Skip to content

Commit

Permalink
Collated v35.16 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMWWallace committed May 7, 2024
1 parent be95de3 commit 16d7210
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 66 deletions.
18 changes: 16 additions & 2 deletions stratagems/doc/readme-stratagems.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1>Sword Coast Stratagems</h1>
<div class="section">
<p><strong><a href="http://www.gibberlings3.net/">A Gibberlings Three Mod</a><br /> </strong>
Author: </strong><a href="http://www.gibberlings3.net/forums/index.php?showuser=1067">DavidW</a></p>
<p><strong>Version 35.15</strong><br />
<p><strong>Version 35.16</strong><br />
<strong> Languages:</strong> English, French, German, Italian, Polish, Russian, Spanish, and Traditional Chinese.<br />
<strong>Platforms: </strong>Windows, Linux (Enhanced Edition only), Mac OS X (Enhanced Edition only)</p>
<p>Sword Coast Stratagems (<acronym title="Sword Coast Stratagems">SCS
Expand Down Expand Up @@ -2387,9 +2387,23 @@ <h3>Override files</h3>
</li>
<li>Version 35.15 (30th April 2024)
<ul>
<li>Fixed a side-effect of the odd-symbol removal that was blanking some lines on the Dragonspear UI++ menu and *possibly* others too.</li>
<li>Fixed a side-effect of the odd-symbol removal that was blanking some lines on the Dragonspear UI++ menu and *possibly* on other UIs too.</li>
</ul>
</li>
<li>Version 35.16 (7th May 2024)
<ul>
<li>Fixed yet more cosmetic issues with Dragonspear UI++.</li>
<li>'Improved NPC Customization and Management' should cope better with characters imported from one game into another (e.g. in EET or Endless BG).</li>
<li>The spell tweak that makes Truesight remove blindness no longer adds multiple 'this removes blindness' messages to Truesight's description.</li>
<li>The gaze attack granted by the Shapechange spell's Basilisk ability is now correctly restored each round.</li>
<li>Fixed a nasty interaction between two spell tweaks which caused the Mind Flayer shapechange effect to crash the game.</li>
<li>The spell tweak to Grease now correctly updates its description.</li>
<li>'NPC Customization and Management' should avoid Imoen-related UI glitches on EET now.</li>
<li>The '+2' is now correctly stripped from Arrows of Fire if you use the 'make elemental arrows like BG2' tweak.</li>
<li>Closed some logic loopholes in the provisions component.</li>

</ul>
</li>
</ul>
</div>

Expand Down
17 changes: 8 additions & 9 deletions stratagems/gameplay/camping.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,6 @@ THEN
Continue()
END

IF
Global("dw_trying_to_rest","GLOBAL",1)
!PartyRested()
THEN
RESPONSE #100
SetGlobal("dw_trying_to_rest","GLOBAL",0)
Continue()
END

IF
PartyRested()
Global("dw_trying_to_rest","GLOBAL",1)
Expand Down Expand Up @@ -474,6 +465,14 @@ THEN
Continue()
END

IF
Global("dw_trying_to_rest","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("dw_trying_to_rest","GLOBAL",0)
Continue()
END

>>>>>>>>

<<<<<<<<.../stratagems-inline/ice_island_add.baf
Expand Down
2 changes: 1 addition & 1 deletion stratagems/gameplay/elemental_arrows.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DEFINE_ACTION_FUNCTION elemental_arrows BEGIN
[
m_identified_description:=@16011
INNER_PATCH_SAVE m_identified_name "%m_identified_name%" BEGIN
REPLACE_TEXTUALLY "*\+.*" ""
REPLACE_TEXTUALLY ".\+.*" ""
END
m.ab.alter{s_attack_bonus=0 s_damage_bonus=0}
]
Expand Down
17 changes: 3 additions & 14 deletions stratagems/gameplay/inns.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,9 @@ DEFINE_ACTION_FUNCTION inns BEGIN

LAF adjust_room_prices END

// get global scripts
ACTION_IF FILE_EXISTS_IN_GAME "campaign.2da" BEGIN
LAF 2daq_extract STR_VAR resref=campaign column=WORLDSCRIPT RET_ARRAY scripts=array END
END ELSE BEGIN
ACTION_CLEAR_ARRAY scripts
END
OUTER_SPRINT $scripts("BALDUR") ""
OUTER_SPRINT $scripts("BALDUR25") ""

// prepend

ACTION_PHP_EACH scripts AS script=>discard BEGIN
LAF extend INT_VAR ssl=1 inline=1 allow_missing=1 STR_VAR script top=global_add END
END
// worldscript
LAF extend_worldscripts INT_VAR inline=1 STR_VAR top=global_add END




Expand Down
4 changes: 2 additions & 2 deletions stratagems/genai/ssl/summon_initial.ssl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// initial common code for summons, adapted from gMinion

IF TRIGGER
HotKey(E)
HotKey(%hot_key_E%)
Global("gh_AIOffSwitch","LOCALS",1)
THEN DO
Action(Literal)
Expand All @@ -13,7 +13,7 @@ END
// * If AI is on, check for switching if off
// * D=Disable AI
IF TRIGGER
HotKey(E)
HotKey(%hot_key_E%)
Global("gh_AIOffSwitch","LOCALS",0)
THEN DO
Action(Literal)
Expand Down
5 changes: 4 additions & 1 deletion stratagems/leveller/leveller_2.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ DEFINE_ACTION_FUNCTION leveller_2 BEGIN

// Imoen needs to be high enough level to get her mage levels back
ACTION_IF is_bg2 BEGIN
APPEND "m_dw_lvd.lua" "dwLevellerDualClass['imoen'].final_xp=90000"
APPEND "m_dw_lvd.lua" "dwLevellerDualClass['imoen2'].final_xp=90000"
ACTION_IF !is_eet BEGIN
APPEND "m_dw_lvd.lua" "dwLevellerDualClass['imoen'].final_xp=90000"
END
END

// bespoke fix - Imoen shouldn't run away till she's levelled
Expand Down Expand Up @@ -427,6 +429,7 @@ END

IF
InPartyAllowDead(Myself)
CheckStat(Myself,0,LEVEL)
!Global("dw#aulel","LOCALS",1) // apply setup spell if not done already (for safety)
THEN
RESPONSE #100
Expand Down
6 changes: 3 additions & 3 deletions stratagems/setup-stratagems.tp2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BACKUP ~weidu_external/backup/stratagems~
AUTHOR ~For help troubleshooting installation problems, go to the Sword Coast Stratagems forum at gibberlings3.net.~
//MODDER setup_tra none area_variables none missing_extern none missing_resref none ict2_actions none missing_eval none overwriting_file none fun_args warn
VERSION ~35.15~
VERSION ~35.16~
README ~stratagems/doc/readme-stratagems.html~
AUTO_EVAL_STRINGS

Expand Down Expand Up @@ -97,12 +97,12 @@ EMPTY_LANGUAGE
/////////////////////////////////////



/*
BEGIN test DESIGNATED 0
REQUIRE_PREDICATE FILE_EXISTS "dw#test_component_active.mrk" "For internal use only"

LAF run STR_VAR files=test location=test END

*/


///////////////////////////////////////////////////////////////////
Expand Down
10 changes: 7 additions & 3 deletions stratagems/sfo2e/lib_kit.tph
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ BEGIN
PHP_EACH weap_rows AS row=>discard BEGIN
SPRINT key "prof_%row%"
TO_LOWER key
SET $struct("%key%")=$weap_array("%row%" "%kit_here%")
PATCH_IF VARIABLE_IS_SET $weap_array("%row%" "%kit_here%") BEGIN
SET $struct("%key%")=$weap_array("%row%" "%kit_here%")
END
END
END
END ELSE BEGIN
Expand Down Expand Up @@ -424,7 +426,9 @@ BEGIN
PHP_EACH weap_rows AS row=>discard BEGIN
SPRINT key "prof_%row%"
TO_LOWER key
SET $weap_array("%row%" "%kit%")=$"%struct%"("%key%")
PATCH_IF VARIABLE_IS_SET $"%struct%"("%key%") BEGIN
SET $weap_array("%row%" "%kit%")=$"%struct%"("%key%")
END
END
LPF 2da_write STR_VAR array=weap_array default="0" END
BUT_ONLY
Expand Down Expand Up @@ -1460,7 +1464,7 @@ ACTION_IF !value BEGIN
PATCH_IF VARIABLE_IS_SET $kit_abbrev("%row%") BEGIN
SPRINT lua_new $kit_abbrev("%row%")
SPRINT lua_old $lua_array("%row%" "ABBREV")
PATCH_IF "%lua_new%" STR_CMP "%lua_old%" BEGIN
PATCH_IF !("%lua_new%" STR_EQ "%lua_old%") && FILE_EXISTS_IN_GAME "lu%lua_old%.2da" BEGIN
INNER_ACTION BEGIN
COPY_EXISTING "lu%lua_old%.2da" "override/lu%lua_new%.2da"
END
Expand Down
2 changes: 1 addition & 1 deletion stratagems/sfo2e/lib_opcode.tph
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ BEGIN
// insert the subspell, immediately following the opcode
PATCH_IF opcode=700 && "%eff%" STR_EQ "" BEGIN
PATCH_FOR_EACH match_opcode IN 6 10 15 19 44 49 BEGIN
LPF ALTER_EFFECT INT_VAR silent=1 match_opcode opcode=700 END
LPF ALTER_EFFECT INT_VAR check_globals=0 header silent=1 match_opcode opcode=700 END
END
END
PATCH_IF "%eff%" STR_EQ "" BEGIN
Expand Down
2 changes: 1 addition & 1 deletion stratagems/sfo2e/lib_sfo.tph
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ BACKUP "weidu_external/backup/[your mod folder name]" in your tp2.
OUTER_SET is_bgt = GAME_IS ~bgt~
OUTER_SET demivrgvs = FILE_EXISTS_IN_GAME ~dvimhere.mrk~
OUTER_SET lefreut_ui = MOD_IS_INSTALLED "LEUI-BG1EE.tp2" 0 || MOD_IS_INSTALLED "LEUI.tp2" 0 || MOD_IS_INSTALLED "LEUI-SOD.tp2" 0

OUTER_SET dragonspear_ui = MOD_IS_INSTALLED "DRAGONSPEAR_UI++.TP2" 1

ACTION_IF !VARIABLE_IS_SET tutu_var BEGIN
ACTION_IF is_tutu BEGIN
Expand Down
12 changes: 12 additions & 0 deletions stratagems/sfo2e/lua/ui_detect_class_kit.tph
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,22 @@ END
DEFINE_ACTION_FUNCTION patch_character_screen_display//internal
BEGIN
COPY_EXISTING "ui.menu" override
REPLACE_EVALUATE ~\(text[ %TAB%]+lua[ %TAB%]+"[^"]*Infinity_FetchString[^"]*"\)~ BEGIN
INNER_PATCH_SAVE out "%MATCH1%" BEGIN
REPLACE_TEXTUALLY "Infinity_FetchString" "dw_IFS_placeholder"
END
END
"%out%"
REPLACE_TEXTUALLY ~text[ %TAB%]+lua[ %TAB%]+"Infinity_FetchString\([^"]+\)"~ ~text lua "dw_IFS_placeholder\1"~
REPLACE_TEXTUALLY "\(Infinity_FetchString([^)]*)\)" "dwFilterKitDesc(\1)"
REPLACE_TEXTUALLY ~text[ %TAB%]+lua[ %TAB%]+"\([^"]+\)"~ ~text lua "dwFilterKitDesc(\1)"~
REPLACE_TEXTUALLY ~dw_IFS_placeholder~ "Infinity_FetchString"
PATCH_IF MOD_IS_INSTALLED "DRAGONSPEAR_UI++.TP2" 1 BEGIN
PATCH_FOR_EACH function IN getClassString1 getClassString2 getClassString3 getLevelString1 getLevelString2 getLevelString3 BEGIN
LPF UI_alter_function STR_VAR function patch="REPLACE_TEXTUALLY ~characters\[currentID\]\.classlevel\.\(first\|second\|third\)\.details~ ~dwFilterKitDesc(characters[currentID].classlevel.\1.details)~" END
END
END


END

Expand Down
1 change: 1 addition & 0 deletions stratagems/sfo2e/lua/ui_externalize_proficiencies.tph
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ DEFINE_ACTION_FUNCTION externalize_weapprof BEGIN
dwClassProf={
%class_data%
}
dwClassProf[19]=dwClassProf[1] --- sorcerers are hardcoded to match mages

dwKitProf={
%kit_data%
Expand Down
16 changes: 2 additions & 14 deletions stratagems/sfo2e/lua/ui_inn_label.tph
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,10 @@ DEFINE_ACTION_FUNCTION ui_inn_label BEGIN
ACTION_IF !FILE_EXISTS_IN_GAME "m_dw_ilf.lua" BEGIN //only run once
COPY ".../stratagems-inline/m_dw_ilf.lua" override

// get global scripts

ACTION_IF FILE_EXISTS_IN_GAME "campaign.2da" BEGIN
LAF 2daq_extract STR_VAR resref=campaign column=WORLDSCRIPT RET_ARRAY scripts=array END
END ELSE BEGIN
ACTION_CLEAR_ARRAY scripts
END
OUTER_SPRINT $scripts("BALDUR") ""
OUTER_SPRINT $scripts("BALDUR25") ""

// prepend

ACTION_PHP_EACH scripts AS script=>discard BEGIN
LAF extend INT_VAR inline=1 allow_missing=1 STR_VAR script top=global_add END
END
LAF extend_worldscripts INT_VAR inline=1 STR_VAR top=global_add END


END
END
Expand All @@ -51,7 +40,6 @@ end

<<<<<<<<.../stratagems-inline/global_add.baf
IF
!PartyRested()
!Global("dw_inn_roomtype","LOCALS",0)
THEN
RESPONSE #100
Expand Down
1 change: 1 addition & 0 deletions stratagems/sfo2e/lua/ui_ranger_favored_enemy.tph
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ BEGIN

OUTER_INNER_PATCH_SAVE favored_enemy_menu "%object_data%" BEGIN
REPLACE_TEXTUALLY ~onOpen[^"]*"[^"]*"~ ~~
REPLACE_TEXTUALLY "ignoreEsc" "---ignoreEsc"
REPLACE_TEXTUALLY "'CHARGEN_HATEDRACE'" ~'DW_HATEDRACE'%WNL%%TAB%onOpen"%WNL%%TAB%%TAB%dwRacialEnemyOnOpen()%WNL%%TAB%"~
REPLACE_TEXTUALLY EXACT_MATCH "chargen.hatedRace" "dwHatedRace"
REPLACE_TEXTUALLY "hatedRaceOrGeneralHelp" "dwHatedRaceOrGeneralHelp"
Expand Down
2 changes: 1 addition & 1 deletion stratagems/spell/install_spell_resources.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ BEGIN
ACTION_IF proceed BEGIN
// main install
LAF make_label STR_VAR label="dw_%file%" END
LAF run STR_VAR file END
LAF run STR_VAR file END
END
END
END
Expand Down
2 changes: 1 addition & 1 deletion stratagems/spell/revise_shapechange.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ DEFINE_ACTION_FUNCTION shapechange_build_forms BEGIN
LAF spl_make_innate_repeating_spell INT_VAR override_description=50054 delete_casting=1 new_is_ids=0 STR_VAR arguments="%WIZARD_FLESH_TO_STONE%=>%spl_shapeshift_basilisk_gaze%" END
spl.edit[%spl_shapeshift_basilisk_gaze%]
[
m.ab_fx.alter{s_savebonus="-6" s_save_vs_spell=0 s_save_vs_polymorph=1}
m.ab_fx.alter{s_savebonus="-6" s_save_vs_spell=0 s_save_vs_polymorph=1|match="s_target=2"}
m.ab.alter{s_projectile:=Gaze s_casting_time=0}
m_name:=@50053
]
Expand Down
4 changes: 3 additions & 1 deletion stratagems/spell/truesight_blindness.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ DEFINE_ACTION_FUNCTION truesight_blindness BEGIN

spl.edit[%WIZARD_TRUE_SIGHT% %INQUIS_TRUE_SIGHT% %HELM_TRUE_SIGHT% %DECK_EMPRESS% %KOA_TRUE_SIGHT_NO_VIS% %CLERIC_TRUE_SIGHT% sppr950|allow_missing:i=1 edit_strrefs_in_place:i=1]
[
m_description:="%m_description%%desc_add%"
PATCH_IF INDEX ("%desc_add%" "%m_description%")<0 BEGIN
m_description:="%m_description%%desc_add%"
END
m.ab_fx.clone{s_opcode=101 s_parameter2=74|match="s_opcode=142"} // protection from opcode:blindness
m.immunity_effect{blinded|permanent:i=0}
]
Expand Down
2 changes: 1 addition & 1 deletion stratagems/spell/web_and_the_large.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DEFINE_ACTION_FUNCTION web_and_the_large BEGIN
]
spl.edit[%WIZARD_GREASE%]
[
new:=@22
new:=@221
m_description:="%m_description%%WNL%%new%"
]

Expand Down
13 changes: 2 additions & 11 deletions stratagems/tactical_bg1/carsa.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,8 @@ DEFINE_ACTION_FUNCTION carsa BEGIN
END

// handle the scripts

EXTEND_BOTTOM "%tutu_var%carsa.bcs" "%MOD_FOLDER%/%component_loc%/resource/carsa_add.baf"
COPY_EXISTING - "%FirewineBridge%.are" nowhere
READ_ASCII 0x94 script
ACTION_IF !FILE_EXISTS_IN_GAME "%script%.bcs" BEGIN
COPY "%MOD_FOLDER%/%component_loc%/resource/carsa_area_add.baf" "override/%script%.bcs"
EVALUATE_BUFFER
COMPILE_BAF_TO_BCS
END ELSE BEGIN
EXTEND_BOTTOM "%script%.bcs" "%MOD_FOLDER%/%component_loc%/resource/carsa_area_add.baf"
END
LAF extend STR_VAR script="%tutu_var%carsa" bottom=carsa_add location=resource END
LAF extend_area_script STR_VAR area="%FirewineBridge%" bottom=carsa_area_add location=resource END

// make the spawn-Kahrk spell and effect
// on the Calling, just copy them over (put the already-built SCS ones into resource)
Expand Down

0 comments on commit 16d7210

Please sign in to comment.