Woah, thanks so much!
Thanks for the updates!
BTW, the description related to inventory limit mode in ddraw.ini says:
";Add 8 to use the critters extra unused stat instead of for CritterInvSizeLimit for critters other than dude_obj"
But any number of CritterInvSizeLimitMode greater than 7 will be set to 0 in InventoryInit, or do I misunderstand something?
;These options modify the checks to see if a critter can carry an additional item, changing which items are counted towards the weight limit and adding an additional size check
;Set the mode to 0 to disable the size check, 1 to apply to pc only, 2 to apply to the pc and party members, or 3 to apply to all critters
;Only the PC uses CritterInvSizeLimit. Other critters will use the extra unused stat (STAT_unused = 10)
;Add 4 to the mode to limit the weight check to used items only
Like trying to put a 500 lb item from inventory on active slots in Mode 4?I'm not actually sure what'll happen if you use this new option and try to move an item from your inventory to your hands when it would take you over the weight limit... Probably should have checked that. >.>
I've updated the modders pack with the new compiler. novarain seems to have already taken care of the dll.When can we expect the next version? As I understand, I need new version of script compiler with new function supported, right?
Shame. I would have expected it to block you from running and picking more stuff up, if not to actually stop you putting it in your hands. Looks like I have a bit more work to do there. :pLike trying to put a 500 lb item from inventory on active slots in Mode 4?
Just did the test. With a 1000 lb Assault Rifle in my hands (Total WT displayed in red), I can still run around like nothing and shoot people, plus pick up stuff on the ground.
Now it's actually more like an unlimited carry weight cheat.
Like trying to put a 500 lb item from inventory on active slots in Mode 4?I'm not actually sure what'll happen if you use this new option and try to move an item from your inventory to your hands when it would take you over the weight limit... Probably should have checked that. >.>
Just did the test. With a 1000 lb Assault Rifle in my hands (Total WT displayed in red), I can still run around like nothing and shoot people, plus pick up stuff on the ground.
Now it's actually more like an unlimited carry weight cheat.
Sorry, I don't get it. In my test I don't seem to have any penalty.Just for what it's worth: I was hoping it'd work this way. Just wanted to introduce movement/AP/THC penalties; not make it impossible. It's just nice that it's now obvious why you're getting the penalties.
Sorry, I don't get it. In my test I don't seem to have any penalty.Just for what it's worth: I was hoping it'd work this way. Just wanted to introduce movement/AP/THC penalties; not make it impossible. It's just nice that it's now obvious why you're getting the penalties.
Do you mean with your upcoming mod and mode 4 setting, I'll get the movement penalty even not in the combat?
arr := [1, 2, 3, 6, 8];
arr := temp_array(4, 5);
arr[0] := 1;
arr[1] := 2;
arr[2] := 3;
arr[3] := 6;
arr[4] := 8;
procedure aaabbb(...) begin
display_str("Arguments: "+arg[0]+", "+arg[1];
end
// Jim's Formula
static __declspec(naked) void DamageFunction6() {
__asm {
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDivisor; // Retrieve Ammo Divisor
imul ebp,eax; // Ammo Divisor = 1 * Ammo Divisor (ebp set to 1 earlier in function)
mov ebx,dword ptr ss:[esp+0x1c]; // Get number of hits
xor ecx,ecx; // Set loop counter to zero
test ebx,ebx; // Is number of hits smaller than= 0?
jle end; // If yes, jump beyond damage calculation loop
ajmp: // Start of damage calculation loop
mov edx,dword ptr ds:[esi+0x4]; // Get pointer to weapon (?)
mov eax,dword ptr ds:[esi]; // Get pointer to critter (?)
mov ebx,dword ptr ss:[esp+0x18]; // Get Bonus Ranged Damage
call DamageFunctionSub1; // Retrieve Raw Damage
add ebx,eax; // Raw Damage = Raw Damage + Bonus Ranged Damage
mov edx,dword ptr ss:[esp+0x28]; // Get armor DT
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDTMod; // Retrieve ammo AM (Armor Modifier: adds or removes a percentage of the DT and DR)
cmp edx,eax; // is ammo DT bigger than AM
jge ijmp; // If yes, go to end of calc because threshold not met
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDividend; // Retrieve Ammo Dividend
imul ebx,eax; // Raw Damage = Raw Damage * Ammo Dividend
test ebp,ebp; // Is Ammo Divisor == 0?
je djmp; // If yes, avoid divide by zero error
mov edx,ebx;
mov eax,ebx;
sar edx,0x1f;
idiv ebp;
mov ebx,eax; // Otherwise, Raw Damage = Raw Damage / Ammo Divisor
djmp:
mov edx,dword ptr ss:[esp+0x2c]; // Get armor DR
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDTMod; // Retrieve ammo AM
imul edx,eax; // DR modifier = armor DR * ammo AM
mov dword ptr ss:[esp+0x30],0x64; //sets some variable to 100
mov eax,edx; //(not sure if I have to do this, but Haen does it)
sar edx,0x1f; // makes DR modifier the dividend
idiv dword ptr ss:[esp+0x30]; // DR modifier = DR modifier / 100
mov edx,dword ptr ss:[esp+0x2c]; // Get armor DR
sub edx,eax; // DR = DR - DR modifier (can be negative)
test edx,edx; // Is DR >= 0?
jge gjmp;
xor edx,edx; // If no, set DR = 0
jmp hjmp;
gjmp:
cmp edx,0x64; // Otherwise, is DR bigger than or equal to 100?
jge ijmp; // If yes, damage will be zero, so stop calculating and go to bottom of loop
hjmp:
imul edx,ebx; // Otherwise, Resisted Damage = DR * Raw Damage
mov dword ptr ss:[esp+0x30],0x64;
mov eax,edx;
sar edx,0x1f;
idiv dword ptr ss:[esp+0x30]; // Resisted Damage = Resisted Damage / 100
sub ebx,eax; // Raw Damage = Raw Damage - Resisted Damage
test ebx,ebx; // Is Raw Damage smaller than 0?
jle ijmp; // If yes, don't accumulate damage
add dword ptr ds:[edi],ebx; // Otherwise, Accumulated Damage = Accumulated Damage + Raw Damage
ijmp:
mov eax,dword ptr ss:[esp+0x1c]; // Get number of hits
inc ecx; // counter += 1
cmp ecx,eax; // Is counter smaller than number of hits?
jl ajmp; // If yes, go back to start of damage calcuation loop (calculate damage for next hit)
end:
jmp DamageFunctionReturn; // Otherwise, exit loop
}
}
foreach crit in list_as_array(LIST_CRITTERS) begin
...
end
foreach crit in list_as_array(LIST_CRITTERS) if (crit) then begin
...
end
// Jim's Formula
static __declspec(naked) void DamageFunction5() {
__asm {
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDivisor; // Retrieve Ammo Divisor
imul ebp,eax; // Ammo Divisor = 1 * Ammo Divisor (ebp set to 1 earlier in function)
mov ebx,dword ptr ss:[esp+0x1c]; // Get number of hits
xor ecx,ecx; // Set loop counter to zero
test ebx,ebx; // Is number of hits smaller than= 0?
jle end; // If yes, jump beyond damage calculation loop
ajmp: // Start of damage calculation loop
mov edx,dword ptr ds:[esi+0x4]; // Get pointer to weapon (?)
mov eax,dword ptr ds:[esi]; // Get pointer to critter (?)
call DamageFunctionSub1; // Retrieve Raw Damage
mov ebx,eax; // Move Raw Damage to ebx
mov edx,dword ptr ss:[esp+0x28]; // Get armor DT
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDTMod; // Retrieve ammo AM (Armor Modifier: adds or removes a percentage of the DT and DR)
cmp edx,eax; // is ammo DT bigger than AM
jge ijmp; // If yes, go to end of calc because threshold not met
mov edx,dword ptr ss:[esp+0x2c]; // Get armor DR
mov eax,dword ptr ds:[esi+0x8]; // Get pointer to critter's weapon
call GetAmmoDTMod; // Retrieve ammo AM
imul edx,eax; // DR modifier = armor DR * ammo AM
mov dword ptr ss:[esp+0x30],0x64; //sets some variable to 100
mov eax,edx; //(not sure if I have to do this, but Haen does it)
sar edx,0x1f; // makes DR modifier the dividend
idiv dword ptr ss:[esp+0x30]; // DR modifier = DR modifier / 100
mov edx,dword ptr ss:[esp+0x2c]; // Get armor DR
sub edx,eax; // DR = DR - DR modifier (can be negative)
test edx,edx; // Is DR >= 0?
jge gjmp;
xor edx,edx; // If no, set DR = 0
jmp hjmp;
gjmp:
cmp edx,0x64; // Otherwise, is DR bigger than or equal to 100?
jge ijmp; // If yes, damage will be zero, so stop calculating and go to bottom of loop
hjmp:
imul edx,ebx; // Otherwise, Resisted Damage = DR * Raw Damage
mov dword ptr ss:[esp+0x30],0x64;
mov eax,edx;
sar edx,0x1f;
idiv dword ptr ss:[esp+0x30]; // Resisted Damage = Resisted Damage / 100
sub ebx,eax; // Raw Damage = Raw Damage - Resisted Damage
test ebx,ebx; // Is Raw Damage smaller than 0?
jle ijmp; // If yes, don't accumulate damage
add dword ptr ds:[edi],ebx; // Otherwise, Accumulated Damage = Accumulated Damage + Raw Damage
ijmp:
mov eax,dword ptr ss:[esp+0x1c]; // Get number of hits
inc ecx; // counter += 1
cmp ecx,eax; // Is counter smaller than number of hits?
jl ajmp; // If yes, go back to start of damage calcuation loop (calculate damage for next hit)
end:
jmp DamageFunctionReturn; // Otherwise, exit loop
}
}
;Choose the damage formula used to calculate combat damage.
;Don't set this to anything other than 0 unless another mod you're using explicitly tells you to!
;0 - Fallout default
;1 - Glovz's Damage Fix
;2 - Glovz's Damage Fix with Damage Multiplier tweak
;4 - Jim's Formula
;5 - Haenlomal's Yet Another Ammo Mod.
DamageFormula=0