mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c14d5dd57 | ||
|
|
e7d03fc60a | ||
|
|
61615930b6 | ||
|
|
62e5559aea | ||
|
|
50c91db5ea | ||
|
|
b1624e5acf | ||
|
|
024b1dbf6f | ||
|
|
659da227f4 | ||
|
|
b48549b524 | ||
|
|
bf61051887 | ||
|
|
158234438b | ||
|
|
eb4998ced6 | ||
|
|
9631e08db4 | ||
|
|
52072e29c0 | ||
|
|
28c18c1925 | ||
|
|
77349cbaec | ||
|
|
85845a2d80 | ||
|
|
d8e2e6f1ca | ||
|
|
dd00e130a9 | ||
|
|
6cb8700df5 | ||
|
|
ec0baf3065 | ||
|
|
5265100425 | ||
|
|
c095e54b62 | ||
|
|
229a5516e0 | ||
|
|
f056c53739 | ||
|
|
cb84700bfc | ||
|
|
0f722a50fd | ||
|
|
6b7a10130d | ||
|
|
061302585b | ||
|
|
c3acd1af3e | ||
|
|
411c0a6e98 | ||
|
|
4cc1235dbc | ||
|
|
bf70cadc02 | ||
|
|
70a742db81 | ||
|
|
00d4e188d6 | ||
|
|
a30464cfae | ||
|
|
38438d1e9c | ||
|
|
94e4a2043a | ||
|
|
42f70f920e | ||
|
|
f56af79c16 | ||
|
|
955733270c | ||
|
|
9804902af6 | ||
|
|
cfb546ce8a | ||
|
|
de2549eeaa | ||
|
|
cc00a2c162 | ||
|
|
16be32d284 | ||
|
|
16f19824d1 | ||
|
|
535b7edc55 | ||
|
|
573e5324f4 | ||
|
|
e17b722f16 | ||
|
|
7a6e15bae1 | ||
|
|
df34f6c994 | ||
|
|
26874a709e | ||
|
|
45724aa6b3 | ||
|
|
b477a43bd0 | ||
|
|
ca86b5f930 | ||
|
|
f05ec714e7 | ||
|
|
3e3f6f92ed | ||
|
|
ad1f08378b | ||
|
|
9be861a84b | ||
|
|
11dfb3e94a | ||
|
|
3668a1c94f | ||
|
|
5cb3ca2a59 | ||
|
|
4ef88959e3 | ||
|
|
4cc9cb0b83 | ||
|
|
363d7a1cc5 | ||
|
|
d9d86e3fe4 | ||
|
|
ce1fd719cf | ||
|
|
1595d75f7c | ||
|
|
6287eefd7c | ||
|
|
3bc84a0040 | ||
|
|
18b34767b6 | ||
|
|
af4bad36d4 | ||
|
|
1a40c40cd3 | ||
|
|
9367139957 | ||
|
|
87f45d26db | ||
|
|
bd2f83d6a8 | ||
|
|
d29b51d5ea | ||
|
|
d276da3d68 | ||
|
|
502897cb6f | ||
|
|
e3739ba7aa | ||
|
|
02beff2b04 | ||
|
|
cf82440753 | ||
|
|
e78e76e35d | ||
|
|
47783c802e | ||
|
|
ce72ef51f8 | ||
|
|
dbc0ebd36f | ||
|
|
db89f5760c | ||
|
|
e864f1f961 | ||
|
|
fafc4a317f | ||
|
|
5d689c0641 | ||
|
|
4a65a6753f | ||
|
|
5dec063c1c | ||
|
|
dbdf414cd9 | ||
|
|
3e2a22fad8 | ||
|
|
13ee06dee2 | ||
|
|
2d3031e583 | ||
|
|
de5c12484d | ||
|
|
c880ae93a9 | ||
|
|
295a5d1437 | ||
|
|
e726ee54ba | ||
|
|
712eafc241 | ||
|
|
d1bf22ec8d | ||
|
|
21d496f392 | ||
|
|
07948206fb | ||
|
|
6a71bf086d | ||
|
|
ec585529c8 | ||
|
|
e6aad27e44 | ||
|
|
f0528740a4 | ||
|
|
bfd8b38547 | ||
|
|
e6086f984e | ||
|
|
2e766cd3c9 | ||
|
|
48f53388fd | ||
|
|
6199f95c38 | ||
|
|
a6d84bd470 | ||
|
|
a11228a5ec | ||
|
|
7784e199af | ||
|
|
53895a4af2 | ||
|
|
354b938d60 | ||
|
|
643d8d3886 | ||
|
|
924c35d011 | ||
|
|
86163bf94c | ||
|
|
21b2d34432 | ||
|
|
98508a9c76 | ||
|
|
f8b232cc09 | ||
|
|
394b4b9967 | ||
|
|
1bea84eb3c | ||
|
|
26159138e0 | ||
|
|
1883009930 | ||
|
|
f1289c1e7d | ||
|
|
c3e4894243 | ||
|
|
2330dd97bb | ||
|
|
90b718122d | ||
|
|
5ca7ed0dc5 | ||
|
|
9bd03bfb76 | ||
|
|
07b7e270b8 | ||
|
|
f9dbbcdca2 | ||
|
|
fcdb5633d4 | ||
|
|
4e2bfd6b08 | ||
|
|
8c0fab1f6b | ||
|
|
05f15f0262 | ||
|
|
147cb50a66 | ||
|
|
b8968c5334 | ||
|
|
4f6b68ca93 | ||
|
|
0ff6157b42 | ||
|
|
2bbb92420f | ||
|
|
4678f41b5a | ||
|
|
7439ba2634 | ||
|
|
4c047bf8a3 | ||
|
|
694b699f15 | ||
|
|
25b408816a | ||
|
|
b819423d2a | ||
|
|
720f937b4f | ||
|
|
25094253e5 | ||
|
|
bdffc061d3 | ||
|
|
dfe4b6b2e0 | ||
|
|
972d978882 | ||
|
|
e99cca2b87 | ||
|
|
108719ac83 | ||
|
|
6feda61424 | ||
|
|
19c94b8513 | ||
|
|
af7b5cbb6b | ||
|
|
56009e1634 | ||
|
|
7bd3bd4128 | ||
|
|
696be7fac5 | ||
|
|
66dd966d8a | ||
|
|
8ce9ae89eb | ||
|
|
361e961b38 | ||
|
|
f8c1bf1ebb | ||
|
|
748cbb030a | ||
|
|
473fbf81b4 | ||
|
|
225f36808d | ||
|
|
879315b4d0 | ||
|
|
971be61d95 |
+105
-87
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v3.7
|
||||
;v3.8.3
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -48,26 +48,26 @@ SpeedMultiInitial=100
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Graphics]
|
||||
;Set to 0 for 8 bit fullscreen
|
||||
;Set to 4 for dx9 fullscreen
|
||||
;Set to 5 for dx9 windowed
|
||||
;A dx9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
|
||||
;Set to 4 for DX9 fullscreen
|
||||
;Set to 5 for DX9 windowed
|
||||
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
|
||||
;Modes 1, 2 and 3 are no longer supported
|
||||
Mode=0
|
||||
|
||||
;If using a dx9 mode, this changes the resolution
|
||||
;If using a DX9 mode, this changes the resolution
|
||||
;The graphics are simply stretched to fit the new window; this does _not_ let you see more of the map
|
||||
;If set to 0, use Fallout's native resolution
|
||||
GraphicsWidth=0
|
||||
GraphicsHeight=0
|
||||
|
||||
;Set to 1 to do the palette conversion on the gpu
|
||||
;Set to 2 to do the palette conversion on the cpu
|
||||
;Set to 1 to do the palette conversion on the GPU
|
||||
;Set to 2 to do the palette conversion on the CPU
|
||||
;Set to 0 to pick automatically
|
||||
;GPU is faster, but requires v2.0 pixel shader support
|
||||
GPUBlt=0
|
||||
|
||||
;Set to 1 to allow using 32 bit graphics for talking heads
|
||||
;Requires graphics mode 4 or 5, and gpublt set to 1
|
||||
;Requires graphics mode 4 or 5, and GPUBlt set to 1
|
||||
Use32BitHeadGraphics=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
@@ -164,24 +164,10 @@ WorldMapFPSPatch=1
|
||||
;Controls the world map speed if WorldMapFPSPatch is 1. Higher values cause slower movement
|
||||
WorldMapDelay2=66
|
||||
|
||||
;XX OBSOLETE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
;XX
|
||||
;XX ;This will change the physical speed at which you move across the map
|
||||
;XX ;Set to 0 to leave at the default. (i.e. limited by vwait in windowed mode, or by processor speed in fullscreen)
|
||||
;XX ;If set to something other than 0, it enforces a maximum fps on the world map screen.
|
||||
;XX ;Changing this to something other than 0 is not recommended if you've already applied a world map speed patch to your Fallout exe.
|
||||
;XX WorldMapFPS=0
|
||||
;XX
|
||||
;XX ;Only set to 1 if your systems high performance timer is unreliable for some reason
|
||||
;XX ForceLowResolutionTimer=0
|
||||
;XX
|
||||
;XX ;Set to 1 to enable Ray's patch to make world map encounter rate independent of your travel speed
|
||||
;XX WorldMapEncounterFix=0
|
||||
;XX WorldMapEncounterRate=6
|
||||
;XX
|
||||
;XX ;Obsolete, but can still be used if you know what it does.
|
||||
;XX ;WorldMapDelay=0
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
;Set to 1 to enable Ray's patch to make world map encounter rate independent of your travel speed
|
||||
;Higher values of WorldMapEncounterRate cause a slower encounter rate
|
||||
WorldMapEncounterFix=0
|
||||
WorldMapEncounterRate=5
|
||||
|
||||
;The number of slots available in the locations list panel of the world map
|
||||
;Set to 0 to leave unchanged. 17 is default.
|
||||
@@ -201,9 +187,14 @@ WorldMapSlots=0
|
||||
;To use a patch file other than patch000.dat, uncomment the next line and add your new file name
|
||||
;If you want to check for multiple patch files, you can include a %d in the file name (sprintf syntax)
|
||||
;By default, only the first patch file found will be used.
|
||||
;If you want to load multiple patch files at once, uncomment the NumberPatchLoop line and set it to the number of files to check for
|
||||
;If you want to load multiple patch files (up to 1000) at once, uncomment the MultiPatches line and set it to 1
|
||||
;PatchFile=patch%03d.dat
|
||||
;NumberPatchLoop=100
|
||||
;MultiPatches=0
|
||||
|
||||
;Set to 1 to enable the modified data load order for the engine to find game data
|
||||
;Original: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat
|
||||
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
DataLoadOrderPatch=0
|
||||
|
||||
;To change the default and starting player models, uncomment the next four lines.
|
||||
;The default models can also be changed ingame via script
|
||||
@@ -233,6 +224,7 @@ Movie16=artimer4.mve
|
||||
Movie17=credits.mve
|
||||
|
||||
;To change the starting year, month or day, uncomment the next 3 lines
|
||||
;Both StartMonth and StartDay are 0-indexed
|
||||
;StartYear=-1
|
||||
;StartMonth=-1
|
||||
;StartDay=-1
|
||||
@@ -247,11 +239,12 @@ Movie17=credits.mve
|
||||
;PerksFile=Perks.ini
|
||||
|
||||
;Set to 1 if you want the pipboy to be available at the start of the game
|
||||
;Set to 2 to make the pipboy available by only skipping the vault suit movie check
|
||||
PipBoyAvailableAtGameStart=0
|
||||
|
||||
;Set to 1 to double the number of available kill types
|
||||
;If you use this, you need to provide the extra descriptions in proto.msg (entries from 1450 to 1487 are names and 1488 to 1525 are descriptions)
|
||||
;Changing this option mid game will not invalidate old save games, but the players kill counters will be completely screwed.
|
||||
;Changing this option mid game will not invalidate old save games, but the player's kill counters will be completely screwed.
|
||||
;Setting this to 1 may cause problems if the player kills more than 32767 of any one critter type
|
||||
;Additional kill types must have their new critical tables set! (See the OverrideCriticalTable option)
|
||||
ExtraKillTypes=0
|
||||
@@ -267,11 +260,14 @@ DamageFormula=0
|
||||
;Prevents you from using 0 to escape from dialogue at any time.
|
||||
DialogueFix=1
|
||||
|
||||
;Prevents you from using number keys to enter unvisited areas on a town map
|
||||
TownMapHotkeysFix=1
|
||||
|
||||
;Set to 1 to disable the horrigan encounter
|
||||
DisableHorrigan=0
|
||||
|
||||
;Set to 1 to disable the random element in npc levelling.
|
||||
;This will cause all npc party members to automatically level up as soon as the player reaches the requirements
|
||||
;Set to 1 to disable the random element in NPC levelling.
|
||||
;This will cause all NPC party members to automatically level up as soon as the player reaches the requirements
|
||||
NPCAutoLevel=0
|
||||
|
||||
;Change the initial starting location and world map viewport
|
||||
@@ -287,9 +283,6 @@ SingleCore=1
|
||||
;Set to 1 to override the art_chache_size setting in fallout2.cfg
|
||||
OverrideArtCacheSize=0
|
||||
|
||||
;Set to 1 to fix issues with the GainXXX perks not giving all the bonuses that they should
|
||||
GainStatPerkFix=1
|
||||
|
||||
;Prevents you from saving in combat except at the start of your turn to avoid a few bugs
|
||||
;Note that even with this option enabled, it is still not advisable to save in combat at all.
|
||||
;Set to 2 to block all saving in combat
|
||||
@@ -298,8 +291,8 @@ SaveInCombatFix=1
|
||||
;Point at an ini file containing elevator data
|
||||
;ElevatorsFile=Elevators.ini
|
||||
|
||||
;Uncomment and set to a comma delimited list of numbers to use a custom xp table.
|
||||
;Players level is capped once the highest specified level is reached
|
||||
;Uncomment and set a comma delimited list of numbers to use a custom xp table.
|
||||
;Player's level is capped once the highest specified level is reached
|
||||
;XPTable=50,100,200
|
||||
|
||||
;Set to 1 to enable additional weapon animations codes from o-t
|
||||
@@ -308,15 +301,14 @@ SaveInCombatFix=1
|
||||
AdditionalWeaponAnims=1
|
||||
|
||||
;Uncomment these lines to modify the default modifiers for aimed shots at specific bodyparts
|
||||
;BodypartHitMod0=-40
|
||||
;BodypartHitMod1=-30
|
||||
;BodypartHitMod2=-30
|
||||
;BodypartHitMod3=0
|
||||
;BodypartHitMod4=-20
|
||||
;BodypartHitMod5=-20
|
||||
;BodypartHitMod6=-60
|
||||
;BodypartHitMod7=-30
|
||||
;BodypartHitMod8=0
|
||||
;BodyHit_Head=-40
|
||||
;BodyHit_Left_Arm=-30
|
||||
;BodyHit_Right_Arm=-30
|
||||
;BodyHit_Torso_Uncalled=0
|
||||
;BodyHit_Right_Leg=-20
|
||||
;BodyHit_Left_Leg=-20
|
||||
;BodyHit_Eyes=-60
|
||||
;BodyHit_Groin=-30
|
||||
|
||||
;Set to 1 to use a CriticalOverrides.ini file to override the default critical table
|
||||
;Set to 2 to use the default critical with bug fixes (doesn't require an ini)
|
||||
@@ -340,7 +332,7 @@ CorpseLineOfFireFix=0
|
||||
;Set a number of milliseconds to idle each input loop
|
||||
;Set to -1 to disable
|
||||
;Set to 0 to idle only if other processes are waiting for processor time
|
||||
;Set to 1 (or some higher number if needed) to prevent 100% cpu use
|
||||
;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use
|
||||
ProcessorIdle=-1
|
||||
|
||||
;Set to 1 if using the hero appearance mod
|
||||
@@ -349,17 +341,17 @@ EnableHeroAppearanceMod=0
|
||||
;Set to 1 to skip the 3 opening movies
|
||||
SkipOpeningMovies=0
|
||||
|
||||
;Causes npc's who complete their combat turn with ap left over will try and find other ways to spend it.
|
||||
;Only npcs with ap left equal to or greater than the value given here will be considered.
|
||||
;Causes NPCs who complete their combat turn with ap left over will try and find other ways to spend it.
|
||||
;Only NPCs with ap left equal to or greater than the value given here will be considered.
|
||||
;Set to 0 to disable
|
||||
NPCsTryToSpendExtraAP=0
|
||||
|
||||
;Allows the use of tiles over 80*36 in size. sfall will just split and resave them at startup
|
||||
;Set to 1 to check all tiles on started (slow)
|
||||
;set to 2 if you provide a XLtiles.lst file in art/tiles/ containing a list of the tile ids that need checking
|
||||
;Set to 2 if you provide a XLtiles.lst file in art/tiles/ containing a list of the tile ids that need checking
|
||||
AllowLargeTiles=0
|
||||
|
||||
;Change the skilldex cursor frm numbers
|
||||
;Change the Skilldex cursor frm numbers
|
||||
;Default is 293 for all skills
|
||||
Lockpick=293
|
||||
Steal=293
|
||||
@@ -391,10 +383,12 @@ UseScrollingQuestsList=1
|
||||
;Set to 1 to add additional pages of save slots
|
||||
ExtraSaveSlots=0
|
||||
|
||||
;Set to 1 to speed up the hp/ac counter animations
|
||||
;Set to 1 to speed up the HP/AC counter animations
|
||||
;Set to 2 to update the HP/AC counters instantly
|
||||
SpeedInterfaceCounterAnims=0
|
||||
|
||||
;These lines allow you to control the karma frm's displayed on the character screen
|
||||
;Number of KarmaPoints should be 1 less than number of KarmaFRMs
|
||||
;KarmaFRMsCount=3
|
||||
;KarmaFRMs=47,48,49
|
||||
;KarmaPoints=-100,100
|
||||
@@ -402,7 +396,7 @@ SpeedInterfaceCounterAnims=0
|
||||
;Set to 1 to allow science and repair to be used on the player, or 2 for all critters. (Rather than only brahmin/robots)
|
||||
ScienceOnCritters=0
|
||||
|
||||
;Modify this value to change the players speed of rotation on the inventory and character screens
|
||||
;Modify this value to change the player's speed of rotation on the inventory and character screens
|
||||
;Default is 166
|
||||
SpeedInventoryPCRotation=166
|
||||
|
||||
@@ -416,21 +410,15 @@ BonusHtHDamageFix=1
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
DisplayBonusDamage=0
|
||||
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32)
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||
AnimationsAtOnceLimit=120
|
||||
|
||||
;Set to 1 to fix issues with the wield_obj_critter script function.
|
||||
WieldObjCritterFix=1
|
||||
|
||||
;Set to 1 to remove the limits that stop the player rolling critical successes/misses in the first few days of game time
|
||||
RemoveCriticalTimelimits=0
|
||||
|
||||
;Set to 1 to enable party members with level 6 protos to reach level 6
|
||||
NPCStage6Fix=0
|
||||
|
||||
;Set to 1 to fix the problem with melee weapon equiped npcs being unable to attack multi-hex critters
|
||||
MultiHexPathingFix=1
|
||||
|
||||
;Change the colour of the font used on the main menu for the Fallout/sfall version number
|
||||
;It's the last byte ('3c' by default,) that picks the colour used. The first byte supplies additional flags
|
||||
;MainMenuFontColour=0x0600003c
|
||||
@@ -453,7 +441,7 @@ BoostScriptDialogLimit=0
|
||||
;DerivedStats=Stats.ini
|
||||
|
||||
;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
|
||||
;Set the mode to 0 to disable the size check, 1 to apply to the 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
|
||||
CritterInvSizeLimitMode=0
|
||||
@@ -472,6 +460,12 @@ EncounterTableSize=0
|
||||
;Set to 1 to disable the pipboy alarm button
|
||||
DisablePipboyAlarm=0
|
||||
|
||||
;Uncomment the next four lines to move the main menu buttons and credit text (the 'Copyright(c)' line on the main menu)
|
||||
;MainMenuOffsetX=0
|
||||
;MainMenuOffsetY=0
|
||||
;MainMenuCreditsOffsetX=0
|
||||
;MainMenuCreditsOffsetY=0
|
||||
|
||||
;Prevents you from using super stims on a critter who is at full health.
|
||||
SuperStimExploitFix=0
|
||||
|
||||
@@ -482,13 +476,15 @@ QuickPocketsApCostReduction=2
|
||||
;Set to 1 to allow objects seeing through other objects with their ShootThru flag set
|
||||
ObjCanSeeObj_ShootThru_Fix=0
|
||||
|
||||
;These options change the bullet distribution of burst attacks
|
||||
;All the bullets are divided into three groups: central, left and right. These three groups will then travel along three parallel tracks, trying to hit targets on the way
|
||||
;Set the mod to 1 to enable the next four lines
|
||||
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
||||
ComputeSprayMod=0
|
||||
|
||||
;These options modify the bullet distribution of burst attacks if ComputeSprayMod is 1
|
||||
;All the bullets are divided into three groups: central, left and right
|
||||
;These three groups will then travel along three parallel tracks, trying to hit targets on the way
|
||||
;CenterMult/Div set the ratio of how many bullets go to the central group, and remaining bullets are divided equally to left and right sides
|
||||
;TargetMult/Div set the ratio of how many bullets in the central group will attack the primary target directly
|
||||
;Multipliers are capped at divisor values.
|
||||
ComputeSprayMod=0
|
||||
;Multipliers are capped at divisor values
|
||||
ComputeSpray_CenterMult=1
|
||||
ComputeSpray_CenterDiv=3
|
||||
ComputeSpray_TargetMult=1
|
||||
@@ -524,43 +520,51 @@ CheckWeaponAmmoCost=0
|
||||
CombatPanelAnimDelay=1000
|
||||
;Controls the speed of dialog panel animations (lower - faster; valid range: 0..255)
|
||||
DialogPanelAnimDelay=33
|
||||
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
|
||||
PipboyTimeAnimDelay=50
|
||||
|
||||
;Allows you to directly control other critters in combat
|
||||
;Set to 0 to disable
|
||||
;Set to 1 to control all critters in combat
|
||||
;Set to 2 to control all party members
|
||||
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set it to a comma delimited list of PIDs
|
||||
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set a comma delimited list of PIDs
|
||||
ControlCombat=0
|
||||
;ControlCombatPIDList=62,89,97,107,160,161
|
||||
|
||||
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
|
||||
StackEmptyWeapons=0
|
||||
|
||||
;Changes the way weapon reloading works when you drag ammo onto a weapon in the inventory
|
||||
;Set to -1 to disable (vanilla behavior with the 'Move Items' window)
|
||||
;Set to 0 to use all the ammo boxes to reload
|
||||
;Set to 1 or more to reserve the specified amount of ammo boxes and use all the rest to reload
|
||||
;If the amount of ammo boxes in the inventory is less than or equal to the reserve, only one box will be used
|
||||
ReloadReserve=-1
|
||||
|
||||
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
|
||||
DialogOptions9Lines=0
|
||||
DialogOptions9Lines=1
|
||||
|
||||
;Set to 1 to leave the music playing in dialogue with talking heads
|
||||
EnableMusicInDialogue=0
|
||||
|
||||
;Prevents 'Too Many Items' bug from corrupting game saves
|
||||
TooManyItemsBugFix=1
|
||||
;Set to 1 to fix the bug that unable to sell used geiger counters or stealth boys
|
||||
CanSellUsedGeiger=1
|
||||
|
||||
;Set to 1 to fix a minor visual glitch when picking up a solo item from the top of inventory with a stack of multiple items at the bottom
|
||||
;Also fixes the inability to reload weapons by dragging ammo onto weapons in the inventory list
|
||||
InventoryDragIssuesFix=1
|
||||
|
||||
;Set to 1 to add proper checks for NPC's addiction instead of always using global variables
|
||||
;Also fixes Jet Antidote not working on NPCs
|
||||
NPCDrugAddictionFix=1
|
||||
|
||||
;Set to 1 to fix issues with NPC stats being dropped unreasonably if one has mutiple of the same armor in inventory and equips the armor,
|
||||
;And either you order NPC to remove the armor through dialog or one levels up
|
||||
ArmorCorruptsNPCStatsFix=1
|
||||
|
||||
;Set to 1 to fix the bug that NPCs become unresponsive and act like walking containers if you move to another map while they are under 'lost next turn' critical miss effect
|
||||
NPCTurnsIntoContainerFix=1
|
||||
|
||||
;Set to 1 to fix issues with being able to charge the car with using cells on scenary/critters and cells getting consumed even when the car is already fully charged
|
||||
;Set to 1 to fix the issue with being able to charge the car by using cells on other scenary/critters
|
||||
CarChargingFix=1
|
||||
|
||||
;Set to 1 to skip weapon equip/unequip animations when performing various actions
|
||||
InstantWeaponEquip=0
|
||||
|
||||
;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension
|
||||
;You need to use the message_str_game script function to get messages from the files
|
||||
;ExtraGameMsgFileList=
|
||||
|
||||
;Set to 1 to display numbered dialogue options
|
||||
NumbersInDialogue=0
|
||||
|
||||
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||
CreditsAtBottom=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Debugging]
|
||||
@@ -570,18 +574,32 @@ CarChargingFix=1
|
||||
;Set to 1 to enable sfall debugging mode
|
||||
Enable=0
|
||||
|
||||
;Fallout 2 Debug Patch
|
||||
;Set to 1 to enable debugging output to screen or 2 to create a debug.log file
|
||||
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg
|
||||
;-------
|
||||
;[debug]
|
||||
;mode=environment
|
||||
;output_map_data_info=1
|
||||
;show_load_info=1
|
||||
;show_script_messages=1
|
||||
;show_tile_num=1
|
||||
;[sound]
|
||||
;debug=1
|
||||
;debug_sfxc=1
|
||||
;-------
|
||||
DebugMode=0
|
||||
|
||||
;Change to 1 to skip the compatibility mode check
|
||||
SkipCompatModeCheck=0
|
||||
|
||||
;Set to 1 to skip the executable file size check
|
||||
;Does not require enabling sfall debugging mode
|
||||
SkipSizeCheck=0
|
||||
|
||||
;If you're testing changes to the Fallout exe, you can override the crc that sfall looks for here
|
||||
;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here
|
||||
;You can use several hex values, separated by commas
|
||||
;Does not require enabling sfall debugging mode
|
||||
;ExtraCRC=0x00000000,0x00000000
|
||||
|
||||
;Set to 1 to stop Fallout from deleting non readonly protos at startup
|
||||
@@ -591,7 +609,7 @@ DontDeleteProtos=0
|
||||
;Set to 1 to give scripts direct access to Fallout's address space, and to make arbitrary calls into Fallout's code
|
||||
AllowUnsafeScripting=0
|
||||
|
||||
;These options control what output is saved in the debug log
|
||||
;These options control what output is saved in the debug log (sfall-log.txt)
|
||||
|
||||
;Prints messages duing sfall initialization
|
||||
Init=0
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
procedure start;
|
||||
#include ".\HEADERS\dik.h"
|
||||
|
||||
procedure start begin
|
||||
variable event, keyDX;
|
||||
if not init_hook then begin
|
||||
event := get_sfall_arg;
|
||||
keyDX := get_sfall_arg;
|
||||
|
||||
if ((event == 1) and (keyDX == DIK_SEMICOLON)) then begin
|
||||
tap_key(DIK_CAPITAL);
|
||||
tap_key(DIK_A);
|
||||
tap_key(DIK_CAPITAL);
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
"Take All" Hotkey mod for Fallout 2 by NovaRain
|
||||
----------------------------------------
|
||||
|
||||
- makes pressing the semicolon key send an uppercase A after a semicolon.
|
||||
- the uppercase A (shift + A if Caps Lock is off) is the built-in hotkey for the TAKE ALL button on the loot screen.
|
||||
|
||||
To use, copy hs_keypress.int file to your scripts folder.
|
||||
|
||||
This mod is a simple example of how you can use HOOK_KEYPRESS hooks.
|
||||
@@ -6,7 +6,7 @@ This folder contains documentation about sfall scripting extensions.
|
||||
dik.h - DX scancodes constants for use with key_pressed function and HOOK_KEYPRESS
|
||||
|
||||
sfall function notes.txt - incomplete reference for new opcodes
|
||||
sfall function 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
|
||||
arrays.txt - manual for sfall arrays
|
||||
|
||||
|
||||
@@ -2,16 +2,6 @@
|
||||
#ifndef DEFINE_EXTRA_H
|
||||
#define DEFINE_EXTRA_H
|
||||
|
||||
#define ATTACK_MODE_NONE 0
|
||||
#define ATTACK_MODE_PUNCH 1
|
||||
#define ATTACK_MODE_KICK 2
|
||||
#define ATTACK_MODE_SWING 3
|
||||
#define ATTACK_MODE_THRUST 4
|
||||
#define ATTACK_MODE_THROW 5
|
||||
#define ATTACK_MODE_SINGLE 6
|
||||
#define ATTACK_MODE_BURST 7
|
||||
#define ATTACK_MODE_FLAME 8
|
||||
|
||||
#define OBJ_TYPE_ITEM (0)
|
||||
#define OBJ_TYPE_CRITTER (1)
|
||||
#define OBJ_TYPE_SCENERY (2)
|
||||
@@ -20,18 +10,47 @@
|
||||
#define OBJ_TYPE_MISC (5)
|
||||
#define OBJ_TYPE_SPATIAL (6)
|
||||
|
||||
/* Item Common Flags */
|
||||
#define HIDDEN_ITEM 134217728 // 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 WEAPON_BIGGUN 256 // 0x00000100 - Big Gun
|
||||
#define WEAPON_2HAND 512 // 0x00000200 - 2Hnd (weapon is two-handed)
|
||||
|
||||
#define ATKMODE_PRI_NONE 0
|
||||
#define ATKMODE_PRI_PUNCH 1
|
||||
#define ATKMODE_PRI_KICK 2
|
||||
#define ATKMODE_PRI_SWING 3
|
||||
#define ATKMODE_PRI_THRUST 4
|
||||
#define ATKMODE_PRI_THROW 5
|
||||
#define ATKMODE_PRI_SINGLE 6
|
||||
#define ATKMODE_PRI_BURST 7
|
||||
#define ATKMODE_PRI_FLAME 8
|
||||
#define ATKMODE_SEC_NONE 0
|
||||
#define ATKMODE_SEC_PUNCH 16 // 0x00000010
|
||||
#define ATKMODE_SEC_KICK 32 // 0x00000020
|
||||
#define ATKMODE_SEC_SWING 48 // 0x00000030
|
||||
#define ATKMODE_SEC_THRUST 64 // 0x00000040
|
||||
#define ATKMODE_SEC_THROW 80 // 0x00000050
|
||||
#define ATKMODE_SEC_SINGLE 96 // 0x00000060
|
||||
#define ATKMODE_SEC_BURST 112 // 0x00000070
|
||||
#define ATKMODE_SEC_FLAME 128 // 0x00000080
|
||||
|
||||
/* Critter Flags */
|
||||
#define CFLG_BARTER 2 //0x00000002 - Barter (can trade with)
|
||||
#define CFLG_NOSTEAL 32 //0x00000020 - Steal (cannot steal from)
|
||||
#define CFLG_NODROP 64 //0x00000040 - Drop (doesn't drop items)
|
||||
#define CFLG_NOLIMBS 128 //0x00000080 - Limbs (cannot lose limbs)
|
||||
#define CFLG_NOAGES 256 //0x00000100 - Ages (dead body does not disappear)
|
||||
#define CFLG_NOHEAL 512 //0x00000200 - Heal (damage is not cured with time)
|
||||
#define CFLG_INVULN 1024 //0x00000400 - Invulnerable (cannot be hurt)
|
||||
#define CFLG_FLATTN 2048 //0x00000800 - Flatten (leaves no dead body)
|
||||
#define CFLG_SPECIAL 4096 //0x00001000 - Special (there is a special type of death)
|
||||
#define CFLG_RANGED 8192 //0x00002000 - Range (melee attack is possible at a distance)
|
||||
#define CFLG_NOKNOCKDOWN 16384 //0x00004000 - Knock (cannot be knocked down)
|
||||
#define CFLG_BARTER 2 // 0x00000002 - Barter (can trade with)
|
||||
#define CFLG_NOSTEAL 32 // 0x00000020 - Steal (cannot steal from)
|
||||
#define CFLG_NODROP 64 // 0x00000040 - Drop (doesn't drop items)
|
||||
#define CFLG_NOLIMBS 128 // 0x00000080 - Limbs (cannot lose limbs)
|
||||
#define CFLG_NOAGES 256 // 0x00000100 - Ages (dead body does not disappear)
|
||||
#define CFLG_NOHEAL 512 // 0x00000200 - Heal (damage is not cured with time)
|
||||
#define CFLG_INVULN 1024 // 0x00000400 - Invulnerable (cannot be hurt)
|
||||
#define CFLG_FLATTN 2048 // 0x00000800 - Flatten (leaves no dead body)
|
||||
#define CFLG_SPECIAL 4096 // 0x00001000 - Special (there is a special type of death)
|
||||
#define CFLG_RANGED 8192 // 0x00002000 - Range (melee attack is possible at a distance)
|
||||
#define CFLG_NOKNOCKDOWN 16384 // 0x00004000 - Knock (cannot be knocked down)
|
||||
|
||||
//remove inven obj defines
|
||||
#define RMOBJ_CONSUME_DRUG 4666772
|
||||
@@ -205,5 +224,4 @@
|
||||
#define WPN_ANIM_MINIGUN (0x09) // (L)
|
||||
#define WPN_ANIM_ROCKET_LAUNCHER (0x0A) // (M)
|
||||
|
||||
|
||||
#endif // DEFINE_EXTRA_H
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef H_DIK
|
||||
#define H_DIK
|
||||
|
||||
// Listed are keyboard scan code constants (in decimal), taken from dinput.h
|
||||
// Listed are keyboard scan code constants (in decimal), taken from dinput.h
|
||||
|
||||
#define DIK_ESCAPE 1
|
||||
#define DIK_1 2
|
||||
@@ -14,9 +14,9 @@
|
||||
#define DIK_8 9
|
||||
#define DIK_9 10
|
||||
#define DIK_0 11
|
||||
#define DIK_MINUS 12 /* - on main keyboard */
|
||||
#define DIK_MINUS 12 /* - on main keyboard */
|
||||
#define DIK_EQUALS 13
|
||||
#define DIK_BACK 14 /* backspace */
|
||||
#define DIK_BACK 14 /* backspace */
|
||||
#define DIK_TAB 15
|
||||
#define DIK_Q 16
|
||||
#define DIK_W 17
|
||||
@@ -116,20 +116,20 @@
|
||||
#define DIK_RWIN 0xDC /* Right Windows key */
|
||||
#define DIK_APPS 0xDD /* AppMenu key */
|
||||
|
||||
#define DIK_BACKSPACE DIK_BACK /* backspace */
|
||||
#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
|
||||
#define DIK_LALT DIK_LMENU /* left Alt */
|
||||
#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
|
||||
#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
|
||||
#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
|
||||
#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
|
||||
#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
|
||||
#define DIK_RALT DIK_RMENU /* right Alt */
|
||||
#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
|
||||
#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
|
||||
#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
|
||||
#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
|
||||
#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
|
||||
#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
|
||||
#define DIK_BACKSPACE DIK_BACK /* backspace */
|
||||
#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
|
||||
#define DIK_LALT DIK_LMENU /* left Alt */
|
||||
#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
|
||||
#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
|
||||
#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
|
||||
#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
|
||||
#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
|
||||
#define DIK_RALT DIK_RMENU /* right Alt */
|
||||
#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
|
||||
#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
|
||||
#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
|
||||
#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
|
||||
#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
|
||||
#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,32 +16,32 @@
|
||||
#define SKILLDEX (0x4000)
|
||||
|
||||
//Valid arguments to register_hook
|
||||
#define HOOK_TOHIT (0)
|
||||
#define HOOK_AFTERHITROLL (1)
|
||||
#define HOOK_CALCAPCOST (2)
|
||||
#define HOOK_DEATHANIM1 (3)
|
||||
#define HOOK_DEATHANIM2 (4)
|
||||
#define HOOK_COMBATDAMAGE (5)
|
||||
#define HOOK_ONDEATH (6)
|
||||
#define HOOK_FINDTARGET (7)
|
||||
#define HOOK_USEOBJON (8)
|
||||
#define HOOK_REMOVEINVENOBJ (9)
|
||||
#define HOOK_BARTERPRICE (10)
|
||||
#define HOOK_MOVECOST (11)
|
||||
#define HOOK_HEXMOVEBLOCKING (12)
|
||||
#define HOOK_HEXAIBLOCKING (13)
|
||||
#define HOOK_TOHIT (0)
|
||||
#define HOOK_AFTERHITROLL (1)
|
||||
#define HOOK_CALCAPCOST (2)
|
||||
#define HOOK_DEATHANIM1 (3)
|
||||
#define HOOK_DEATHANIM2 (4)
|
||||
#define HOOK_COMBATDAMAGE (5)
|
||||
#define HOOK_ONDEATH (6)
|
||||
#define HOOK_FINDTARGET (7)
|
||||
#define HOOK_USEOBJON (8)
|
||||
#define HOOK_REMOVEINVENOBJ (9)
|
||||
#define HOOK_BARTERPRICE (10)
|
||||
#define HOOK_MOVECOST (11)
|
||||
#define HOOK_HEXMOVEBLOCKING (12)
|
||||
#define HOOK_HEXAIBLOCKING (13)
|
||||
#define HOOK_HEXSHOOTBLOCKING (14)
|
||||
#define HOOK_HEXSIGHTBLOCKING (15)
|
||||
#define HOOK_ITEMDAMAGE (16)
|
||||
#define HOOK_AMMOCOST (17)
|
||||
#define HOOK_USEOBJ (18)
|
||||
#define HOOK_KEYPRESS (19)
|
||||
#define HOOK_MOUSECLICK (20)
|
||||
#define HOOK_USESKILL (21)
|
||||
#define HOOK_STEAL (22)
|
||||
#define HOOK_ITEMDAMAGE (16)
|
||||
#define HOOK_AMMOCOST (17)
|
||||
#define HOOK_USEOBJ (18)
|
||||
#define HOOK_KEYPRESS (19)
|
||||
#define HOOK_MOUSECLICK (20)
|
||||
#define HOOK_USESKILL (21)
|
||||
#define HOOK_STEAL (22)
|
||||
#define HOOK_WITHINPERCEPTION (23)
|
||||
#define HOOK_INVENTORYMOVE (24)
|
||||
#define HOOK_INVENWIELD (25)
|
||||
#define HOOK_INVENWIELD (25)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
@@ -187,3 +187,12 @@
|
||||
|
||||
#define party_member_list_critters party_member_list(0)
|
||||
#define party_member_list_all party_member_list(1)
|
||||
|
||||
|
||||
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
||||
#define critter_inven_obj2(obj, type) sfall_func2("critter_inven_obj2", obj, type)
|
||||
#define intface_redraw sfall_func0("intface_redraw")
|
||||
#define intface_hide sfall_func0("intface_hide")
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
|
||||
@@ -6,29 +6,48 @@ Hook scripts are specially named scripts that are run by sfall at specific point
|
||||
|
||||
In addition to the bit of code it overrides, the script will be run once when first loaded and again at each player reload to allow for setup. Hook scripts have access to a set of arguments supplied to sfall, but aren't required to use them all. They also return one or more values, but again they're optional, and you only need to return a value if you want to override the default.
|
||||
|
||||
As good practise to aid in mod compatibility, only use the hs_xxx .int script if you are setting return values. For any other scripts, use a normal global script combined with register_hook or register_hook_proc.
|
||||
To aid in mods compatibility, avoid using hs_xxx .int scripts. Instead it is recommended to use a normal global script combined with register_hook_proc or register_hook.
|
||||
|
||||
There are script functions specific to hook scripts:
|
||||
Example setup for a hook-script based mod:
|
||||
|
||||
int init_hook()
|
||||
|
||||
|
||||
procedure tohit_hook_handler begin
|
||||
display_msg("Modifying hit_hook " + get_sfall_arg);
|
||||
set_hit_chance_max(100);
|
||||
set_sfall_return(100);
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_TOHIT, tohit_hook_handler);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
There are script functions available, specific to hook scripts:
|
||||
|
||||
> int init_hook()
|
||||
The hook script equivilent of game_loaded; it returns 2 when the script is first loaded, 1 when the player reloads and 0 otherwise.
|
||||
|
||||
mixed get_sfall_arg()
|
||||
> mixed get_sfall_arg()
|
||||
Gets the next argument from sfall. Each time it's called it returns the next argument, or otherwise it returns 0 if there are no more arguments left.
|
||||
|
||||
int get_sfall_args()
|
||||
> array get_sfall_args()
|
||||
Returns all hook arguments as a new temp array.
|
||||
|
||||
void set_sfall_return(int value)
|
||||
> void set_sfall_return(int value)
|
||||
Used to return the new values from the script. Each time it's called it sets the next value, or if you've already set all return values it does nothing.
|
||||
|
||||
void set_sfall_arg(int argnum, int value)
|
||||
> void set_sfall_arg(int argnum, int value)
|
||||
Changes argument value. This is usefull if you have several hook scripts attached to one hook point (see below).
|
||||
|
||||
void register_hook(int hooktype)
|
||||
> void register_hook(int hooktype)
|
||||
Used from a normal global script if you want to run it at the same point a full hook script would normally run. In case of this function, "start" proc will be execuded in a current global script. You can use all above functions like normal.
|
||||
|
||||
void register_hook_proc(int hooktype, proc procedure)
|
||||
> void register_hook_proc(int hooktype, proc procedure)
|
||||
The same as register_hook, except that you specifically define which procedure in the current script should be called as a hook (instead of "start"). Pass procedure the same as how you use dialog option functions. This IS the recommended way to use hook scripts, as it gives both modularity (each mod logic in a separate global script, no conflicts if you don't use "hs_*.int" scripts) and flexibility (you can place all related hook scripts for specific mod in a single script!).
|
||||
|
||||
NOTE: you can hook several scripts to a single hook point, for example if it's different mods from different authors or just some different aspects of one larger mod. In this case scripts are executed in reverse order of how they were registered. When one of the scripts in a chain returns value with "set_sfall_return", the next script may override this value if calls "set_sfall_return" again. Sometimes you need to multiply certain value in a chain of hook scripts.
|
||||
@@ -56,7 +75,7 @@ The defines to use for the hooktype are in sfall.h.
|
||||
----------- HOOK SCRIPT TYPES -------------
|
||||
-------------------------------------------
|
||||
|
||||
hs_tohit.int
|
||||
HOOK_TOHIT (hs_tohit.int)
|
||||
|
||||
Runs when fallout is calculating the chances of an attack striking a target
|
||||
Runs after the hit chance is fully calculated normally, including applying the 95% cap
|
||||
@@ -65,12 +84,15 @@ int arg1 - The unmodified hit chance
|
||||
critter arg2 - The attacker
|
||||
critter arg3 - The target of the attack
|
||||
int arg4 - The targeted bodypart
|
||||
int arg5 - Source tile (may differ from attacker's tile, when AI is considering potential fire position)
|
||||
int arg6 - Attack Type (one of ATKTYPE_*)
|
||||
int arg7 - Ranged flag (0 or 1, actually passed 1 even for unarmed attacks, may be a vanilla bug)
|
||||
|
||||
int ret1 - the new hit chance
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_afterhitroll.int
|
||||
HOOK_AFTERHITROLL (hs_afterhitroll.int)
|
||||
|
||||
Runs after fallout has decided if an attack will hit or miss
|
||||
|
||||
@@ -86,7 +108,7 @@ critter ret3 - Override the target of the attack
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_calcapcost.int
|
||||
HOOK_CALCAPCOST (hs_calcapcost.int)
|
||||
|
||||
Runs whenever fallout is calculating the ap cost of using the weapon (or unarmed attack). Doesn't run for using other item types or moving.
|
||||
Note that the first time a game is loaded, this script doesn't run before the initial interface is drawn, so if the script effects the ap cost of whatever is in the players hands at the time the wrong ap cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
@@ -101,7 +123,7 @@ int ret1 - The new ap cost
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_deathanim1.int
|
||||
HOOK_DEATHANIM1 (hs_deathanim1.int)
|
||||
|
||||
Runs before fallout tries to calculate the death animation. Lets you switch out which weapon fallout sees
|
||||
|
||||
@@ -114,7 +136,7 @@ int ret1 - The pid of an object to override the attacking weapon with
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_deathanim2.int
|
||||
HOOK_DEATHANIM2 (hs_deathanim2.int)
|
||||
|
||||
Runs after fallout has calculated the death animation. Lets you set your own custom frame id, so more powerful than hs_deathanim1, but performs no validation.
|
||||
When using critter_dmg function, this script will also run. In that case weapon pid will be -1 and target will point to an object with obj_art_fid == 0x20001F5.
|
||||
@@ -129,7 +151,7 @@ int ret1 - The death anim id to override with
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_combatdamage.int
|
||||
HOOK_COMBATDAMAGE (hs_combatdamage.int)
|
||||
|
||||
Runs when:
|
||||
1) Game calculates how much damage each target will get. This includes primary target as well as all extras (explosions and bursts). This happens BEFORE the actual attack animation.
|
||||
@@ -156,7 +178,7 @@ int ret5 - The amount of knockback to the target
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_ondeath.int
|
||||
HOOK_ONDEATH (hs_ondeath.int)
|
||||
|
||||
Runs immediately after a critter dies for any reason. No return values; this is just a convinence for when you need to do something after death for a large number of different critters and don't want to have to script each and every one of them.
|
||||
|
||||
@@ -164,7 +186,7 @@ Critter arg1 - The critter that just died
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_findtarget.int
|
||||
HOOK_FINDTARGET (hs_findtarget.int)
|
||||
|
||||
Runs when the ai is trying to pick a target in combat. Fallout first chooses a list of 4 likely suspects, then normally sorts them in order of weakness/distance/etc depending on the ai caps of the attacker. This hook replaces that sorting function, allowing you to sort the targets in some arbitrary way. Use sfall_return to give the 4 targets, in order of preference. All 4 must be given if you want to override normal sorting; if you want to specify less than 4 targets fill in the extra spaces with 0's. If you do not give 4 targets, the npcs normal sorting mechanism will be used.
|
||||
|
||||
@@ -183,7 +205,7 @@ critter ret4 - The fourth choice of target
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_useobjon.int
|
||||
HOOK_USEOBJON (hs_useobjon.int)
|
||||
|
||||
Runs when:
|
||||
1) a critter uses an object on another critter. (Or themselves)
|
||||
@@ -201,7 +223,7 @@ int ret1 - overrides hard-coded handler and selects what should happen with
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_useobj.int
|
||||
HOOK_USEOBJ (hs_useobj.int)
|
||||
|
||||
Runs when:
|
||||
1) a critter uses an object from inventory which have "Use" action flag set or it's an active flare or dynamite.
|
||||
@@ -217,7 +239,7 @@ int ret1 - overrides hard-coded handler and selects what should happen with
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_removeinvenobj.int
|
||||
HOOK_REMOVEINVENOBJ (hs_removeinvenobj.int)
|
||||
|
||||
Runs when an object is removed from a critters inventory for any reason
|
||||
|
||||
@@ -228,22 +250,25 @@ int arg4 - The reason the object is being removed. (Actually, the site from
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_barterprice.int
|
||||
HOOK_BARTERPRICE (hs_barterprice.int)
|
||||
|
||||
Runs whenever the value of goods being purchased is calculated
|
||||
|
||||
critter arg1 - the critter doing the bartering (either dude_obj or inven_dude)
|
||||
critter arg2 - the critter being bartered with
|
||||
int arg3 - the default value of the goods
|
||||
critter arg4 - the barter critter (has all of the goods being traded in its inventory)
|
||||
critter arg4 - table of requested goods (being bought from NPC)
|
||||
int arg5 - the amount of actual caps in the barter stack (as opposed to goods)
|
||||
int arg6 - the value of all goods being traded before skill modifications
|
||||
critter arg7 - table of offered goods (being sold to NPC)
|
||||
int arg8 - the total cost of the goods offered by the player
|
||||
int arg9 - set 1 if the "offers" button was pressed(not for a party member), otherwise 0
|
||||
|
||||
int ret1 - the modified value of all of the goods
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_movecost.int
|
||||
HOOK_MOVECOST (hs_movecost.int)
|
||||
|
||||
Runs when calculating the ap cost of movement
|
||||
|
||||
@@ -277,7 +302,7 @@ object* ret1 - 0 if the hex doesn't block, or any sort of object pointer if it d
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_itemdamage.int
|
||||
HOOK_ITEMDAMAGE (hs_itemdamage.int)
|
||||
|
||||
Runs when retriving the damage rating of the players used weapon. (Which may be their fists.)
|
||||
|
||||
@@ -293,7 +318,7 @@ int ret2 - The new maximum damage
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_ammocost.int
|
||||
HOOK_AMMOCOST (hs_ammocost.int)
|
||||
|
||||
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.
|
||||
@@ -309,7 +334,7 @@ int ret1 - new ammo cost value (set to 0 for unlimited ammo)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_keypress.int
|
||||
HOOK_KEYPRESS (hs_keypress.int)
|
||||
|
||||
Runs once every time when any key was pressed or released.
|
||||
DX codes: (see dik.h header)
|
||||
@@ -321,7 +346,7 @@ int arg3 - key VK code (very similar to ASCII codes)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_mouseclick.int
|
||||
HOOK_MOUSECLICK (hs_mouseclick.int)
|
||||
|
||||
Runs once every time when a mouse button was pressed or release.
|
||||
|
||||
@@ -330,7 +355,7 @@ int arg2 - button number (0 - left, 1 - right, up to 7)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_useskill.int
|
||||
HOOK_USESKILL (hs_useskill.int)
|
||||
|
||||
Runs when using any skill on any object.
|
||||
|
||||
@@ -347,7 +372,7 @@ int ret1 - overrides hard-coded handler (-1 - use engine handler, any other
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_steal.int
|
||||
HOOK_STEAL (hs_steal.int)
|
||||
|
||||
Runs when checking an attempt to steal or plant an item in other inventory using Steal skill.
|
||||
|
||||
@@ -363,7 +388,7 @@ int ret1 - overrides hard-coded handler (1 - force success, 0 - force fail,
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_withinperception.int
|
||||
HOOK_WITHINPERCEPTION (hs_withinperception.int)
|
||||
|
||||
Runs when checking if one critter sees another critter. This is used in different situations like combat AI. You can override the result.
|
||||
|
||||
@@ -379,7 +404,7 @@ int ret1 - overrides the returned result of the function: 0 - not in range (
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_inventorymove.int
|
||||
HOOK_INVENTORYMOVE (hs_inventorymove.int)
|
||||
|
||||
Runs before moving items between inventory slots in dude interface. You can override the action.
|
||||
What you can NOT do with this hook:
|
||||
@@ -390,7 +415,7 @@ What you can do:
|
||||
- add AP costs for all inventory movement including reloading
|
||||
- apply or remove some special scripted effects depending on PC's armor
|
||||
|
||||
int arg1 - Target slot (0 - main backback, 1 - left hand, 2 - right hand, 3 - armor slot, 4 - weapon, when reloading it by dropping ammo)
|
||||
int arg1 - Target slot (0 - main backpack, 1 - left hand, 2 - right hand, 3 - armor slot, 4 - weapon, when reloading it by dropping ammo)
|
||||
Item arg2 - Item being moved
|
||||
Item arg3 - Item being replaced or weapon being reloaded (can be 0)
|
||||
|
||||
@@ -398,10 +423,12 @@ int ret1 - Override setting (-1 - use engine handler, any other value - prev
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_invenwield.int
|
||||
HOOK_INVENWIELD (hs_invenwield.int)
|
||||
|
||||
Runs before wielding or unwielding an armor or a weapon by a critter (except when using inventory by PC).
|
||||
An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations.
|
||||
NOTE: when replacing a previously wielded armor or weapon, the unwielding hook will not be executed.
|
||||
If you need to rely on this, try checking if armor/weapon already equipped when wielding hook is executed.
|
||||
|
||||
Critter arg1 - critter
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor), may be 0 when unwielding
|
||||
|
||||
@@ -48,7 +48,7 @@ set_fake_trait and set_fake_perk can be used to add additional traits and perks
|
||||
|
||||
has_fake_trait and has_fake_perk return the number of levels the player has of the perks/traits with the given name.
|
||||
|
||||
perk_add_mode, set_selectable_perk, set_perkbox_title, hide_real_perks, show_real_perks and clear_selectable_perks control the behaviour of the select a perk box. set_selectable_perk can be used to add additional items by setting the 'active' parameter to 1, and to remove them again by setting it to 0. set_perkbox_title can be used to change the title of the box, or by using "" it will be set back to the default. hide and show_real_perks can be used to prevent the dialog from displaying any of the original 119 perks. perk_add_mode modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the players traits, if bit 2 is set it is added to the players perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. clear_selectable_perks restores the dialog to it's default state.
|
||||
perk_add_mode, set_selectable_perk, set_perkbox_title, hide_real_perks, show_real_perks and clear_selectable_perks control the behaviour of the select a perk box. set_selectable_perk can be used to add additional items by setting the 'active' parameter to 1, and to remove them again by setting it to 0. set_perkbox_title can be used to change the title of the box, or by using "" it will be set back to the default. hide and show_real_perks can be used to prevent the dialog from displaying any of the original 119 perks. perk_add_mode modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the players traits, if bit 2 is set it is added to the players perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. clear_selectable_perks restores the dialog to it's default state.
|
||||
|
||||
show_iface_tag, hide_iface_tag and is_iface_tag_active relate to the boxes that appear above the interface such as SNEAK and LEVEL. You can use 3 for LEVEL and 4 for ADDICT, or the range from 5 to 9 for custom boxes. Remember to add your messages to intrface.msg and setup the font colours in ddraw.ini if you're going to use custom boxes.
|
||||
|
||||
@@ -62,7 +62,7 @@ nb_* functions are reserved for the brotherhood tactical training mod, and shoul
|
||||
|
||||
The fs_* functions are used to manipulate a virtual file system. Files saved here should have paths relative to the data folder, and use backslashes as the directory seperator. They will take precedence over files stored in the normal data folder. They will also be saved into save games, so be avoid creating large files. Using fs_copy followed by fs_read_xxx, you can read the contents of existing files.
|
||||
|
||||
get/set_proto_data are used to manipulate the in memory copies of the .pro files fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading, and is equal to the file offset minus 12. Changes are not stored on disc, and are not permenent. If you modify the protos, and then fallout subsequently reloads the file your changes will be lost.
|
||||
get/set_proto_data are used to manipulate the in memory copies of the .pro files fallout makes when they are loaded. The offset refers to the offset in memory from the start of the proto to the element you are reading. Changes are not stored on disc, and are not permenent. If you modify the protos, and then fallout subsequently reloads the file your changes will be lost.
|
||||
|
||||
the list_xxx functions can be used to loop over all items on a map. list_begin takes an argument telling sfall what you want to list. (Defined in sfall.h) It returns a list pointer, which you iterate through with list_next. Finally, when you've finished with the list use list_end on it. Not calling list_end will result in a memory leak. Alternatively, use list_as_array to get the whole list at once as a temp array variable, which can be looped over using len_array and which you don't need to remember to free afterwards.
|
||||
|
||||
@@ -77,48 +77,64 @@ force_aimed_shots and disable_aimed_shots allow overriding the normal rules rega
|
||||
get/set_critter_skill_points will get/set the number of additional points a critter has in a skill, on top of whatever they have from their stats and other bonuses. Note that skill points are part of the proto, so calling set_skill_points on a critter will affect all critters that share the same proto.
|
||||
|
||||
|
||||
|
||||
------------------------------
|
||||
------ TYPES REFERENCE -------
|
||||
------------------------------
|
||||
|
||||
> Data types mentioned in this document:
|
||||
|
||||
void - means opcode does not return any value
|
||||
any - any type
|
||||
int - integer number
|
||||
float - floating point number
|
||||
string - string (text) value
|
||||
object - pointer to game object (actually an integer)
|
||||
array - array ID to be used with array-related functions (actually an integer)
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
------ FUNCTION REFERENCE (incomplete) -------
|
||||
----------------------------------------------
|
||||
|
||||
> int game_loaded()
|
||||
> int game_loaded()
|
||||
- returns 1 the first time it is called after a new game or game load, and 0 any time after. It works on an individual basis for each script, so one script wont interfere with others. It's primary use is for global scripts, so that they know when to call set_global_script_repeat, but it can be called from normal scripts too.
|
||||
|
||||
> void inc_npc_level(string npc)
|
||||
- takes an npc name as an argument. The npc must be in your party. This function ignores player level requirements and the minimum 3 player level delay between npc level gains. It also ignores the random element, regardless of sfall's NPCAutoLevel setting.
|
||||
> void inc_npc_level(string npc)
|
||||
- takes an npc name as an argument. The npc must be in your party. This function ignores player level requirements and the minimum 3 player level delay between npc level gains. It also ignores the random element, regardless of sfall's NPCAutoLevel setting.
|
||||
|
||||
> int get_npc_level(string npc)
|
||||
- also takes the npc name as an argument, and returns the npc's current level. Again, the npc needs to be in your party.
|
||||
|
||||
> int get_ini_setting(string setting)
|
||||
- reads an integer value from an ini file in the fallout directory.
|
||||
- It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned.
|
||||
- The file name is limited to 16 chars, including the extension.
|
||||
- The section name is limited to 8 characters.
|
||||
> int get_ini_setting(string setting)
|
||||
- reads an integer value from an ini file in the fallout directory.
|
||||
- It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned.
|
||||
- The file name is limited to 16 chars, including the extension.
|
||||
- The section name is limited to 8 characters.
|
||||
- It can also be used to get sfalls settings, by using ddraw.ini as the file name.
|
||||
|
||||
> string get_ini_string(string setting)
|
||||
- reads a string value from an ini file in the fallout directory.
|
||||
- reads a string value from an ini file in the fallout directory.
|
||||
|
||||
> int get_game_mode()
|
||||
- is a more flexible version of in_world_map. It will return a set of flags indicating which mode the game is currently in.
|
||||
- is a more flexible version of in_world_map. It will return a set of flags indicating which mode the game is currently in.
|
||||
- These flags are the same as those used in the set_shader_mode function.
|
||||
|
||||
> int get_uptime()
|
||||
- is just a wrapper around the windows GetTickCount() function. It's useful for making time fade effects in shaders, since they already have access to the current tick count.
|
||||
|
||||
> boolean in_world_map()
|
||||
- returns 1 if the player is looking at the world map, or 0 at any other time.
|
||||
> boolean in_world_map()
|
||||
- returns 1 if the player is looking at the world map, or 0 at any other time.
|
||||
- Obviously this is only useful in global scripts, since normal scripts will never get the chance to run on the world map.
|
||||
|
||||
> void force_encounter(int map)
|
||||
- can be called either from a global script while traveling on the world map, or from a normal script while on a local map.
|
||||
> void force_encounter(int map)
|
||||
- can be called either from a global script while traveling on the world map, or from a normal script while on a local map.
|
||||
- In either case the encounter occurs shortly after the next time the player moves on the world map.
|
||||
- The player will not get an outdoorsman skill check.
|
||||
|
||||
> void force_encounter_with_flags(int map, int flags)
|
||||
- does the same thing as force_encounter, but allows the specification of some extra options.
|
||||
- Forcing a random encounter on a map that is not normally used for random encounters may cause the player to lose the car, if they have it.
|
||||
- does the same thing as force_encounter, but allows the specification of some extra options.
|
||||
- Forcing a random encounter on a map that is not normally used for random encounters may cause the player to lose the car, if they have it.
|
||||
- In this case use force_encounter_with_flags with the ENCOUNTER_FLAG_NO_CAR flag set.
|
||||
|
||||
> int get_light_level()
|
||||
@@ -129,40 +145,40 @@ get/set_critter_skill_points will get/set the number of additional points a crit
|
||||
- adjusts how fast time passes while you're on the world map. It takes a single float as an argument, where 1 is the normal speed.
|
||||
- This function works in addition to the WorldMapTimeMod setting in ddraw.ini and the pathfinder perk, rather than overriding it, so calling set_map_time_multi(0.5) when the player has 2 levels of pathfinder would result in time passing at 25% the normal speed on the world map.
|
||||
|
||||
> void remove_script(objptr)
|
||||
- accepts a pointer to an object and will remove the script from that object.
|
||||
> void remove_script(object)
|
||||
- accepts a pointer to an object and will remove the script from that object.
|
||||
|
||||
> void set_script(objptr, int scriptid)
|
||||
> void set_script(object, int scriptid)
|
||||
- accepts a pointer to an object and scriptID, and applies the given script to an object (scriptID accept the same values as create_object_sid from sfall 3.6)
|
||||
- If used on an object that is already scripted, it will remove the existing script first; you cannot have multiple scripts attached to a single object. Calling set_script on self_obj will have all sorts of wacky side effects, and should be avoided.
|
||||
- if you add 0x80000000 to the sid when calling set_script, map_enter_p_proc will be SKIPPED. The start proc will always be run.
|
||||
|
||||
> int get_script(objptr)
|
||||
- accepts a pointer to an object and returns it's scriptID (line number in scripts.lst), or -1 if the object is unscripted.
|
||||
> int get_script(object)
|
||||
- accepts a pointer to an object and returns it's scriptID (line number in scripts.lst), or -1 if the object is unscripted.
|
||||
|
||||
> void set_self(int obj)
|
||||
- overrides the scripts self_obj for the next function call.
|
||||
- It is primarily used to allow the calling of functions which take an implicit self_obj parameter (e.g. drop_obj) from global scripts, but it can also be used from normal scripts;
|
||||
> void set_self(int obj)
|
||||
- overrides the scripts self_obj for the next function call.
|
||||
- It is primarily used to allow the calling of functions which take an implicit self_obj parameter (e.g. drop_obj) from global scripts, but it can also be used from normal scripts;
|
||||
- self_obj will revert back to its original value after the next function call.
|
||||
- calling self_obj(0) will also revert self_obj to original value
|
||||
- source_obj, target_obj, and similar functions will not work if preceeded by "set_self"
|
||||
|
||||
> void mod_skill_points_per_level(int x)
|
||||
- accepts a value of between -100 and 100, and modifies the number of skill points the player recieves when they level up.
|
||||
- This is a modification of what would otherwise happen, rather than a replacement.
|
||||
- accepts a value of between -100 and 100, and modifies the number of skill points the player recieves when they level up.
|
||||
- This is a modification of what would otherwise happen, rather than a replacement.
|
||||
- The value is not saved into the save game, so should be reset in the game_loaded section of a script.
|
||||
|
||||
> void seq_perk_freq(int x)
|
||||
- sets the number of levels between each perk.
|
||||
- Setting 0 will reset it back to the default.
|
||||
- This overrides the effects of the skilled trait.
|
||||
- It is not saved into the save game, so needs to be called once per reload.
|
||||
- sets the number of levels between each perk.
|
||||
- Setting 0 will reset it back to the default.
|
||||
- This overrides the effects of the skilled trait.
|
||||
- It is not saved into the save game, so needs to be called once per reload.
|
||||
- Be careful not to let the player obtain a perk when no perks are available to pick, or the game may crash.
|
||||
|
||||
> ObjectPtr get_last_target(objptr)
|
||||
- will return the last critter to be deliberately attacked
|
||||
> ObjectPtr get_last_attacker(objptr)
|
||||
- will return the last critter to deliberately launch an attack against the argument critter.
|
||||
> object get_last_target(object)
|
||||
- will return the last critter to be deliberately attacked
|
||||
> object get_last_attacker(object)
|
||||
- will return the last critter to deliberately launch an attack against the argument critter.
|
||||
- If a critter has not launched/recieved an attack, it will return 0. This is only stored for the duration of combat, and outside of combat both functions will always return 0.
|
||||
|
||||
> void set_base_pickpocket_mod(int max, int mod)
|
||||
@@ -170,46 +186,46 @@ get/set_critter_skill_points will get/set the number of additional points a crit
|
||||
- "max" will replace 95% success chance cap (so you can set 100% maximum chance, for instance)
|
||||
- "mod" will add this much percent to each success chance. for example if your chance is 50% and "mod" is 20, you will get 70% actual success rate
|
||||
|
||||
> void set_critter_pickpocket_mod(CritterPtr, int max, int mod)
|
||||
> void set_critter_pickpocket_mod(object, int max, int mod)
|
||||
- the same as above, but applies only to specific critter
|
||||
|
||||
> void reg_anim_combat_check
|
||||
> void reg_anim_combat_check
|
||||
- allows to enable all reg_anim_* functions in combat (including vanilla functions) if set to 0. It is automatically reset at the end of each frame, so you need to call it before "reg_anim_begin" - "reg_anim_end" block.
|
||||
|
||||
|
||||
Some additional reg_anim_* functions were introduced. They all work in the same convention as vanilla functions and use the same underlying code.
|
||||
|
||||
> void reg_anim_destroy(object)
|
||||
Some additional reg_anim_* functions were introduced. They all work in the same convention as vanilla functions and use the same underlying code.
|
||||
|
||||
> void reg_anim_destroy(object)
|
||||
- given object is destroyed at the end of current animation set
|
||||
|
||||
> void reg_anim_animate_and_hide(object, animID, delay)
|
||||
|
||||
> void reg_anim_animate_and_hide(object, animID, delay)
|
||||
- exactly like "reg_anim_animate" but the object will automatically disappear after the last animation frame (but not destroyed)
|
||||
|
||||
> void reg_anim_light(object, light, delay)
|
||||
> void reg_anim_light(object, light, delay)
|
||||
- change light of any object. light argument is a light radius (0-8), but you can use highest 2 bytes to pass light intensity as well (example: 0xFFFF0008 - intensity 65535 and radius 8). If highest 2 bytes are 0, intensity will not be changed. Intensity range is from 0 to 65535 (0xFFFF).
|
||||
|
||||
> void reg_anim_change_fid(object, fid, delay)
|
||||
> void reg_anim_change_fid(object, fid, delay)
|
||||
- should work like art_change_fid_num but in reg_anim sequence
|
||||
|
||||
> void reg_anim_take_out(object, holdFrameID, delay)
|
||||
> void reg_anim_take_out(object, holdFrameID, delay)
|
||||
- plays "take out weapon" animation for given holdFrameID. It is not required to have such weapon in critter's inventory.
|
||||
|
||||
> void reg_anim_turn_towards(object, tile/target, delay)
|
||||
|
||||
> void reg_anim_turn_towards(object, tile/target, delay)
|
||||
- makes object change it's direction to face given tile num or target object.
|
||||
|
||||
> int metarule2_explosions(int arg1, int arg2)
|
||||
was made as a dirty easy hack to allow dynamically change some explosion parameters (ranged attack). All changed parameters are reset to vanilla state automatically after each attack action. Following macros are available in sfall.h:
|
||||
|
||||
> void set_attack_explosion_pattern(x, y)
|
||||
> void set_attack_explosion_pattern(x, y)
|
||||
- currently y is not used and x means: 1 - reduced explosion pattern (3 effects are spawned instead of 7), 0 - full pattern
|
||||
|
||||
> void set_attack_explosion_art(x, y)
|
||||
> void set_attack_explosion_art(x, y)
|
||||
- y not used and x is a misc frame ID (last 3 bytes, without object type) to use for the next explosion.
|
||||
|
||||
> void set_attack_explosion_radius(x)
|
||||
|
||||
> void set_attack_explosion_radius(x)
|
||||
- changes radius at which explosion will hit secondary targets for the next attack (from the experiments it is limited to something around 8 by the engine)
|
||||
|
||||
> void set_attack_is_explosion_fire
|
||||
> void set_attack_is_explosion_fire
|
||||
- if you call this right before using a weapon with fire damage type, it will produce explosion effects (and radius damage) just like "explosion" type, but all targets will still recieve fire damage.
|
||||
|
||||
|
||||
@@ -219,20 +235,20 @@ Some utility/math functions are available:
|
||||
- takes a string and a seperator, searches the string for all instances of the seperator, and returns a temp array filled with the pieces of the string split at each instance. If you give an empty string as the seperator, the string is split into individual characters.
|
||||
- you can use this to search for a substring in a string like this: strlen(get_array(string_split(haystack, needle), 0))
|
||||
|
||||
> string substr(string, start, length)
|
||||
> string substr(string, start, length)
|
||||
- cuts a substring from a string starting at "start" up to "length" characters. If start is negative - it indicates starting position from the end of the string (for example substr("test", -2, 2) will return last 2 charactes: "st"). If length is negative - it means so many characters will be omitted from the end of string (example: substr("test", 0, -2) will return string without last 2 characters: "te")
|
||||
|
||||
> int strlen(char* string)
|
||||
> int strlen(string string)
|
||||
- returns string length
|
||||
|
||||
> string sprintf(char* format, any value)
|
||||
- formats given value using standart syntax of C printf function (google "printf" for format details). However it is limited to formatting only 1 value.
|
||||
> string sprintf(string format, any value)
|
||||
- formats given value using standart syntax of C printf function (google "printf" for format details). However it is limited to formatting only 1 value.
|
||||
- can be used to get character by ASCII code ("%c")
|
||||
|
||||
> int typeof(any value)
|
||||
> int typeof(any value)
|
||||
- returns type of the given value: VALTYPE_INT, VALTYPE_FLOAT or VALTYPE_STR.
|
||||
|
||||
> int charcode(char* string)
|
||||
> int charcode(string string)
|
||||
- returns ASCII code for the first character in given string
|
||||
|
||||
> ^ operator (exponentiation)
|
||||
@@ -276,7 +292,8 @@ Some utility/math functions are available:
|
||||
|
||||
> string message_str_game(int fileId, int messageId)
|
||||
- works exactly the same as message_str, except you get messages from files in "text/english/game" folder
|
||||
- use GAME_MSG_* defines or mstr_* macros from sfall.h to use specific msg file
|
||||
- use GAME_MSG_* defines or mstr_* macros from sfall.h to use specific msg file
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise
|
||||
@@ -285,12 +302,12 @@ Some utility/math functions are available:
|
||||
> int tile_light(int elevation, int tileNum)
|
||||
- returns light intensity at the given tile in range from 0 to 65535
|
||||
|
||||
> ObjectPtr obj_blocking_line(ObjectPtr objFrom, int tileTo, int blockingType)
|
||||
> object obj_blocking_line(object objFrom, int tileTo, int blockingType)
|
||||
- returns first object which blocks direct linear path from objFrom to tileTo using selected blocking function (see BLOCKING_TYPE_* constants in sfall.h)
|
||||
- if path is clear (no blocker was encountered by selected function) - returns 0
|
||||
- objFrom is always excluded from calculations, but is required to be a valid object
|
||||
|
||||
> ObjectPtr obj_blocking_tile(int tileNum, int elevation, int blockingType)
|
||||
> object obj_blocking_tile(int tileNum, int elevation, int blockingType)
|
||||
- returns first object blocking given tile using given blocking function or 0 if tile is clear
|
||||
|
||||
> array tile_get_objs(int tileNum, int elevation)
|
||||
@@ -300,22 +317,58 @@ Some utility/math functions are available:
|
||||
> array party_member_list(int includeHidden)
|
||||
- returns array of all current party members (0 - only critter-type, alive and visible will be returned, 1 - all object, including Trunk, etc.)
|
||||
|
||||
> array path_find_to(ObjectPtr objFrom, int tileTo, int blockingType)
|
||||
> array path_find_to(object objFrom, int tileTo, int blockingType)
|
||||
- returns the shortest path to a given tile using given blocking function as an array of tile directions (0..5) to move on each step
|
||||
- array length equals to a number of steps
|
||||
- empty array means that specified target cannot be reached
|
||||
|
||||
> ObjectPtr create_spatial(int scriptID, int tile, int elevation, int radius)
|
||||
> object create_spatial(int scriptID, int tile, int elevation, int radius)
|
||||
- creates new spatial script with given SID, at given tile, and radius
|
||||
|
||||
> int art_exists(int artFID)
|
||||
- checks if given artFID exists in the game
|
||||
- useful when you want to check if critter can use specific weapon: art_exists((artFid bwand 0xffff0fff) bwor (weaponAnim * 0x1000))
|
||||
|
||||
> int obj_is_carrying_obj(ObjectPtr invenObj, ObjectPtr itemObj)
|
||||
> int obj_is_carrying_obj(object invenObj, object itemObj)
|
||||
- returns number of itemObj inside invenObj's inventory, note that both arguments are object pointers
|
||||
- useful when dealing with different stacks of same item (obj_is_carrying_obj_pid just returns total for all stacks of the same PID)
|
||||
|
||||
> any sfall_funcX(string funcName, ...)
|
||||
- these opcodes allows to use additional scripting functions, that do not require new opcode
|
||||
- first argument is always function name (string)
|
||||
- there are 7 versions of this opcode for different number of additional arguments (for convenience)
|
||||
- opcodes have return value, but it is not neccessary to use it
|
||||
|
||||
|
||||
------------------------------------
|
||||
------ sfall_funcX functions -------
|
||||
------------------------------------
|
||||
|
||||
> array sfall_func0("get_metarule_table")
|
||||
- returns names of all currently available scripting functions (via sfall_funcX)
|
||||
|
||||
> int sfall_func1("spatial_radius", object object)
|
||||
- return radius of spatial script, associated with given dummy-object (returned by create_spatial)
|
||||
|
||||
> object sfall_func2("critter_inven_obj2", object invenObj, int type)
|
||||
- works just like vanilla critter_inven_obj, but correctly reports item in player's inactive hand slot
|
||||
|
||||
> void sfall_func0("intface_redraw")
|
||||
- redraws main game interface
|
||||
- useful after direct changes to current player weapons or stats to reflect changes
|
||||
|
||||
> void sfall_func0("intface_hide")
|
||||
- hides main interface
|
||||
|
||||
> void sfall_func0("intface_show")
|
||||
- shows main interface
|
||||
|
||||
> int sfall_func0("intface_is_hidden")
|
||||
- returns 1 if interface is currently hidden, 0 otherwise
|
||||
|
||||
> void sfall_func0("exec_map_update_scripts")
|
||||
- executes map_update_p_proc for all objects on map and global/hook scripts as well
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
+90
-80
@@ -2,12 +2,12 @@
|
||||
*0x8156 - int read_byte(int address)
|
||||
*0x8157 - int read_short(int address)
|
||||
*0x8158 - int read_int(int address)
|
||||
*0x8159 - char* read_string(int address)
|
||||
*0x8159 - string read_string(int address)
|
||||
|
||||
*0x81cf - void write_byte(int address, int value)
|
||||
*0x81d0 - void write_short(int address, int value)
|
||||
*0x81d1 - void write_int(int address, int value)
|
||||
*0x821b - void write_string(int address, char* value)
|
||||
*0x821b - void write_string(int address, string value)
|
||||
|
||||
*0x81d2 - void call_offset_v0(int address)
|
||||
*0x81d3 - void call_offset_v1(int address, int arg1)
|
||||
@@ -25,10 +25,10 @@
|
||||
0x815c - int get_pc_base_stat(int StatID)
|
||||
0x815d - int get_pc_extra_stat(int StatID)
|
||||
|
||||
0x815e - void set_critter_base_stat(CritterPtr, int StatID, int value)
|
||||
0x815f - void set_critter_extra_stat(CritterPtr, int StatID, int value)
|
||||
0x8160 - int get_critter_base_stat(CritterPtr, int StatID)
|
||||
0x8161 - int get_critter_extra_stat(CritterPtr, int StatID)
|
||||
0x815e - void set_critter_base_stat(object, int StatID, int value)
|
||||
0x815f - void set_critter_extra_stat(object, int StatID, int value)
|
||||
0x8160 - int get_critter_base_stat(object, int StatID)
|
||||
0x8161 - int get_critter_extra_stat(object, int StatID)
|
||||
0x8242 - void set_critter_skill_points(int critter, int skill, int value)
|
||||
0x8243 - int get_critter_skill_points(int critter, int skill)
|
||||
0x8244 - void set_available_skill_points(int value)
|
||||
@@ -43,7 +43,7 @@
|
||||
0x81ba - void set_npc_stat_min(int stat, int value)
|
||||
|
||||
0x816b - int input_funcs_available()
|
||||
ox816c - int key_pressed(int dxScancode)
|
||||
0x816c - int key_pressed(int dxScancode)
|
||||
0x8162 - void tap_key(int dxScancode)
|
||||
0x821c - int get_mouse_x()
|
||||
0x821d - int get_mouse_y()
|
||||
@@ -55,18 +55,18 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8164 - bool game_loaded()
|
||||
|
||||
0x8165 - bool graphics_funcs_available()
|
||||
0x8166 - int load_shader(char* path)
|
||||
0x8166 - int load_shader(string path)
|
||||
0x8167 - void free_shader(int ID)
|
||||
0x8168 - void activate_shader(int ID)
|
||||
0x8169 - void deactivate_shader(int ID)
|
||||
0x816d - void set_shader_int(int ID, char* param, int value)
|
||||
0x816e - void set_shader_float(int ID, char* param, float value)
|
||||
0x816f - void set_shader_vector(int ID, char* param, float f1, float f2, float f3, float f4)
|
||||
0x816d - void set_shader_int(int ID, string param, int value)
|
||||
0x816e - void set_shader_float(int ID, string param, float value)
|
||||
0x816f - void set_shader_vector(int ID, string param, float f1, float f2, float f3, float f4)
|
||||
0x81ad - int get_shader_version()
|
||||
0x81ae - void set_shader_mode(int mode)
|
||||
0x81b0 - void force_graphics_refresh(bool enabled)
|
||||
0x81b1 - int get_shader_texture(int ID, int texture)
|
||||
0x81b2 - void set_shader_texture(int ID, char* param, int texID)
|
||||
0x81b2 - void set_shader_texture(int ID, string param, int texID)
|
||||
|
||||
0x816a - void set_global_script_repeat(int frames)
|
||||
0x819b - void set_global_script_type(int type)
|
||||
@@ -82,9 +82,9 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8173 - int get_world_map_x_pos()
|
||||
0x8174 - int get_world_map_y_pos()
|
||||
|
||||
0x8175 - void set_dm_model(char* name)
|
||||
0x8176 - void set_df_model(char* name)
|
||||
0x8177 - void set_movie_path(char* filename, int movieid)
|
||||
0x8175 - void set_dm_model(string name)
|
||||
0x8176 - void set_df_model(string name)
|
||||
0x8177 - void set_movie_path(string filename, int movieid)
|
||||
|
||||
0x8178 - void set_perk_image(int perkID, int value)
|
||||
0x8179 - void set_perk_ranks(int perkID, int value)
|
||||
@@ -103,8 +103,8 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8196 - void set_perk_int(int perkID, int value)
|
||||
0x8187 - void set_perk_agl(int perkID, int value)
|
||||
0x8188 - void set_perk_lck(int perkID, int value)
|
||||
0x8189 - void set_perk_name(int perkID, char* value)
|
||||
0x818a - void set_perk_desc(int perkID, char* value)
|
||||
0x8189 - void set_perk_name(int perkID, string value)
|
||||
0x818a - void set_perk_desc(int perkID, string value)
|
||||
0x8247 - void set_perk_freq(int value)
|
||||
|
||||
0x818b - void set_pipboy_available(int available)
|
||||
@@ -116,18 +116,18 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x818f - void set_perk_owed(int value)
|
||||
0x8190 - int get_perk_available(int perk)
|
||||
|
||||
0x8191 - int get_critter_current_ap(CritterPtr)
|
||||
0x8192 - void set_critter_current_ap(CritterPtr, int ap)
|
||||
0x8191 - int get_critter_current_ap(object critter)
|
||||
0x8192 - void set_critter_current_ap(object critter, int ap)
|
||||
|
||||
0x8193 - int active_hand()
|
||||
0x8194 - void toggle_active_hand()
|
||||
|
||||
0x8195 - void set_weapon_knockback(WeaponPtr, int type, float value)
|
||||
0x8196 - void set_target_knockback(CritterPtr, int type, float value)
|
||||
0x8197 - void set_attacker_knockback(CritterPtr, int type, float value)
|
||||
0x8198 - void remove_weapon_knockback(WeaponPtr)
|
||||
0x8199 - void remove_target_knockback(CritterPtr)
|
||||
0x819a - void remove_attacker_knockback(CritterPtr)
|
||||
0x8195 - void set_weapon_knockback(object weapon, int type, float value)
|
||||
0x8196 - void set_target_knockback(object critter, int type, float value)
|
||||
0x8197 - void set_attacker_knockback(object critter, int type, float value)
|
||||
0x8198 - void remove_weapon_knockback(object weapon)
|
||||
0x8199 - void remove_target_knockback(object critter)
|
||||
0x819a - void remove_attacker_knockback(object critter)
|
||||
|
||||
0x819d - void set_sfall_global(string/int varname, int/float value)
|
||||
0x819e - int get_sfall_global_int(string/int varname)
|
||||
@@ -152,26 +152,26 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x81aa - void set_xp_mod(int percentage)
|
||||
0x81ab - void set_perk_level_mod(int levels)
|
||||
|
||||
0x81c5 - void set_critter_hit_chance_mod(CritterPtr, int max, int mod)
|
||||
0x81c5 - void set_critter_hit_chance_mod(object, int max, int mod)
|
||||
0x81c6 - void set_base_hit_chance_mod(int max, int mod)
|
||||
0x81c7 - void set_critter_skill_mod(CritterPtr, int max)
|
||||
0x81c7 - void set_critter_skill_mod(object, int max)
|
||||
0x81c8 - void set_base_skill_mod(int max)
|
||||
0x81c9 - void set_critter_pickpocket_mod(CritterPtr, int max, int mod)
|
||||
0x81c9 - void set_critter_pickpocket_mod(object, int max, int mod)
|
||||
0x81ca - void set_base_pickpocket_mod(int max, int mod)
|
||||
|
||||
0x81a3 - int eax_available()
|
||||
0x81a4 - void set_eax_environment(int environment)
|
||||
|
||||
0x81a5 - void inc_npc_level(char* npc)
|
||||
0x8241 - int get_npc_level(char* npc)
|
||||
0x81a5 - void inc_npc_level(string npc)
|
||||
0x8241 - int get_npc_level(string npc)
|
||||
|
||||
0x81a6 - int get_viewport_x()
|
||||
0x81a7 - int get_viewport_y()
|
||||
0x81a8 - void set_viewport_x(int view_x)
|
||||
0x81a9 - void set_viewport_y(int view_y)
|
||||
|
||||
0x81ac - int get_ini_setting(char* setting)
|
||||
0x81eb - char* get_ini_string(char* setting)
|
||||
0x81ac - int get_ini_setting(string setting)
|
||||
0x81eb - string get_ini_string(string setting)
|
||||
|
||||
0x81af - int get_game_mode()
|
||||
|
||||
@@ -179,14 +179,14 @@ ox816c - int key_pressed(int dxScancode)
|
||||
|
||||
0x81b6 - void set_car_current_town(int town)
|
||||
|
||||
0x81bb - void set_fake_perk(char* name, int level, int image, char* desc)
|
||||
0x81bc - void set_fake_trait(char* name, int active, int image, char* desc)
|
||||
0x81bd - void set_selectable_perk(char* name, int active, int image, char* desc)
|
||||
0x81be - void set_perkbox_title(char* title)
|
||||
0x81bb - void set_fake_perk(string name, int level, int image, string desc)
|
||||
0x81bc - void set_fake_trait(string name, int active, int image, string desc)
|
||||
0x81bd - void set_selectable_perk(string name, int active, int image, string desc)
|
||||
0x81be - void set_perkbox_title(string title)
|
||||
0x81bf - void hide_real_perks()
|
||||
0x81c0 - void show_real_perks()
|
||||
0x81c1 - int has_fake_perk(char* name)
|
||||
0x81c2 - int has_fake_trait(char* name)
|
||||
0x81c1 - int has_fake_perk(string name)
|
||||
0x81c2 - int has_fake_trait(string name)
|
||||
0x81c3 - void perk_add_mode(int type)
|
||||
0x81c4 - void clear_selectable_perks()
|
||||
0x8225 - void remove_trait(int traitID)
|
||||
@@ -231,11 +231,11 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8266 - int ceil(float)
|
||||
0x8267 - int round(float)
|
||||
|
||||
0x81f2 - void set_palette(char* path)
|
||||
0x81f2 - void set_palette(string path)
|
||||
|
||||
0x81f3 - void remove_script(objptr)
|
||||
0x81f4 - void set_script(objptr, int scriptid)
|
||||
0x81f5 - int get_script(objptr)
|
||||
0x81f3 - void remove_script(object)
|
||||
0x81f4 - void set_script(object, int scriptid)
|
||||
0x81f5 - int get_script(object)
|
||||
|
||||
0x81f6 - int nb_create_char()
|
||||
|
||||
@@ -258,10 +258,10 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8202 - void fs_seek(int id, int pos)
|
||||
0x8203 - void fs_resize(int id, int size)
|
||||
|
||||
0x8204 - int get_proto_data(objptr, int offset)
|
||||
0x8205 - void set_proto_data(objptr, int offset, int value)
|
||||
0x8204 - int get_proto_data(object, int offset)
|
||||
0x8205 - void set_proto_data(object, int offset, int value)
|
||||
|
||||
0x8206 - void set_self(objptr)
|
||||
0x8206 - void set_self(object)
|
||||
0x8207 - void register_hook(int hook)
|
||||
|
||||
0x820d - int list_begin(int type)
|
||||
@@ -277,19 +277,19 @@ ox816c - int key_pressed(int dxScancode)
|
||||
0x8214 - void set_hero_race(int style)
|
||||
0x8215 - void set_hero_style(int style)
|
||||
|
||||
0x8216 - void set_critter_burst_disable(int critter, int disable)
|
||||
0x8216 - void set_critter_burst_disable(object critter, int disable)
|
||||
|
||||
0x8217 - int get_weapon_ammo_pid(objptr weapon)
|
||||
0x8218 - void set_weapon_ammo_pid(objptr weapon, int pid)
|
||||
0x8219 - int get_weapon_ammo_count(objptr weapon)
|
||||
0x821a - void set_weapon_ammo_count(objptr weapon, int count)
|
||||
0x8217 - int get_weapon_ammo_pid(object weapon)
|
||||
0x8218 - void set_weapon_ammo_pid(object weapon, int pid)
|
||||
0x8219 - int get_weapon_ammo_count(object weapon)
|
||||
0x821a - void set_weapon_ammo_count(object weapon, int count)
|
||||
|
||||
0x8220 - int get_screen_width()
|
||||
0x8221 - int get_screen_height()
|
||||
|
||||
0x8222 - void stop_game()
|
||||
0x8223 - void resume_game()
|
||||
0x8224 - void create_message_window(char* message)
|
||||
0x8224 - void create_message_window(string message)
|
||||
|
||||
0x8226 - int get_light_level()
|
||||
|
||||
@@ -297,16 +297,16 @@ ox816c - int key_pressed(int dxScancode)
|
||||
|
||||
0x8228 - int get_attack_type
|
||||
|
||||
0x822b - int play_sfall_sound(char* file, int loop)
|
||||
0x822b - int play_sfall_sound(string file, int loop)
|
||||
0x822c - void stop_sfall_sound(int ptr)
|
||||
|
||||
0x8235 - array string_split(char* string, char* split)
|
||||
0x8237 - int atoi(char* string)
|
||||
0x8238 - float atof(char* string)
|
||||
0x824e - char* substr(char* string, int start, int length)
|
||||
0x824f - int strlen(char* string)
|
||||
0x8250 - char* sprintf(char* format, any value)
|
||||
0x8251 - int charcode(char* string)
|
||||
0x8235 - array string_split(string string, string split)
|
||||
0x8237 - int atoi(string string)
|
||||
0x8238 - float atof(string string)
|
||||
0x824e - string substr(string string, int start, int length)
|
||||
0x824f - int strlen(string string)
|
||||
0x8250 - string sprintf(string format, any value)
|
||||
0x8251 - int charcode(string string)
|
||||
0x8253 - int typeof(any value)
|
||||
|
||||
0x823a - int get_tile_fid(int tile)
|
||||
@@ -318,35 +318,45 @@ ox816c - int key_pressed(int dxScancode)
|
||||
|
||||
0x8240 - void mark_movie_played(int id)
|
||||
|
||||
0x8248 - objptr get_last_target(objptr critter)
|
||||
0x8249 - objptr get_last_attacker(objptr critter)
|
||||
0x8248 - object get_last_target(object critter)
|
||||
0x8249 - object get_last_attacker(object critter)
|
||||
|
||||
0x824b - int tile_under_cursor
|
||||
0x824c - int gdialog_get_barter_mod
|
||||
0x824d - void set_inven_ap_cost
|
||||
|
||||
0x825c - void reg_anim_combat_check(int enable)
|
||||
0x825a - void reg_anim_destroy(objptr object)
|
||||
0x825b - void reg_anim_animate_and_hide(objptr object, int animID, int delay)
|
||||
0x825d - void reg_anim_light(objptr object, int radius, int delay)
|
||||
0x825e - void reg_anim_change_fid(objptr object, int FID, int delay)
|
||||
0x825f - void reg_anim_take_out(objptr object, int holdFrameID, int delay)
|
||||
0x8260 - void reg_anim_turn_towards(objptr object, int tile/targetObj, int delay)
|
||||
0x825a - void reg_anim_destroy(object object)
|
||||
0x825b - void reg_anim_animate_and_hide(object object, int animID, int delay)
|
||||
0x825d - void reg_anim_light(object object, int radius, int delay)
|
||||
0x825e - void reg_anim_change_fid(object object, int FID, int delay)
|
||||
0x825f - void reg_anim_take_out(object object, int holdFrameID, int delay)
|
||||
0x8260 - void reg_anim_turn_towards(object object, int tile/targetObj, int delay)
|
||||
|
||||
0x8261 - int metarule2_explosions(objptr object)
|
||||
0x8261 - int metarule2_explosions(object object)
|
||||
|
||||
0x8262 - void register_hook_proc(int hook, procedure proc)
|
||||
|
||||
0x8266 - char* message_str_game(int fileId, int messageId)
|
||||
0x8267 - int sneak_success
|
||||
0x8268 - int tile_light(int elevation, int tileNum)
|
||||
0x8269 - ObjectPtr obj_blocking_line(ObjectPtr objFrom, int tileTo, int blockingType)
|
||||
0x826a - ObjectPtr obj_blocking_tile(int tileNum, int elevation, int blockingType)
|
||||
0x826b - array tile_get_objs(int tileNum, int elevation)
|
||||
0x826c - array party_member_list(int includeHidden)
|
||||
0x826d - array path_find_to(ObjectPtr objFrom, int tileTo, int blockingType)
|
||||
0x826e - ObjectPtr create_spatial(int scriptID, int tile, int elevation, int radius)
|
||||
0x826f - int art_exists(int artFID)
|
||||
0x8270 - int obj_is_carrying_obj(ObjectPtr invenObj, ObjectPtr itemObj)
|
||||
0x826b - string message_str_game(int fileId, int messageId)
|
||||
0x826c - int sneak_success
|
||||
0x826d - int tile_light(int elevation, int tileNum)
|
||||
0x826e - object obj_blocking_line(object objFrom, int tileTo, int blockingType)
|
||||
0x826f - object obj_blocking_tile(int tileNum, int elevation, int blockingType)
|
||||
0x8270 - array tile_get_objs(int tileNum, int elevation)
|
||||
0x8271 - array party_member_list(int includeHidden)
|
||||
0x8272 - array path_find_to(object objFrom, int tileTo, int blockingType)
|
||||
0x8273 - object create_spatial(int scriptID, int tile, int elevation, int radius)
|
||||
0x8274 - int art_exists(int artFID)
|
||||
0x8275 - int obj_is_carrying_obj(object invenObj, object itemObj)
|
||||
|
||||
0x8276 - any sfall_func0(string funcName)
|
||||
0x8277 - any sfall_func1(string funcName, arg1)
|
||||
0x8278 - any sfall_func2(string funcName, arg1, arg2)
|
||||
0x8279 - any sfall_func3(string funcName, arg1, arg2, arg3)
|
||||
0x827a - any sfall_func4(string funcName, arg1, arg2, arg3, arg4)
|
||||
0x827b - any sfall_func5(string funcName, arg1, arg2, arg3, arg4, arg5)
|
||||
0x827c - any sfall_func6(string funcName, arg1, arg2, arg3, arg4, arg5, arg6)
|
||||
|
||||
|
||||
* These functions require AllowUnsafeScripting to be enabled in ddraw.ini
|
||||
|
||||
* These functions require AllowUnsafeScripting to be enabled in ddraw.ini
|
||||
+4
-6
@@ -18,8 +18,8 @@
|
||||
|
||||
#include "main.h"
|
||||
#include "AI.h"
|
||||
#include "SafeWrite.h"
|
||||
#include "FalloutEngine.h"
|
||||
#include "SafeWrite.h"
|
||||
|
||||
#include <hash_map>
|
||||
|
||||
@@ -45,8 +45,6 @@ static void _stdcall CombatAttackHook(DWORD source, DWORD target) {
|
||||
targets[source]=target;
|
||||
}
|
||||
|
||||
//static const DWORD _ai_attack=0x42A748;
|
||||
static const DWORD _combat_attack=0x422F3C;
|
||||
static void __declspec(naked) combat_attack_hook() {
|
||||
_asm {
|
||||
pushad;
|
||||
@@ -54,7 +52,7 @@ static void __declspec(naked) combat_attack_hook() {
|
||||
push eax;
|
||||
call CombatAttackHook;
|
||||
popad;
|
||||
jmp _combat_attack;
|
||||
jmp combat_attack_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +80,7 @@ end:
|
||||
|
||||
static void __declspec(naked) BlockCombatHook2() {
|
||||
__asm {
|
||||
mov eax, dword ptr ds:[0x518F10];
|
||||
mov eax, dword ptr ds:[_intfaceEnabled];
|
||||
test eax, eax;
|
||||
jz end;
|
||||
mov eax, CombatDisabled;
|
||||
@@ -123,4 +121,4 @@ void _stdcall AICombatStart() {
|
||||
void _stdcall AICombatEnd() {
|
||||
targets.clear();
|
||||
sources.clear();
|
||||
}
|
||||
}
|
||||
|
||||
+8
-9
@@ -658,12 +658,11 @@ static void __declspec(naked) DisplayBonusHtHDmg2() {
|
||||
push eax
|
||||
call sprintf_
|
||||
add esp, 4*5
|
||||
mov eax, 0x472569
|
||||
jmp eax
|
||||
push 0x472569
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
static const DWORD roll_random=0x4A30C0;
|
||||
static const DWORD UnarmedAttacksFixEnd=0x423A0D;
|
||||
static void __declspec(naked) UnarmedAttacksFix() {
|
||||
__asm {
|
||||
@@ -674,7 +673,7 @@ static void __declspec(naked) UnarmedAttacksFix() {
|
||||
PowKickHPunch:
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0x5; // 5% chance of critical hit
|
||||
jle CriticalHit;
|
||||
jmp end;
|
||||
@@ -687,7 +686,7 @@ HKickJabCheck:
|
||||
HKickJab:
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0xa; // 10% chance of critical hit
|
||||
jle CriticalHit;
|
||||
jmp end;
|
||||
@@ -696,7 +695,7 @@ Haymaker:
|
||||
jnz PalmStrike;
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0xf; // 15% chance of critical hit
|
||||
jle CriticalHit;
|
||||
jmp end;
|
||||
@@ -705,7 +704,7 @@ PalmStrike:
|
||||
jnz PiercingStrike;
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0x14; // 20% chance of critical hit
|
||||
jle CriticalHit;
|
||||
jmp end;
|
||||
@@ -714,7 +713,7 @@ PiercingStrike:
|
||||
jnz PiercingKick;
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0x28; // 40% chance of critical hit
|
||||
jle CriticalHit;
|
||||
jmp end;
|
||||
@@ -723,7 +722,7 @@ PiercingKick:
|
||||
jnz end;
|
||||
mov edx,0x64;
|
||||
mov eax,0x1;
|
||||
call roll_random;
|
||||
call roll_random_;
|
||||
cmp eax,0x32; // 50% chance of critical hit
|
||||
jg end;
|
||||
CriticalHit:
|
||||
|
||||
+268
-323
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
void AnimationsAtOnceInit(signed char aniMax);
|
||||
void AnimationsAtOnceInit();
|
||||
void AnimationsAtOnceExit();
|
||||
|
||||
|
||||
|
||||
+24
-5
@@ -250,6 +250,7 @@ void LoadArrays(HANDLE h) {
|
||||
if (nextarrayid == 0) nextarrayid++;
|
||||
arrays.insert(array_pair(nextarrayid, arrayVar));
|
||||
savedArrays[arrayVar.key] = nextarrayid++;
|
||||
arrayVar.keyHash.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,9 +311,26 @@ void DESetArray(int id, const DWORD* types, const void* data) {
|
||||
|
||||
/*
|
||||
Array manipulation functions for script operators
|
||||
TODO: move somewhere else
|
||||
*/
|
||||
|
||||
const char* _stdcall GetSfallTypeName(DWORD dataType) {
|
||||
switch (dataType) {
|
||||
case DATATYPE_NONE:
|
||||
return "(none)";
|
||||
case DATATYPE_STR:
|
||||
return "string";
|
||||
case DATATYPE_FLOAT:
|
||||
return "float";
|
||||
case DATATYPE_INT:
|
||||
return "integer";
|
||||
default:
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
|
||||
DWORD _stdcall getSfallTypeByScriptType(DWORD varType) {
|
||||
varType&=0xffff;
|
||||
varType &= 0xffff;
|
||||
switch (varType) {
|
||||
case VAR_TYPE_STR:
|
||||
case VAR_TYPE_STR2:
|
||||
@@ -408,7 +426,8 @@ DWORD _stdcall GetArray(DWORD id, DWORD key, DWORD keyType, DWORD* resultType) {
|
||||
return 0;
|
||||
} else {
|
||||
el = key;
|
||||
if (arr.size() <= el) return 0;
|
||||
// check for invalid index
|
||||
if (el < 0 || el >= arr.size()) return 0;
|
||||
}
|
||||
switch(arr.val[el].type) {
|
||||
case DATATYPE_NONE: return 0;
|
||||
@@ -436,9 +455,6 @@ void _stdcall SetArray(DWORD id, DWORD key, DWORD keyType, DWORD val, DWORD valT
|
||||
if (valType == DATATYPE_INT && val == 0 && allowUnset) {
|
||||
// after assigning zero to a key, no need to store it, because "get_array" returns 0 for non-existent keys: try unset
|
||||
if (el >= 0) {
|
||||
// remove key=>value pair from vector
|
||||
arr.clearRange(el, el + 2);
|
||||
arr.val.erase(arr.val.begin() + el, arr.val.begin() + (el + 2));
|
||||
// remove from hashtable
|
||||
arr.keyHash.erase(elIter);
|
||||
// shift all keyHash references
|
||||
@@ -446,6 +462,9 @@ void _stdcall SetArray(DWORD id, DWORD key, DWORD keyType, DWORD val, DWORD valT
|
||||
if (elIter->second >= (DWORD)el)
|
||||
elIter->second -= 2;
|
||||
}
|
||||
// remove key=>value pair from vector
|
||||
arr.clearRange(el, el + 2);
|
||||
arr.val.erase(arr.val.begin() + el, arr.val.begin() + (el + 2));
|
||||
}
|
||||
} else {
|
||||
if (el == -1) {
|
||||
|
||||
+5
-1
@@ -4,7 +4,7 @@
|
||||
#include <unordered_map>
|
||||
#include <set>
|
||||
|
||||
#define ARRAY_MAX_STRING (1024) // maximum length of string to be stored as array key or value
|
||||
#define ARRAY_MAX_STRING (255) // maximum length of string to be stored as array key or value
|
||||
#define ARRAY_MAX_SIZE (100000) // maximum number of array elements,
|
||||
// so total maximum memory/disk footprint of one array is: 16 + (ARRAY_MAX_STRING + 8) * ARRAY_MAX_SIZE
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
extern char get_all_arrays_special_key[];
|
||||
|
||||
// TODO: rewrite
|
||||
class sArrayElement
|
||||
{
|
||||
public:
|
||||
@@ -79,6 +80,8 @@ typedef std::tr1::unordered_map<sArrayElement, DWORD, sArrayElement_HashFunc, sA
|
||||
/**
|
||||
This class represents sfall array
|
||||
It can be both list (normal array) and map (associative)
|
||||
|
||||
TODO: rewrite for better interface (especially associate arrays)
|
||||
*/
|
||||
class sArrayVar
|
||||
{
|
||||
@@ -139,6 +142,7 @@ void GetArrays(int* arrays);
|
||||
void DEGetArray(int id, DWORD* types, void* data);
|
||||
void DESetArray(int id, const DWORD* types, const void* data);
|
||||
|
||||
const char* _stdcall GetSfallTypeName(DWORD dataType);
|
||||
DWORD _stdcall getSfallTypeByScriptType(DWORD varType);
|
||||
DWORD _stdcall getScriptTypeBySfallType(DWORD dataType);
|
||||
// creates new normal (persistent) array. len == -1 specifies associative array (map)
|
||||
|
||||
+2
-2
@@ -19,10 +19,10 @@
|
||||
#include "main.h"
|
||||
|
||||
#include "BarBoxes.h"
|
||||
#include "FalloutEngine.h"
|
||||
|
||||
static const DWORD DisplayBoxesRet1=0x4615A8;
|
||||
static const DWORD DisplayBoxesRet2=0x4615BE;
|
||||
static const DWORD _add_bar_box=0x4616F0;
|
||||
struct sBox {
|
||||
DWORD msg;
|
||||
DWORD colour;
|
||||
@@ -39,7 +39,7 @@ start:
|
||||
test eax, eax;
|
||||
jz next;
|
||||
lea eax, [ebx+5];
|
||||
call _add_bar_box;
|
||||
call add_bar_box_;
|
||||
add esi, eax;
|
||||
next:
|
||||
inc ebx;
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ void BooksInit() {
|
||||
GetPrivateProfileString("Misc", "BooksFile", "", buf, MAX_PATH, ini);
|
||||
if (strlen(buf)>0) {
|
||||
sprintf(iniBooks, ".\\%s", buf);
|
||||
dlog("Applying books patch... ", DL_INIT);
|
||||
dlog("Applying books patch...", DL_INIT);
|
||||
memset(books,0,sizeof(sBook)*BooksCount);
|
||||
|
||||
int i, n = 0, count;
|
||||
@@ -111,6 +111,6 @@ void BooksInit() {
|
||||
}
|
||||
|
||||
MakeCall(0x49B9FB, &obj_use_book_hook, true);
|
||||
dlog_f(" (%d/%d books) Done\r\n", DL_INIT, n, count);
|
||||
dlog_f(" (%d/%d books) Done\n", DL_INIT, n, count);
|
||||
}
|
||||
}
|
||||
+671
-193
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user