mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5e7a77588 | ||
|
|
a19f9d0b83 | ||
|
|
7dc0681b4c | ||
|
|
b066e9d533 | ||
|
|
6e8f2c6c36 | ||
|
|
0044af0362 | ||
|
|
ce0e950884 | ||
|
|
a66ff8d252 | ||
|
|
9bd9837a7d | ||
|
|
a89e672355 | ||
|
|
b32c358a77 | ||
|
|
1b98bedd6f | ||
|
|
596b485d9c | ||
|
|
ae53c9586a | ||
|
|
7b53814c82 | ||
|
|
e9b40f5491 | ||
|
|
71a7545445 | ||
|
|
42ab38a333 | ||
|
|
c540ce8e72 | ||
|
|
3db8ed3381 | ||
|
|
de009eec4e | ||
|
|
9268776736 | ||
|
|
c09ed0565b | ||
|
|
e57f9b5503 | ||
|
|
39ed1d313f | ||
|
|
510bd6ddeb | ||
|
|
c0f11b7a46 | ||
|
|
1cb1284787 |
+17
-2
@@ -1,8 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## 4.4.3.1
|
||||
* Fixed a possible hang or crash introduced in 4.4.1 when running certain script sequences
|
||||
|
||||
## 4.4.3
|
||||
* Fixed a bug introduced in 4.2.9 that caused critters with crippled arms to be unable to attack in certain cases
|
||||
* Fixed the critical hit messages of the right arm and left leg for super mutants
|
||||
* Fixed `add_extra_msg_file` script function to prevent it from loading the same msg file more than once
|
||||
* Removed **DisplaySwiftLearnerExp** from `ddraw.ini` because there is little reason to turn it off
|
||||
* Removed **SpeedInterfaceCounterAnims=3**. Now the AC counter is always instantly updated when switching to other controlled critters in combat
|
||||
* Added a fix for the game disappearing from the taskbar after using `Alt+Tab`
|
||||
* Added a fix for the clickability issue of the **'Use Inventory Item On'** action when the selected item overlaps an object
|
||||
* Added a fix for the xp exploit from canceling **Here and Now** perk when the player has **Swift Learner** perk
|
||||
* Added support for loading an external **DirectDraw** wrapper (`ddraw.dll`) from the `<GameRoot>\wrapper\` directory for rendering
|
||||
* Added a static books mod and a molotov fire damage mod to the example mods in the **modders pack**
|
||||
|
||||
## 4.4.2
|
||||
* Fixed a bug in **XPTable** that could cause a hang when leveling up in some cases
|
||||
* Fixed the messages of critical hits to the right arm for some critter types
|
||||
* Fixed the critical hit messages of the right arm for some critter types
|
||||
* Changed `add_mult_objs_to_inven` script function to allow adding more than 99999 instances of an object in one go
|
||||
* Added a fix to use **'English'** as the fallback language directory for loading `credits.txt/quotes.txt`
|
||||
* Added a fix for gaining two levels at once when leveling up from level 97
|
||||
@@ -642,7 +657,7 @@ Various bug fixes and features based on the work by Mr.Stalin:
|
||||
* Fixed `critter_mod_skill` script function taking a negative amount value as a positive
|
||||
* Fixed a crash when calling `use_obj/use_obj_on_obj` without using `set_self` in global scripts
|
||||
* Fixed `pickup_obj`, `drop_obj`, and `use_obj` script functions not working properly in some cases
|
||||
* Fixed **TimeLimit=-3** not returning the correct year, and removed the setting value -2 (Now it works the same as -3)
|
||||
* Fixed **TimeLimit=-3** not returning the correct year, and removed the setting value of -2 (Now it works the same as -3)
|
||||
* Fixed the mouse cursor lag on the world map when **WorldMapFPSPatch** is enabled
|
||||
* Fixed issues with the game speed tweak. Now the game speed will be temporarily set to normal speed when in the inventory or dialogue, and it doesn't affect the endgame slideshow
|
||||
* Fixed and improved the functionality of **UseFileSystemOverride** and `fs_*` script functions
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
;WeaponAnims codes
|
||||
; 1 - Knife (D)
|
||||
; 2 - Club (E)
|
||||
; 3 - Sledgehammer (F)
|
||||
; 3 - Sledgehammer (F)
|
||||
; 4 - Spear (G)
|
||||
; 5 - Pistol (H)
|
||||
; 6 - SMG (I)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
;WeaponAnims codes
|
||||
; 1 - Knife (D)
|
||||
; 2 - Club (E)
|
||||
; 3 - Sledgehammer (F)
|
||||
; 3 - Sledgehammer (F)
|
||||
; 4 - Spear (G)
|
||||
; 5 - Pistol (H)
|
||||
; 6 - SMG (I)
|
||||
@@ -76,7 +76,8 @@ Default=16777346
|
||||
Jacket=16777346
|
||||
Leather=16777347
|
||||
Metal=16777348
|
||||
Combat=16777226
|
||||
Combat=16777367
|
||||
Robe=16777368
|
||||
|
||||
; Kitsune (RP)
|
||||
[6]
|
||||
|
||||
@@ -28,8 +28,8 @@ 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)
|
||||
; 1 - requires Motion Sensor to be present in the player's inventory to activate highlighting
|
||||
; 2 - requires Motion Sensor and consumes 1 charge on every use (depleted sensor will not work anymore)
|
||||
MotionScanner=0
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ MotionScanner=0
|
||||
;Set to 2 to control all party members
|
||||
;Set to 3 to let you use the command cursor to specify targets for party members to attack in combat
|
||||
Mode=0
|
||||
;If you want to control only specific critters, uncomment the PIDList line and set a comma delimited list of PIDs
|
||||
;If you want to control only specific critters, uncomment the PIDList line and set a comma-delimited list of PIDs
|
||||
;PIDList=62,89,97,107,160,161
|
||||
|
||||
;Set a comma delimited list of perk IDs for perks to be inherited from the player during the combat control
|
||||
;Set a comma-delimited list of perk IDs for perks to be inherited from the player during the combat control
|
||||
PerksList=0,73
|
||||
|
||||
;Set to 1 to allow the player to gain a positive reputation when killing NPCs while controlling other critters
|
||||
|
||||
+18
-21
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.4.2
|
||||
;v4.4.3.1
|
||||
|
||||
[Main]
|
||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||
@@ -57,10 +57,11 @@ SpeedMultiInitial=100
|
||||
;Set to 0 for 8 bit fullscreen
|
||||
;Set to 4 for DX9 fullscreen
|
||||
;Set to 5 for DX9 windowed
|
||||
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be set to the same aspect ratio as your desktop resolution)
|
||||
;Set to 6 for DX9 fullscreen windowed (the resolution in f2_res.ini should be in the same aspect ratio as your desktop resolution)
|
||||
;A DX9 mode is required for any graphics related script extender functions to work (i.e. fullscreen shaders)
|
||||
;Modes 1, 2 and 3 are no longer supported
|
||||
;If using the hi-res patch by Mash, this option will always be read from the main ddraw.ini file
|
||||
;Note: When using an external DirectDraw wrapper (ddraw.dll file in <GameRoot>\wrapper\), DX9 mode will not be available
|
||||
Mode=0
|
||||
|
||||
;If using a DX9 mode, this changes the resolution
|
||||
@@ -175,7 +176,7 @@ UseScrollWheel=1
|
||||
;Set to 0 to only ever scroll 1 click
|
||||
ScrollMod=0
|
||||
|
||||
;Adjusts mouse sensitivity to some percentage of normal.
|
||||
;Adjusts mouse sensitivity to some percentage of normal
|
||||
;Negative values are valid if you want your mouse axis reversed for some reason
|
||||
MouseSensitivity=100
|
||||
|
||||
@@ -305,7 +306,7 @@ FemaleDialogMsgs=0
|
||||
;The text must be enclosed in angle brackets (example: <MaleText^FemaleText>)
|
||||
DialogGenderWords=0
|
||||
|
||||
;To change the default and starting player models, uncomment the next four lines.
|
||||
;To change the default and starting player models, uncomment the next four lines
|
||||
;The default models can also be changed in-game via script
|
||||
;MaleStartModel=hmwarr
|
||||
;MaleDefaultModel=hmjmps
|
||||
@@ -340,7 +341,7 @@ Movie17=credits.mve
|
||||
;StartDay=-1
|
||||
|
||||
;To change the limit of the distance away from the player to which you're allowed to scroll the local maps, uncomment the next two lines
|
||||
;Defaults are 480 in the x direction and 400 in the y direction.
|
||||
;Defaults are 480 in the x direction and 400 in the y direction
|
||||
;Does not work with the hi-res patch by Mash!
|
||||
;LocalMapXLimit=480
|
||||
;LocalMapYLimit=400
|
||||
@@ -351,12 +352,12 @@ PipBoyAvailableAtGameStart=0
|
||||
|
||||
;Set to 1 to double the number of available kill types
|
||||
;If you use this, you need to provide the extra descriptions in proto.msg (entries from 1450 to 1487 are names and 1488 to 1525 are descriptions)
|
||||
;Changing this option mid game will not invalidate old save games, but the player's kill counters will be completely screwed.
|
||||
;Changing this option mid game will not invalidate old save games, but the player's kill counters will be completely screwed
|
||||
;Setting this to 1 may cause problems if the player kills more than 32767 of any one critter type
|
||||
;Additional kill types must have their new critical tables set! (See the OverrideCriticalTable option)
|
||||
ExtraKillTypes=0
|
||||
|
||||
;Choose the damage formula used to calculate combat damage.
|
||||
;Choose the damage formula used to calculate combat damage
|
||||
;Don't set this to anything other than 0 unless another mod you're using explicitly tells you to!
|
||||
;0 - Fallout default
|
||||
;1 - Glovz's Damage Fix
|
||||
@@ -364,7 +365,7 @@ ExtraKillTypes=0
|
||||
;5 - Haenlomal's Yet Another Ammo Mod
|
||||
DamageFormula=0
|
||||
|
||||
;Prevents you from using 0 to escape from dialogue at any time.
|
||||
;Prevents you from using 0 to escape from dialogue at any time
|
||||
DialogueFix=1
|
||||
|
||||
;Prevents you from using number keys to enter unvisited areas on a town map
|
||||
@@ -373,7 +374,7 @@ TownMapHotkeysFix=1
|
||||
;Set to 1 to disable the Horrigan encounter
|
||||
DisableHorrigan=0
|
||||
|
||||
;Set to 1 to disable the random element in NPC levelling.
|
||||
;Set to 1 to disable the random element in NPC levelling
|
||||
;This will cause all NPC party members to automatically level up as soon as the player reaches the requirements
|
||||
NPCAutoLevel=0
|
||||
|
||||
@@ -395,7 +396,7 @@ OverrideArtCacheSize=0
|
||||
;Set to 2 to block all saving in combat
|
||||
SaveInCombatFix=1
|
||||
|
||||
;Uncomment and set a comma delimited list of numbers to use a custom xp table.
|
||||
;Uncomment and set a comma-delimited list of numbers to use a custom xp table
|
||||
;Player's level is capped once the highest specified level is reached
|
||||
;XPTable=50,100,200
|
||||
|
||||
@@ -454,8 +455,8 @@ EnableHeroAppearanceMod=0
|
||||
;Set to 2 to also skip the splash screen
|
||||
SkipOpeningMovies=0
|
||||
|
||||
;Causes NPCs who complete their combat turn with AP left over will try and find other ways to spend it.
|
||||
;Only NPCs with AP left equal to or greater than the value given here will be considered.
|
||||
;Causes NPCs who complete their combat turn with AP left over will try and find other ways to spend it
|
||||
;Only NPCs with AP left equal to or greater than the value given here will be considered
|
||||
;Set to 0 to disable
|
||||
NPCsTryToSpendExtraAP=0
|
||||
|
||||
@@ -494,7 +495,7 @@ UseScrollingQuestsList=1
|
||||
;PremadeFIDs=201,203,202
|
||||
|
||||
;Use this line to modify the list of cities and their associated global variables used for city reputations
|
||||
;Syntax is 'city id:global id', with each city/global pair separated by a comma.
|
||||
;Syntax is 'city id:global id', with each city/global pair separated by a comma
|
||||
;CityRepsList=0:47,2:48,1:49,4:50,5:51,3:52,8:53,6:54,7:55,13:56,10:57,11:59,14:61,17:63,19:64,18:65,25:66,9:294,20:308
|
||||
|
||||
;Set this to a valid path to save a copy of the console contents
|
||||
@@ -514,7 +515,6 @@ AutoQuickSavePage=1
|
||||
|
||||
;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
|
||||
SpeedInterfaceCounterAnims=0
|
||||
|
||||
;These lines allow you to control the karma FRMs displayed on the character screen
|
||||
@@ -536,7 +536,7 @@ BoxBarCount=5
|
||||
;The line must contain the same number of digits as the value of BoxBarCount, each either a 0 for green or 1 for red
|
||||
;BoxBarColours=00000
|
||||
|
||||
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly.
|
||||
;Set to 1 to fix the bug that caused bonus HtH damage to not be applied correctly
|
||||
BonusHtHDamageFix=1
|
||||
|
||||
;Set to 1 to display additional points of damage from Bonus HtH/Ranged Damage perks in the inventory
|
||||
@@ -579,7 +579,7 @@ CritterInvSizeLimitMode=0
|
||||
CritterInvSizeLimit=200
|
||||
|
||||
;Some bit flags to alter behaviour of the motion sensor
|
||||
;1 - Allow sensor use on automap when motion sensor is in pack rather than hands
|
||||
;1 - Allow sensor use on automap when the motion sensor is in the pack rather than hands
|
||||
;2 - Motion sensor doesn't require charges
|
||||
MotionScannerFlags=1
|
||||
|
||||
@@ -598,7 +598,7 @@ DisablePipboyAlarm=0
|
||||
;MainMenuCreditsOffsetX=0
|
||||
;MainMenuCreditsOffsetY=0
|
||||
|
||||
;Prevents you from using super stims on a critter who is at full health.
|
||||
;Prevents you from using super stims on a critter who is at full health
|
||||
SuperStimExploitFix=0
|
||||
|
||||
;Change the AP cost for accessing inventory in combat, and the related effect of Quick Pockets perk
|
||||
@@ -676,7 +676,7 @@ CanSellUsedGeiger=1
|
||||
;Set to 1 to skip weapon equip/unequip animations when performing various actions
|
||||
InstantWeaponEquip=0
|
||||
|
||||
;To add additional game msg files, uncomment the next line and set a comma delimited list of filenames without .msg extension
|
||||
;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
|
||||
@@ -696,9 +696,6 @@ DeathScreenFontPatch=0
|
||||
;Set to 1 to display full item description for weapon/ammo in the barter screen
|
||||
FullItemDescInBarter=0
|
||||
|
||||
;Set to 1 to display experience points with the bonus from Swift Learner perk when gained from non-scripted situations
|
||||
DisplaySwiftLearnerExp=1
|
||||
|
||||
;Set to 1 to display party member's current level/AC/addict flag on the combat control panel
|
||||
PartyMemberExtraInfo=0
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
|
||||
Molotov Fire Damage mod for Fallout 2 by NovaRain
|
||||
-------------------------------------------------
|
||||
|
||||
- molotov cocktail now inflicts fire damage to critters
|
||||
- molotov cocktail can still blow up some doors and scenery objects as before
|
||||
|
||||
Requires sfall 3.8.4 or higher
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
procedure start;
|
||||
procedure afterhitroll_handler;
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_AFTERHITROLL, afterhitroll_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure afterhitroll_handler begin
|
||||
variable
|
||||
hitType := get_sfall_arg,
|
||||
attacker := get_sfall_arg,
|
||||
target := get_sfall_arg,
|
||||
slot, item;
|
||||
|
||||
if (target and attacker) then begin
|
||||
if (attacker == dude_obj and active_hand == 0) then begin
|
||||
slot := INVEN_TYPE_LEFT_HAND;
|
||||
end else begin
|
||||
slot := INVEN_TYPE_RIGHT_HAND;
|
||||
end
|
||||
item := critter_inven_obj(attacker, slot);
|
||||
|
||||
if (item and obj_pid(item) == PID_MOLOTOV_COCKTAIL) then begin
|
||||
if (obj_type(target) == OBJ_TYPE_SCENERY and hitType > 1) then begin
|
||||
set_proto_data(PID_MOLOTOV_COCKTAIL, PROTO_WP_DMG_TYPE, DMG_explosion);
|
||||
end else begin
|
||||
set_proto_data(PID_MOLOTOV_COCKTAIL, PROTO_WP_DMG_TYPE, DMG_fire);
|
||||
set_attack_explosion_radius(2); // grenade radius
|
||||
set_attack_is_explosion_fire;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
Molotov Fire Damage mod for Fallout 2 by NovaRain
|
||||
-------------------------------------------------
|
||||
|
||||
- molotov cocktail now inflicts fire damage to critters
|
||||
- molotov cocktail can still blow up some doors and scenery objects as before
|
||||
|
||||
|
||||
Requires sfall 3.8.4 or higher.
|
||||
|
||||
To use, copy gl_molotov.int to your scripts folder.
|
||||
|
||||
This mod is an example of how you can use metarule2_explosions macros.
|
||||
Binary file not shown.
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
|
||||
Static Books mod for Fallout 2 by NovaRain
|
||||
------------------------------------------
|
||||
|
||||
- changes vanilla skill books to increase skills by a fixed amount
|
||||
- reading a book gives +5% to a skill (+6% if tagged), +8% with the Comprehension perk
|
||||
- books can still increase skills when over 91%
|
||||
|
||||
Requires sfall 3.5 or higher
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\define.h"
|
||||
#include "..\headers\command.h"
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
|
||||
#define BOOK_BONUS (5)
|
||||
|
||||
procedure start;
|
||||
procedure useobj_handler;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook_proc(HOOK_USEOBJ, useobj_handler);
|
||||
end
|
||||
end
|
||||
|
||||
procedure useobj_handler begin
|
||||
variable
|
||||
user := get_sfall_arg,
|
||||
obj := get_sfall_arg,
|
||||
skill := -1,
|
||||
bonus := BOOK_BONUS,
|
||||
msg, skLevel;
|
||||
|
||||
if (obj_item_subtype(obj) == item_type_misc_item) then begin
|
||||
switch obj_pid(obj) begin
|
||||
case PID_BIG_BOOK_OF_SCIENCE:
|
||||
skill := SKILL_SCIENCE;
|
||||
msg := 802;
|
||||
case PID_DEANS_ELECTRONICS:
|
||||
skill := SKILL_REPAIR;
|
||||
msg := 803;
|
||||
case PID_FIRST_AID_BOOK:
|
||||
skill := SKILL_FIRST_AID;
|
||||
msg := 804;
|
||||
case PID_SCOUT_HANDBOOK:
|
||||
skill := SKILL_OUTDOORSMAN;
|
||||
msg := 806;
|
||||
case PID_GUNS_AND_BULLETS:
|
||||
skill := SKILL_SMALL_GUNS;
|
||||
msg := 805;
|
||||
end
|
||||
|
||||
// read book
|
||||
if (skill != -1) then begin
|
||||
if combat_is_initialized then begin
|
||||
display_msg(mstr_proto(902));
|
||||
set_sfall_return(0);
|
||||
return;
|
||||
end
|
||||
|
||||
skLevel := has_skill(dude_obj, skill);
|
||||
if (dude_perk(PERK_comprehension_perk)) then begin
|
||||
bonus := (bonus * 3 + 1) / 2; // +50%, rounding up
|
||||
end
|
||||
if (bonus % 2) then begin
|
||||
bonus += is_skill_tagged(skill); // adjustment for tagged skill when the bonus is an odd number
|
||||
end
|
||||
critter_mod_skill(dude_obj, skill, bonus);
|
||||
gfade_out(1);
|
||||
game_time_advance(ONE_GAME_HOUR * (11 - dude_iq));
|
||||
exec_map_update_scripts;
|
||||
gfade_in(1);
|
||||
display_msg(mstr_proto(800));
|
||||
if (has_skill(dude_obj, skill) == skLevel) then begin
|
||||
msg := 801;
|
||||
end
|
||||
display_msg(mstr_proto(msg));
|
||||
set_sfall_return(1); // remove
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
Static Books mod for Fallout 2 by NovaRain
|
||||
------------------------------------------
|
||||
|
||||
- changes vanilla skill books to increase skills by a fixed amount
|
||||
- reading a book gives +5% to a skill (+6% if tagged), +8% with the Comprehension perk
|
||||
- books can still increase skills when over 91%
|
||||
|
||||
|
||||
Requires sfall 3.5 or higher
|
||||
|
||||
To use, copy gl_static_books.int to your scripts folder.
|
||||
Binary file not shown.
Binary file not shown.
@@ -37,7 +37,7 @@ procedure SetGlobalVar_Handler;
|
||||
|
||||
variable
|
||||
controlMode,
|
||||
pidList, perksList,
|
||||
pidList, perksList, addedPerkLevels,
|
||||
lightInt, lightDist, npcControl,
|
||||
displayName, displayNameColor, isShowTag,
|
||||
inControl := false,
|
||||
@@ -61,7 +61,7 @@ procedure CombatTurn_Handler begin
|
||||
variable
|
||||
status := get_sfall_arg,
|
||||
critter := get_sfall_arg,
|
||||
pid, perkID, level;
|
||||
pid, i, perkID, level;
|
||||
|
||||
DEBUGMSG("Combat Turn: " + status + ", by " + obj_name(critter) + "/" + critter + ", arg3: " + get_sfall_arg)
|
||||
|
||||
@@ -99,9 +99,14 @@ procedure CombatTurn_Handler begin
|
||||
lightInt := get_object_data(critter, OBJ_DATA_LIGHT_INTENSITY);
|
||||
|
||||
// set perks (only work with 4.1.8+)
|
||||
foreach (perkID in perksList) begin
|
||||
foreach (i: perkID in perksList) begin
|
||||
addedPerkLevels[i] := 0;
|
||||
|
||||
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
if (level) then critter_add_trait(critter, TRAIT_PERK, perkID, level);
|
||||
if (level) then begin
|
||||
addedPerkLevels[i] := level;
|
||||
critter_add_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
end
|
||||
// special handling if dude has Jinxed trait/perk
|
||||
if (has_trait(TRAIT_TRAIT, real_dude_obj, TRAIT_jinxed) or has_trait(TRAIT_PERK, real_dude_obj, PERK_jinxed_perk)) then begin
|
||||
@@ -142,8 +147,8 @@ procedure CombatTurn_Handler begin
|
||||
// remove perks before switching control (only work with 4.1.8+)
|
||||
if (dude_obj != real_dude_obj) then begin
|
||||
DEBUGMSG("Remove perks after NPC control.")
|
||||
foreach (perkID in perksList) begin
|
||||
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
foreach (i: perkID in perksList) begin
|
||||
level := addedPerkLevels[i]; //has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
if (level) then critter_rm_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
// special handling for Jinxed
|
||||
@@ -227,9 +232,6 @@ procedure start begin
|
||||
displayNameColor := GetConfig("CombatControl", "DisplayNameColor", 0);
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
if (len_array(pidList) > 0) then
|
||||
fix_array(pidList);
|
||||
@@ -239,6 +241,8 @@ procedure start begin
|
||||
perksList := GetConfigListInt("CombatControl", "PerksList");
|
||||
fix_array(perksList);
|
||||
|
||||
addedPerkLevels := create_array_list(len_array(perksList));
|
||||
|
||||
register_hook_proc(HOOK_COMBATTURN, CombatTurn_Handler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChange_Handler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMove_Handler);
|
||||
|
||||
+9
-10
@@ -18,45 +18,46 @@ variable translationIni;
|
||||
// Gets the integer value from the specified ini
|
||||
procedure GetIniConfig(variable section, variable key, variable def, variable inifile) begin
|
||||
variable val := get_ini_setting(inifile + "|" + section + "|" + key);
|
||||
if val == -1 then val := def;
|
||||
if (val == -1) then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the string value from the specified ini
|
||||
procedure GetIniConfigStr(variable section, variable key, variable def, variable inifile) begin
|
||||
variable val := get_ini_string(inifile + "|" + section + "|" + key);
|
||||
if val == -1 orElse val == "" then val := def;
|
||||
if (val == -1 orElse val == "") then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the integer value from sfall-mods.ini
|
||||
procedure GetConfig(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_setting(ini + "|" + section + "|" + key);
|
||||
if val == -1 then val := def;
|
||||
if (val == -1) then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the string value from sfall-mods.ini
|
||||
procedure GetConfigStr(variable section, variable key, variable def) begin
|
||||
variable val := get_ini_string(ini + "|" + section + "|" + key);
|
||||
if val == -1 orElse val == "" then val := def;
|
||||
if (val == -1 orElse val == "") then return def;
|
||||
return val;
|
||||
end
|
||||
|
||||
// Gets the value from sfall-mods.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 orElse val == "" then return [];
|
||||
if (val == -1 orElse val == "") then return [];
|
||||
|
||||
return string_split(val, ",");
|
||||
end
|
||||
|
||||
// Gets the value from sfall-mods.ini as a temp array of ints
|
||||
procedure GetConfigListInt(variable section, variable key) begin
|
||||
variable arr, i, item;
|
||||
variable arr, len, i, item;
|
||||
|
||||
arr := GetConfigList(section, key);
|
||||
for (i := 0; i < len_array(arr); i++) begin
|
||||
len = len_array(arr);
|
||||
for (i := 0; i < len; i++) begin
|
||||
arr[i] := atoi(arr[i]);
|
||||
end
|
||||
return arr;
|
||||
@@ -65,9 +66,7 @@ end
|
||||
// Translates given string using Translations.ini
|
||||
procedure Translate(variable id, variable def) begin
|
||||
variable str := get_ini_string(translationIni + "|Sfall|" + id);
|
||||
if (str == 0 orElse (strlen(str) == 0)) then begin
|
||||
str := def;
|
||||
end
|
||||
if (str == 0 orElse strlen(str) == 0) then return def;
|
||||
return str;
|
||||
end
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ The execution speed of scripts is not typically important in an unmodded game, g
|
||||
The sfall build of sslc supports a `-O` command line option to perform an optimization pass over the generated code. This isn't a magic make-my-code-go-faster bullet; most of what it does is very limited in scope. It's primary purpose was to strip out the procedures and variables which get automatically pulled into every script that includes **define.h**, whether you use them or not, and to do something about the additional variables that get created by `foreach` loops.
|
||||
|
||||
**There are several levels of optimization available:**
|
||||
- `-O1` - Basic, only removes unreferenced globals variables and procedures, code itself remains untouched.
|
||||
- `-O1` - Basic, only removes unreferenced variables and procedures, code itself remains untouched.
|
||||
- `-O2` - Full, most code optimizations are on, but only those that were tested on complex scripts.
|
||||
- `-O3` - Experimental, provides most efficiency, but tend to break some complex code due to bugs.
|
||||
- `-O3` - Experimental, provides the most efficiency, but tends to break some complex code due to bugs.
|
||||
|
||||
**The following optimizations are performed:**
|
||||
|
||||
|
||||
@@ -3,13 +3,11 @@ SSLC
|
||||
|
||||
This is a modified copy of sslc, that has a few bugfixes from the original, that will recognise and compile the additional script functions provided by sfall, that can also understand some additional syntax, and that has an integrated preprocessor and optimizer.
|
||||
|
||||
Unlike the original script compiler, this has not been compiled as a dos program. When using this in place of the original compile.exe but still using p.bat, you need to either get rid of the dos4gw.exe reference from p.bat or replace the original dos4gw.exe with the one in this archive.
|
||||
Unlike the original script compiler, this has not been compiled as a DOS program. When using this in place of the original `compile.exe` but still using `p.bat`, you need to get rid of the `dos4gw.exe` reference from `p.bat`.
|
||||
|
||||
If you use Fallout Script Editor, you can extract `compile.exe` and `dos4gw.exe` to its `\binary` folder, or extract them somewhere else and change your preferences in FSE to point there. FSE doesn't seem to be able to tell when errors occur when using this compiler though, so I'd recommend either using sfall's script editor instead or compiling by hand if possible.
|
||||
When compiling global or hook scripts for sfall 3.4 or below, you _must_ include the line `procedure start;` before any `#include` files that define procedures to avoid a few weird problems. This is no longer required starting from 3.5.
|
||||
|
||||
When compiling global or hook scripts for sfall 3.4 or below, you _must_ include the line `procedure start;` before any `#include` files that define procedures to avoid a few weird problems. (this is no longer required starting from 3.5)
|
||||
|
||||
This version of compiler was designed primarily for new sfall functions, but it can safely (and is recommended) to be used with non-sfall scripts as well, as long as you don't use any of the arrays syntax and any sfall script functions.
|
||||
This version of compiler was designed primarily for new sfall functions, but it can be safely used (and is recommended) with non-sfall scripts as well.
|
||||
|
||||
The original unmodified sslc source is over here: [https://teamx.ru/site_arc/utils/index.html](https://teamx.ru/site_arc/utils/index.html)
|
||||
|
||||
@@ -18,19 +16,19 @@ The original unmodified sslc source is over here: [https://teamx.ru/site_arc/uti
|
||||
```
|
||||
-q don't wait for input on error
|
||||
-n no warnings
|
||||
-b backward compatibility mode
|
||||
-b use backward compatibility mode
|
||||
-l no logo
|
||||
-p preprocess source
|
||||
-P preprocess only (don't generate .int)
|
||||
-F write full file paths in "#line" directives
|
||||
-O optimize code (full by default, see optimization.md)
|
||||
-O<N> set specific level of optimization (0 - off, 1 - basic, 2 - full, 3 - experimental)
|
||||
-O optimize code (full optimization, see optimization.md)
|
||||
-O<N> set specific level of optimization (0 - none, 1 - basic, 2 - full, 3 - experimental)
|
||||
-d print debug messages
|
||||
-D output an abstract syntax tree of the program
|
||||
-o set output path (follows the input file name)
|
||||
-s enable short-circuit evaluation for all AND, OR operators
|
||||
-m<macro[=val]> define a macro named "macro" for conditional compilation
|
||||
-I<path> specify an additional directory to search for include files
|
||||
-m<macro>[=<val>] define a macro named "macro" for conditional compilation
|
||||
-I<path> specify an additional directory to search for include files
|
||||
```
|
||||
|
||||
The original command line option `-w` to turn on warnings no longer has an effect, since warnings are now on by default
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user