mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e982be4b6 | ||
|
|
8a888f387d | ||
|
|
712b4de5f7 | ||
|
|
a3b456cf0a | ||
|
|
9f689863d7 | ||
|
|
b5306406b3 | ||
|
|
ce3b9c172c | ||
|
|
b8a77d77fb | ||
|
|
a01da656c7 | ||
|
|
5eda8dd7a0 | ||
|
|
c05babeda7 | ||
|
|
cc2b95d64e | ||
|
|
fb62bd51b5 | ||
|
|
f4d7ccef40 | ||
|
|
85bb34377c | ||
|
|
af24c6eae4 | ||
|
|
930f463000 | ||
|
|
e1aefcc1ed | ||
|
|
25554ff0b2 | ||
|
|
dad0860d6e | ||
|
|
a7e492a80f | ||
|
|
d9b748c261 | ||
|
|
0aad511e3e | ||
|
|
d117296990 | ||
|
|
e672db53c7 | ||
|
|
25bbd91fc5 | ||
|
|
8db528330b | ||
|
|
f761f7834e | ||
|
|
f6c4e5133c | ||
|
|
2e30c86467 | ||
|
|
1679f7c59d | ||
|
|
9a4cbd4fa9 | ||
|
|
0c561ba677 | ||
|
|
20ccdacee8 | ||
|
|
d44663ce76 | ||
|
|
a196160258 | ||
|
|
55a97a5793 | ||
|
|
3eaa64ee16 | ||
|
|
aa9257ab1c | ||
|
|
81a8fd4863 | ||
|
|
ed260ad7e5 | ||
|
|
9dce3c8d62 | ||
|
|
f28a179c78 | ||
|
|
540abbe273 | ||
|
|
8dda3940d0 | ||
|
|
44b9b24490 | ||
|
|
dafbc357b2 | ||
|
|
02572a5193 | ||
|
|
cab19b5ca0 | ||
|
|
d6952a0c93 | ||
|
|
b996867d65 | ||
|
|
bd18c240f9 | ||
|
|
2ad28e3086 | ||
|
|
ef5ff4e90f | ||
|
|
0a672c1e10 | ||
|
|
01214633f4 | ||
|
|
334e98c4c1 | ||
|
|
78a29ad556 | ||
|
|
e5d14ff845 | ||
|
|
716bfd4156 | ||
|
|
9b67db7208 | ||
|
|
e92ded34e4 | ||
|
|
1689542165 | ||
|
|
2c86201db9 | ||
|
|
d7c9acf713 | ||
|
|
399da0d322 | ||
|
|
774adaa3b0 | ||
|
|
b4d174d91b | ||
|
|
3291f6fe17 | ||
|
|
84f442ca08 | ||
|
|
f5c35eb639 | ||
|
|
514894ed59 | ||
|
|
204810d067 | ||
|
|
ec4ba13a28 | ||
|
|
14a6ef7fc6 | ||
|
|
c3a74070ca | ||
|
|
302fd4bb51 | ||
|
|
c7520c71cf | ||
|
|
45632d6887 | ||
|
|
866c9165c0 | ||
|
|
813abbf452 | ||
|
|
c6864e01f6 | ||
|
|
0eab48932a | ||
|
|
6c3efc5b84 | ||
|
|
cb8d7dc94a | ||
|
|
5786cfb267 | ||
|
|
78dfb530a9 | ||
|
|
d588f2e691 | ||
|
|
daf7a82997 | ||
|
|
9ad2b19e1a | ||
|
|
4b66dd3682 | ||
|
|
4899aeece1 | ||
|
|
946266e367 | ||
|
|
438ea071fc | ||
|
|
89760235c7 | ||
|
|
321f1c6034 | ||
|
|
513338f160 | ||
|
|
08b92542f4 | ||
|
|
46013c94b0 | ||
|
|
7a4ab59089 | ||
|
|
e505e204cb | ||
|
|
7343754d53 | ||
|
|
ae1e17d359 | ||
|
|
32dbe5581d | ||
|
|
a93ad5a9ba | ||
|
|
874b047ce1 | ||
|
|
afa590c5a8 | ||
|
|
b89c52fcec | ||
|
|
ec2d323f75 | ||
|
|
586679b07f |
@@ -46,8 +46,6 @@ nb-configuration.xml
|
|||||||
*.user
|
*.user
|
||||||
*.userosscache
|
*.userosscache
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
*.VC.db
|
|
||||||
*.VC.opendb
|
|
||||||
|
|
||||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
*.userprefs
|
*.userprefs
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[sfall]
|
[sfall]
|
||||||
SaveInCombat=Cannot save at this time
|
SaveInCombat=Cannot save at this time.
|
||||||
KarmaGain=You gained %d karma.
|
KarmaGain=You gained %d karma.
|
||||||
KarmaLoss=You lost %d karma.
|
KarmaLoss=You lost %d karma.
|
||||||
HighlightFail1=You aren't carrying a motion sensor.
|
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!
|
SuperStimExploitMsg=You cannot use a super stim on someone who is not injured!
|
||||||
BlockedCombat=You cannot enter combat at this time.
|
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.
|
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]
|
[AppearanceMod]
|
||||||
RaceText=Race
|
RaceText=Race
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
|
|
||||||
; This section maps 7 armor types to corresponding armor item PIDs
|
|
||||||
[ArmorTypes]
|
|
||||||
Jacket = 74,265
|
|
||||||
Leather = 1,379
|
|
||||||
Metal = 2,240,380
|
|
||||||
Power = 3,232
|
|
||||||
AdvPower = 348,349
|
|
||||||
Combat = 17,239,381
|
|
||||||
Robe = 113,524
|
|
||||||
|
|
||||||
; Default armor FIDs (the same for all NPCs)
|
|
||||||
[Default]
|
|
||||||
Power=16777217
|
|
||||||
AdvPower=16777287
|
|
||||||
Robe=16777218
|
|
||||||
|
|
||||||
|
|
||||||
; Sulik
|
|
||||||
[1]
|
|
||||||
PID=16777313
|
|
||||||
Default=16777280
|
|
||||||
Leather=16777325
|
|
||||||
Power=16777324
|
|
||||||
Metal=16777323
|
|
||||||
Jacket=16777321
|
|
||||||
Combat=16777322
|
|
||||||
|
|
||||||
; Vic
|
|
||||||
[2]
|
|
||||||
PID=16777278
|
|
||||||
Default=16777307
|
|
||||||
Jacket=16777329
|
|
||||||
Combat=16777330
|
|
||||||
Metal=16777331
|
|
||||||
Power=16777332
|
|
||||||
Leather=16777333
|
|
||||||
|
|
||||||
; Cassidy
|
|
||||||
[3]
|
|
||||||
PID=16777305
|
|
||||||
Default=16777354
|
|
||||||
Leather=16777260
|
|
||||||
Power=16777328
|
|
||||||
Metal=16777327
|
|
||||||
Jacket=16777351
|
|
||||||
Combat=16777326
|
|
||||||
|
|
||||||
; Myron
|
|
||||||
[4]
|
|
||||||
PID=16777376
|
|
||||||
Default=16777304
|
|
||||||
Leather=
|
|
||||||
Power=16777349
|
|
||||||
Combat=16777350
|
|
||||||
|
|
||||||
; Cat Jules
|
|
||||||
[5]
|
|
||||||
PID=16777734
|
|
||||||
Default=16777353
|
|
||||||
Leather=16777347
|
|
||||||
Metal=16777348
|
|
||||||
Jacket=16777346
|
|
||||||
Combat=16777226
|
|
||||||
|
|
||||||
; Kitsune
|
|
||||||
[6]
|
|
||||||
PID=16777724
|
|
||||||
Default=16777222
|
|
||||||
Leather=16777221
|
|
||||||
Metal=16777223
|
|
||||||
Jacket=16777222
|
|
||||||
Combat=16777219
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
[Highlighting]
|
|
||||||
|
|
||||||
; DX scancode of a key to press to highlight items on the ground
|
|
||||||
; 42 - SHIFT key
|
|
||||||
Key=42
|
|
||||||
|
|
||||||
; Set to 1 to also highlight containers
|
|
||||||
Containers=0
|
|
||||||
|
|
||||||
; Set to 1 to also highlight lootable corpses
|
|
||||||
Corpses=0
|
|
||||||
|
|
||||||
; Set to 1 to only highlight objects in the player's line-of-sight
|
|
||||||
CheckLOS=0
|
|
||||||
|
|
||||||
; Set the color of outlines, available colors:
|
|
||||||
; 1 - glowing red
|
|
||||||
; 2 - red
|
|
||||||
; 4 - grey
|
|
||||||
; 8 - glowing green
|
|
||||||
; 16 - bright yellow
|
|
||||||
; 32 - dark yellow
|
|
||||||
; 64 - purple
|
|
||||||
OutlineColor=16
|
|
||||||
|
|
||||||
; Motion Scanner mode:
|
|
||||||
; 0 - ignored
|
|
||||||
; 1 - requires Motion Scanner present in player inventory to activate highlighting
|
|
||||||
; 2 - requires Motion Scanner and also requires 1 charge on every use (depleted scanner will not work anymore)
|
|
||||||
MotionScanner=0
|
|
||||||
|
|
||||||
|
|
||||||
[CombatControl]
|
|
||||||
;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 PIDList line and set a comma delimited list of PIDs
|
|
||||||
Mode=0
|
|
||||||
;PIDList=62,89,97,107,160,161
|
|
||||||
+106
-26
@@ -1,5 +1,5 @@
|
|||||||
;sfall configuration settings
|
;sfall configuration settings
|
||||||
;v4.0.4
|
;v3.8.12
|
||||||
|
|
||||||
[Main]
|
[Main]
|
||||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
;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
|
;Set to 1 to allow attaching sound files to combat float messages
|
||||||
AllowSoundForFloats=1
|
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
|
;This does not effect the play_sfall_sound and stop_sfall_sound script functions
|
||||||
AllowDShowSound=0
|
AllowDShowSound=0
|
||||||
|
|
||||||
@@ -70,6 +71,14 @@ GPUBlt=0
|
|||||||
;Requires graphics mode 4 or 5, and GPUBlt set to 1
|
;Requires graphics mode 4 or 5, and GPUBlt set to 1
|
||||||
Use32BitHeadGraphics=0
|
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
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
[Input]
|
[Input]
|
||||||
;Set to 1 to enable the mouse scroll wheel to scroll through inventory, barter, and loot screens
|
;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
|
;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
|
;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
|
;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
|
;Set to 0 to disable a slot, otherwise specify the DX scancode of the key you want to use
|
||||||
@@ -127,10 +136,38 @@ SpeedKey9=0x00
|
|||||||
;Set to -1 for either ctrl key, -2 for either alt key or -3 for either shift key
|
;Set to -1 for either ctrl key, -2 for either alt key or -3 for either shift key
|
||||||
WindowScrollKey=0
|
WindowScrollKey=0
|
||||||
|
|
||||||
|
;A key to press to toggle the highlighting of all items on the ground on the current map
|
||||||
|
;Set to 0 if you don't want a toggle key, or a DX scancode otherwise
|
||||||
|
ToggleItemHighlightsKey=42
|
||||||
|
|
||||||
|
;Set to 1 to also highlight containers
|
||||||
|
HighlightContainers=1
|
||||||
|
|
||||||
|
;Set the color of outlines, available colors:
|
||||||
|
;0x01 - glowing red
|
||||||
|
;0x02 - red
|
||||||
|
;0x04 - grey
|
||||||
|
;0x08 - glowing green
|
||||||
|
;0x10 - bright yellow
|
||||||
|
;0x20 - dark yellow
|
||||||
|
;0x40 - purple
|
||||||
|
OutlineColor=0x10
|
||||||
|
|
||||||
;A key to press to reload your currently equipped weapon
|
;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
|
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
|
;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
|
DebugEditorKey=0
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
@@ -164,7 +201,7 @@ WorldMapEncounterRate=5
|
|||||||
|
|
||||||
;The number of slots available in the locations list panel of the world map
|
;The number of slots available in the locations list panel of the world map
|
||||||
;Set to 0 to leave unchanged. 17 is default.
|
;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
|
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
|
;To start a new game somewhere other than artemple.map, uncomment the next line and set it to the map you want to load
|
||||||
@@ -288,7 +325,7 @@ SaveInCombatFix=1
|
|||||||
;Player's level is capped once the highest specified level is reached
|
;Player's level is capped once the highest specified level is reached
|
||||||
;XPTable=50,100,200
|
;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
|
;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'
|
;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
|
AdditionalWeaponAnims=1
|
||||||
@@ -328,23 +365,34 @@ CorpseLineOfFireFix=0
|
|||||||
;Set to 1 (or some higher number if needed, the maximum is 127) 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
|
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
|
;Set to 1 if using the hero appearance mod
|
||||||
EnableHeroAppearanceMod=0
|
EnableHeroAppearanceMod=0
|
||||||
|
|
||||||
;Set to 1 to skip the 3 opening movies
|
;Set to 1 to skip the 3 opening movies
|
||||||
SkipOpeningMovies=0
|
SkipOpeningMovies=0
|
||||||
|
|
||||||
;Causes NPCs who complete their combat turn with ap left over will try and find other ways to spend it.
|
;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.
|
;Only NPCs with AP left equal to or greater than the value given here will be considered.
|
||||||
;Set to 0 to disable
|
;Set to 0 to disable
|
||||||
NPCsTryToSpendExtraAP=0
|
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
|
;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 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
|
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
|
;Default is 293 for all skills
|
||||||
Lockpick=293
|
Lockpick=293
|
||||||
Steal=293
|
Steal=293
|
||||||
@@ -354,12 +402,15 @@ Doctor=293
|
|||||||
Science=293
|
Science=293
|
||||||
Repair=293
|
Repair=293
|
||||||
|
|
||||||
;Remove window position rounding
|
|
||||||
RemoveWindowRounding=0
|
|
||||||
|
|
||||||
;Set to 1 to add scroll buttons to the pipboy 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
|
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
|
;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
|
;Multiple options should be separated by commas, and there must be the same number of entries in both lines
|
||||||
;PremadePaths=combat,diplomat,stealth
|
;PremadePaths=combat,diplomat,stealth
|
||||||
@@ -367,6 +418,7 @@ UseScrollingQuestsList=1
|
|||||||
|
|
||||||
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
;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.
|
||||||
|
;CityRepsCount=19
|
||||||
;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
|
;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
|
;Set this to a valid path to save a copy of the console contents
|
||||||
@@ -379,8 +431,9 @@ ExtraSaveSlots=0
|
|||||||
;Set to 2 to update the HP/AC counters instantly
|
;Set to 2 to update the HP/AC counters instantly
|
||||||
SpeedInterfaceCounterAnims=0
|
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
|
;Number of KarmaPoints should be 1 less than number of KarmaFRMs
|
||||||
|
;KarmaFRMsCount=3
|
||||||
;KarmaFRMs=47,48,49
|
;KarmaFRMs=47,48,49
|
||||||
;KarmaPoints=-100,100
|
;KarmaPoints=-100,100
|
||||||
|
|
||||||
@@ -401,6 +454,9 @@ BonusHtHDamageFix=1
|
|||||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||||
DisplayBonusDamage=0
|
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)
|
;Modify the maximum number of animations allowed to run on a map. (Default is 32, and the maximum is 127)
|
||||||
AnimationsAtOnceLimit=120
|
AnimationsAtOnceLimit=120
|
||||||
|
|
||||||
@@ -433,14 +489,16 @@ 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
|
;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
|
;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
|
;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
|
CritterInvSizeLimitMode=0
|
||||||
CritterInvSizeLimit=200
|
CritterInvSizeLimit=100
|
||||||
|
|
||||||
;Some bit flags to alter behaviour of the motion sensor
|
;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
|
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
|
||||||
;2 - Motion sensor doesn't require charges
|
;2 - Motion sensor doesn't require charges
|
||||||
|
;4 - Motion sensor is required to use the item highlight feature
|
||||||
MotionScannerFlags=1
|
MotionScannerFlags=1
|
||||||
|
|
||||||
;Set to non-0 to adjust the maximum encounter table size
|
;Set to non-0 to adjust the maximum encounter table size
|
||||||
@@ -463,9 +521,17 @@ SuperStimExploitFix=0
|
|||||||
InventoryApCost=4
|
InventoryApCost=4
|
||||||
QuickPocketsApCostReduction=2
|
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
|
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
|
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
||||||
ComputeSprayMod=0
|
ComputeSprayMod=0
|
||||||
|
|
||||||
@@ -513,6 +579,14 @@ DialogPanelAnimDelay=33
|
|||||||
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
|
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
|
||||||
PipboyTimeAnimDelay=50
|
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 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
|
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
|
||||||
StackEmptyWeapons=0
|
StackEmptyWeapons=0
|
||||||
|
|
||||||
@@ -523,6 +597,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
|
;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
|
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
|
;Allows 9 options (lines of text) to be displayed correctly in a dialog window
|
||||||
DialogOptions9Lines=1
|
DialogOptions9Lines=1
|
||||||
|
|
||||||
@@ -536,6 +613,7 @@ DontTurnOffSneakIfYouRun=0
|
|||||||
CanSellUsedGeiger=1
|
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 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
|
CarChargingFix=1
|
||||||
|
|
||||||
;Set to 1 to skip weapon equip/unequip animations when performing various actions
|
;Set to 1 to skip weapon equip/unequip animations when performing various actions
|
||||||
@@ -548,16 +626,18 @@ InstantWeaponEquip=0
|
|||||||
;Set to 1 to display numbered dialogue options
|
;Set to 1 to display numbered dialogue options
|
||||||
NumbersInDialogue=0
|
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 display party member's current level/AC/addict flag on the combat control panel
|
||||||
|
PartyMemberExtraInfo=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
|
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||||
CreditsAtBottom=0
|
CreditsAtBottom=0
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
||||||
[Scripts]
|
|
||||||
;Comma-separated list of masked paths to load global scripts from
|
|
||||||
;Only use single slash \ as directory separator
|
|
||||||
;Paths outside of scripts folder are supported
|
|
||||||
GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
|
|
||||||
|
|
||||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
[Debugging]
|
[Debugging]
|
||||||
;Extra sfall configuration settings that can be used by modders
|
;Extra sfall configuration settings that can be used by modders
|
||||||
@@ -567,8 +647,8 @@ GlobalScriptPaths=scripts\gl*.int,scripts\sfall\gl*.int
|
|||||||
Enable=0
|
Enable=0
|
||||||
|
|
||||||
;Fallout 2 Debug Patch
|
;Fallout 2 Debug Patch
|
||||||
;Set to 1 to enable debugging output to screen or 2 to create a debug.log file
|
;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
|
;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg:
|
||||||
;-------
|
;-------
|
||||||
;[debug]
|
;[debug]
|
||||||
;mode=environment
|
;mode=environment
|
||||||
@@ -586,12 +666,12 @@ DebugMode=0
|
|||||||
SkipCompatModeCheck=0
|
SkipCompatModeCheck=0
|
||||||
|
|
||||||
;Set to 1 to skip the executable file size check
|
;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
|
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
|
;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
|
;ExtraCRC=0x00000000,0x00000000
|
||||||
|
|
||||||
;Set to 1 to stop Fallout from deleting non readonly protos at startup
|
;Set to 1 to stop Fallout from deleting non readonly protos at startup
|
||||||
|
|||||||
Binary file not shown.
@@ -1,126 +0,0 @@
|
|||||||
/**
|
|
||||||
|
|
||||||
Item Highlight mod.
|
|
||||||
|
|
||||||
Previously was part of sfall itself, now a separate mod.
|
|
||||||
Features:
|
|
||||||
- highlighting items, containers (optional) and lootable corpses (optional) on the ground
|
|
||||||
- configurable hotkey is used to trigger highlight
|
|
||||||
- only objects in direct line-of-sight of player are highlighted (optional)
|
|
||||||
- motion scanner is required to enable highlight (optional)
|
|
||||||
- motion scanner charges are decreased on each use (optional)
|
|
||||||
|
|
||||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
|
||||||
(short circuit evaluation)
|
|
||||||
|
|
||||||
version 1.0
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
//#include "..\..\..\!SRC\headers\define.h"
|
|
||||||
|
|
||||||
#define CRITTER_IS_DEAD (1)
|
|
||||||
#define PID_MOTION_SENSOR (59)
|
|
||||||
#define NO_HIGHLIGHT(obj) (get_flags(obj) bwand FLAG_NOHIGHLIGHT)
|
|
||||||
#define NO_STEAL(obj) (get_proto_data(obj_pid(obj), PROTO_CR_FLAGS) bwand CFLG_NOSTEAL)
|
|
||||||
|
|
||||||
variable configSection := "Highlighting";
|
|
||||||
variable highlightKey;
|
|
||||||
variable isHighlight;
|
|
||||||
variable alsoContainer;
|
|
||||||
variable alsoCorpse;
|
|
||||||
variable checkLOS;
|
|
||||||
variable outlineColor;
|
|
||||||
variable motionScanner;
|
|
||||||
variable highlightFailMsg1;
|
|
||||||
variable highlightFailMsg2;
|
|
||||||
|
|
||||||
procedure ToggleHighlightObject(variable obj, variable enable) begin
|
|
||||||
if obj and (not enable or not checkLOS or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) then begin
|
|
||||||
if (alsoContainer and obj_item_subtype(obj) == item_type_container) or (not NO_HIGHLIGHT(obj)) then begin
|
|
||||||
if (enable) then set_outline(obj, outlineColor);
|
|
||||||
else set_outline(obj, 0);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure ToggleHighlight(variable enable) begin
|
|
||||||
variable obj;
|
|
||||||
foreach obj in list_as_array(LIST_GROUNDITEMS) begin
|
|
||||||
if obj != outlined_object then begin
|
|
||||||
call ToggleHighlightObject(obj, enable);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if (alsoCorpse) then begin
|
|
||||||
foreach obj in list_as_array(LIST_CRITTERS) begin
|
|
||||||
if critter_state(obj) == CRITTER_IS_DEAD and not NO_STEAL(obj) then begin
|
|
||||||
call ToggleHighlightObject(obj, enable);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
tile_refresh_display;
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure KeyPressHandler begin
|
|
||||||
variable pressed := get_sfall_arg,
|
|
||||||
scanCode := get_sfall_arg,
|
|
||||||
scanner, charges;
|
|
||||||
|
|
||||||
if scanCode == highlightKey then begin
|
|
||||||
if pressed then begin
|
|
||||||
isHighlight := true;
|
|
||||||
if motionScanner then begin
|
|
||||||
scanner := obj_carrying_pid_obj(dude_obj, PID_MOTION_SENSOR);
|
|
||||||
if scanner then begin
|
|
||||||
if motionScanner >= 2 then begin
|
|
||||||
charges := get_weapon_ammo_count(scanner);
|
|
||||||
if charges > 0 then begin
|
|
||||||
set_weapon_ammo_count(scanner, charges - 1);
|
|
||||||
intface_redraw;
|
|
||||||
call ToggleHighlight(true);
|
|
||||||
end else begin
|
|
||||||
display_msg(highlightFailMsg2);
|
|
||||||
end
|
|
||||||
end else begin
|
|
||||||
call ToggleHighlight(true);
|
|
||||||
end
|
|
||||||
end else begin
|
|
||||||
display_msg(highlightFailMsg1);
|
|
||||||
end
|
|
||||||
end else begin
|
|
||||||
call ToggleHighlight(true);
|
|
||||||
end
|
|
||||||
end else begin
|
|
||||||
isHighlight := false;
|
|
||||||
call ToggleHighlight(false);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure CombatTurnHandler begin
|
|
||||||
if isHighlight then begin
|
|
||||||
isHighlight := false;
|
|
||||||
call ToggleHighlight(false);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure start begin
|
|
||||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
|
||||||
call InitConfigs;
|
|
||||||
|
|
||||||
highlightKey := GetConfig(configSection, "Key", 0);
|
|
||||||
alsoContainer := GetConfig(configSection, "Containers", 0);
|
|
||||||
alsoCorpse := GetConfig(configSection, "Corpses", 0);
|
|
||||||
checkLOS := GetConfig(configSection, "CheckLOS", 0);
|
|
||||||
outlineColor := GetConfig(configSection, "OutlineColor", 16);
|
|
||||||
if (outlineColor < 1) then outlineColor := 64;
|
|
||||||
motionScanner := GetConfig(configSection, "MotionScanner", 0);
|
|
||||||
|
|
||||||
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
|
|
||||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
|
||||||
|
|
||||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
|
||||||
register_hook_proc(HOOK_COMBATTURN, CombatTurnHandler);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Binary file not shown.
@@ -1,114 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
NPC Armor Appearance mod
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
|
||||||
(short circuit evaluation)
|
|
||||||
|
|
||||||
version 1.0
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#define IS_ARMOR(item) (obj_type(item) == OBJ_TYPE_ITEM and obj_item_subtype(item) == item_type_armor)
|
|
||||||
|
|
||||||
variable
|
|
||||||
modIni := "npcarmor.ini",
|
|
||||||
defaultFids,
|
|
||||||
armorPidMap, // maps armor PID to it's "type" - leather armor, metal, power armor, etc.
|
|
||||||
npcMap;
|
|
||||||
|
|
||||||
procedure check_armor_change(variable critter, variable item, variable isWorn) begin
|
|
||||||
variable npc, armorType, fid;
|
|
||||||
if (npcMap[obj_pid(critter)]) then begin
|
|
||||||
npc := npcMap[obj_pid(critter)];
|
|
||||||
if (not isWorn) then begin
|
|
||||||
// display_msg("No armor fid: " + npc["Default"]);
|
|
||||||
return npc["Default"];
|
|
||||||
end else if (item) then begin
|
|
||||||
armorType := armorPidMap[obj_pid(item)];
|
|
||||||
fid := npc[armorType] or defaultFids[armorType];
|
|
||||||
if (fid == 0 or fid == -1) then fid := npc["Default"];
|
|
||||||
// display_msg("Change fid: " + fid + ", npc: " + npc[armorType] + ", default:" + defaultFids[armorType]);
|
|
||||||
return fid;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return -1;
|
|
||||||
end
|
|
||||||
|
|
||||||
// for NPCs when they change armor themselves
|
|
||||||
procedure invenwield_handler begin
|
|
||||||
variable critter, item, fid, slot, isWorn;
|
|
||||||
critter := get_sfall_arg;
|
|
||||||
item := get_sfall_arg;
|
|
||||||
slot := get_sfall_arg;
|
|
||||||
isWorn := get_sfall_arg;
|
|
||||||
|
|
||||||
if (critter and item and slot == INVEN_TYPE_WORN) then begin
|
|
||||||
fid := check_armor_change(critter, item, isWorn);
|
|
||||||
if (fid != -1) then begin
|
|
||||||
art_change_fid_num(critter, fid);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
// when changing armor from inventory while controlling other NPCs
|
|
||||||
procedure adjustfid_handler begin
|
|
||||||
variable fid, armor;
|
|
||||||
if (dude_obj != real_dude_obj) then begin
|
|
||||||
armor := critter_inven_obj(dude_obj, INVEN_TYPE_WORN);
|
|
||||||
fid := check_armor_change(dude_obj, armor, armor != 0);
|
|
||||||
if (fid != -1) then begin
|
|
||||||
set_sfall_return(fid);
|
|
||||||
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);
|
|
||||||
|
|
||||||
defaultFids := get_ini_section(modIni, "Default");
|
|
||||||
fix_array(defaultFids);
|
|
||||||
foreach (armorType: i in defaultFids) begin
|
|
||||||
defaultFids[armorType] := atoi(i);
|
|
||||||
end
|
|
||||||
|
|
||||||
armorPidMap := create_array_map;
|
|
||||||
armorTypes := get_ini_section(modIni, "ArmorTypes");
|
|
||||||
foreach (armorType: pids in armorTypes) begin
|
|
||||||
pids := string_split(pids, ",");
|
|
||||||
foreach (pid in pids) begin
|
|
||||||
armorPidMap[atoi(pid)] := armorType;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
npcMap := create_array_map;
|
|
||||||
|
|
||||||
i := 1;
|
|
||||||
sect := get_ini_section(modIni, ""+i);
|
|
||||||
while (sect.PID) do begin
|
|
||||||
npc := create_array_map;
|
|
||||||
npc["Default"] := atoi(sect["Default"]);
|
|
||||||
foreach (armorType: pids in armorTypes) begin
|
|
||||||
if (sect[armorType]) then begin
|
|
||||||
npc[armorType] := atoi(sect[armorType]);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
npcMap[atoi(sect.PID)] := npc;
|
|
||||||
|
|
||||||
i += 1;
|
|
||||||
sect := get_ini_section(modIni, ""+i);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
NPC Combat Control
|
|
||||||
|
|
||||||
Allows to take control of your party member or other NPCs during combat
|
|
||||||
|
|
||||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
|
||||||
(short circuit evaluation)
|
|
||||||
|
|
||||||
version 1.0
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "..\headers\define.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
variable
|
|
||||||
configSection := "CombatControl",
|
|
||||||
controlMode,
|
|
||||||
pidList,
|
|
||||||
hasGeckoSkinning := false;
|
|
||||||
|
|
||||||
|
|
||||||
procedure combatturn_handler begin
|
|
||||||
variable
|
|
||||||
status := get_sfall_arg,
|
|
||||||
critter := get_sfall_arg,
|
|
||||||
arg3 := get_sfall_arg,
|
|
||||||
pid;
|
|
||||||
|
|
||||||
// display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + ", arg3: " + arg3);
|
|
||||||
pid := obj_pid(critter);
|
|
||||||
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
|
|
||||||
set_dude_obj(critter);
|
|
||||||
if hasGeckoSkinning then critter_add_trait(critter, TRAIT_PERK, PERK_gecko_skinning_perk, 1);
|
|
||||||
end else begin
|
|
||||||
set_dude_obj(real_dude_obj);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure start 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);
|
|
||||||
if (controlMode > 2) then controlMode := 0;
|
|
||||||
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;
|
|
||||||
|
|
||||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
|
|
||||||
#include "..\scripting\headers\sfall.h"
|
|
||||||
#include "..\scripting\headers\define_lite.h"
|
|
||||||
#include "..\scripting\headers\define_extra.h"
|
|
||||||
|
|
||||||
#include "..\scripting\headers\lib.arrays.h"
|
|
||||||
#include "..\scripting\headers\lib.strings.h"
|
|
||||||
// #include "..\scripting\headers\lib.inven.h"
|
|
||||||
|
|
||||||
variable ini := "sfall-mods.ini";
|
|
||||||
variable translationIni;
|
|
||||||
|
|
||||||
// Gets the integer value from ddraw.ini
|
|
||||||
procedure GetConfig(variable section, variable key, variable def) begin
|
|
||||||
variable val := get_ini_setting(ini + "|" + section + "|" + key);
|
|
||||||
if val == -1 then val := def;
|
|
||||||
return val;
|
|
||||||
end
|
|
||||||
|
|
||||||
// Gets the string value from ddraw.ini
|
|
||||||
procedure GetConfigStr(variable section, variable key, variable def) begin
|
|
||||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
|
||||||
if val == -1 or val == "" then val := def;
|
|
||||||
return val;
|
|
||||||
end
|
|
||||||
|
|
||||||
// Gets the value from ddraw.ini as a temp array of strings
|
|
||||||
procedure GetConfigList(variable section, variable key) begin
|
|
||||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
|
||||||
if val == -1 or val == "" then return [];
|
|
||||||
|
|
||||||
return string_split(val, ",");
|
|
||||||
end
|
|
||||||
|
|
||||||
// Gets the value from ddraw.ini as a temp array of ints
|
|
||||||
procedure GetConfigListInt(variable section, variable key) begin
|
|
||||||
variable arr, i, item;
|
|
||||||
|
|
||||||
arr := GetConfigList(section, key);
|
|
||||||
for (i := 0; i < len_array(arr); i++) begin
|
|
||||||
arr[i] := atoi(arr[i]);
|
|
||||||
end
|
|
||||||
return arr;
|
|
||||||
end
|
|
||||||
|
|
||||||
// Translates given string using Translations.ini
|
|
||||||
procedure Translate(variable id, variable def) begin
|
|
||||||
variable str := get_ini_string(translationIni + "|Sfall|" + id);
|
|
||||||
if not str or (strlen(str) == 0) then begin
|
|
||||||
str := def;
|
|
||||||
end
|
|
||||||
return str;
|
|
||||||
end
|
|
||||||
|
|
||||||
procedure InitConfigs begin
|
|
||||||
translationIni := GetConfigStr("Main", "TranslationsINI", "./Translations.ini");
|
|
||||||
end
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
To install each mod, copy *.int file into your <Fallout Dir>\data\scripts\ folder.
|
|
||||||
For gl_npcarmor.int, you also need to copy npcarmor.ini to your Fallout directory.
|
|
||||||
@@ -10,6 +10,12 @@
|
|||||||
#define OBJ_TYPE_MISC (5)
|
#define OBJ_TYPE_MISC (5)
|
||||||
#define OBJ_TYPE_SPATIAL (6)
|
#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 */
|
/* Item Common Flags */
|
||||||
#define HIDDEN_ITEM 134217728 // 0x08000000 - Hidden Item
|
#define HIDDEN_ITEM 134217728 // 0x08000000 - Hidden Item
|
||||||
|
|
||||||
@@ -21,14 +27,14 @@
|
|||||||
#define WEAPON_2HAND 512 // 0x00000200 - 2Hnd (weapon is two-handed)
|
#define WEAPON_2HAND 512 // 0x00000200 - 2Hnd (weapon is two-handed)
|
||||||
|
|
||||||
#define ATKMODE_PRI_NONE 0
|
#define ATKMODE_PRI_NONE 0
|
||||||
#define ATKMODE_PRI_PUNCH 1
|
#define ATKMODE_PRI_PUNCH 1 // 0001
|
||||||
#define ATKMODE_PRI_KICK 2
|
#define ATKMODE_PRI_KICK 2 // 0010
|
||||||
#define ATKMODE_PRI_SWING 3
|
#define ATKMODE_PRI_SWING 3 // 0011
|
||||||
#define ATKMODE_PRI_THRUST 4
|
#define ATKMODE_PRI_THRUST 4 // 0100
|
||||||
#define ATKMODE_PRI_THROW 5
|
#define ATKMODE_PRI_THROW 5 // 0101
|
||||||
#define ATKMODE_PRI_SINGLE 6
|
#define ATKMODE_PRI_SINGLE 6 // 0110
|
||||||
#define ATKMODE_PRI_BURST 7
|
#define ATKMODE_PRI_BURST 7 // 0111
|
||||||
#define ATKMODE_PRI_FLAME 8
|
#define ATKMODE_PRI_FLAME 8 // 1000
|
||||||
#define ATKMODE_SEC_NONE 0
|
#define ATKMODE_SEC_NONE 0
|
||||||
#define ATKMODE_SEC_PUNCH 16 // 0x00000010
|
#define ATKMODE_SEC_PUNCH 16 // 0x00000010
|
||||||
#define ATKMODE_SEC_KICK 32 // 0x00000020
|
#define ATKMODE_SEC_KICK 32 // 0x00000020
|
||||||
@@ -101,15 +107,21 @@
|
|||||||
// offsets for get_proto_data
|
// offsets for get_proto_data
|
||||||
#define PROTO_PID (1)
|
#define PROTO_PID (1)
|
||||||
#define PROTO_TEXTID (4)
|
#define PROTO_TEXTID (4)
|
||||||
|
#define PROTO_FID (8)
|
||||||
|
|
||||||
// items
|
// items
|
||||||
|
#define PROTO_IT_LDIST (12)
|
||||||
|
#define PROTO_IT_LINT (16)
|
||||||
|
#define PROTO_IT_FLAG (20)
|
||||||
#define PROTO_IT_FLAGS (24)
|
#define PROTO_IT_FLAGS (24)
|
||||||
|
#define PROTO_IT_SCRIPTID (28)
|
||||||
#define PROTO_IT_TYPE (32)
|
#define PROTO_IT_TYPE (32)
|
||||||
#define PROTO_IT_MATERIAL (108)
|
#define PROTO_IT_MATERIAL (108)
|
||||||
#define PROTO_IT_SIZE (112)
|
#define PROTO_IT_SIZE (112)
|
||||||
#define PROTO_IT_WEIGHT (116)
|
#define PROTO_IT_WEIGHT (116)
|
||||||
#define PROTO_IT_COST (120)
|
#define PROTO_IT_COST (120)
|
||||||
#define PROTO_IT_INV_FID (124)
|
#define PROTO_IT_INV_FID (124)
|
||||||
|
#define PROTO_IT_SOUND (128) // byte
|
||||||
|
|
||||||
// weapons
|
// weapons
|
||||||
#define PROTO_WP_ANIM (36)
|
#define PROTO_WP_ANIM (36)
|
||||||
@@ -187,7 +199,11 @@
|
|||||||
#define PROTO_DR_ADDICT_DELAY (100)
|
#define PROTO_DR_ADDICT_DELAY (100)
|
||||||
|
|
||||||
// critters
|
// 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_HEAD_FID (40)
|
||||||
#define PROTO_CR_AI_PACKET (44)
|
#define PROTO_CR_AI_PACKET (44)
|
||||||
#define PROTO_CR_TEAM_NUM (48)
|
#define PROTO_CR_TEAM_NUM (48)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
#define INTFACEUSE (0x8000)
|
#define INTFACEUSE (0x8000)
|
||||||
#define INTFACELOOT (0x10000)
|
#define INTFACELOOT (0x10000)
|
||||||
#define BARTER (0x20000)
|
#define BARTER (0x20000)
|
||||||
#define HEROWIN (0x40000)
|
|
||||||
|
|
||||||
//Valid arguments to register_hook
|
//Valid arguments to register_hook
|
||||||
#define HOOK_TOHIT (0)
|
#define HOOK_TOHIT (0)
|
||||||
@@ -46,11 +45,6 @@
|
|||||||
#define HOOK_WITHINPERCEPTION (23)
|
#define HOOK_WITHINPERCEPTION (23)
|
||||||
#define HOOK_INVENTORYMOVE (24)
|
#define HOOK_INVENTORYMOVE (24)
|
||||||
#define HOOK_INVENWIELD (25)
|
#define HOOK_INVENWIELD (25)
|
||||||
#define HOOK_ADJUSTFID (26)
|
|
||||||
#define HOOK_COMBATTURN (27)
|
|
||||||
#define HOOK_CARTRAVEL (28)
|
|
||||||
#define HOOK_SETGLOBALVAR (29)
|
|
||||||
#define HOOK_RESTTIMER (30)
|
|
||||||
|
|
||||||
//Valid arguments to list_begin
|
//Valid arguments to list_begin
|
||||||
#define LIST_CRITTERS (0)
|
#define LIST_CRITTERS (0)
|
||||||
@@ -138,6 +132,7 @@
|
|||||||
#define set_attack_explosion_radius(x) metarule2_explosions(3, x, 0)
|
#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(x) metarule2_explosions(4, x, 0)
|
||||||
#define set_attack_is_explosion_fire set_attack_is_explosion(DMG_fire)
|
#define set_attack_is_explosion_fire set_attack_is_explosion(DMG_fire)
|
||||||
|
#define set_explosion_radius(grenade, rocket) metarule2_explosions(5, grenade, rocket)
|
||||||
|
|
||||||
|
|
||||||
#define GAME_MSG_COMBAT (0)
|
#define GAME_MSG_COMBAT (0)
|
||||||
@@ -180,11 +175,6 @@
|
|||||||
#define CURSOR_COMMAND (1)
|
#define CURSOR_COMMAND (1)
|
||||||
#define CURSOR_TARGETING (2)
|
#define CURSOR_TARGETING (2)
|
||||||
|
|
||||||
//Valid flags for set_rest_mode
|
|
||||||
#define RESTMODE_DISABLED (1) // disable resting on all maps
|
|
||||||
#define RESTMODE_STRICT (2) // disable resting on maps with "can_rest_here=No" in Maps.txt, even if there are no other critters
|
|
||||||
#define RESTMODE_NO_HEALING (4) // disable healing during resting
|
|
||||||
|
|
||||||
#define mstr_combat(x) (message_str_game(GAME_MSG_COMBAT, x))
|
#define mstr_combat(x) (message_str_game(GAME_MSG_COMBAT, x))
|
||||||
#define mstr_ai(x) (message_str_game(GAME_MSG_AI, x))
|
#define mstr_ai(x) (message_str_game(GAME_MSG_AI, x))
|
||||||
#define mstr_scrname(x) (message_str_game(GAME_MSG_SCRNAME, x))
|
#define mstr_scrname(x) (message_str_game(GAME_MSG_SCRNAME, x))
|
||||||
@@ -217,35 +207,28 @@
|
|||||||
|
|
||||||
|
|
||||||
#define attack_is_aimed sfall_func0("attack_is_aimed")
|
#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 critter_inven_obj2(obj, type) sfall_func2("critter_inven_obj2", obj, type)
|
||||||
#define display_stats sfall_func0("display_stats")
|
#define display_stats sfall_func0("display_stats")
|
||||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||||
#define floor2(value) sfall_func1("floor2", value)
|
#define floor2(value) sfall_func1("floor2", value)
|
||||||
|
#define get_current_inven_size(obj) sfall_func1("get_current_inven_size", obj)
|
||||||
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
||||||
#define get_flags(obj) sfall_func1("get_flags", obj)
|
#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_map_enter_position sfall_func0("get_map_enter_position")
|
||||||
#define get_outline(obj) sfall_func1("get_outline", obj)
|
#define get_outline(obj) sfall_func1("get_outline", obj)
|
||||||
#define intface_hide sfall_func0("intface_hide")
|
#define intface_hide sfall_func0("intface_hide")
|
||||||
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
#define intface_is_hidden sfall_func0("intface_is_hidden")
|
||||||
#define intface_redraw sfall_func0("intface_redraw")
|
#define intface_redraw sfall_func0("intface_redraw")
|
||||||
#define intface_show sfall_func0("intface_show")
|
#define intface_show sfall_func0("intface_show")
|
||||||
|
#define inventory_redraw(invSide) sfall_func1("inventory_redraw", invSide)
|
||||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
#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 outlined_object sfall_func0("outlined_object")
|
||||||
#define real_dude_obj sfall_func0("real_dude_obj")
|
|
||||||
#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_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_flags(obj, flags) sfall_func2("set_flags", obj, flags)
|
||||||
#define set_ini_setting(setting, value) sfall_func2("set_ini_setting", setting, value)
|
#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_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)
|
#define set_outline(obj, color) sfall_func2("set_outline", obj, color)
|
||||||
#define set_rest_heal_time(time) sfall_func1("set_rest_heal_time", time)
|
|
||||||
#define set_rest_mode(mode) sfall_func1("set_rest_mode", mode)
|
|
||||||
#define set_unjam_locks_time(time) sfall_func1("set_unjam_locks_time", time)
|
|
||||||
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
||||||
#define tile_refresh_display sfall_func0("tile_refresh_display")
|
#define tile_refresh_display sfall_func0("tile_refresh_display")
|
||||||
#define unjam_lock(obj) sfall_func1("unjam_lock", obj)
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ critter ret3 - Override the target of the attack
|
|||||||
HOOK_CALCAPCOST (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.
|
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().
|
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
|
critter arg1 - The critter performing the action
|
||||||
@@ -162,8 +162,8 @@ critter arg1 - The target
|
|||||||
critter arg2 - The attacker
|
critter arg2 - The attacker
|
||||||
int arg3 - The amount of damage to the target
|
int arg3 - The amount of damage to the target
|
||||||
int arg4 - The amount of damage to the attacker
|
int arg4 - The amount of damage to the attacker
|
||||||
int arg5 - The special effect flags for the target
|
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
|
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 arg7 - The weapon used in the attack
|
||||||
int arg8 - The bodypart that was struck
|
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)
|
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)
|
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.
|
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.
|
||||||
|
|
||||||
@@ -305,14 +305,14 @@ object* ret1 - 0 if the hex doesn't block, or any sort of object pointer if it d
|
|||||||
|
|
||||||
HOOK_ITEMDAMAGE (hs_itemdamage.int)
|
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 arg1 - The default min damage
|
||||||
int arg2 - The default max damage
|
int arg2 - The default max damage
|
||||||
Item arg3 - The weapon used. (0 if unarmed)
|
Item arg3 - The weapon used. (0 if unarmed)
|
||||||
Critter arg4 - The critter doing the attacking
|
Critter arg4 - The critter doing the attacking
|
||||||
int arg5 - The type of attack
|
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 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
|
int ret2 - The new maximum damage
|
||||||
@@ -340,11 +340,14 @@ HOOK_KEYPRESS (hs_keypress.int)
|
|||||||
Runs once every time when any key was pressed or released.
|
Runs once every time when any key was pressed or released.
|
||||||
DX codes: (see dik.h header)
|
DX codes: (see dik.h header)
|
||||||
VK codes: http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx
|
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 arg1 - event type: 1 - pressed, 0 - released
|
||||||
int arg2 - key DX scancode
|
int arg2 - key DX scancode
|
||||||
int arg3 - key VK code (very similar to ASCII codes)
|
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)
|
HOOK_MOUSECLICK (hs_mouseclick.int)
|
||||||
@@ -432,69 +435,8 @@ 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.
|
If you need to rely on this, try checking if armor/weapon already equipped when wielding hook is executed.
|
||||||
|
|
||||||
Critter arg1 - critter
|
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), may be 0 when unwielding (object is valid only if the item is unwielded by move_obj_inven_to_obj() or rm_obj_from_inven())
|
||||||
int arg3 - slot (INVEN_TYPE_*)
|
int arg3 - slot (INVEN_TYPE_*)
|
||||||
int arg4 - 1 when wielding, 0 when unwielding
|
int arg4 - 1 when wielding, 0 when unwielding
|
||||||
|
|
||||||
int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
|
int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
HOOK_ADJUSTFID (hs_adjustfid.int)
|
|
||||||
|
|
||||||
Runs after calculating character figure FID on the inventory screen, whenever the game decides that character appearance might change.
|
|
||||||
Also happens on other screens, like barter.
|
|
||||||
|
|
||||||
NOTE: FID has following format: 0x0ABBCDDD, where A is object type, BB - animation code (always 0 in this case), C - weapon code, DDD - FRM index in LST file.
|
|
||||||
|
|
||||||
int arg1 - the vanilla fid calculated by the engine according to critter base FID and armor/weapon being used
|
|
||||||
|
|
||||||
int ret1 - overrides the calculated FID with provided value
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
HOOK_COMBATTURN (hs_combatturn.int)
|
|
||||||
|
|
||||||
Runs before and after each turn in combat (for both PC and NPC).
|
|
||||||
|
|
||||||
int arg1 - event type: 1 - start of turn, 0 - normal end of turn, -1 - combat ended abruptly (by script or by pressing Enter during PC turn)
|
|
||||||
int arg2 - critter doing the turn
|
|
||||||
int arg3 - unknown boolean argument
|
|
||||||
|
|
||||||
int ret1 - pass 1 at the start of turn to skip the turn, pass -1 at the end of turn to force end of combat
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
HOOK_CARTRAVEL (hs_cartravel.int)
|
|
||||||
|
|
||||||
Runs continuously during worldmap travel on car.
|
|
||||||
|
|
||||||
int arg1 - vanilla car speed (between 3 and 8 "steps")
|
|
||||||
int arg2 - vanilla fuel consumption (100 and below)
|
|
||||||
|
|
||||||
int ret1 - car speed override (pass -1 if you just want to override fuel consumption)
|
|
||||||
int ret2 - fuel consumption override
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
HOOK_SETGLOBALVAR (hs_setglobalvar.int)
|
|
||||||
|
|
||||||
Runs when setting the value of a global variable.
|
|
||||||
|
|
||||||
int arg1 - the index number of the global variable being set
|
|
||||||
int arg2 - the set value of the global variable
|
|
||||||
|
|
||||||
int ret1 - overrides the value of the global variable
|
|
||||||
|
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
HOOK_RESTTIMER (hs_resttimer.int)
|
|
||||||
|
|
||||||
Runs continuously while the player is resting (using pipboy alarm clock).
|
|
||||||
|
|
||||||
int arg1 - the game time in ticks
|
|
||||||
int arg2 - event type: 1 - when the resting ends normally, -1 - when pressing ESC to cancel the timer, 0 - otherwise
|
|
||||||
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
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
---------- GLOBAL SCRIPTS -----------
|
---------- 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.
|
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.
|
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 9 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 3.8.12, 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.
|
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.
|
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.
|
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.
|
- 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)
|
> 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)
|
> 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)
|
> void set_car_current_town(int town)
|
||||||
- changes the current town index for the player's car
|
- 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)
|
> void reg_anim_turn_towards(object, tile/target, delay)
|
||||||
- makes object change its direction to face given tile num or target object.
|
- makes object change its direction to face given tile num or target object.
|
||||||
|
|
||||||
> int metarule2_explosions(int arg1, int arg2)
|
> int 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:
|
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)
|
||||||
@@ -231,6 +231,10 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
|
|||||||
> 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 receive fire damage.
|
- 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.
|
||||||
|
|
||||||
|
|
||||||
Some utility/math functions are available:
|
Some utility/math functions are available:
|
||||||
|
|
||||||
@@ -409,28 +413,6 @@ Some utility/math functions are available:
|
|||||||
> object sfall_func0("outlined_object")
|
> object sfall_func0("outlined_object")
|
||||||
- returns an object that is currently highlighted by hovering the mouse above it
|
- returns an object that is currently highlighted by hovering the mouse above it
|
||||||
|
|
||||||
> object sfall_func1("set_dude_obj", critter)
|
|
||||||
- take control of a given critter
|
|
||||||
- passing 0 will reset control back to "real" dude
|
|
||||||
|
|
||||||
> void sfall_func0("real_dude_obj")
|
|
||||||
- returns the initial dude_obj after set_dude_obj was used
|
|
||||||
|
|
||||||
> array sfall_func1("get_ini_sections", string fileName)
|
|
||||||
- returns an array of names of all sections in a given INI file
|
|
||||||
|
|
||||||
> array sfall_func2("get_ini_section", string fileName, string section)
|
|
||||||
- returns an associative array of keys and values for a given INI file and section
|
|
||||||
|
|
||||||
> int sfall_func0("car_gas_amount")
|
|
||||||
- returns current amount of fuel in player's car (between 0 and 80000)
|
|
||||||
- to change fuel amount, use vanilla function: metarule(METARULE_GIVE_CAR_GAS, amount) - amount can be positive or negative
|
|
||||||
|
|
||||||
> void sfall_func1("set_car_intface_art", int artIndex)
|
|
||||||
- changes the interface art (index in LST file) for the car image on worldmap screen
|
|
||||||
- should be called before going to worldmap
|
|
||||||
- vanilla art index is 0x1B1
|
|
||||||
|
|
||||||
> int sfall_func0("get_cursor_mode")
|
> int sfall_func0("get_cursor_mode")
|
||||||
- returns the current cursor mode (0 - movement cursor, 1 - command cursor, 2 - targeting cursor)
|
- returns the current cursor mode (0 - movement cursor, 1 - command cursor, 2 - targeting cursor)
|
||||||
- mode 4 to 10 are Skilldex skills (yellow targeting cursor)
|
- mode 4 to 10 are Skilldex skills (yellow targeting cursor)
|
||||||
@@ -442,19 +424,6 @@ Some utility/math functions are available:
|
|||||||
- displays player stats in the inventory screen display window
|
- displays player stats in the inventory screen display window
|
||||||
- works only in opened inventory
|
- works only in opened inventory
|
||||||
|
|
||||||
> int sfall_func1("lock_is_jammed", object)
|
|
||||||
- returns 1 if the lock (container or scenery) is currently jammed, 0 otherwise
|
|
||||||
|
|
||||||
> void sfall_func1("unjam_lock", object)
|
|
||||||
- unjams a lock immediately without having to wait until the next day, or leave the map and then return after 24 hours
|
|
||||||
- does not work in use_skill_on_p_proc procedure
|
|
||||||
|
|
||||||
> void sfall_func1("set_unjam_locks_time", int time)
|
|
||||||
- sets after how many hours (up to 127 hours) jammed locks will be unjammed if the player leaves the map
|
|
||||||
- also disables the auto unjam that occurs at midnight when the player is on the map
|
|
||||||
- passing 0 will disable the auto unjam mechanism completely
|
|
||||||
- The auto unjam mechanism will be reset each time the player reloads the game
|
|
||||||
|
|
||||||
> array sfall_func0("get_map_enter_position")
|
> array sfall_func0("get_map_enter_position")
|
||||||
- returns an array of the player's position data (index 0 - tile, 1 - elevation, 2 - rotation) when entering the map through exit grids
|
- returns an array of the player's position data (index 0 - tile, 1 - elevation, 2 - rotation) when entering the map through exit grids
|
||||||
- if entering from the world map, the tile value will be -1
|
- if entering from the world map, the tile value will be -1
|
||||||
@@ -465,17 +434,21 @@ Some utility/math functions are available:
|
|||||||
- setting the tile to 0 will put the player on the start hex (default tile and elevation) of the map
|
- setting the tile to 0 will put the player on the start hex (default tile and elevation) of the map
|
||||||
- works only in map_enter_p_proc procedure
|
- works only in map_enter_p_proc procedure
|
||||||
|
|
||||||
> void sfall_func1("set_rest_heal_time", int minutes)
|
|
||||||
- sets the time interval in minutes for healing during resting. The default is 180
|
|
||||||
- The time interval will be reset each time the player reloads the game
|
|
||||||
|
|
||||||
> void sfall_func1("set_rest_mode", int mode)
|
|
||||||
- sets the bit flags for the rest mode (see RESTMODE_* constants in sfall.h)
|
|
||||||
- passing 0 will reset the rest mode. It will also be reset each time the player reloads the game
|
|
||||||
|
|
||||||
> int sfall_func0("attack_is_aimed")
|
> int sfall_func0("attack_is_aimed")
|
||||||
- returns 1 if the aimed attack mode is selected, 0 otherwise
|
- returns 1 if the aimed attack mode is selected, 0 otherwise
|
||||||
|
|
||||||
|
> 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)
|
||||||
|
|
||||||
|
> 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
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
------ MORE INFO -------
|
------ MORE INFO -------
|
||||||
------------------------
|
------------------------
|
||||||
|
|||||||
@@ -16,24 +16,17 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unordered_map>
|
#include "main.h"
|
||||||
|
|
||||||
#include "..\main.h"
|
|
||||||
|
|
||||||
#include "AI.h"
|
#include "AI.h"
|
||||||
#include "..\FalloutEngine\Fallout2.h"
|
#include "FalloutEngine.h"
|
||||||
#include "..\SafeWrite.h"
|
#include "SafeWrite.h"
|
||||||
|
|
||||||
namespace sfall
|
#include <hash_map>
|
||||||
{
|
|
||||||
|
|
||||||
typedef std::unordered_map<DWORD, DWORD> :: const_iterator iter;
|
typedef stdext::hash_map<DWORD, DWORD> :: const_iterator iter;
|
||||||
|
|
||||||
static std::unordered_map<DWORD,DWORD> targets;
|
static stdext::hash_map<DWORD,DWORD> targets;
|
||||||
static std::unordered_map<DWORD,DWORD> sources;
|
static stdext::hash_map<DWORD,DWORD> sources;
|
||||||
|
|
||||||
static DWORD combatDisabled;
|
|
||||||
static std::string combatBlockedMessage;
|
|
||||||
|
|
||||||
DWORD _stdcall AIGetLastAttacker(DWORD target) {
|
DWORD _stdcall AIGetLastAttacker(DWORD target) {
|
||||||
iter itr=sources.find(target);
|
iter itr=sources.find(target);
|
||||||
@@ -47,31 +40,37 @@ DWORD _stdcall AIGetLastTarget(DWORD source) {
|
|||||||
else return itr->second;
|
else return itr->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _stdcall CombatAttackHook(DWORD source, DWORD target) {
|
static void __fastcall CombatAttackHook(DWORD source, DWORD target) {
|
||||||
sources[target] = source;
|
sources[target] = source;
|
||||||
targets[source] = target;
|
targets[source] = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __declspec(naked) combat_attack_hook() {
|
static void __declspec(naked) combat_attack_hook() {
|
||||||
_asm {
|
_asm {
|
||||||
pushad;
|
push ecx;
|
||||||
push edx;
|
push edx;
|
||||||
push eax;
|
push eax;
|
||||||
call CombatAttackHook;
|
mov ecx, eax; // source
|
||||||
popad;
|
call CombatAttackHook; // edx - target
|
||||||
jmp fo::funcoffs::combat_attack_;
|
pop eax;
|
||||||
|
pop edx;
|
||||||
|
pop ecx;
|
||||||
|
jmp combat_attack_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD CombatDisabled;
|
||||||
|
static char CombatBlockedMessage[128];
|
||||||
|
|
||||||
static void _stdcall CombatBlocked() {
|
static void _stdcall CombatBlocked() {
|
||||||
fo::func::display_print(combatBlockedMessage.c_str());
|
DisplayConsoleMessage(CombatBlockedMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const DWORD BlockCombatHook1Ret1=0x45F6B4;
|
static const DWORD BlockCombatHook1Ret1=0x45F6B4;
|
||||||
static const DWORD BlockCombatHook1Ret2=0x45F6D7;
|
static const DWORD BlockCombatHook1Ret2=0x45F6D7;
|
||||||
static void __declspec(naked) BlockCombatHook1() {
|
static void __declspec(naked) BlockCombatHook1() {
|
||||||
__asm {
|
__asm {
|
||||||
mov eax, combatDisabled;
|
mov eax, CombatDisabled;
|
||||||
test eax, eax;
|
test eax, eax;
|
||||||
jz end;
|
jz end;
|
||||||
call CombatBlocked;
|
call CombatBlocked;
|
||||||
@@ -84,10 +83,10 @@ end:
|
|||||||
|
|
||||||
static void __declspec(naked) BlockCombatHook2() {
|
static void __declspec(naked) BlockCombatHook2() {
|
||||||
__asm {
|
__asm {
|
||||||
mov eax, dword ptr ds:[FO_VAR_intfaceEnabled];
|
mov eax, dword ptr ds:[_intfaceEnabled];
|
||||||
test eax, eax;
|
test eax, eax;
|
||||||
jz end;
|
jz end;
|
||||||
mov eax, combatDisabled;
|
mov eax, CombatDisabled;
|
||||||
test eax, eax;
|
test eax, eax;
|
||||||
jz succeed;
|
jz succeed;
|
||||||
pushad;
|
pushad;
|
||||||
@@ -103,17 +102,18 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _stdcall AIBlockCombat(DWORD i) {
|
void _stdcall AIBlockCombat(DWORD i) {
|
||||||
combatDisabled = i ? 1 : 0;
|
if(i) CombatDisabled=1;
|
||||||
|
else CombatDisabled=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AI::init() {
|
void AIInit() {
|
||||||
//HookCall(0x42AE1D, ai_attack_hook);
|
//HookCall(0x42AE1D, ai_attack_hook);
|
||||||
//HookCall(0x42AE5C, ai_attack_hook);
|
//HookCall(0x42AE5C, ai_attack_hook);
|
||||||
HookCall(0x426A95, combat_attack_hook);
|
HookCall(0x426A95, combat_attack_hook);
|
||||||
HookCall(0x42A796, combat_attack_hook);
|
HookCall(0x42A796, combat_attack_hook);
|
||||||
MakeJump(0x45F6AF, BlockCombatHook1);
|
MakeJump(0x45F6AF, BlockCombatHook1);
|
||||||
HookCall(0x4432A6, BlockCombatHook2);
|
HookCall(0x4432A6, BlockCombatHook2);
|
||||||
combatBlockedMessage = Translate("sfall", "BlockedCombat", "You cannot enter combat at this time.");
|
GetPrivateProfileString("sfall", "BlockedCombat", "You cannot enter combat at this time.", CombatBlockedMessage, 128, translationIni);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _stdcall AICombatStart() {
|
void _stdcall AICombatStart() {
|
||||||
@@ -125,5 +125,3 @@ void _stdcall AICombatEnd() {
|
|||||||
targets.clear();
|
targets.clear();
|
||||||
sources.clear();
|
sources.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@@ -16,18 +16,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Module.h"
|
void AIInit();
|
||||||
|
|
||||||
namespace sfall
|
|
||||||
{
|
|
||||||
|
|
||||||
class AI : public Module {
|
|
||||||
public:
|
|
||||||
const char* name() { return "AI"; }
|
|
||||||
void init();
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO: use subscription instead
|
|
||||||
void _stdcall AICombatStart();
|
void _stdcall AICombatStart();
|
||||||
void _stdcall AICombatEnd();
|
void _stdcall AICombatEnd();
|
||||||
|
|
||||||
@@ -35,5 +24,3 @@ DWORD _stdcall AIGetLastAttacker(DWORD target);
|
|||||||
DWORD _stdcall AIGetLastTarget(DWORD source);
|
DWORD _stdcall AIGetLastTarget(DWORD source);
|
||||||
|
|
||||||
void _stdcall AIBlockCombat(DWORD i);
|
void _stdcall AIBlockCombat(DWORD i);
|
||||||
|
|
||||||
}
|
|
||||||
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