mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f44db1730c | ||
|
|
fbdb9777c7 | ||
|
|
0f1e648e1a | ||
|
|
7bd93af696 | ||
|
|
6319017186 | ||
|
|
29ad288f52 | ||
|
|
a10196e2ca | ||
|
|
88779c10e0 | ||
|
|
919384bac7 | ||
|
|
a60f58c0eb | ||
|
|
558e654dbf | ||
|
|
5ab389a51a | ||
|
|
3203152ca4 | ||
|
|
134dc03dc9 | ||
|
|
1ac8825b1b | ||
|
|
851e9b6d59 | ||
|
|
cbb6afac7c | ||
|
|
bceb505024 | ||
|
|
005684fa3b | ||
|
|
009a6cc21d | ||
|
|
ee64d981fa | ||
|
|
bb13dbd727 | ||
|
|
e813188e67 | ||
|
|
64a59211ba | ||
|
|
88f3622a5d | ||
|
|
e6d958a83b | ||
|
|
6796dc1012 | ||
|
|
90149b4fb6 | ||
|
|
41a398cbf2 | ||
|
|
88cd177ebb | ||
|
|
569721381c | ||
|
|
8af87a5252 | ||
|
|
96cb6c51ea | ||
|
|
5874450f60 | ||
|
|
f088c9bb70 | ||
|
|
7f8481d03a | ||
|
|
f162a5ab0c | ||
|
|
ce69e8123e | ||
|
|
b5e85f2f89 | ||
|
|
f7fe463f42 | ||
|
|
27f2d57ebd | ||
|
|
bbe789d013 | ||
|
|
76ea3ed383 | ||
|
|
c6f3dbfcf6 | ||
|
|
49ce654d72 | ||
|
|
b2a1160492 | ||
|
|
5da2ec76de | ||
|
|
123f69268d | ||
|
|
6d0c84e783 | ||
|
|
c652fae849 | ||
|
|
3399e07958 | ||
|
|
044af677d9 | ||
|
|
752ad8ae01 | ||
|
|
9d9d8ada49 | ||
|
|
6bd7d3ebca | ||
|
|
9bc71a5d2a | ||
|
|
6d66232162 | ||
|
|
fe5f4bb2aa | ||
|
|
8a7d22dd03 | ||
|
|
fac0b73d9e | ||
|
|
2974210ad3 | ||
|
|
bb0f2bb8db | ||
|
|
715b55dda8 | ||
|
|
999d818c86 | ||
|
|
1d7fd442b0 | ||
|
|
3062533492 | ||
|
|
032e1d13f3 | ||
|
|
9f0797f8ad | ||
|
|
a7c66685b9 | ||
|
|
118b186d4d | ||
|
|
a8718dab2f | ||
|
|
ccd897281f | ||
|
|
d200262a2b | ||
|
|
0ebe3ef1a4 | ||
|
|
d0c97f7118 | ||
|
|
0bda53e109 | ||
|
|
93cd7a08ad | ||
|
|
44d668f50b | ||
|
|
f368973299 | ||
|
|
96802c9642 | ||
|
|
39221065af | ||
|
|
95f95e7b38 | ||
|
|
41c8722179 | ||
|
|
3b780110ea | ||
|
|
448dbdb31e | ||
|
|
033376000c | ||
|
|
bc2dabc461 | ||
|
|
08b5e3a769 | ||
|
|
09c9c5cce0 | ||
|
|
b4b1698345 | ||
|
|
2a20209bb8 | ||
|
|
84c7ac0536 | ||
|
|
46f8820ecf | ||
|
|
5d4b8fdd7b | ||
|
|
44603174dd | ||
|
|
d37fbd8390 | ||
|
|
2f22a1e982 | ||
|
|
3f03cf3c18 | ||
|
|
1b3b5dc523 | ||
|
|
fff48407c3 | ||
|
|
841e741e91 | ||
|
|
d4a501d813 | ||
|
|
5e056f1743 | ||
|
|
35a94b5418 | ||
|
|
7eaef76f6f | ||
|
|
30002664ef | ||
|
|
c2f7e38a43 | ||
|
|
8a5674f2d9 | ||
|
|
8c2483a289 | ||
|
|
e14ac89463 | ||
|
|
d5a38eb3aa | ||
|
|
177137f2ee | ||
|
|
76f88eae18 | ||
|
|
28962f428f | ||
|
|
aaa76cb3d1 | ||
|
|
ea1c00ec91 | ||
|
|
410c7ab417 | ||
|
|
ab3ddc68b6 | ||
|
|
1652072391 | ||
|
|
051b1c98aa | ||
|
|
56945c7437 | ||
|
|
2f6f0d8b28 | ||
|
|
0e715236bf | ||
|
|
b24a860d40 | ||
|
|
120a8cd964 | ||
|
|
62d4577152 | ||
|
|
2d8ea2b44c | ||
|
|
4ef20c3526 | ||
|
|
5e0e8dd2f1 | ||
|
|
04bd88cdc2 | ||
|
|
839e86ed26 | ||
|
|
eeef8759d3 | ||
|
|
c4903abd4c | ||
|
|
e0c0b9ba19 | ||
|
|
b9c7f5ea82 | ||
|
|
56fdec8b37 | ||
|
|
470a0b3386 | ||
|
|
279c524da9 |
@@ -1,5 +1,5 @@
|
||||
[sfall]
|
||||
SaveInCombat=Cannot save at this time
|
||||
SaveInCombat=Cannot save at this time.
|
||||
KarmaGain=You gained %d karma.
|
||||
KarmaLoss=You lost %d karma.
|
||||
HighlightFail1=You aren't carrying a motion sensor.
|
||||
@@ -7,6 +7,9 @@ HighlightFail2=Your motion sensor is out of charge.
|
||||
SuperStimExploitMsg=You cannot use a super stim on someone who is not injured!
|
||||
BlockedCombat=You cannot enter combat at this time.
|
||||
SaveSfallDataFail=ERROR saving extended savegame information! Check if other programs interfere with savegame files/folders and try again.
|
||||
PartyLvlMsg=Lvl:
|
||||
PartyACMsg=AC:
|
||||
PartyAddictMsg=Addict
|
||||
|
||||
[AppearanceMod]
|
||||
RaceText=Race
|
||||
|
||||
@@ -19,6 +19,7 @@ Robe=16777218
|
||||
; Sulik
|
||||
[1]
|
||||
PID=16777313
|
||||
WeaponAnims=1,3,4,6
|
||||
Default=16777280
|
||||
Leather=16777325
|
||||
Power=16777324
|
||||
@@ -29,6 +30,7 @@ Combat=16777322
|
||||
; Vic
|
||||
[2]
|
||||
PID=16777278
|
||||
WeaponAnims=1,5,7
|
||||
Default=16777307
|
||||
Jacket=16777329
|
||||
Combat=16777330
|
||||
@@ -39,6 +41,7 @@ Leather=16777333
|
||||
; Cassidy
|
||||
[3]
|
||||
PID=16777305
|
||||
WeaponAnims=4,5,7
|
||||
Default=16777354
|
||||
Leather=16777260
|
||||
Power=16777328
|
||||
@@ -49,6 +52,7 @@ Combat=16777326
|
||||
; Myron
|
||||
[4]
|
||||
PID=16777376
|
||||
WeaponAnims=1,5
|
||||
Default=16777304
|
||||
Leather=
|
||||
Power=16777349
|
||||
@@ -57,6 +61,7 @@ Combat=16777350
|
||||
; Cat Jules
|
||||
[5]
|
||||
PID=16777734
|
||||
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
Default=16777353
|
||||
Leather=16777347
|
||||
Metal=16777348
|
||||
@@ -66,6 +71,7 @@ Combat=16777226
|
||||
; Kitsune
|
||||
[6]
|
||||
PID=16777724
|
||||
WeaponAnims=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
Default=16777222
|
||||
Leather=16777221
|
||||
Metal=16777223
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
Key=42
|
||||
|
||||
; Set to 1 to also highlight containers
|
||||
Containers=0
|
||||
Containers=1
|
||||
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=0
|
||||
Corpses=1
|
||||
|
||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
||||
CheckLOS=0
|
||||
@@ -38,3 +38,18 @@ MotionScanner=0
|
||||
;If you want to control only specific critters, uncomment the PIDList line and set a comma delimited list of PIDs
|
||||
Mode=0
|
||||
;PIDList=62,89,97,107,160,161
|
||||
|
||||
;Choose a notification box to display the name of the controlled critter above the interface bar
|
||||
;Must be between 5 and (4 + the value of BoxBarCount in ddraw.ini)
|
||||
;Set to 0 to disable
|
||||
DisplayName=0
|
||||
|
||||
;Set the color of display name, available colors:
|
||||
;0 - green
|
||||
;1 - red
|
||||
;2 - white
|
||||
;3 - yellow
|
||||
;4 - dark yellow
|
||||
;5 - blue
|
||||
;6 - purple
|
||||
DisplayNameColor=0
|
||||
|
||||
+123
-23
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.0.4
|
||||
;v4.1.2
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -17,7 +17,8 @@ NumSoundBuffers=0
|
||||
;Set to 1 to allow attaching sound files to combat float messages
|
||||
AllowSoundForFloats=1
|
||||
|
||||
;Set to 1 to automatically search for alternative formats when Fallout tries to play an acm
|
||||
;Set to 1 to automatically search for alternative formats (mp3/wma/wav) when Fallout tries to play an acm
|
||||
;Set to 2 to play alternative music files even if original acm files are not present in the music folder
|
||||
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
|
||||
AllowDShowSound=0
|
||||
|
||||
@@ -70,6 +71,14 @@ GPUBlt=0
|
||||
;Requires graphics mode 4 or 5, and GPUBlt set to 1
|
||||
Use32BitHeadGraphics=0
|
||||
|
||||
;Set to 1 to automatically search for alternative avi video files when Fallout tries to play the game movies
|
||||
;Requires graphics mode 4 or 5
|
||||
AllowDShowMovies=0
|
||||
|
||||
;Fade effect time percentage modifier
|
||||
;Default is 100. Decrease/increase this value to speed up/slow down fade effects
|
||||
FadeMultiplier=100
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Input]
|
||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
||||
@@ -107,7 +116,7 @@ SpeedModKey=-1
|
||||
|
||||
;A key to press to toggle the speed tweak on or off
|
||||
;Specify 0 if you don't want a toggle key, or a DX scancode otherwise
|
||||
SpeedToggleKey=0x00
|
||||
SpeedToggleKey=0
|
||||
|
||||
;The keys corresponding to the 10 speed slots
|
||||
;Set to 0 to disable a slot, otherwise specify the DX scancode of the key you want to use
|
||||
@@ -128,9 +137,20 @@ SpeedKey9=0x00
|
||||
WindowScrollKey=0
|
||||
|
||||
;A key to press to reload your currently equipped weapon
|
||||
;Set to 0 if you don't want a reload key, or a DX scancode otherwise
|
||||
ReloadWeaponKey=0
|
||||
|
||||
;A key to hold down to let you move/drop a whole stack of items at once without the 'Move Items' window
|
||||
;Set to 0 if you don't want to use a modifier key, or a DX scancode otherwise
|
||||
ItemFastMoveKey=29
|
||||
|
||||
;Set to 1 to skip the 'Move Items' window when taking items from containers or corpses and not holding down ItemFastMoveKey
|
||||
;Requires ItemFastMoveKey to be enabled
|
||||
FastMoveFromContainer=0
|
||||
|
||||
;A key to press to open a debug game editor
|
||||
;Set to 0 to disable, or a DX scancode otherwise
|
||||
;Requires sfall debugging mode and FalloutClient.exe from the modders pack
|
||||
DebugEditorKey=0
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
@@ -164,7 +184,7 @@ 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.
|
||||
;Setting this greater than 17 requires a replacement background frm, or you'll get glitched graphics
|
||||
;Setting this greater than 17 requires a replacement background FRM, or you'll get glitched graphics
|
||||
WorldMapSlots=0
|
||||
|
||||
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
|
||||
@@ -189,6 +209,10 @@ WorldMapSlots=0
|
||||
;Modified: master_patches > critter_patches > patchXXX.dat > critter_dat > f2_res_patches > f2_res_dat > master_dat
|
||||
DataLoadOrderPatch=0
|
||||
|
||||
;Set to 1 to enable loading alternative dialog msg files from text/language/dialog_female/ for female PC
|
||||
;Set to 2 to also load subtitle files from text/language/cuts_female/ for female PC
|
||||
FemaleDialogMsgs=0
|
||||
|
||||
;To change the default and starting player models, uncomment the next four lines.
|
||||
;The default models can also be changed ingame via script
|
||||
;MaleStartModel=hmwarr
|
||||
@@ -288,7 +312,7 @@ SaveInCombatFix=1
|
||||
;Player's level is capped once the highest specified level is reached
|
||||
;XPTable=50,100,200
|
||||
|
||||
;Set to 1 to enable additional weapon animations codes from o-t
|
||||
;Set to 1 to enable additional weapon animation codes from o-t
|
||||
;The 4 byte value at 0x39 of weapon protos may range from 0 to 15 rather than 0 to 10
|
||||
;Since the letters 'n' and 'r' are in use for other animations, an animation code of 11 corrisponds to 's' and 15 to 't'
|
||||
AdditionalWeaponAnims=1
|
||||
@@ -328,23 +352,34 @@ CorpseLineOfFireFix=0
|
||||
;Set to 1 (or some higher number if needed, the maximum is 127) to prevent 100% CPU use
|
||||
ProcessorIdle=-1
|
||||
|
||||
;Set a number of how many protos per type can be loaded into memory at once (valid range: 512..4096)
|
||||
;Set to -1 to let set_proto_data script function automatically increase the limit when needed
|
||||
LoadProtoMaxLimit=-1
|
||||
|
||||
;Set to 1 if using the hero appearance mod
|
||||
EnableHeroAppearanceMod=0
|
||||
|
||||
;Set to 1 to skip the 3 opening movies
|
||||
SkipOpeningMovies=0
|
||||
|
||||
;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.
|
||||
;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
|
||||
|
||||
;Set to 1 to fix NPCs not checking weapon perks properly when searching for the best weapon
|
||||
;Note that enabling this option can significantly affect the weapon choice of some NPCs in combat
|
||||
AIBestWeaponFix=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
|
||||
AllowLargeTiles=0
|
||||
|
||||
;Change the Skilldex cursor frm numbers
|
||||
;Set to 1 to boost the maximum number of tile FRMs from 4096 to 16383
|
||||
MoreTiles=0
|
||||
|
||||
;Change the Skilldex cursor FRM numbers
|
||||
;Default is 293 for all skills
|
||||
Lockpick=293
|
||||
Steal=293
|
||||
@@ -354,19 +389,22 @@ Doctor=293
|
||||
Science=293
|
||||
Repair=293
|
||||
|
||||
;Remove window position rounding
|
||||
RemoveWindowRounding=0
|
||||
|
||||
;Set to 1 to add scroll buttons to the pip boy quest list, and remove the quests per area limit
|
||||
;Set to 1 to add scroll buttons to the pipboy quest list, and remove the quests per area limit
|
||||
;Set to 2 to use a different set of scroll buttons
|
||||
UseScrollingQuestsList=1
|
||||
|
||||
;To change the location of quest list scroll buttons, uncomment the next two lines
|
||||
;Defaults are 140 for the X-axis and 334 for the Y-axis
|
||||
;QuestsScrollButtonsX=140
|
||||
;QuestsScrollButtonsY=334
|
||||
|
||||
;Uncomment these lines to control the premade characters offered when starting a new game
|
||||
;Multiple options should be separated by commas, and there must be the same number of entries in both lines
|
||||
;PremadePaths=combat,diplomat,stealth
|
||||
;PremadeFIDs=201,203,202
|
||||
|
||||
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
||||
;Syntax is 'city id : global id', with each city/global pair separated by a comma.
|
||||
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
|
||||
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
|
||||
|
||||
;Set this to a valid path to save a copy of the console contents
|
||||
@@ -375,11 +413,19 @@ UseScrollingQuestsList=1
|
||||
;Set to 1 to add additional pages of save slots
|
||||
ExtraSaveSlots=0
|
||||
|
||||
;To use more than one save slot for quick saving (F6 key) without picking a slot beforehand, set the next two lines
|
||||
;AutoQuickSave sets how many save slots on a page you want to use for quick saving (valid range: 1..10)
|
||||
;AutoQuickSavePage is the page number to use (valid range: 1..1000) if ExtraSaveSlots is enabled
|
||||
;The quick saves will be rotated from the first slot on the page to the n-th slot
|
||||
;Set to 0 to disable. AutoQuickSave will use page 1 if AutoQuickSavePage is disabled
|
||||
AutoQuickSave=0
|
||||
AutoQuickSavePage=0
|
||||
|
||||
;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
|
||||
;These lines allow you to control the karma FRMs displayed on the character screen
|
||||
;Number of KarmaPoints should be 1 less than number of KarmaFRMs
|
||||
;KarmaFRMs=47,48,49
|
||||
;KarmaPoints=-100,100
|
||||
@@ -391,8 +437,11 @@ ScienceOnCritters=0
|
||||
;Default is 166
|
||||
SpeedInventoryPCRotation=166
|
||||
|
||||
;Uncomment to set the text colour of the extra 5 interface boxes
|
||||
;The line must contain a 5 digits, each either a 0 for green or 1 for red
|
||||
;Modify the number of the extra interface boxes available to modders. (Default is 5, and the maximum is 95)
|
||||
BoxBarCount=5
|
||||
|
||||
;Uncomment to set the text colour of the extra interface boxes
|
||||
;The line must contain the same number of digits as the value of BoxBarCount, each either a 0 for green or 1 for red
|
||||
;BoxBarColours=00000
|
||||
|
||||
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly.
|
||||
@@ -401,6 +450,9 @@ BonusHtHDamageFix=1
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
DisplayBonusDamage=0
|
||||
|
||||
;Set to 1 to display the range of the second attack mode in the inventory when you switch weapon modes in active item slots
|
||||
DisplaySecondWeaponRange=1
|
||||
|
||||
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||
AnimationsAtOnceLimit=120
|
||||
|
||||
@@ -433,10 +485,11 @@ BoostScriptDialogLimit=0
|
||||
|
||||
;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 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)
|
||||
;Only the PC uses CritterInvSizeLimit. Other critters will use the unused stat (STAT_unused = 10) or have the size limit of 100 if the stat is not set
|
||||
;Add 4 to the mode to limit the weight check to used items only
|
||||
;You can use line number 542/543 in proto.msg and line number 35 in inventry.msg to set up custom messages for item size
|
||||
CritterInvSizeLimitMode=0
|
||||
CritterInvSizeLimit=200
|
||||
CritterInvSizeLimit=100
|
||||
|
||||
;Some bit flags to alter behaviour of the motion sensor
|
||||
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
|
||||
@@ -463,9 +516,17 @@ SuperStimExploitFix=0
|
||||
InventoryApCost=4
|
||||
QuickPocketsApCostReduction=2
|
||||
|
||||
;Set to 1 to allow objects seeing through other objects with their ShootThru flag set
|
||||
;Set to 1 to allow objects seeing through other objects that have their ShootThru flag set
|
||||
;Note that enabling this option can cause unexpected NPC behavior in some situations
|
||||
ObjCanSeeObj_ShootThru_Fix=0
|
||||
|
||||
;Set to 1 to fix the broken obj_can_hear_obj script function
|
||||
ObjCanHearObjFix=0
|
||||
|
||||
;Set to 1 to enable the mood argument of start_gdialog script function to be available for talking heads
|
||||
;If the argument value is -1, the mood will be determined by the local variable 0 of the script (vanilla behavior)
|
||||
StartGDialogFix=0
|
||||
|
||||
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
||||
ComputeSprayMod=0
|
||||
|
||||
@@ -523,6 +584,9 @@ StackEmptyWeapons=0
|
||||
;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
|
||||
|
||||
;Set to 1 to change the counter in the 'Move Items' window to start at the maximum number of items
|
||||
ItemCounterDefaultMax=0
|
||||
|
||||
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
|
||||
DialogOptions9Lines=1
|
||||
|
||||
@@ -536,18 +600,51 @@ DontTurnOffSneakIfYouRun=0
|
||||
CanSellUsedGeiger=1
|
||||
|
||||
;Set to 1 to fix the issue with being able to charge the car by using cells on other scenary/critters
|
||||
;Set to 0 if another mod you're using has custom vehicles
|
||||
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
|
||||
;By default, the files will have consecutive numbers assigned beginning with 0
|
||||
;You can use the syntax 'filename:number' to manually assign numbers to specific msg files, with each pair separated by a comma
|
||||
;If a file after the specified pair does not have a number assigned, it will have the next consecutive number from the last pair
|
||||
;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 use Fallout's normal text font instead of DOS-like font on the world map
|
||||
WorldMapFontPatch=0
|
||||
|
||||
;Set to 1 to keep the selected attack mode when moving the weapon between active item slots
|
||||
KeepWeaponSelectMode=1
|
||||
|
||||
;Set to 1 to display full item description for weapon/ammo in barter screen
|
||||
FullItemDescInBarter=0
|
||||
|
||||
;Set to 1 to display experience points with the bonus from Swift Learner perk when gained from non-scripted situations
|
||||
DisplaySwiftLearnerExp=1
|
||||
|
||||
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
|
||||
PartyMemberExtraInfo=0
|
||||
|
||||
;Set to 1 to fix the bug of using First Aid/Doctor skills when using them on the player
|
||||
;This will cause the party member to apply his/her skills when you use First Aid/Doctor skills on the player, but only if
|
||||
;the player is standing next to the party member
|
||||
;Note that because the related engine function is not fully implemented, enabling this option without a global script
|
||||
;that overrides First Aid/Doctor functions has very limited usefulness
|
||||
PartyMemberSkillFix=0
|
||||
|
||||
;Set to 1 to skip loading game settings from a saved game, except for the game/combat difficulty settings
|
||||
;Set to 2 to also skip loading the game/combat difficulty settings
|
||||
SkipLoadingGameSettings=0
|
||||
|
||||
;Set to 1 to prevent the inventory/loot/automap interfaces from being placed on top of other script-created windows
|
||||
InterfaceDontMoveOnTop=0
|
||||
|
||||
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||
CreditsAtBottom=0
|
||||
|
||||
@@ -567,8 +664,8 @@ GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
|
||||
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
|
||||
;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and 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
|
||||
@@ -586,12 +683,12 @@ DebugMode=0
|
||||
SkipCompatModeCheck=0
|
||||
|
||||
;Set to 1 to skip the executable file size check
|
||||
;Does not require enabling sfall debugging mode
|
||||
;Does not require sfall debugging mode
|
||||
SkipSizeCheck=0
|
||||
|
||||
;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
|
||||
;Does not require sfall debugging mode
|
||||
;ExtraCRC=0x00000000,0x00000000
|
||||
|
||||
;Set to 1 to stop Fallout from deleting non readonly protos at startup
|
||||
@@ -601,6 +698,9 @@ 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
|
||||
|
||||
;Set to 1 to force sfall to inject all hooks code into the game, even if corresponding hook scripts don't exist
|
||||
InjectAllGameHooks=0
|
||||
|
||||
;These options control what output is saved in the debug log (sfall-log.txt)
|
||||
|
||||
;Prints messages duing sfall initialization
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Example implementation of the algorithm of how the game engine sets the explosive timer.
|
||||
*/
|
||||
|
||||
#include "..\..\scripting_docs\headers\sfall.h"
|
||||
#include "..\..\scripting_docs\headers\define_lite.h"
|
||||
|
||||
// from CONDTION.H
|
||||
#define ROLL_CRITICAL_FAILURE (0)
|
||||
#define ROLL_FAILURE (1)
|
||||
#define ROLL_SUCCESS (2)
|
||||
#define ROLL_CRITICAL_SUCCESS (3)
|
||||
|
||||
procedure start;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook(HOOK_EXPLOSIVETIMER);
|
||||
end else begin
|
||||
variable
|
||||
time := get_sfall_arg,
|
||||
result := ROLL_CRITICAL_FAILURE;
|
||||
|
||||
if has_trait(TRAIT_PERK, dude_obj, PERK_demolition_expert_perk) then
|
||||
result := ROLL_SUCCESS;
|
||||
else begin
|
||||
result := roll_vs_skill(dude_obj, SKILL_TRAPS, 0);
|
||||
end
|
||||
|
||||
if (result) then begin
|
||||
if (result == ROLL_FAILURE) then
|
||||
time /= 2;
|
||||
else begin // success or critical success
|
||||
result := ROLL_SUCCESS;
|
||||
end
|
||||
end else begin // critical failure
|
||||
time := 0;
|
||||
result := ROLL_FAILURE;
|
||||
end
|
||||
|
||||
set_sfall_return(time);
|
||||
set_sfall_return(result); // failure/success
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Example implementation of the algorithm of how the game engine checks if one critter sees another critter.
|
||||
|
||||
NOTE: the AllowUnsafeScripting option must be enabled.
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
#define can_see_(source, target) call_offset_r2(0x412BEC, source, target)
|
||||
#define obj_dist_(target, source) call_offset_r2(0x48BBD4, target, source)
|
||||
|
||||
procedure start;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook(HOOK_WITHINPERCEPTION);
|
||||
end else begin
|
||||
variable
|
||||
source := get_sfall_arg,
|
||||
target := get_sfall_arg,
|
||||
original := get_sfall_arg,
|
||||
hookType := get_sfall_arg, /* new arg */
|
||||
result := 0,
|
||||
distance;
|
||||
|
||||
if target then begin
|
||||
distance := get_critter_stat(source, STAT_pe);
|
||||
|
||||
if can_see_(source, target) then begin
|
||||
distance *= 5;
|
||||
if (get_flags(target) bwand FLAG_TRANSGLASS) then distance /= 2;
|
||||
end else if combat_is_initialized then begin
|
||||
distance *= 2;
|
||||
end
|
||||
|
||||
if (target == dude_obj) then begin
|
||||
if sneak_success then begin
|
||||
distance /= 4;
|
||||
if has_skill(target, SKILL_SNEAK) > 120 then distance -= 1;
|
||||
end else if dude_is_sneaking then begin
|
||||
distance := distance * 2 / 3;
|
||||
end
|
||||
end
|
||||
|
||||
if obj_dist_(target, source) <= distance then result := 1;
|
||||
|
||||
// example
|
||||
if (result) then begin
|
||||
display_msg("hs_withinperception: " + obj_name(source) + " sees " + obj_name(target) + " [original: " + original + " script: " + result + "]");
|
||||
end else begin
|
||||
display_msg("hs_withinperception: " + obj_name(source) + " does not see " + obj_name(target) + " [original: " + original + " script: " + result + "]");
|
||||
end
|
||||
end
|
||||
|
||||
//set_sfall_return(result);
|
||||
end
|
||||
end
|
||||
Binary file not shown.
@@ -67,7 +67,7 @@ procedure KeyPressHandler begin
|
||||
scanCode := get_sfall_arg,
|
||||
scanner, charges;
|
||||
|
||||
if scanCode == highlightKey then begin
|
||||
if scanCode == highlightKey and not(get_game_mode bwand INTFACELOOT) then begin
|
||||
if pressed then begin
|
||||
isHighlight := true;
|
||||
if motionScanner then begin
|
||||
@@ -105,6 +105,13 @@ procedure CombatTurnHandler begin
|
||||
end
|
||||
end
|
||||
|
||||
procedure GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand INTFACELOOT) then begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
call InitConfigs;
|
||||
@@ -122,5 +129,6 @@ procedure start begin
|
||||
|
||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
||||
register_hook_proc(HOOK_COMBATTURN, CombatTurnHandler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChangeHandler);
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
@@ -4,18 +4,19 @@
|
||||
|
||||
Used to replace the scripted part of B-Team mod.
|
||||
Appropriate graphics are required for this mod to work.
|
||||
Can be adopted to any mod by adjusting armor PIDs, NPC PIDs and NPC FIDs in INI file.
|
||||
Can be adopted to any mod by adjusting armor PIDs, allowed weapon anim codes, NPC PIDs and NPC FIDs in INI file.
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
version 1.0
|
||||
version 1.1
|
||||
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define IS_ARMOR(item) (obj_type(item) == OBJ_TYPE_ITEM and obj_item_subtype(item) == item_type_armor)
|
||||
#define IS_WEAPON(item) (obj_type(item) == OBJ_TYPE_ITEM and obj_item_subtype(item) == item_type_weapon)
|
||||
|
||||
variable
|
||||
modIni := "npcarmor.ini",
|
||||
@@ -41,9 +42,28 @@ procedure check_armor_change(variable critter, variable item, variable isWorn) b
|
||||
return -1;
|
||||
end
|
||||
|
||||
// for NPCs when they change armor themselves
|
||||
procedure check_weapon_change(variable critter, variable item, variable isWield) begin
|
||||
variable npc, newWeaponAnim, weaponAnimList, i;
|
||||
if (npcMap[obj_pid(critter)]) then begin
|
||||
npc := npcMap[obj_pid(critter)];
|
||||
if isWield then begin
|
||||
newWeaponAnim := get_proto_data(obj_pid(item), PROTO_WP_ANIM);
|
||||
weaponAnimList := string_split(npc["WeaponAnims"], ",");
|
||||
if newWeaponAnim then begin
|
||||
foreach (i in weaponAnimList) begin
|
||||
if (newWeaponAnim == atoi(i)) then return -1;
|
||||
end
|
||||
end else begin // anim code 0 - none/unarmed
|
||||
return -1;
|
||||
end
|
||||
end
|
||||
end
|
||||
return 0;
|
||||
end
|
||||
|
||||
// for NPCs when they change armor/weapon themselves
|
||||
procedure invenwield_handler begin
|
||||
variable critter, item, fid, slot, isWorn;
|
||||
variable critter, item, fid, slot, isWorn, canWield;
|
||||
critter := get_sfall_arg;
|
||||
item := get_sfall_arg;
|
||||
slot := get_sfall_arg;
|
||||
@@ -55,6 +75,11 @@ procedure invenwield_handler begin
|
||||
art_change_fid_num(critter, fid);
|
||||
end
|
||||
end
|
||||
|
||||
if (critter and item and (slot == INVEN_TYPE_RIGHT_HAND or slot == INVEN_TYPE_LEFT_HAND)) then begin
|
||||
canWield := check_weapon_change(critter, item, isWorn);
|
||||
set_sfall_return(canWield);
|
||||
end
|
||||
end
|
||||
|
||||
// when changing armor from inventory while controlling other NPCs
|
||||
@@ -69,12 +94,26 @@ procedure adjustfid_handler begin
|
||||
end
|
||||
end
|
||||
|
||||
// when changing weapon from inventory while controlling other NPCs
|
||||
procedure inventorymove_handler begin
|
||||
variable slot, item, canWield;
|
||||
slot := get_sfall_arg;
|
||||
item := get_sfall_arg;
|
||||
if (dude_obj != real_dude_obj) then begin
|
||||
if (IS_WEAPON(item) and (slot == INVEN_TYPE_RIGHT_HAND or slot == INVEN_TYPE_LEFT_HAND)) then begin
|
||||
canWield := check_weapon_change(dude_obj, item, item != 0);
|
||||
set_sfall_return(canWield);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
procedure start begin
|
||||
variable sect, sects, armorTypes, armorType, npc, pid, pids, i;
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
register_hook_proc(HOOK_INVENWIELD, invenwield_handler);
|
||||
register_hook_proc(HOOK_ADJUSTFID, adjustfid_handler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, inventorymove_handler);
|
||||
|
||||
defaultFids := get_ini_section(modIni, "Default");
|
||||
fix_array(defaultFids);
|
||||
@@ -97,6 +136,7 @@ procedure start begin
|
||||
sect := get_ini_section(modIni, ""+i);
|
||||
while (sect.PID) do begin
|
||||
npc := create_array_map;
|
||||
npc["WeaponAnims"] := sect["WeaponAnims"];
|
||||
npc["Default"] := atoi(sect["Default"]);
|
||||
foreach (armorType: pids in armorTypes) begin
|
||||
if (sect[armorType]) then begin
|
||||
|
||||
Binary file not shown.
@@ -12,12 +12,17 @@
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "main.h"
|
||||
|
||||
variable
|
||||
configSection := "CombatControl",
|
||||
controlMode,
|
||||
pidList,
|
||||
displayName,
|
||||
displayNameColor,
|
||||
maxBoxCount,
|
||||
inControl := false,
|
||||
hasGeckoSkinning := false;
|
||||
|
||||
|
||||
@@ -33,15 +38,41 @@ procedure combatturn_handler begin
|
||||
if (status == 1
|
||||
and (len_array(pidList) == 0 or scan_array(pidList, pid bwand 0xFFFFFF) != -1)
|
||||
and (controlMode == 1 or party_member_obj(pid))) then begin
|
||||
if not(critter == real_dude_obj) then begin
|
||||
set_dude_obj(critter);
|
||||
if hasGeckoSkinning then critter_add_trait(critter, TRAIT_PERK, PERK_gecko_skinning_perk, 1);
|
||||
end else begin
|
||||
inControl := true;
|
||||
end
|
||||
if inControl then begin
|
||||
// center the screen on the controlled critter and remove roof tiles
|
||||
move_to(dude_obj, dude_tile, dude_elevation);
|
||||
if (displayName and critter != real_dude_obj) then begin
|
||||
set_iface_tag_text(displayName, obj_name(critter), displayNameColor);
|
||||
show_iface_tag(displayName);
|
||||
end
|
||||
end
|
||||
end else if inControl then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
if displayName then hide_iface_tag(displayName);
|
||||
end
|
||||
end
|
||||
|
||||
procedure gamemodechange_handler begin
|
||||
if has_trait(TRAIT_PERK, real_dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
|
||||
if not(get_game_mode BWAND COMBAT) then inControl := false;
|
||||
end
|
||||
|
||||
procedure inventorymove_handler begin
|
||||
if (inControl and get_sfall_arg == 3) then begin // armor slot
|
||||
if (obj_pid(dude_obj) == PID_MARCUS or proto_data(obj_pid(dude_obj), cr_body_type) != CR_BODY_BIPED) then begin
|
||||
display_msg(message_str_game(GAME_MSG_PROTO, 675));
|
||||
set_sfall_return(true);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
if (game_loaded and sfall_ver_major >= 4) then begin
|
||||
set_perk_ranks(PERK_gecko_skinning_perk, 1);
|
||||
set_perk_level(PERK_gecko_skinning_perk, 999); // prevent it from appearing in the perk selection window
|
||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||
@@ -49,9 +80,15 @@ procedure start begin
|
||||
if (controlMode > 0) then begin
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
fix_array(pidList);
|
||||
if has_trait(TRAIT_PERK, dude_obj, PERK_gecko_skinning_perk) then hasGeckoSkinning := true;
|
||||
maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount") + 4;
|
||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
if (maxBoxCount < 9) then maxBoxCount := 9;
|
||||
if (displayName < 5 or displayName > maxBoxCount) then displayName := 0;
|
||||
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, gamemodechange_handler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, inventorymove_handler);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
#define OBJ_TYPE_MISC (5)
|
||||
#define OBJ_TYPE_SPATIAL (6)
|
||||
|
||||
#define WEAPON_TYPE_NONE (0)
|
||||
#define WEAPON_TYPE_UNARMED (1)
|
||||
#define WEAPON_TYPE_MELEE (2)
|
||||
#define WEAPON_TYPE_THROWN (3)
|
||||
#define WEAPON_TYPE_GUNS (4)
|
||||
|
||||
/* Item Common Flags */
|
||||
#define HIDDEN_ITEM 134217728 // 0x08000000 - Hidden Item
|
||||
|
||||
@@ -21,14 +27,14 @@
|
||||
#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_PRI_PUNCH 1 // 0001
|
||||
#define ATKMODE_PRI_KICK 2 // 0010
|
||||
#define ATKMODE_PRI_SWING 3 // 0011
|
||||
#define ATKMODE_PRI_THRUST 4 // 0100
|
||||
#define ATKMODE_PRI_THROW 5 // 0101
|
||||
#define ATKMODE_PRI_SINGLE 6 // 0110
|
||||
#define ATKMODE_PRI_BURST 7 // 0111
|
||||
#define ATKMODE_PRI_FLAME 8 // 1000
|
||||
#define ATKMODE_SEC_NONE 0
|
||||
#define ATKMODE_SEC_PUNCH 16 // 0x00000010
|
||||
#define ATKMODE_SEC_KICK 32 // 0x00000020
|
||||
@@ -101,15 +107,21 @@
|
||||
// offsets for get_proto_data
|
||||
#define PROTO_PID (1)
|
||||
#define PROTO_TEXTID (4)
|
||||
#define PROTO_FID (8)
|
||||
|
||||
// items
|
||||
#define PROTO_IT_LDIST (12)
|
||||
#define PROTO_IT_LINT (16)
|
||||
#define PROTO_IT_FLAG (20)
|
||||
#define PROTO_IT_FLAGS (24)
|
||||
#define PROTO_IT_SCRIPTID (28)
|
||||
#define PROTO_IT_TYPE (32)
|
||||
#define PROTO_IT_MATERIAL (108)
|
||||
#define PROTO_IT_SIZE (112)
|
||||
#define PROTO_IT_WEIGHT (116)
|
||||
#define PROTO_IT_COST (120)
|
||||
#define PROTO_IT_INV_FID (124)
|
||||
#define PROTO_IT_SOUND (128) // byte
|
||||
|
||||
// weapons
|
||||
#define PROTO_WP_ANIM (36)
|
||||
@@ -187,7 +199,11 @@
|
||||
#define PROTO_DR_ADDICT_DELAY (100)
|
||||
|
||||
// critters
|
||||
#define PROTO_CR_FLAGS (32)
|
||||
#define PROTO_CR_LDIST (20)
|
||||
#define PROTO_CR_LINT (24)
|
||||
#define PROTO_CR_FLAG (28)
|
||||
#define PROTO_CR_FLAGS (32) // Critter Flags
|
||||
#define PROTO_CR_SCRIPTID (36)
|
||||
#define PROTO_CR_HEAD_FID (40)
|
||||
#define PROTO_CR_AI_PACKET (44)
|
||||
#define PROTO_CR_TEAM_NUM (48)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define INTFACELOOT (0x10000)
|
||||
#define BARTER (0x20000)
|
||||
#define HEROWIN (0x40000)
|
||||
#define DIALOGVIEW (0x80000)
|
||||
|
||||
//Valid arguments to register_hook
|
||||
#define HOOK_TOHIT (0)
|
||||
@@ -51,6 +52,12 @@
|
||||
#define HOOK_CARTRAVEL (28)
|
||||
#define HOOK_SETGLOBALVAR (29)
|
||||
#define HOOK_RESTTIMER (30)
|
||||
#define HOOK_GAMEMODECHANGE (31)
|
||||
#define HOOK_USEANIMOBJ (32)
|
||||
#define HOOK_EXPLOSIVETIMER (33)
|
||||
#define HOOK_DESCRIPTIONOBJ (34)
|
||||
#define HOOK_USESKILLON (35)
|
||||
#define HOOK_ONEXPLOSION (36)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
@@ -138,6 +145,11 @@
|
||||
#define set_attack_explosion_radius(x) metarule2_explosions(3, x, 0)
|
||||
#define set_attack_is_explosion(x) metarule2_explosions(4, x, 0)
|
||||
#define set_attack_is_explosion_fire set_attack_is_explosion(DMG_fire)
|
||||
#define set_explosion_radius(grenade, rocket) metarule2_explosions(5, grenade, rocket)
|
||||
#define get_explosion_damage(itemPid) metarule2_explosions(6, itemPid, 0)
|
||||
#define set_dynamite_damage(minDmg, maxDmg) metarule2_explosions(7, minDmg, maxDmg)
|
||||
#define set_plastic_damage(minDmg, maxDmg) metarule2_explosions(8, minDmg, maxDmg)
|
||||
#define set_explosion_max_targets(x) metarule2_explosions(9, x, 0)
|
||||
|
||||
|
||||
#define GAME_MSG_COMBAT (0)
|
||||
@@ -218,28 +230,39 @@
|
||||
|
||||
#define attack_is_aimed sfall_func0("attack_is_aimed")
|
||||
#define car_gas_amount sfall_func0("car_gas_amount")
|
||||
#define create_win(winName, x, y, w, h) sfall_func5("create_win", winName, x, y, w, h)
|
||||
#define create_win_flag(winName, x, y, w, h, flag) sfall_func6("create_win", winName, x, y, w, h, flag)
|
||||
#define critter_inven_obj2(obj, type) sfall_func2("critter_inven_obj2", obj, type)
|
||||
#define dialog_message(text) sfall_func1("dialog_message", text)
|
||||
#define dialog_obj sfall_func0("dialog_obj")
|
||||
#define display_stats sfall_func0("display_stats")
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
#define floor2(value) sfall_func1("floor2", value)
|
||||
#define get_can_rest_on_map(map, elev) sfall_func2("get_can_rest_on_map", map, elev)
|
||||
#define get_current_inven_size(obj) sfall_func1("get_current_inven_size", obj)
|
||||
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
||||
#define get_flags(obj) sfall_func1("get_flags", obj)
|
||||
#define get_ini_section(file, sect) sfall_func2("get_ini_section", file, sect)
|
||||
#define get_ini_sections(file) sfall_func1("get_ini_sections", file)
|
||||
#define get_map_enter_position sfall_func0("get_map_enter_position")
|
||||
#define get_outline(obj) sfall_func1("get_outline", obj)
|
||||
#define get_string_pointer(text) sfall_func1("get_string_pointer", text)
|
||||
#define intface_hide sfall_func0("intface_hide")
|
||||
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
||||
#define intface_redraw sfall_func0("intface_redraw")
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define inventory_redraw(invSide) sfall_func1("inventory_redraw", invSide)
|
||||
#define item_make_explosive(pid, aPid, min, max) sfall_func4("item_make_explosive", pid, aPid, min, max)
|
||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
||||
#define lock_is_jammed(obj) sfall_func1("lock_is_jammed", obj)
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
#define real_dude_obj sfall_func0("real_dude_obj")
|
||||
#define set_can_rest_on_map(map, elev, value) sfall_func3("set_can_rest_on_map", map, elev, value)
|
||||
#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex)
|
||||
#define set_cursor_mode(mode) sfall_func1("set_cursor_mode", mode)
|
||||
#define set_dude_obj(critter) sfall_func1("set_dude_obj", critter)
|
||||
#define set_flags(obj, flags) sfall_func2("set_flags", obj, flags)
|
||||
#define set_iface_tag_text(tag, text, color) sfall_func3("set_iface_tag_text", tag, text, color)
|
||||
#define set_ini_setting(setting, value) sfall_func2("set_ini_setting", setting, value)
|
||||
#define set_map_enter_position(tile, elev, rot) sfall_func3("set_map_enter_position", tile, elev, rot)
|
||||
#define set_outline(obj, color) sfall_func2("set_outline", obj, color)
|
||||
|
||||
@@ -111,7 +111,7 @@ critter ret3 - Override the target of the attack
|
||||
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.
|
||||
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 player's hands at the time the wrong AP cost will be shown. It will be fixed the next time the interface is redrawn.
|
||||
You can get the weapon object by checking item slot based on attack type (ATKTYPE_LWEP1, ATKTYPE_LWEP2, etc) and then calling critter_inven_obj().
|
||||
|
||||
critter arg1 - The critter performing the action
|
||||
@@ -162,8 +162,8 @@ critter arg1 - The target
|
||||
critter arg2 - The attacker
|
||||
int arg3 - The amount of damage to the target
|
||||
int arg4 - The amount of damage to the attacker
|
||||
int arg5 - The special effect flags for the target
|
||||
int arg6 - The special effect flags for the attacker
|
||||
int arg5 - The special effect flags for the target (use bwand DAM_* to check specific flags)
|
||||
int arg6 - The special effect flags for the attacker (use bwand DAM_* to check specific flags)
|
||||
int arg7 - The weapon used in the attack
|
||||
int arg8 - The bodypart that was struck
|
||||
int arg9 - Damage Multiplier (this is divided by 2, so a value of 3 does 1.5x damage, and 8 does 4x damage. Usually it's 2, but with Silent Death perk and the corresponding attack conditions, it's 4; for critical hits, the value is taken from the critical table)
|
||||
@@ -189,7 +189,7 @@ Critter arg1 - The critter that just died
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
The return values can include critters that weren't in the list of possible targets, but the additional targets may still be discarded later on in the combat turn if they are out of the attackers perception or the chance of a successful hit is too low. The list of possible targets often includes duplicated entries.
|
||||
|
||||
@@ -265,7 +265,8 @@ 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
|
||||
int ret1 - the modified value of all of the goods (pass -1 if you just want to modify offered goods)
|
||||
int ret2 - the modified value of all offered goods
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
@@ -305,14 +306,14 @@ object* ret1 - 0 if the hex doesn't block, or any sort of object pointer if it d
|
||||
|
||||
HOOK_ITEMDAMAGE (hs_itemdamage.int)
|
||||
|
||||
Runs when retrieving the damage rating of the players used weapon. (Which may be their fists.)
|
||||
Runs when retrieving the damage rating of the player's used weapon. (Which may be their fists.)
|
||||
|
||||
int arg1 - The default min damage
|
||||
int arg2 - The default max damage
|
||||
Item arg3 - The weapon used. (0 if unarmed)
|
||||
Critter arg4 - The critter doing the attacking
|
||||
int arg5 - The type of attack
|
||||
int arg6 - non zero if this is an attack using a melee weapon
|
||||
int arg6 - non-zero if this is an attack using a melee weapon
|
||||
|
||||
int ret1 - Either the damage to be used, if ret2 isn't given, or the new minimum damage if it is
|
||||
int ret2 - The new maximum damage
|
||||
@@ -323,12 +324,12 @@ 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.
|
||||
To add proper check for ammo before shooting and proper calculation of number of burst rounds, set Misc.CheckWeaponAmmoCost=1 in ddraw.ini
|
||||
To add proper check for ammo before shooting and proper calculation of number of burst rounds (hook type 1 and 2 in arg4), set Misc.CheckWeaponAmmoCost=1 in ddraw.ini
|
||||
|
||||
Item arg1 - weapon
|
||||
int arg2 - Number of bullets in burst (1 for single shots)
|
||||
int arg3 - Ammo cost calculated by original function (this is basically 2 for Super Cattle Prod and Mega Power Fist)
|
||||
int arg4 - Type of hook (0 - when subtracting ammo after attack, 1 - when checking for "out of ammo" before attack)
|
||||
int arg4 - Type of hook (0 - when subtracting ammo after single shot attack, 1 - when checking for "out of ammo" before attack, 2 - when calculating number of burst rounds, 3 - when subtracting ammo after burst attack)
|
||||
|
||||
int ret1 - new ammo cost value (set to 0 for unlimited ammo)
|
||||
|
||||
@@ -340,11 +341,14 @@ HOOK_KEYPRESS (hs_keypress.int)
|
||||
Runs once every time when any key was pressed or released.
|
||||
DX codes: (see dik.h header)
|
||||
VK codes: http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx
|
||||
NOTE: if you want to override a key, the new key DX scancode should be the same for both pressed and released events.
|
||||
|
||||
int arg1 - event type: 1 - pressed, 0 - released
|
||||
int arg2 - key DX scancode
|
||||
int arg3 - key VK code (very similar to ASCII codes)
|
||||
|
||||
int ret1 - overrides the pressed key (a new key DX scancode or 0 for no override)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_MOUSECLICK (hs_mouseclick.int)
|
||||
@@ -400,6 +404,7 @@ This is fired after the default calculation is made.
|
||||
Critter arg1 - Watcher object
|
||||
Obj arg2 - Target object
|
||||
int arg3 - Result of vanilla function: 1 - within perception range, 0 - otherwise
|
||||
int arg4 - Type of hook: 1 - when being called from obj_can_see_obj script function, 2 when being called from obj_can_hear_obj script function (need to set ObjCanHearObjFix=1 in ddraw.ini), 0 for all other cases
|
||||
|
||||
int ret1 - overrides the returned result of the function: 0 - not in range (can't see), 1 - in range (will see if not blocked), 2 - forced detection (will see regardless, only used in obj_can_see_obj scripting function which is called by every critter in the game)
|
||||
|
||||
@@ -416,9 +421,9 @@ 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 backpack, 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, 5 - container, like bag/backpack, 6 - dropping on the ground)
|
||||
Item arg2 - Item being moved
|
||||
Item arg3 - Item being replaced or weapon being reloaded (can be 0)
|
||||
Item arg3 - Item being replaced, weapon being reloaded, or container being filled (can be 0)
|
||||
|
||||
int ret1 - Override setting (-1 - use engine handler, any other value - prevent relocation of item/reloading weapon)
|
||||
|
||||
@@ -432,7 +437,7 @@ NOTE: when replacing a previously wielded armor or weapon, the unwielding hook w
|
||||
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
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor)
|
||||
int arg3 - slot (INVEN_TYPE_*)
|
||||
int arg4 - 1 when wielding, 0 when unwielding
|
||||
|
||||
@@ -497,4 +502,79 @@ int arg2 - event type: 1 - when the resting ends normally, -1 - when pressin
|
||||
int arg3 - the hour part of the length of resting time
|
||||
int arg4 - the minute part of the length of resting time
|
||||
|
||||
int ret1 - pass 1 to interrupt the resting
|
||||
int ret1 - pass 1 to interrupt the resting, pass 0 to continue the rest if it was interrupted by pressing ESC key
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_GAMEMODECHANGE (hs_gamemodechange.int)
|
||||
|
||||
Runs once every time when the game mode was changed, like opening/closing the inventory, character screen, pipboy, etc.
|
||||
|
||||
int arg1 - event type: 1 - when the player exits the game, 0 - otherwise
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_USEANIMOBJ (hs_useanimobj.int)
|
||||
|
||||
Runs before playing the "use" (usually "magic hands") animation when a critter uses a scenery/container object on the map, or before walking/running animation if the player is at a distance from the object.
|
||||
|
||||
Critter arg1 - the critter that uses an object (usually dude_obj)
|
||||
Obj arg2 - the object being used
|
||||
int arg3 - the animation code being used (see ANIM_* in Animcomd.h)
|
||||
|
||||
int ret1 - overrides the animation code (pass -1 if you want to skip the animation)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_EXPLOSIVETIMER (hs_explosivetimer.int)
|
||||
|
||||
Runs after setting the explosive timer. You can override the result.
|
||||
|
||||
int arg1 - the time in ticks set in the timer
|
||||
Obj arg2 - the explosive object
|
||||
int arg3 - the result of engine calculation of whether the timer was set successfully: 1 - failure, 2 - success (similar to ROLL_* in Condtion.h)
|
||||
|
||||
int ret1 - overrides the time of the timer (maximum 18000 ticks)
|
||||
int ret2 - overrides the result of engine calculation: 0/1 - failure, 2/3 - success (similar to ROLL_*), any other value - use engine handler
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_DESCRIPTIONOBJ (hs_descriptionobj.int)
|
||||
|
||||
Runs when using the examine action icon to display item description. You can override the description of the item.
|
||||
An example usage would be to add an additional description to the item based on player's stats/skills.
|
||||
|
||||
Obj arg1 - the item
|
||||
|
||||
int ret1 - a pointer to the new text received by using "get_string_pointer" function
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_USESKILLON (hs_useskillon.int)
|
||||
|
||||
Runs before using any skill on any object. Lets you override the critter that uses the skill.
|
||||
NOTE: the user critter can't be overridden when using Steal skill.
|
||||
|
||||
Critter arg1 - The user critter (usually dude_obj)
|
||||
Obj arg2 - The target object/critter
|
||||
int arg3 - skill being used
|
||||
|
||||
int ret1 - a new critter to override the user critter. Pass -1 to cancel the skill use, pass 0 to skip this return value
|
||||
int ret2 - pass 1 to allow the skill being used in combat (only for dude_obj or critter being controlled by the player)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_ONEXPLOSION (hs_onexplosion.int)
|
||||
|
||||
Runs when Fallout is checking all the tiles within the explosion radius for targets before an explosion occurs.
|
||||
The tile checking will be interrupted when 6 additional targets (critters) are received.
|
||||
|
||||
int arg1 - event type: 1 - when checking objects within the explosion radius without causing damage (e.g. the player drops an active explosive), 0 - otherwise
|
||||
Critter arg2 - The attacker
|
||||
int arg3 - The tile on which the explosion occurs
|
||||
int arg4 - checked tile within the explosion radius
|
||||
Obj arg5 - first found object on the checked tile as an additional target
|
||||
Critter arg6 - The target critter, may be 0 or equal to the attacker
|
||||
int arg7 - 1 when using throwing weapons (e.g. grenades), 0 otherwise
|
||||
|
||||
int ret1 - overrides the found object on the checked tile, pass 0 to skip the object
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
---------- GLOBAL SCRIPTS -----------
|
||||
-------------------------------------
|
||||
|
||||
As well as the new functions, sfall also adds global scripts. These run independent of any loaded maps, but do not have an attached object. (i.e. using self_obj without using set_self first will crash the script.) To use a global script, the script must have a name which begins with 'gl' and contains a procedure called 'start'. This procedure will be executed once when the player loads a saved game or starts a new game. If you wish the script to be executed repeatedly, call set_global_script_repeat on this first run using the number of frames between each run as the argument. (0 disables the script, 1 runs it every frame, 2 runs it every other frame etc.)
|
||||
As well as the new functions, sfall also adds global scripts. These run independent of any loaded maps, but do not have an attached object. (i.e. using self_obj without using set_self first will crash the script.) To use a global script, the script must have a name which begins with 'gl' and contains a procedure called 'start', 'map_enter_p_proc', 'map_exit_p_proc', or 'map_update_p_proc'. The start procedure will be executed once when the player loads a saved game or starts a new game. The map_*_p_proc procedures will be executed once when a map is being entered/left/updated. If you wish the script to be executed repeatedly, call set_global_script_repeat on the first run of the start procedure using the number of frames between each run as the argument. (0 disables the script, 1 runs it every frame, 2 runs it every other frame etc.)
|
||||
|
||||
Global scripts have multiple modes, which can be set using the set_global_script_type function. In the default mode (i.e. mode 0) their execution is linked to the local map game loop, so the script will not run in dialogs or on the world map. In mode 1 their execution is linked to the player input, and so they will run whenever the mouse cursor is visible on screen, including the world map, character dialogs etc. In mode 2, execution is linked to the world map loop, so the script will only be executed on the world map and not on the local map or in any dialog windows. Mode 3 is a combination of modes 0 and 2, so scripts will be executed on both local maps and the world map, but not in dialog windows. Using mode 1 requires the input wrapper to be enabled. Use available_global_script_types to check what is available.
|
||||
|
||||
@@ -50,7 +50,7 @@ has_fake_trait and has_fake_perk return the number of levels the player has of t
|
||||
|
||||
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.
|
||||
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 (4 + the value of BoxBarCount in ddraw.ini) for custom boxes. Remember to add your messages to intrface.msg and set up the font colours in ddraw.ini if you're going to use custom boxes. Starting from sfall 4.1, is_iface_tag_active can also be used to check 0 for SNEAK, 1 for POISONED, and 2 for RADIATED.
|
||||
|
||||
get/set_bodypart_hit_modifier alter the hit percentage modifiers for aiming at specific bodyparts. Valid bodypart id's are from 0 to 8. Changes are not saved, and will reset to the defaults (or to the values specified in ddraw.ini if they exist) at each reload.
|
||||
|
||||
@@ -72,7 +72,7 @@ arrays are created and manipulated with the xxx_array functions. An array must f
|
||||
|
||||
NOTE: the above description only applies when "arraysBehavior" is set to 0 in ddraw.ini. Refer to "arrays.txt" for detailed description of new arrays behavior.
|
||||
|
||||
force_aimed_shots and disable_aimed_shots allow overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) force_aimed_shots will allow a weapon to make aimed shots even if it normally couldn't, and disable_aimed_shots stops a weapon from making aimed shots even if it normally could. Both of these functions affect player and npcs alike. force_aimed_shots does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the functions once at each reload. Use a pid of 0 to represent unarmed.
|
||||
force_aimed_shots and disable_aimed_shots allow overriding the normal rules regarding which weapons are allowed to make aimed attacks. (e.g. weapons that cause explosive damage normally cannot normally make aimed shots.) force_aimed_shots will allow a weapon to make aimed shots even if it normally couldn't, and disable_aimed_shots stops a weapon from making aimed shots even if it normally could. Both of these functions affect player and NPCs alike. force_aimed_shots does not override the effects of the fast shot trait. The list of edited weapons is not saved over game loads, so you need to call the functions once at each reload. Use a pid of 0 to represent unarmed.
|
||||
|
||||
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.
|
||||
|
||||
@@ -101,10 +101,10 @@ array - array ID to be used with array-related functions (actually an integer)
|
||||
- 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.
|
||||
- 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.
|
||||
- also takes the NPC name as an argument, and returns the NPC's current level. Again, the NPC needs to be in your party.
|
||||
|
||||
> void set_car_current_town(int town)
|
||||
- changes the current town index for the player's car
|
||||
@@ -216,7 +216,7 @@ Some additional reg_anim_* functions were introduced. They all work in the same
|
||||
> void reg_anim_turn_towards(object, tile/target, delay)
|
||||
- makes object change its direction to face given tile num or target object.
|
||||
|
||||
> int metarule2_explosions(int arg1, int arg2)
|
||||
> int/array metarule2_explosions(int arg1, int arg2, int arg3)
|
||||
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)
|
||||
@@ -231,6 +231,24 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
|
||||
> 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 receive fire damage.
|
||||
|
||||
> void set_explosion_radius(grenade, rocket)
|
||||
- sets a permanent radius of the explosion for grenades and/or rockets. Passing 0 means not changing the corresponding radius.
|
||||
- changed radius will be reset each time the player reloads the game.
|
||||
|
||||
> array get_explosion_damage(itemPid)
|
||||
- returns array of the minimum and maximum damage of the explosive item.
|
||||
|
||||
> void set_dynamite_damage(minDmg, maxDmg)
|
||||
- sets the minimum and maximum damage for Dynamite.
|
||||
- changed damage will be reset each time the player reloads the game.
|
||||
|
||||
> void set_plastic_damage(minDmg, maxDmg)
|
||||
- sets the minimum and maximum damage for Plastic Explosives.
|
||||
- changed damage will be reset each time the player reloads the game.
|
||||
|
||||
> void set_explosion_max_targets(x)
|
||||
- sets the maximum number of additional targets for an explosion, valid range: 1..6 (default is 6)
|
||||
|
||||
|
||||
Some utility/math functions are available:
|
||||
|
||||
@@ -300,6 +318,7 @@ Some utility/math functions are available:
|
||||
- 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
|
||||
- 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.)
|
||||
- if a file has a specific number assigned in ExtraGameMsgFileList, its fileId will be (0x2000 + assigned number). (e.g. with ExtraGameMsgFileList=foo,bar:2,foobar in ddraw.ini, bar.msg will be associated with 0x2002 and foobar.msg with 0x2003.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise
|
||||
@@ -476,6 +495,53 @@ Some utility/math functions are available:
|
||||
> int sfall_func0("attack_is_aimed")
|
||||
- returns 1 if the aimed attack mode is selected, 0 otherwise
|
||||
|
||||
> void sfall_func3("set_iface_tag_text", int tag, string text, int color)
|
||||
- sets the text messages and colors for custom notification boxes to the interface without the need to add messages to intrface.msg and set up the font colors in ddraw.ini
|
||||
- tag value is the same as used in show_iface_tag, hide_iface_tag, and is_iface_tag_active. The valid range is from 5 to (4 + the value of BoxBarCount in ddraw.ini)
|
||||
- The text is limited to 19 characters
|
||||
- available colors: 0 - green, 1 - red, 2 - white, 3 - yellow, 4 - dark yellow, 5 - blue, 6 - purple
|
||||
|
||||
> void sfall_func1("inventory_redraw", int invSide)
|
||||
- redraws inventory list in the inventory/use inventory item on/loot/barter screens
|
||||
- invSide specifies which side needs to be redrawn: 0 - the player, 1 - target (container/NPC in loot/barter screens)
|
||||
|
||||
> void sfall_func3("item_make_explosive", int pid, int activePid, int damage)
|
||||
> void sfall_func4("item_make_explosive", int pid, int activePid, int min, int max)
|
||||
- makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
|
||||
- activePid is for an item with an active timer, can be the same as the pid argument
|
||||
- the item proto must be "Misc Item" type and have "Use" action flag
|
||||
- min/max are the minimum and maximum explosion damage
|
||||
- using the function on an item that is already set as an explosive will override its previous settings
|
||||
- NOTE: this function does not work for pid's of Dynamite and Plastic Explosives
|
||||
|
||||
> int sfall_func1("get_string_pointer", string text)
|
||||
- returns a pointer to a string variable or to a text
|
||||
|
||||
> void sfall_func1("dialog_message", string text)
|
||||
- displays a message in the NPC response window in dialog or barter screen
|
||||
|
||||
> int sfall_func1("get_current_inven_size", object)
|
||||
- returns the current inventory size of the container or the critter
|
||||
|
||||
> void sfall_func5("create_win", string winName, int x, int y, int width, int height)
|
||||
> void sfall_func6("create_win", string winName, int x, int y, int width, int height, int flags)
|
||||
- works just like vanilla CreateWin function, but creates a window with MoveOnTop flag if the flags argument is not specified, and allows to set additional flags for the created window
|
||||
- MoveOnTop flag allows the created window to be placed on top of the game interface
|
||||
|
||||
> void sfall_func3("set_can_rest_on_map", int mapNum, int elev, bool value)
|
||||
- allows/disallows to rest on the map for the specified level, overrides the can_rest_here values in maps.txt
|
||||
- mapNum is the map index from maps.txt
|
||||
- passing -1 to the elev argument will set the rest value for all map elevations
|
||||
- the set rest value will be stored in sfalldb.sav file (in savegame)
|
||||
|
||||
> int sfall_func2("get_can_rest_on_map", int mapNum, int elev)
|
||||
- returns the set rest value of the map after using the set_can_rest_on_map function
|
||||
- returns -1 if the rest value of the map was not previously set (i.e. no data for the map in sfalldb.sav)
|
||||
- the can_rest_here values in maps.txt are ignored
|
||||
|
||||
> object sfall_func0("dialog_obj")
|
||||
- returns the object (critter) the player is having a conversation or bartering with
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Functions.h"
|
||||
#include "Structs.h"
|
||||
#include "Variables.h"
|
||||
#include "VariableOffsets.h"
|
||||
|
||||
#include "EngineUtils.h"
|
||||
@@ -74,15 +75,45 @@ void SkillSetTags(long* tags, long num) {
|
||||
fo::func::skill_set_tags(tags, num);
|
||||
}
|
||||
|
||||
int _fastcall GetItemType(GameObject* item) {
|
||||
return fo::func::item_get_type(item);
|
||||
}
|
||||
|
||||
_declspec(noinline) GameObject* GetItemPtrSlot(GameObject* critter, InvenType slot) {
|
||||
GameObject* itemPtr = nullptr;
|
||||
switch (slot) {
|
||||
case fo::INVEN_TYPE_LEFT_HAND:
|
||||
itemPtr = fo::func::inven_left_hand(critter);
|
||||
break;
|
||||
case fo::INVEN_TYPE_RIGHT_HAND:
|
||||
itemPtr = fo::func::inven_right_hand(critter);
|
||||
break;
|
||||
case fo::INVEN_TYPE_WORN:
|
||||
itemPtr = fo::func::inven_worn(critter);
|
||||
break;
|
||||
}
|
||||
return itemPtr;
|
||||
}
|
||||
|
||||
long& GetActiveItemMode() {
|
||||
return fo::var::itemButtonItems[fo::var::itemCurrentItem].mode;
|
||||
}
|
||||
|
||||
GameObject* GetActiveItem() {
|
||||
return fo::var::itemButtonItems[fo::var::itemCurrentItem].item;
|
||||
}
|
||||
|
||||
bool HeroIsFemale() {
|
||||
return (fo::func::stat_level(fo::var::obj_dude, fo::Stat::STAT_gender) == fo::Gender::GENDER_FEMALE);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
//print text to surface
|
||||
void PrintText(char *DisplayText, BYTE ColourIndex, DWORD Xpos, DWORD Ypos, DWORD TxtWidth, DWORD ToWidth, BYTE *ToSurface) {
|
||||
DWORD posOffset = Ypos*ToWidth + Xpos;
|
||||
DWORD posOffset = Ypos * ToWidth + Xpos;
|
||||
__asm {
|
||||
xor eax, eax
|
||||
MOV AL, ColourIndex
|
||||
mov al, ColourIndex
|
||||
push eax
|
||||
mov edx, DisplayText
|
||||
mov ebx, TxtWidth
|
||||
|
||||
@@ -50,6 +50,16 @@ void SkillGetTags(long* result, long num);
|
||||
// wrapper for skill_set_tags with bounds checking
|
||||
void SkillSetTags(long* tags, long num);
|
||||
|
||||
int _fastcall GetItemType(GameObject* item);
|
||||
|
||||
_declspec(noinline) GameObject* GetItemPtrSlot(GameObject* critter, InvenType slot);
|
||||
|
||||
long& GetActiveItemMode();
|
||||
|
||||
GameObject* GetActiveItem();
|
||||
|
||||
bool HeroIsFemale();
|
||||
|
||||
// Print text to surface
|
||||
void PrintText(char *displayText, BYTE colorIndex, DWORD x, DWORD y, DWORD textWidth, DWORD destWidth, BYTE *surface);
|
||||
// gets the height of the currently selected font
|
||||
|
||||
@@ -213,6 +213,15 @@ enum ObjType : char
|
||||
OBJ_TYPE_SPATIAL = 6
|
||||
};
|
||||
|
||||
enum ArtType : char
|
||||
{
|
||||
OBJ_TYPE_INTRFACE = 6,
|
||||
OBJ_TYPE_INVEN = 7,
|
||||
OBJ_TYPE_HEAD = 8,
|
||||
OBJ_TYPE_BACKGROUND = 9,
|
||||
OBJ_TYPE_SKILLDEX = 10
|
||||
};
|
||||
|
||||
// Some FO2 PIDs possibly used by engine
|
||||
enum ProtoId : long
|
||||
{
|
||||
@@ -579,6 +588,38 @@ enum ItemType : long
|
||||
item_type_key = 6,
|
||||
};
|
||||
|
||||
// Inventory Equates
|
||||
enum InvenType : long
|
||||
{
|
||||
INVEN_TYPE_WORN = 0,
|
||||
INVEN_TYPE_RIGHT_HAND = 1,
|
||||
INVEN_TYPE_LEFT_HAND = 2,
|
||||
};
|
||||
|
||||
enum AttackType : long
|
||||
{
|
||||
ATKTYPE_LWEAPON_PRIMARY = 0,
|
||||
ATKTYPE_LWEAPON_SECONDARY = 1,
|
||||
ATKTYPE_RWEAPON_PRIMARY = 2,
|
||||
ATKTYPE_RWEAPON_SECONDARY = 3,
|
||||
ATKTYPE_PUNCH = 4,
|
||||
ATKTYPE_KICK = 5,
|
||||
ATKTYPE_LWEAPON_RELOAD = 6,
|
||||
ATKTYPE_RWEAPON_RELOAD = 7,
|
||||
ATKTYPE_STRONGPUNCH = 8,
|
||||
ATKTYPE_HAMMERPUNCH = 9,
|
||||
ATKTYPE_HAYMAKER = 10,
|
||||
ATKTYPE_JAB = 11,
|
||||
ATKTYPE_PALMSTRIKE = 12,
|
||||
ATKTYPE_PIERCINGSTRIKE = 13,
|
||||
ATKTYPE_STRONGKICK = 14,
|
||||
ATKTYPE_SNAPKICK = 15,
|
||||
ATKTYPE_POWERKICK = 16,
|
||||
ATKTYPE_HIPKICK = 17,
|
||||
ATKTYPE_HOOKKICK = 18,
|
||||
ATKTYPE_PIERCINGKICK = 19
|
||||
};
|
||||
|
||||
#define OBJFLAG_CAN_WEAR_ITEMS (0xf000000)
|
||||
|
||||
#define OBJFLAG_HELD_IN_RIGHT (0x10000)
|
||||
@@ -600,4 +641,68 @@ enum RollResult
|
||||
ROLL_CRITICAL_SUCCESS = 0x3,
|
||||
};
|
||||
|
||||
namespace Fields {
|
||||
enum CommonObj : long
|
||||
{
|
||||
id = 0x00,
|
||||
tile = 0x04,
|
||||
x = 0x08,
|
||||
y = 0x0C,
|
||||
sx = 0x10,
|
||||
sy = 0x14,
|
||||
frm = 0x18,
|
||||
rotation = 0x1C,
|
||||
artFid = 0x20,
|
||||
flags = 0x24,
|
||||
elevation = 0x28,
|
||||
inventory = 0x2C,
|
||||
protoId = 0x64,
|
||||
cid = 0x68,
|
||||
lightDistance = 0x6C,
|
||||
lightIntensity = 0x70,
|
||||
outline = 0x74,
|
||||
scriptId = 0x78,
|
||||
owner = 0x7C,
|
||||
scriptIndex = 0x80,
|
||||
};
|
||||
|
||||
enum CritterObj : long
|
||||
{
|
||||
reaction = 0x38,
|
||||
combatState = 0x3C,
|
||||
movePoints = 0x40,
|
||||
damageFlags = 0x44,
|
||||
damageLastTurn = 0x48,
|
||||
aiPacket = 0x4C,
|
||||
teamNum = 0x50,
|
||||
whoHitMe = 0x54,
|
||||
health = 0x58,
|
||||
rads = 0x5C,
|
||||
poison = 0x60,
|
||||
};
|
||||
|
||||
enum ItemObj : long
|
||||
{
|
||||
updatedFlags = 0x38,
|
||||
charges = 0x3C,
|
||||
ammoPid = 0x40,
|
||||
};
|
||||
}
|
||||
|
||||
namespace WinFlags {
|
||||
enum WinButtonFlags : long
|
||||
{
|
||||
OwnerFlag = 0x1,
|
||||
UnknownFlag2 = 0x2,
|
||||
MoveOnTop = 0x4,
|
||||
Hidden = 0x8,
|
||||
Exclusive = 0x10,
|
||||
Transparent = 0x20,
|
||||
UnknownFlag40 = 0x40,
|
||||
UnknownFlag80 = 0x80,
|
||||
scriptWindow = 0x100,
|
||||
itsButton = 0x10000,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ FUNC(GNW_text_width_, 0x4D5B60)
|
||||
FUNC(GNW_win_refresh_, 0x4D6FD8)
|
||||
FUNC(GameMap2Slot_, 0x47F510)
|
||||
FUNC(GetComment_, 0x47ED5C)
|
||||
FUNC(GetSlotList_, 0x47E5D0)
|
||||
FUNC(IncGamma_, 0x4928E4)
|
||||
FUNC(Index2RGB_, 0x4C72D5)
|
||||
FUNC(InfoButton_, 0x43AF40)
|
||||
@@ -1562,12 +1563,15 @@ FUNC(gsound_internal_effect_callback_, 0x451AD0)
|
||||
FUNC(gsound_internal_speech_callback_, 0x451A90)
|
||||
FUNC(gsound_load_sound_, 0x4510DC)
|
||||
FUNC(gsound_load_sound_volume_, 0x45145C)
|
||||
FUNC(gsound_med_butt_press_, 0x451988)
|
||||
FUNC(gsound_med_butt_release_, 0x451990)
|
||||
FUNC(gsound_open_, 0x451A08)
|
||||
FUNC(gsound_play_sfx_file_, 0x4519A8)
|
||||
FUNC(gsound_play_sfx_file_volume_, 0x45108C)
|
||||
FUNC(gsound_play_sound_, 0x451510)
|
||||
FUNC(gsound_read_, 0x451A30)
|
||||
FUNC(gsound_red_butt_press_, 0x451970)
|
||||
FUNC(gsound_red_butt_release_, 0x451978)
|
||||
FUNC(gsound_reset_, 0x450164)
|
||||
FUNC(gsound_seek_, 0x451A4C)
|
||||
FUNC(gsound_set_master_volume_, 0x4502EC)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user