Updated Ammo INI Loader example script mod

Updated version number.
This commit is contained in:
NovaRain
2022-03-15 13:02:33 +08:00
parent 8d6e6874ee
commit e566db91bb
6 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -32,4 +32,4 @@ DoneBtn=Done
;PowerKick=Power Kick: ;PowerKick=Power Kick:
;HipKick=Hip Kick: ;HipKick=Hip Kick:
;HookKick=Hook Kick: ;HookKick=Hook Kick:
;PiercingKick=Piercing kick: ;PiercingKick=Piercing Kick:
Binary file not shown.
+12 -12
View File
@@ -1,14 +1,14 @@
/* /*
Ammo INI Loader mod for Fallout 2 by NovaRain Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
--------------------------------------------- --------------------------------------------------
- modifies ammo protos with data from an INI file: - modifies ammo protos with data from an INI file:
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini * AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
* AmmoYAAM.ini if DamageFormula=5 in ddraw.ini * AmmoYAAM.ini if DamageFormula=5 in ddraw.ini
* AmmoMod.ini if not using any bulit-in damage formula * AmmoMod.ini if not using any bulit-in damage formula
Requires sfall 3.5 or higher Requires sfall 4.0/3.8.29 or higher
*/ */
@@ -23,7 +23,7 @@ variable ammoData;
variable enabled; variable enabled;
procedure start begin procedure start begin
variable i := 1, ammo, ammoPid, dmgMod; variable i := 1, ammo, ammoSection, dmgMod;
if game_loaded then begin if game_loaded then begin
enabled := get_ini_setting("ddraw.ini|Misc|DamageFormula"); enabled := get_ini_setting("ddraw.ini|Misc|DamageFormula");
if (enabled == 1 or enabled == 2) then if (enabled == 1 or enabled == 2) then
@@ -37,19 +37,19 @@ procedure start begin
if (enabled <= 0) then return; if (enabled <= 0) then return;
ammoData := create_array_map; ammoData := create_array_map;
ammoPid := enabled; // pid from the first section ammoSection := get_ini_section(ammoIni, "" + i);
while (ammoPid > 0) do begin while (ammoSection.pid > 0) do begin
ammo := create_array_map; // create permanent arrays ammo := create_array_map; // create permanent arrays
ammo.ac_adjust := get_ini_setting(ammoIni + "|" + i + "|ac_adjust"); ammo.ac_adjust := atoi(ammoSection.ac_adjust);
ammo.dr_adjust := get_ini_setting(ammoIni + "|" + i + "|dr_adjust"); ammo.dr_adjust := atoi(ammoSection.dr_adjust);
// dam_mult and dam_div must be positive integers // dam_mult and dam_div must be positive integers
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_mult"); dmgMod := atoi(ammoSection.dam_mult);
ammo.dam_mult := dmgMod if (dmgMod > 0) else 1; ammo.dam_mult := dmgMod if (dmgMod > 0) else 1;
dmgMod := get_ini_setting(ammoIni + "|" + i + "|dam_div"); dmgMod := atoi(ammoSection.dam_div);
ammo.dam_div := dmgMod if (dmgMod > 0) else 1; ammo.dam_div := dmgMod if (dmgMod > 0) else 1;
ammoData[ammoPid] := ammo; ammoData[atoi(ammoSection.pid)] := ammo;
i++; i++;
ammoPid := get_ini_setting(ammoIni + "|" + i + "|pid"); ammoSection := get_ini_section(ammoIni, "" + i);
end end
call map_enter_p_proc; call map_enter_p_proc;
debug_msg("Ammo INI Loader mod: " + ammoIni + " - set " + (i - 1) + " ammo protos."); debug_msg("Ammo INI Loader mod: " + ammoIni + " - set " + (i - 1) + " ammo protos.");
+3 -3
View File
@@ -1,5 +1,5 @@
Ammo INI Loader mod for Fallout 2 by NovaRain Ammo INI Loader mod v1.1 for Fallout 2 by NovaRain
--------------------------------------------- --------------------------------------------------
- modifies ammo protos with data from an INI file: - modifies ammo protos with data from an INI file:
* AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini * AmmoGlovz.ini if DamageFormula=1 or 2 in ddraw.ini
@@ -7,6 +7,6 @@ Ammo INI Loader mod for Fallout 2 by NovaRain
* AmmoMod.ini if not using any bulit-in damage formula * AmmoMod.ini if not using any bulit-in damage formula
Requires sfall 3.5 or higher. Requires sfall 4.0/3.8.29 or higher.
To use, copy gl_ammomod.int to your scripts folder, and copy the INI files to the same directory as sfall. To use, copy gl_ammomod.int to your scripts folder, and copy the INI files to the same directory as sfall.
+3 -3
View File
@@ -16,10 +16,10 @@ This folder contains documentation about sfall scripting extensions.
lib.strings.h - search in strings, join, repeat, etc. lib.strings.h - search in strings, join, repeat, etc.
lib.misc.h - misc stuff lib.misc.h - misc stuff
sfall function notes.txt - incomplete reference for new opcodes sfall function notes.html - incomplete reference for new opcodes
sfall opcode list.txt - list of all sfall opcodes (w/o descriptions) sfall opcode list.txt - list of all sfall opcodes (w/o descriptions)
hookscripts.txt - detailed manual for using hook scripts to modify engine behavior hookscripts.html - detailed manual for using hook scripts to modify engine behavior
arrays.txt - manual for sfall arrays arrays.html - manual for sfall arrays
If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in .\compiler\sslc_readme.txt. If you are/will be using sfall Script Editor, don't forget to check out new compiler documentation in .\compiler\sslc_readme.txt.
There are numerious new syntax features and extensions to SSL (Star-Trek Scripting language). There are numerious new syntax features and extensions to SSL (Star-Trek Scripting language).
+2 -2
View File
@@ -25,6 +25,6 @@
#define VERSION_MAJOR 3 #define VERSION_MAJOR 3
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_BUILD 33 #define VERSION_BUILD 33
#define VERSION_REV 1 #define VERSION_REV 2
#define VERSION_STRING "3.8.33.1" #define VERSION_STRING "3.8.33.2"