Skip to content

Commit

Permalink
Release 4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Nov 10, 2021
2 parents c9ce0aa + 32924db commit 281823e
Show file tree
Hide file tree
Showing 60 changed files with 1,065 additions and 1,175 deletions.
2 changes: 1 addition & 1 deletion artifacts/config_files/Skills.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TagSkillBonus=20
;Set to 3 to use both modes
TagSkillMode=0

;Set to 1 to base skill costs on spent points instead of current level
;Set to 1 to base skill costs on the number of additional points in a skill instead of the current level
BasedOnPoints=0

;Examples
Expand Down
135 changes: 73 additions & 62 deletions artifacts/ddraw.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.3.1
;v4.3.2

[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
Expand All @@ -26,7 +26,7 @@ UseCommandLine=0

;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Speed]
;Set to 0 to disable everything in this section
;Set to 1 to enable options related to the game speed adjustment (SpeedMulti#, SpeedKey#, SpeedModKey, and SpeedToggleKey)
Enable=1

;The speeds corresponding to each slot in percent. (i.e. 100 is normal speed)
Expand Down Expand Up @@ -372,7 +372,7 @@ ViewYPos=-1
;Set to 1 to force Fallout not to use multiple processor cores even if they are available
SingleCore=1

;Set to 1 to override the art_chache_size setting in fallout2.cfg
;Set to 1 to override the art_cache_size setting in fallout2.cfg
OverrideArtCacheSize=0

;Prevents you from saving in combat except at the start of your turn to avoid a few bugs
Expand All @@ -384,7 +384,7 @@ SaveInCombatFix=1
;Player's level is capped once the highest specified level is reached
;XPTable=50,100,200

;Set to 1 to enable additional weapon animation codes from o to t
;Set to 1 to enable additional weapon animation codes from 'o' to 't'
;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10
;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corresponds to 's' and 15 to 't'
AdditionalWeaponAnims=1
Expand Down Expand Up @@ -443,16 +443,6 @@ SkipOpeningMovies=0
;Set to 0 to disable
NPCsTryToSpendExtraAP=0

;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
;Note that enabling this option can affect the weapon of choice for some NPCs
AIBestWeaponFix=1

;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0

;Allows the use of tiles over 80x36 in size. sfall will just split and resave them to art\tiles\zzz####.frm at startup
;Set to 1 to check all tiles on started (slow, but can also be useful for checking the correct size of your new tiles)
;Set to 2 if you provide a XLtiles.lst file in art\tiles\ containing a list of the tile indexes that need checking
Expand Down Expand Up @@ -569,7 +559,7 @@ BoostScriptDialogLimit=0
;Add 4 to the mode to limit the weight check to used items only
;You can use message number 542/543 in proto.msg and message number 35 in inventry.msg to set up custom messages for item size
CritterInvSizeLimitMode=0
CritterInvSizeLimit=100
CritterInvSizeLimit=200

;Some bit flags to alter behaviour of the motion sensor
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
Expand Down Expand Up @@ -598,32 +588,6 @@ SuperStimExploitFix=0
InventoryApCost=4
QuickPocketsApCostReduction=2

;Set to 1 to fix obj_can_see_obj script function to allow critters to see through objects with 'ShootThru' flag set and other critters in front of them
;Note that enabling this option can cause unexpected NPC behavior in some cases, e.g. initiating combat or dialogue when the player is behind certain obstacles
ObjCanSeeObj_ShootThru_Fix=0

;Set to 1 to fix the broken obj_can_hear_obj script function
ObjCanHearObjFix=0

;Set to 1 to enable the 'mood' argument of start_gdialog script function for talking heads
;If the argument value is -1, the mood will be determined by the local variable 0 of the script (vanilla behavior)
StartGDialogFix=0

;Set to 1 to fix attacker_results/target_results arguments and repurpose the unused called_shot/num_attacks arguments of attack_complex script function
;New behavior of the arguments:
;called_shot - additional damage when hitting the target
;num_attacks - the number of free action points on the first turn only
AttackComplexFix=0

;Set to 1 to make the create_object_sid script function run the 'start' procedure of attached script upon object creation
;By default, the 'start' procedure of attached script is executed after the current script procedure is finished
;Note that enabling this option may cause unexpected results with some existing game scripts
CreateObjectSidFix=0

;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
;Note: To perform the unsigned integer division, use the new 'div' operator
DivisionOperatorFix=1

;Set to 1 to enable the balanced bullet distribution formula for burst attacks
ComputeSprayMod=0

Expand Down Expand Up @@ -657,7 +621,9 @@ ExplosionsEmitLight=0
;Set to 0 for backward compatibility with pre-3.4 scripts
ArraysBehavior=1

;Set to 1 to add proper checks to see if there is enough ammo to attack with weapons that use multiple ammo per shot
;Set to 1 to add proper check for ammo before attacking and proper calculation of the number of burst rounds
;By default, weapons can make attacks when at least one ammo is left, regardless of ammo cost calculations
;Note that enabling this option will prevent super cattle prods and mega power fists from attacking with only one ammo left
CheckWeaponAmmoCost=0

;Controls the speed of combat panel animations (lower - faster; valid range: 0..65535)
Expand Down Expand Up @@ -687,7 +653,7 @@ EnableMusicInDialogue=0
DontTurnOffSneakIfYouRun=0

;Changes the distance at which the player will switch to walking when trying to use objects (valid range: 0..3)
;Set to 0 to disable switching. (Default is 3)
;Default is 3. Set to 0 to disable switching
UseWalkDistance=3

;Changes the displayed message when you recover from the negative effects of radiation exposure
Expand All @@ -700,14 +666,6 @@ ActiveGeigerMsgs=1
;Set to 1 to fix the bug of being unable to sell used geiger counters or stealth boys
CanSellUsedGeiger=1

;Set to 1 to fix the issue with being able to charge the car by using cells on other scenery/critters
;Set to 0 if another mod you're using has custom vehicles
CarChargingFix=1

;Set to 1 to prevent the car from being lost when entering a location via the Town/World button and then leaving on foot
;Note that the global variable 633 (GVAR_CAR_PLACED_TILE) will be set to -1 when the player leaves a location
CarPlacedTileFix=1

;Set to 1 to skip weapon equip/unequip animations when performing various actions
InstantWeaponEquip=0

Expand Down Expand Up @@ -737,17 +695,77 @@ DisplaySwiftLearnerExp=1
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
PartyMemberExtraInfo=0

;Set to 1 to skip loading all game settings except the game/combat difficulty from saved games
;Set to 2 to also skip loading the game/combat difficulty settings
SkipLoadingGameSettings=0

;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35

;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0

;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Critical modding options - the following options should be changed with caution
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

;Set to 1 to fix the issue with being able to charge the car by using cells on other scenery/critters
;Set to 0 if another mod you're using has custom vehicles
CarChargingFix=1

;Set to 1 to prevent the car from being lost when entering a location via the Town/World button and then leaving on foot
;Note that the global variable 633 (GVAR_CAR_PLACED_TILE) will be set to -1 when the player leaves a location
CarPlacedTileFix=1

;Set to 1 to fix obj_can_see_obj script function to allow critters to see through objects with 'ShootThru' flag set and other critters in front of them
;Note that enabling this option can cause unexpected NPC behavior in some cases, e.g. initiating combat or dialogue when the player is behind certain obstacles
ObjCanSeeObj_ShootThru_Fix=0

;Set to 1 to fix the broken obj_can_hear_obj script function
ObjCanHearObjFix=0

;Set to 1 to enable the 'mood' argument of start_gdialog script function for talking heads
;If the argument value is -1, the mood will be determined by the local variable 0 of the script (vanilla behavior)
StartGDialogFix=0

;Set to 1 to fix attacker_results/target_results arguments and repurpose the unused called_shot/num_attacks arguments of attack_complex script function
;New behavior of the arguments:
;called_shot - additional damage when hitting the target
;num_attacks - the number of free action points on the first turn only
AttackComplexFix=0

;Set to 1 to make the create_object_sid script function run the 'start' procedure of attached script upon object creation
;By default, the 'start' procedure of attached script is executed after the current script procedure is finished
;Note that enabling this option may cause unexpected results with some existing game scripts
CreateObjectSidFix=0

;Set to 1 to fix the execution of the 'use_p_proc' procedure for grave type containers when they are in the open state
;By default, using open graves does not run the 'use_p_proc' procedure of attached script like other containers
;Note that enabling this option will cause problems for existing grave scripts
GraveContainersFix=0

;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
;Note: To perform the unsigned integer division, use the new 'div' operator
DivisionOperatorFix=1

;Set to 1 to fix the priority score calculation for choosing the best weapon for NPCs
;Note that enabling this option can affect the weapon of choice for some NPCs
AIBestWeaponFix=1

;Set to 1 to fix NPCs not taking chem_primary_desire in AI.txt as a preference list when using drugs in their inventory
;Set to 2 to allow NPCs to use only the drugs listed in chem_primary_desire and healing drugs (stimpaks and healing powder)
;Note: chem_primary_desire w/o fixes prevents the specified item PID from being consumed if all three values in the list are the same PID
;chem_primary_desire also works as a priority list of drug items the NPC will try to pick up in combat when they are on the ground
AIDrugUsePerfFix=0

;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player
;This will cause the party member to apply his/her skills when you use First Aid/Doctor skills on the player, but only if
;the player is standing next to the party member
;Note that because the related engine function is not fully implemented, enabling this option without a global script
;that overrides First Aid/Doctor functions has very limited usefulness
PartyMemberSkillFix=0

;Set to 1 to skip loading all game settings except the game/combat difficulty from saved games
;Set to 2 to also skip loading the game/combat difficulty settings
SkipLoadingGameSettings=0

;Overrides the global variable number used to show the special death message of the Modoc toilet explosion
;Set to -1 to disable the special death message when the global variable is set
SpecialDeathGVAR=491
Expand All @@ -761,13 +779,6 @@ DisableSpecialMapIDs=0
;Note that enabling this option will break the location change of the 'Fake Vault 13' in Fallout 2
DisableSpecialAreas=0

;Changes the base value of the duration of the knockout effect (valid range: 35..100; default is 35)
;The formula for the duration in ticks is: 10 * (value - 3 * EN)
KnockoutTime=35

;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
CreditsAtBottom=0

;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; Configuration ini files
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand Down
2 changes: 1 addition & 1 deletion artifacts/scripting/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ For those who used arrays in their mods before sfall 3.4:

* There is an INI parameter **arraysBehavior** in **Misc** section of ddraw.ini. If set to 0, all scripts which used sfall arrays before should work. This basically changes that `create_array` will create permanent arrays which are "saved" by default and their ID is also permanent. It is 1 by default.

* How savegame compatibility is handled?<br>
* How savegame compatibility is handled?\
Saved arrays are stored in **sfallgv.sav** file (in savegame) in new (more flexible) format, just after the old arrays. So basically, when you load older savegame, sfall will load arrays from old format and save them to new format on next game save. If you load savegame made with sfall 3.4 using sfall 3.3 (for example), game shouldn't crash, but all arrays will be lost.

* Previously you had to specify size in bytes for array elements. This parameter is now ignored and you can store strings of arbitrary length in arrays.
25 changes: 13 additions & 12 deletions artifacts/scripting/headers/define_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@
#define WEAPON_TYPE_THROWN (3)
#define WEAPON_TYPE_GUNS (4)

/* Item Common Flags */
#define HIDDEN_ITEM 134217728 // 0x08000000 - Hidden Item
/* Item Flags (FlagsExt in proto) */
#define HEALING_ITEM 0x04000000 // Healing Item (item will be used by NPCs for healing in combat) [sfall 4.3.1/3.8.31]
#define HIDDEN_ITEM 0x08000000 // Hidden Item

#define ITEM_ACTION_USE 2048 // 0x00000800 - Use (can be used)
#define ITEM_ACTION_USEON 4096 // 0x00001000 - Use On Smth (can be used on anything)
#define ITEM_ACTION_PICKUP 32768 // 0x00008000 - PickUp
#define ITEM_ACTION_USE 0x00000800 // Use (can be used)
#define ITEM_ACTION_USEON 0x00001000 // Use On Smth (can be used on anything)
#define ITEM_ACTION_PICKUP 0x00008000 // PickUp

#define WEAPON_BIGGUN 256 // 0x00000100 - Big Gun
#define WEAPON_2HAND 512 // 0x00000200 - 2Hnd (weapon is two-handed)
#define WEAPON_ENERGY 1024 // 0x00000400 - Energy Weapon (forces weapon to use Energy Weapons skill)
#define WEAPON_BIGGUN 0x00000100 // Big Gun
#define WEAPON_2HAND 0x00000200 // 2Hnd (weapon is two-handed)
#define WEAPON_ENERGY 0x00000400 // Energy Weapon (forces weapon to use Energy Weapons skill) [sfall 4.2/3.8.20]

#define ATKMODE_PRI_NONE 0
#define ATKMODE_PRI_PUNCH 1 // 0001
Expand Down Expand Up @@ -84,7 +85,7 @@
#define FLAG_LEFT_HAND (0x1000000)
#define FLAG_RIGHT_HAND (0x2000000)
#define FLAG_WORN (0x4000000)
#define FLAG_HIDDENITEM (0x8000000)
#define FLAG_RESERVED (0x8000000)
#define FLAG_WALLTRANSEND (0x10000000)
#define FLAG_LIGHTTHRU (0x20000000)
#define FLAG_SEEN (0x40000000)
Expand Down Expand Up @@ -120,7 +121,7 @@
#define MSGBOX_YESNO (0x10) // use YES/NO buttons instead of DONE
#define MSGBOX_CLEAN (0x20) // no buttons

//remove inven obj defines for the 4th argument to hs_removeinvobj
// remove inven obj defines for the 4th argument to HOOK_REMOVEINVOBJ
#define RMOBJ_CONSUME_DRUG 4666772 // (inven_action_cursor_)
#define RMOBJ_CONTAINER 4683293 // same as RMOBJ_TRADE (item_move_func_)
#define RMOBJ_USE_OBJ 4666865 // (inven_action_cursor_)
Expand Down Expand Up @@ -368,7 +369,7 @@
#define ai_run_away_never (7)

// AI disposition values
#define ai_disposition_none (-1)
#define ai_disposition_none (-1)
#define ai_disposition_custom (0)
#define ai_disposition_coward (1)
#define ai_disposition_defensive (2)
Expand Down Expand Up @@ -406,7 +407,7 @@
#define OBJ_DATA_CUR_FRM (0x18) // current frame number
#define OBJ_DATA_ROTATION (0x1C)
#define OBJ_DATA_FID (0x20)
//#define OBJ_DATA_FLAGS (0x24) // the same flags set in prototypes (PROTO_FLAG)
#define OBJ_DATA_FLAGS (0x24) // the same flags set in prototypes (PROTO_FLAG)
#define OBJ_DATA_ELEVATION (0x28)
#define OBJ_DATA_MISC_FLAGS (0x38)
#define OBJ_DATA_PID (0x64)
Expand Down
4 changes: 2 additions & 2 deletions artifacts/scripting/hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@
id: HOOK_AMMOCOST
doc: |
Runs when calculating ammo cost for a weapon. Doesn't affect damage, only how much ammo is spent.
By default, weapon will shoot when at least 1 round is left, regardless of ammo cost calculations.
To add proper check for ammo before shooting and proper calculation of number of burst rounds (hook type 1 and 2 in arg3), set **CheckWeaponAmmoCost=1** in **Misc** section of ddraw.ini.
By default, weapons can make attacks when at least 1 ammo is left, regardless of ammo cost calculations.
To add proper check for ammo before attacking and proper calculation of the number of burst rounds (hook type 1 and 2 in arg3), set **CheckWeaponAmmoCost=1** in **Misc** section of ddraw.ini.
```
Item arg0 - The weapon
Expand Down
Loading

0 comments on commit 281823e

Please sign in to comment.