mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a62a4d6911 | ||
|
|
20746abba2 | ||
|
|
e11755cb2d | ||
|
|
83b0862db6 | ||
|
|
386b5a6678 | ||
|
|
5bd69dfee2 | ||
|
|
a388a9e602 | ||
|
|
69bea44481 | ||
|
|
e2fc1ee0ec | ||
|
|
912abbd213 | ||
|
|
653b419be6 | ||
|
|
4480ecfcad | ||
|
|
08b9d98d3b | ||
|
|
c20e709659 | ||
|
|
68a345f398 | ||
|
|
730cd212a4 | ||
|
|
ce0f5ea8c9 | ||
|
|
2ce1c0f36e | ||
|
|
72e370117e | ||
|
|
6ab45bbc3c | ||
|
|
7bcf06c227 | ||
|
|
bc8f7477c7 | ||
|
|
f5c570ddc1 | ||
|
|
504f66f002 | ||
|
|
76f2301b6c | ||
|
|
4788ac757b | ||
|
|
a71b33aab1 | ||
|
|
222f3eaf68 | ||
|
|
823d2b92f7 | ||
|
|
f478e9a1f9 | ||
|
|
8718b86440 | ||
|
|
67adb9b592 | ||
|
|
ca5781a44a | ||
|
|
4edf36a1dc | ||
|
|
4a5f556cd3 | ||
|
|
2b7754746c | ||
|
|
8a4a83c8f8 | ||
|
|
c04df22c48 | ||
|
|
8e0ccc576c | ||
|
|
42566cc9da | ||
|
|
9e1c68e78d | ||
|
|
9765396b08 | ||
|
|
b008502e13 | ||
|
|
d71efe5b82 | ||
|
|
120888e5ed | ||
|
|
7b5075042d | ||
|
|
12ad41043d | ||
|
|
e509932add | ||
|
|
ba3ad33587 | ||
|
|
6e74c3166a | ||
|
|
e320acce0b | ||
|
|
4f48926105 | ||
|
|
5611931063 | ||
|
|
f00022fed6 | ||
|
|
78815425e2 | ||
|
|
9ddddcc120 | ||
|
|
11c15cec93 | ||
|
|
f36bd6fb61 | ||
|
|
26ab38c6c3 | ||
|
|
9b50e6be1e | ||
|
|
2427634ee8 | ||
|
|
36d1d0a5fc | ||
|
|
486f00cdf4 | ||
|
|
b6fd424665 | ||
|
|
3d679db758 | ||
|
|
92e1f919d9 | ||
|
|
d259e8c903 | ||
|
|
dea0e596c3 | ||
|
|
90b39f3dde | ||
|
|
c80224f661 | ||
|
|
d7d8de5e1a | ||
|
|
0a21e4abfa | ||
|
|
1340eeb0d3 | ||
|
|
a350fed4d1 | ||
|
|
402d4f40f2 | ||
|
|
0f49c7f68d | ||
|
|
deb0299776 | ||
|
|
4bb3fa0275 | ||
|
|
da31455cef | ||
|
|
4da10e2fdb | ||
|
|
5426d043c1 | ||
|
|
719cec74d1 | ||
|
|
627fe11c29 | ||
|
|
dcca405b89 | ||
|
|
cce9437d19 | ||
|
|
09b3bf3aed | ||
|
|
08a891a0fc | ||
|
|
e9df81ac78 | ||
|
|
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
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
*.VC.db
|
||||
*.VC.opendb
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
; Allows you to configure advanced settings for drugs.
|
||||
; Maximum 50 drugs are allowed
|
||||
; Note: for vanilla drugs, you can only override the values of NumEffect and AddictTime parameters
|
||||
|
||||
[main]
|
||||
; set to 1 to change Jet addiction to be removed after the time expires
|
||||
JetWithdrawal=0
|
||||
|
||||
; total number of drugs in this file
|
||||
Count=0
|
||||
|
||||
; count starts from 1
|
||||
[1]
|
||||
; drug item PID
|
||||
PID=0
|
||||
; set a limit on the count of first and second delayed effects when using the drug, i.e. if the queue has delayed effects from the drug,
|
||||
; and their count is greater or equal to NumEffects, it is not possible to obtain new effects from using the drug
|
||||
; this count is 4 for Buffout/Mentats/Psycho/Jet
|
||||
; set -1 to leave this parameter unchanged
|
||||
NumEffects=-1
|
||||
; the duration of the addiction effect in game minutes (i.e. 1440 = 24 game hours)
|
||||
; set to 0 to use the default time (7 days for all drugs except Jet)
|
||||
AddictTime=0
|
||||
; the number of the global variable from vault13.gam responsible for displaying addiction in the character screen
|
||||
; set to 0 if the addiction is not required
|
||||
GvarID=0
|
||||
; the index number from editor.msg to display the title of the addiction (the description uses the index number of TextID + 100)
|
||||
TextID=-1
|
||||
; the line number (0-indexed) of the corresponding FRM in skilldex.lst
|
||||
FrmID=-1
|
||||
@@ -35,18 +35,10 @@
|
||||
|
||||
;If the value is set to -99999, the variable will be ignored (similar to comment out that line)
|
||||
|
||||
;You can add simple extra perks with ID numbers from 119 to 255
|
||||
; that do not require using scripting functions to change player stats, and can also be used for Armor perks
|
||||
;These parameters are only for extra perks
|
||||
;Stat1-Stat2 = same as Stat
|
||||
;Stat1Mag-Stat2Mag = same as StatMag
|
||||
;Skill3-Skill5 = The skill to be modified (or -1 for none)
|
||||
;Skill3Mod-Skill5Mod = The increased/decreased value to the modified skill
|
||||
|
||||
;This is a modification to vanilla perk 0
|
||||
[0]
|
||||
;This is a modification to perk 119
|
||||
[119]
|
||||
Name=Example
|
||||
Desc=This is an example perk description
|
||||
Desc=This is an example perk~Second line
|
||||
Image=72
|
||||
Ranks=1
|
||||
Level=1
|
||||
@@ -65,39 +57,6 @@ INT=0
|
||||
AGL=0
|
||||
LCK=0
|
||||
|
||||
;Example for creating extra perks
|
||||
[119]
|
||||
Name=Extra Perk
|
||||
Desc=This perk can change player stats and skills
|
||||
Image=72
|
||||
Ranks=1
|
||||
Level=2
|
||||
Type=0
|
||||
Stat=-1
|
||||
StatMag=0
|
||||
Skill1=-1
|
||||
Skill1Mag=0
|
||||
Skill2=-1
|
||||
Skill2Mag=0
|
||||
STR=0
|
||||
PER=0
|
||||
END=0
|
||||
CHR=0
|
||||
INT=0
|
||||
AGL=0
|
||||
LCK=0
|
||||
; for extra perks only
|
||||
Stat1=-1
|
||||
Stat1Mag=0
|
||||
Stat2=-1
|
||||
Stat2Mag=0
|
||||
Skill3=-1
|
||||
Skill3Mod=0
|
||||
Skill4=-1
|
||||
Skill4Mod=0
|
||||
Skill5=-1
|
||||
Skill5Mod=0
|
||||
|
||||
;This is a modification to trait 0
|
||||
[t0]
|
||||
NoHardcode=0
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
;WeaponAnims codes
|
||||
; 1 - Knife (D)
|
||||
; 2 - Club (E)
|
||||
; 3 - Sledgehammer (F)
|
||||
; 4 - Spear (G)
|
||||
; 5 - Pistol (H)
|
||||
; 6 - SMG (I)
|
||||
; 7 - Rifle (J)
|
||||
; 8 - Big Gun (K)
|
||||
; 9 - Minigun (L)
|
||||
; 10 - Rocket Launcher (M)
|
||||
; 11-15 - sfall additional weapon animation codes
|
||||
|
||||
; 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
|
||||
WeaponAnims=1,3,4,6
|
||||
Default=16777280
|
||||
Leather=16777325
|
||||
Power=16777324
|
||||
Metal=16777323
|
||||
Jacket=16777321
|
||||
Combat=16777322
|
||||
|
||||
; Vic
|
||||
[2]
|
||||
PID=16777278
|
||||
WeaponAnims=1,5,7
|
||||
Default=16777307
|
||||
Jacket=16777329
|
||||
Combat=16777330
|
||||
Metal=16777331
|
||||
Power=16777332
|
||||
Leather=16777333
|
||||
|
||||
; Cassidy
|
||||
[3]
|
||||
PID=16777305
|
||||
WeaponAnims=4,5,7
|
||||
Default=16777354
|
||||
Leather=16777260
|
||||
Power=16777328
|
||||
Metal=16777327
|
||||
Jacket=16777351
|
||||
Combat=16777326
|
||||
|
||||
; Myron
|
||||
[4]
|
||||
PID=16777376
|
||||
WeaponAnims=1,5
|
||||
Default=16777304
|
||||
Leather=
|
||||
Power=16777349
|
||||
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
|
||||
Jacket=16777346
|
||||
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
|
||||
Jacket=16777222
|
||||
Combat=16777219
|
||||
@@ -1,57 +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=1
|
||||
|
||||
; Set to 1 to also highlight lootable corpses
|
||||
Corpses=1
|
||||
|
||||
; 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
|
||||
|
||||
;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)
|
||||
;For sfall 4.1.6+ the number for the notification box is set automatically, so just use any value
|
||||
;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
|
||||
;7 - dull pink
|
||||
DisplayNameColor=0
|
||||
+31
-60
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.1.6
|
||||
;v3.8.16
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
@@ -8,14 +8,6 @@ UseCommandLine=0
|
||||
;Uncomment and point to a file to get alternate translations for some sfall messages
|
||||
;TranslationsINI=./Translations.ini
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[ExtraPatches]
|
||||
;This section allows you to set multiple paths to folders containing mods or patches that will be loaded by the game
|
||||
;The priority of read files will be higher than the files in patchXXX.dat. If DataLoadOrderPatch is enabled, the data load order will be:
|
||||
;master_patches > critter_patches > PatchFile99 - PatchFile0 > patchXXX.dat > ...
|
||||
;Paths to folders and Fallout .dat files are supported. The available range for PatchFile option names is from 0 to 99
|
||||
;PatchFile0=mods\RP_data
|
||||
|
||||
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
[Sound]
|
||||
;Sets the number of allowed simultaneous sound effects
|
||||
@@ -147,6 +139,23 @@ SpeedKey9=0x00
|
||||
;Set to -1 for either ctrl key, -2 for either alt key or -3 for either shift key
|
||||
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
|
||||
;Set to 0 if you don't want a reload key, or a DX scancode otherwise
|
||||
ReloadWeaponKey=0
|
||||
@@ -215,10 +224,6 @@ UseFileSystemOverride=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
|
||||
@@ -420,6 +425,7 @@ UseScrollingQuestsList=1
|
||||
|
||||
;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.
|
||||
;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
|
||||
|
||||
;Set this to a valid path to save a copy of the console contents
|
||||
@@ -428,14 +434,6 @@ 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 the current selected page 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
|
||||
;Set to 3 to update the AC counter instantly when switching to other controlled critters in combat
|
||||
@@ -443,6 +441,7 @@ SpeedInterfaceCounterAnims=0
|
||||
|
||||
;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
|
||||
;KarmaFRMsCount=3
|
||||
;KarmaFRMs=47,48,49
|
||||
;KarmaPoints=-100,100
|
||||
|
||||
@@ -453,11 +452,8 @@ ScienceOnCritters=0
|
||||
;Default is 166
|
||||
SpeedInventoryPCRotation=166
|
||||
|
||||
;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
|
||||
;Uncomment to set the text colour of the extra 5 interface boxes
|
||||
;The line must contain 5 digits, 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.
|
||||
@@ -499,10 +495,6 @@ BoostScriptDialogLimit=0
|
||||
;See the Stats.ini in the modders pack for an example file
|
||||
;DerivedStats=Stats.ini
|
||||
|
||||
;Allows you to change some parameters for drugs and their addictions
|
||||
;See the Drugs.ini in the modders pack for an example file
|
||||
;DrugsFile=Drugs.ini
|
||||
|
||||
;These options modify the checks to see if a critter can carry an additional item, changing which items are counted towards the weight limit and adding an additional size check
|
||||
;Set the mode to 0 to disable the size check, 1 to apply to 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 unused stat (STAT_unused = 10) or have the size limit of 100 if the stat is not set
|
||||
@@ -514,6 +506,7 @@ 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
|
||||
;2 - Motion sensor doesn't require charges
|
||||
;4 - Motion sensor is required to use the item highlight feature
|
||||
MotionScannerFlags=1
|
||||
|
||||
;Set to non-0 to adjust the maximum encounter table size
|
||||
@@ -601,6 +594,14 @@ DialogPanelAnimDelay=33
|
||||
;Controls the speed of pipboy alarm clock animations (lower - faster; valid range: 0..127)
|
||||
PipboyTimeAnimDelay=50
|
||||
|
||||
;Allows you to directly control other critters in combat
|
||||
;Set to 0 to disable
|
||||
;Set to 1 to control all critters in combat
|
||||
;Set to 2 to control all party members
|
||||
;If you want to control only specific critters, uncomment the ControlCombatPIDList line and set a comma delimited list of PIDs
|
||||
ControlCombat=0
|
||||
;ControlCombatPIDList=62,89,97,107,160,161
|
||||
|
||||
;Set to 1 to stack empty identical weapons, no matter what type of ammo was loaded before
|
||||
StackEmptyWeapons=0
|
||||
|
||||
@@ -638,9 +639,6 @@ CarChargingFix=1
|
||||
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=
|
||||
|
||||
@@ -650,9 +648,6 @@ 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 the barter screen
|
||||
FullItemDescInBarter=0
|
||||
|
||||
@@ -662,17 +657,6 @@ 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
|
||||
|
||||
@@ -683,13 +667,6 @@ SpecialDeathGVAR=491
|
||||
;Set to 1 to display sfall built-in credits at the bottom of credits.txt contents instead of at the top
|
||||
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
|
||||
[Debugging]
|
||||
;Extra sfall configuration settings that can be used by modders
|
||||
@@ -733,12 +710,6 @@ 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 search for global scripts every time the game loads rather than only once on the first game start
|
||||
AlwaysFindScripts=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
|
||||
|
||||
;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object
|
||||
HideObjIsNullMsg=0
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
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
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
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.
@@ -1,134 +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.1
|
||||
|
||||
**/
|
||||
|
||||
#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 and not(get_game_mode bwand (INTFACELOOT bwor BARTER)) 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 GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) 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);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChangeHandler);
|
||||
end
|
||||
end
|
||||
Binary file not shown.
@@ -1,193 +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, 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.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",
|
||||
defaultFids,
|
||||
armorPidMap, // maps armor PID to it's "type" - leather armor, metal, power armor, etc.
|
||||
npcMap,
|
||||
altWeapon,
|
||||
unWieldWeapon;
|
||||
|
||||
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
|
||||
|
||||
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 // anim code 0 - none/unarmed
|
||||
foreach (i in weaponAnimList) begin
|
||||
if (newWeaponAnim == atoi(i)) then return -1;
|
||||
end
|
||||
return 0;
|
||||
end
|
||||
end else begin
|
||||
unWieldWeapon := obj_pid(item);
|
||||
end
|
||||
end
|
||||
return -1;
|
||||
end
|
||||
|
||||
procedure search_alt_weapon(variable critter) begin
|
||||
variable obj, res, i := 0;
|
||||
obj := inven_ptr(critter, 0);
|
||||
while (obj) do begin
|
||||
if (obj_item_subtype(obj) == item_type_weapon) then begin
|
||||
if (unWieldWeapon == 0 or unWieldWeapon != obj_pid(obj)) then begin
|
||||
res := check_weapon_change(critter, obj, 1);
|
||||
if (res == -1) then begin
|
||||
altWeapon := obj;
|
||||
wield_obj_critter(critter, obj);
|
||||
altWeapon := 0;
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
i++;
|
||||
obj := inven_ptr(critter, i);
|
||||
end
|
||||
unWieldWeapon := 0;
|
||||
end
|
||||
|
||||
// for NPCs when they change armor/weapon themselves
|
||||
procedure invenwield_handler begin
|
||||
variable critter, item, fid, slot, isWorn, canWield;
|
||||
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
|
||||
if art_exists(fid) then begin
|
||||
art_change_fid_num(critter, fid);
|
||||
end else begin
|
||||
debug_msg("Error: NPC Armor mod: missing FID.");
|
||||
end
|
||||
end
|
||||
return;
|
||||
end
|
||||
|
||||
if (critter and item and slot == INVEN_TYPE_RIGHT_HAND) then begin
|
||||
if (altWeapon == item) then return;
|
||||
canWield := check_weapon_change(critter, item, isWorn);
|
||||
set_sfall_return(canWield);
|
||||
if (canWield != -1) then begin
|
||||
call search_alt_weapon(critter);
|
||||
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
|
||||
variable weapAnim := get_sfall_arg bwand 0xF000;
|
||||
variable newFid := fid bwand 0xFFFF0FFF bwor weapAnim;
|
||||
if art_exists(newFid) then begin
|
||||
set_sfall_return(newFid);
|
||||
end else begin
|
||||
debug_msg("Error: NPC Armor mod: missing FID.");
|
||||
end
|
||||
end
|
||||
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);
|
||||
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["WeaponAnims"] := sect["WeaponAnims"];
|
||||
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,140 +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.1
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "main.h"
|
||||
|
||||
#define OBJ_DATA_LIGHT_DISTANCE (0x6C)
|
||||
#define OBJ_DATA_LIGHT_INTENSITY (0x70)
|
||||
|
||||
variable
|
||||
controlMode,
|
||||
noCheckArray,
|
||||
pidList,
|
||||
lightInt, lightDist, npcControl,
|
||||
displayName, displayNameColor,
|
||||
inControl := false,
|
||||
hasGeckoSkinning := false;
|
||||
|
||||
|
||||
procedure AllowControl(variable pid) begin
|
||||
if (noCheckArray or scan_array(pidList, pid bwand 0xFFFFFF) != -1) and (party_member_obj(pid)) then return true;
|
||||
return false;
|
||||
end
|
||||
|
||||
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);
|
||||
if npcControl then begin
|
||||
if lightInt then lightInt := round((lightInt / 65536.0) * 100); // calc percent of intensity
|
||||
obj_set_light_level(npcControl, lightInt, lightDist); // restore/off light for NPC
|
||||
end
|
||||
|
||||
pid := obj_pid(critter);
|
||||
if (status == 1 and (AllowControl(pid) or controlMode == 1)) then begin
|
||||
set_dude_obj(critter);
|
||||
if (critter != real_dude_obj) then begin
|
||||
if not(npcControl) then obj_set_light_level(real_dude_obj, 0, 0); // dude off light
|
||||
npcControl := critter;
|
||||
lightDist := get_object_data(critter, OBJ_DATA_LIGHT_DISTANCE);
|
||||
lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY);
|
||||
obj_set_light_level(critter, 100, 4);
|
||||
|
||||
if hasGeckoSkinning then critter_add_trait(critter, TRAIT_PERK, PERK_gecko_skinning_perk, 1);
|
||||
inControl := true;
|
||||
end else if npcControl then begin
|
||||
obj_set_light_level(dude_obj, 100, 4); // set default light
|
||||
npcControl := 0;
|
||||
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
|
||||
if displayName then hide_iface_tag(displayName);
|
||||
if (status == -1 or AllowControl(pid) == false) then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
obj_set_light_level(dude_obj, 100, 4);
|
||||
npcControl := 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
procedure gamemodechange_handler begin
|
||||
if not(hasGeckoSkinning) then hasGeckoSkinning := has_trait(TRAIT_PERK, real_dude_obj, PERK_gecko_skinning_perk);
|
||||
if (inControl and not(get_game_mode BWAND COMBAT)) then begin
|
||||
inControl := false;
|
||||
if (dude_obj != real_dude_obj) then begin
|
||||
set_dude_obj(real_dude_obj);
|
||||
obj_set_light_level(dude_obj, 100, 4);
|
||||
npcControl := 0;
|
||||
end
|
||||
move_to(dude_obj, dude_tile, dude_elevation);
|
||||
end
|
||||
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
|
||||
variable configSection := "CombatControl";
|
||||
|
||||
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
|
||||
displayName := GetConfig("CombatControl", "DisplayName", 0);
|
||||
|
||||
if displayName then begin
|
||||
variable nameTag := add_iface_tag;
|
||||
debug_msg("NPC control - added new box: " + nameTag);
|
||||
if (nameTag <= 0) then begin // box added?
|
||||
variable maxBoxCount := get_ini_setting("ddraw.ini|Misc|BoxBarCount");
|
||||
if (maxBoxCount < 0) then maxBoxCount := 9;
|
||||
else maxBoxCount += 4;
|
||||
if (displayName < 5 or displayName > maxBoxCount) then displayName := 0;
|
||||
end else begin
|
||||
displayName := nameTag;
|
||||
end
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
end
|
||||
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
fix_array(pidList);
|
||||
noCheckArray := (len_array(pidList) == 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
|
||||
@@ -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 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 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 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 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.
|
||||
@@ -268,80 +268,6 @@
|
||||
#define WPN_ANIM_MINIGUN (0x09) // (L)
|
||||
#define WPN_ANIM_ROCKET_LAUNCHER (0x0A) // (M)
|
||||
|
||||
// AI data parameters
|
||||
#define AI_CAP_AGGRESSION (0)
|
||||
#define AI_CAP_AREA_ATTACK_MODE (1)
|
||||
#define AI_CAP_ATTACK_WHO (2)
|
||||
#define AI_CAP_BEST_WEAPON (3)
|
||||
#define AI_CAP_CHEM_USE (4)
|
||||
#define AI_CAP_DISPOSITION (5)
|
||||
#define AI_CAP_DISTANCE (6)
|
||||
#define AI_CAP_MAX_DISTANCE (7)
|
||||
#define AI_CAP_MIN_HP (8)
|
||||
#define AI_CAP_MIN_TO_HIT (9)
|
||||
#define AI_CAP_HURT_TOO_MUCH (10) // DAM_BLIND/DAM_CRIP_* flags
|
||||
#define AI_CAP_RUN_AWAY_MODE (11)
|
||||
#define AI_CAP_SECONDARY_FREQ (12)
|
||||
#define AI_CAP_CALLED_FREQ (13)
|
||||
#define AI_CAP_CHEM_PRIMARY_DESIRE (14) // array pid list
|
||||
|
||||
// AI attack area mode values
|
||||
#define ai_area_always (0)
|
||||
#define ai_area_sometimes (1)
|
||||
#define ai_area_be_sure (2)
|
||||
#define ai_area_be_careful (3)
|
||||
#define ai_area_be_absolutely_sure (4)
|
||||
|
||||
// AI attack who mode values
|
||||
#define ai_attack_no_pref (-1)
|
||||
#define ai_attack_whomever_attacking_me (0)
|
||||
#define ai_attack_strongest (1)
|
||||
#define ai_attack_weakest (2)
|
||||
#define ai_attack_whomever (3)
|
||||
#define ai_attack_closest (4)
|
||||
|
||||
// AI run away mode values
|
||||
#define ai_run_away_none (0)
|
||||
#define ai_run_away_coward (1)
|
||||
#define ai_run_away_finger_hurts (3)
|
||||
#define ai_run_away_bleeding (4)
|
||||
#define ai_run_away_not_feeling_good (5)
|
||||
#define ai_run_away_tourniquet (6)
|
||||
#define ai_run_away_never (7)
|
||||
|
||||
// AI disposition values
|
||||
#define ai_disposition_none (0)
|
||||
#define ai_disposition_custom (1)
|
||||
#define ai_disposition_coward (2)
|
||||
#define ai_disposition_defensive (3)
|
||||
#define ai_disposition_aggressive (4)
|
||||
#define ai_disposition_berserk (5)
|
||||
|
||||
// AI distance values
|
||||
#define ai_distance_stay_close (0)
|
||||
#define ai_distance_charge (1)
|
||||
#define ai_distance_snipe (2)
|
||||
#define ai_distance_on_your_own (3)
|
||||
#define ai_distance_stay (4)
|
||||
|
||||
// AI best weapon pref values
|
||||
#define ai_weapon_no_pref (0)
|
||||
#define ai_weapon_melee (1)
|
||||
#define ai_weapon_melee_over_ranged (2)
|
||||
#define ai_weapon_ranged_over_melee (3)
|
||||
#define ai_weapon_ranged (4)
|
||||
#define ai_weapon_unarmed (5)
|
||||
#define ai_weapon_unarmed_over_thrown (6)
|
||||
#define ai_weapon_random (7)
|
||||
|
||||
// AI chem use mode values
|
||||
#define ai_chem_clean (0)
|
||||
#define ai_chem_stims_when_hurt_little (1) // use only stimpak/super stimpak/healing powder
|
||||
#define ai_chem_stims_when_hurt_lots (2) // use only stimpak/super stimpak/healing powder
|
||||
#define ai_chem_sometimes (3)
|
||||
#define ai_chem_anytime (4)
|
||||
#define ai_chem_always (5)
|
||||
|
||||
// common object data offsets
|
||||
#define OBJ_DATA_TILENUM (0x04)
|
||||
#define OBJ_DATA_CUR_FRM (0x18) // current frame number
|
||||
@@ -359,49 +285,4 @@
|
||||
#define OBJ_DATA_DAMAGE_LAST_TURN (0x48)
|
||||
#define OBJ_DATA_WHO_HIT_ME (0x54)
|
||||
|
||||
// compute attack result data offsets
|
||||
#define C_ATTACK_SOURCE (0x00)
|
||||
#define C_ATTACK_HIT_MODE (0x04)
|
||||
#define C_ATTACK_WEAPON (0x08)
|
||||
#define C_ATTACK_DAMAGE_SOURCE (0x10) // Amount
|
||||
#define C_ATTACK_FLAGS_SOURCE (0x14) // see DAM_* values in define.h
|
||||
#define C_ATTACK_ROUNDS (0x18)
|
||||
#define C_ATTACK_TARGET (0x20)
|
||||
#define C_ATTACK_BODY_PART (0x28)
|
||||
#define C_ATTACK_DAMAGE_TARGET (0x2C) // Amount
|
||||
#define C_ATTACK_FLAGS_TARGET (0x30) // see DAM_*
|
||||
#define C_ATTACK_KNOCKBACK_VALUE (0x34)
|
||||
#define C_ATTACK_MAIN_TARGET (0x38)
|
||||
#define C_ATTACK_AROUND_NUMBER (0x3C) // The number of critters around the target
|
||||
#define C_ATTACK_TARGET1 (0x40)
|
||||
#define C_ATTACK_TARGET2 (0x44)
|
||||
#define C_ATTACK_TARGET3 (0x48)
|
||||
#define C_ATTACK_TARGET4 (0x4C)
|
||||
#define C_ATTACK_TARGET5 (0x50)
|
||||
#define C_ATTACK_TARGET6 (0x54)
|
||||
#define C_ATTACK_BODY_PART1 (0x58)
|
||||
#define C_ATTACK_BODY_PART2 (0x5C)
|
||||
#define C_ATTACK_BODY_PART3 (0x60)
|
||||
#define C_ATTACK_BODY_PART4 (0x64)
|
||||
#define C_ATTACK_BODY_PART5 (0x68)
|
||||
#define C_ATTACK_BODY_PART6 (0x6C)
|
||||
#define C_ATTACK_DAMAGE_TARGET1 (0x70) // Amount
|
||||
#define C_ATTACK_DAMAGE_TARGET2 (0x74)
|
||||
#define C_ATTACK_DAMAGE_TARGET3 (0x78)
|
||||
#define C_ATTACK_DAMAGE_TARGET4 (0x7C)
|
||||
#define C_ATTACK_DAMAGE_TARGET5 (0x80)
|
||||
#define C_ATTACK_DAMAGE_TARGET6 (0x84)
|
||||
#define C_ATTACK_FLAGS_TARGET1 (0x88) // see DAM_*
|
||||
#define C_ATTACK_FLAGS_TARGET2 (0x8C)
|
||||
#define C_ATTACK_FLAGS_TARGET3 (0x90)
|
||||
#define C_ATTACK_FLAGS_TARGET4 (0x94)
|
||||
#define C_ATTACK_FLAGS_TARGET5 (0x98)
|
||||
#define C_ATTACK_FLAGS_TARGET6 (0x9C)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE1 (0xA0)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE2 (0xA4)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE3 (0xA8)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE4 (0xAC)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE5 (0xB0)
|
||||
#define C_ATTACK_KNOCKBACK_VALUE6 (0xB4)
|
||||
|
||||
#endif // DEFINE_EXTRA_H
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#define INTFACEUSE (0x8000)
|
||||
#define INTFACELOOT (0x10000)
|
||||
#define BARTER (0x20000)
|
||||
#define HEROWIN (0x40000)
|
||||
#define DIALOGVIEW (0x80000)
|
||||
|
||||
//Valid arguments to register_hook
|
||||
#define HOOK_TOHIT (0)
|
||||
@@ -47,19 +45,6 @@
|
||||
#define HOOK_WITHINPERCEPTION (23)
|
||||
#define HOOK_INVENTORYMOVE (24)
|
||||
#define HOOK_INVENWIELD (25)
|
||||
#define HOOK_ADJUSTFID (26)
|
||||
#define HOOK_COMBATTURN (27)
|
||||
#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)
|
||||
#define HOOK_SUBCOMBATDAMAGE (37)
|
||||
#define HOOK_SETLIGHTING (38)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
@@ -156,10 +141,6 @@
|
||||
#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)
|
||||
@@ -202,11 +183,6 @@
|
||||
#define CURSOR_COMMAND (1)
|
||||
#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_ai(x) (message_str_game(GAME_MSG_AI, x))
|
||||
#define mstr_scrname(x) (message_str_game(GAME_MSG_SCRNAME, x))
|
||||
@@ -238,56 +214,35 @@
|
||||
#define party_member_list_all party_member_list(1)
|
||||
|
||||
// sfall_funcX macros
|
||||
#define add_iface_tag sfall_func0("add_iface_tag")
|
||||
#define art_cache_clear sfall_func0("art_cache_clear")
|
||||
#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_object_ai_data(obj, aiParam) sfall_func2("get_object_ai_data", obj, aiParam)
|
||||
#define get_object_data(obj, offset) sfall_func2("get_object_data", obj, offset)
|
||||
#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 loot_obj sfall_func0("loot_obj")
|
||||
#define npc_engine_level_up(toggle) sfall_func1("npc_engine_level_up", toggle)
|
||||
#define obj_under_cursor(crSwitch, inclDude) sfall_func2("obj_under_cursor", crSwitch, inclDude)
|
||||
#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_drugs_data(type, pid, value) sfall_func3("set_drugs_data", type, pid, value)
|
||||
#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_object_data(obj, offset, value) sfall_func3("set_object_data", obj, offset, value)
|
||||
#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 tile_refresh_display sfall_func0("tile_refresh_display")
|
||||
#define unjam_lock(obj) sfall_func1("unjam_lock", obj)
|
||||
|
||||
@@ -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. If you want to specify less than 4 targets, fill in the extra spaces with 0's. Pass -1 to skip the return value.
|
||||
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.
|
||||
|
||||
@@ -266,8 +266,7 @@ 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 (pass -1 if you just want to modify offered goods)
|
||||
int ret2 - the modified value of all offered goods
|
||||
int ret1 - the modified value of all of the goods
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
@@ -325,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 (hook type 1 and 2 in arg4), set Misc.CheckWeaponAmmoCost=1 in ddraw.ini
|
||||
To add proper check for ammo before shooting and proper calculation of number of burst rounds, 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 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 arg4 - Type of hook (0 - when subtracting ammo after attack, 1 - when checking for "out of ammo" before attack)
|
||||
|
||||
int ret1 - new ammo cost value (set to 0 for unlimited ammo)
|
||||
|
||||
@@ -405,7 +404,6 @@ 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)
|
||||
|
||||
@@ -422,9 +420,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, 5 - container, like bag/backpack, 6 - dropping on the ground)
|
||||
int arg1 - Target slot (0 - main backpack, 1 - left hand, 2 - right hand, 3 - armor slot, 4 - weapon, when reloading it by dropping ammo)
|
||||
Item arg2 - Item being moved
|
||||
Item arg3 - Item being replaced, weapon being reloaded, or container being filled (can be 0)
|
||||
Item arg3 - Item being replaced or weapon being reloaded (can be 0)
|
||||
|
||||
int ret1 - Override setting (-1 - use engine handler, any other value - prevent relocation of item/reloading weapon)
|
||||
|
||||
@@ -438,182 +436,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 is already equipped when wielding hook is executed.
|
||||
|
||||
Critter arg1 - critter
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor)
|
||||
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 arg4 - 1 when wielding, 0 when unwielding
|
||||
|
||||
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
|
||||
bool arg3 - set to 1 at the start of the player's turn after the game has been loaded, 0 otherwise
|
||||
|
||||
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, 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
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_SUBCOMBATDAMAGE (hs_subcombatdmg.int)
|
||||
|
||||
This hook overrides the vanilla damage calculation formula.
|
||||
Runs when:
|
||||
1) Before the game calculates how much damage each target will get. This includes primary target as well as all extras (explosions and bursts).
|
||||
2) AI decides whether it is safe to use area attack (burst, grenades), if he might hit friendlies.
|
||||
Does not run for misses, non-combat damage like dynamite explosions, or if one of the damage formulas is selected in ddraw.ini.
|
||||
|
||||
Critter arg1 - The attacker
|
||||
Critter arg2 - The target
|
||||
Obj arg3 - The weapon used in the attack
|
||||
int arg4 - Attack Type (see ATKTYPE_* constants)
|
||||
int arg5 - Number of bullets actually hit the target (1 for melee attacks)
|
||||
int arg6 - Target's Damage Resistance (DR) value (affected by critical hit effects, perks, traits, and special unarmed attacks)
|
||||
int arg7 - Target's Damage Threshold (DT) value (affected by critical hit effects, perks, traits, and special unarmed attacks)
|
||||
int arg8 - Bonus ranged damage from the perk
|
||||
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; for critical hits, the value is taken from the critical table; with Silent Death perk and the corresponding attack conditions, the value will be doubled)
|
||||
int arg10 - Combat Difficulty multiplier (125 - rough, 100 - normal, 75 - wimpy; for player or party members it's always 100)
|
||||
int arg11 - The calculated amount of damage (usually 0, required when using multiple hook scripts to calculate damage and using the set_sfall_arg function)
|
||||
mixed arg12 - Computed attack results (see C_ATTACK_* for offsets and use get/set_object_data functions to get/set the data)
|
||||
|
||||
int ret1 - The returned amount of damage
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_SETLIGHTING (hs_setlighting.int)
|
||||
|
||||
Runs before setting the light level for an object or a map. You can override the result.
|
||||
|
||||
Obj arg1 - the object being set, or -1 when setting the light level for a map
|
||||
int arg2 - the light intensity
|
||||
int arg3 - the light radius, or -1 when setting the light level for a map
|
||||
|
||||
int ret1 - overrides the light intensity. Intensity range is from 0 to 65536
|
||||
int ret2 - overrides the light radius. Radius range is from 0 to 8 (works only for the object)
|
||||
|
||||
@@ -46,11 +46,11 @@ set_pickpocket_max and set_hit_chance_max effect all critters rather than just t
|
||||
|
||||
set_fake_trait and set_fake_perk can be used to add additional traits and perks to the character screen. They will be saved correctly when the player saves and reloads games, but by themselves they will have no further effect on the character. For perks, the allowed range for levels is between 0 and 100; setting the level to 0 removes that perk. For traits, the level must be 0 or 1. The image is a numeric id that corresponds to an entry in skilldex.lst. The name is limited to 63 characters and the description to 255 characters by sfall, but internal Fallout limits may be lower.
|
||||
|
||||
has_fake_trait and has_fake_perk return the number of levels the player has of the perks/traits with the given name or ID of extra perk.
|
||||
has_fake_trait and has_fake_perk return the number of levels the player has of the perks/traits with the given name.
|
||||
|
||||
perk_add_mode, set_selectable_perk, set_perkbox_title, hide_real_perks, show_real_perks and clear_selectable_perks control the behaviour of the select a perk box. set_selectable_perk can be used to add additional items by setting the 'active' parameter to 1, and to remove them again by setting it to 0. set_perkbox_title can be used to change the title of the box, or by using "" it will be set back to the default. hide and show_real_perks can be used to prevent the dialog from displaying any of the original 119 perks. perk_add_mode modifies what happens when a fake perk is selected from the perks dialog. It is treated as a set of flags - if bit 1 is set then it is added to the players traits, if bit 2 is set it is added to the players perks, and if bit 3 is set it is removed from the list of selectable perks. The default is 0x2. clear_selectable_perks restores the dialog to its 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 (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.
|
||||
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.
|
||||
|
||||
@@ -218,7 +218,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/array metarule2_explosions(int arg1, int arg2, int arg3)
|
||||
> 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:
|
||||
|
||||
> void set_attack_explosion_pattern(x, y)
|
||||
@@ -237,20 +237,6 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
|
||||
- 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:
|
||||
|
||||
@@ -320,7 +306,6 @@ 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
|
||||
@@ -430,28 +415,6 @@ Some utility/math functions are available:
|
||||
> object sfall_func0("outlined_object")
|
||||
- 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")
|
||||
- returns the current cursor mode (0 - movement cursor, 1 - command cursor, 2 - targeting cursor)
|
||||
- mode 4 to 10 are Skilldex skills (yellow targeting cursor)
|
||||
@@ -470,12 +433,6 @@ Some utility/math functions are available:
|
||||
- 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")
|
||||
- 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
|
||||
@@ -486,46 +443,13 @@ 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
|
||||
- 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")
|
||||
- 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) or the number of the last custom box added using the add_ifaca_tag function
|
||||
- The text is limited to 19 characters
|
||||
- available colors: 0 - green, 1 - red, 2 - white, 3 - yellow, 4 - dark yellow, 5 - blue, 6 - purple, 7 - dull pink
|
||||
|
||||
> int sfall_func0("add_iface_tag")
|
||||
- adds one custom box to the current boxes, and returns the number of the added tag (-1 if the tags limit is exceeded)
|
||||
- The maximum number of boxes is limited to 126 tags
|
||||
|
||||
> 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
|
||||
|
||||
@@ -534,50 +458,20 @@ Some utility/math functions are available:
|
||||
- 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 a pointer to the object (critter) the player is having a conversation or bartering with
|
||||
|
||||
> object sfall_func2("obj_under_cursor", bool crSwitch, bool inclDude)
|
||||
- returns the object under the cursor on the main game screen
|
||||
- crSwitch: True - only checks critters and ignores their cover (roof tiles, walls, scenery, etc.), False - checks all objects (can't check critters under objects)
|
||||
- passing False to the inclDude argument will ignore dude_obj
|
||||
|
||||
> object sfall_func0("loot_obj")
|
||||
- returns a pointer to the target object (container or critter) of the loot screen
|
||||
|
||||
> int sfall_func2("get_object_data", object, int offset)
|
||||
- returns the data at the specified offset of an object (see OBJ_DATA_* constants in define_extra.h for offsets)
|
||||
|
||||
> void sfall_func3("set_object_data", object, int offset, int data)
|
||||
- sets the data at the specified offset of an object
|
||||
|
||||
> int sfall_func2("get_object_ai_data", object, int aiParam)
|
||||
- returns the setting value from the AI packet of an object (critter)
|
||||
- use AI_CAP_* constants from define_extra.h for the aiParam argument to get AI value
|
||||
|
||||
> void sfall_func0("art_cache_clear")
|
||||
- clears the cache of FRM image files loaded into memory
|
||||
|
||||
> void sfall_func1("npc_engine_level_up", bool toggle)
|
||||
- enables/disables the engine function that increases the level of party members in the player leveling process
|
||||
- if the engine function is disabled, the process of leveling up party members should be performed by script functions
|
||||
|
||||
> void sfall_func3("set_drugs_data", int type, int pid, int value)
|
||||
- overrides the parameters of drugs set in the configuration file (DrugsFile setting in ddraw.ini)
|
||||
- type: 0 - changes the value of NumEffects for the drug (see Drugs.ini for the description of NumEffects)
|
||||
1 - changes the duration of the addiction effect for the drug (a value of 1 = one game minute)
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user