Skip to content

Commit

Permalink
Collated 35.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMWWallace committed Dec 11, 2023
1 parent fe12a03 commit 9418978
Show file tree
Hide file tree
Showing 29 changed files with 443 additions and 206 deletions.
7 changes: 3 additions & 4 deletions stratagems/abazigal/abazigal_enclave.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ DEFINE_ACTION_FUNCTION abazigal_wheels BEGIN

// Wheels compatibility

LAF clone_creature STR_VAR creature=~bazliz03=>dw#viliz~ editstring=~script_override=>dw#viliz script_class=>"" gender=>EXTRA6~ END
LAF clone_creature STR_VAR creature=~eyesek01=>dw#visek eyeegl01=>dw#viegl~ editstring=~script_override=>dw#vilat gender=>EXTRA7~ END
LAF clone_creature STR_VAR creature=~bazliz03=>dw#viliz~ editstring=~script_override=>dw#vilat script_class=>"" gender=>EXTRA6~ END
LAF clone_creature STR_VAR creature=~eyesek01=>dw#visek eyeegl01=>dw#viegl~ editstring=~insert_script_high=>dw#vilat gender=>EXTRA7~ END


END
Expand All @@ -477,8 +477,7 @@ wanted to change the boring vanilla one was so the exit went SE rather than SW,
(But I think it's prettier, and more in-place, now - the previous one was just a reuse.)


*/

*/
DEFINE_ACTION_FUNCTION abazigal_new_ar6008 BEGIN

// copy over the new TIS / PVRZ files
Expand Down
4 changes: 2 additions & 2 deletions stratagems/ascension/ssl/drake.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IF TRIGGER
TriggerBlock(Enemy|Disabled)
CheckStatGT(scstarget,4,NUMBEROFATTACKS)
!HasItem("eneblade",scstarget)
!HasItem("melf",scstarget)
!HasItem("melfmet",scstarget)
!GlobalTimerNotExpired("invis","LOCALS") // no more than 1/3 rds
THEN DO
Combine()
Expand All @@ -47,7 +47,7 @@ IF TRIGGER
HPPercentLT(Myself,50)
TriggerBlock(Enemy|Disabled)
!HasItem("eneblade",scstarget)
!HasItem("melf",scstarget)
!HasItem("melfmet",scstarget)
!GlobalTimerNotExpired("invis","LOCALS") // no more than 1/3 rds
THEN DO
Action(SpellMyself,WIZARD_INVISIBILITY|100|50)
Expand Down
26 changes: 24 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.1</a></strong><br />
<p><strong>Version 35.2</a></strong><br />
<strong> Languages:</strong> English, French, German, Italian, Polish, and Russian<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 @@ -207,7 +207,7 @@ <h3>Mods in general</h3>
<li>The main 'initialise' component adds a difficulty fine-tune button to the UI. It does so in what aims to be a pretty compatibility-friendly way, but it may still cause problems if you have sufficiently drastically edited the UI. Most likely, the component will detect that the UI has been substantially tweaked and will avoid making its own changes (defaulting to the non-Enhanced Edition method of setting the difficulty) but there is some chance of your UI being cosmetically messed up. If this becomes a problem, you can force the UI edit to be skipped (and the non-Enhanced version to be installed) by setting 'Force_Difficulty_Widget' to 1 in stratagems.ini (see under <a href=#customization>customization</a>).</li>
<li>The 'revised resting' component makes a small edit to the UI to display the number of rations you have available, and to impose the requirement that you need rations to rest.</li>
<li>The 'revised inns' component makes a small edit to the UI to display the effects of different inns better, and to apply the benefits of resting.</li>
<li>The two new-spell components alter the UI to permit more than the usual maximum number of spells to be installed. This is done differently from OlvynChuru's 'ClassSpellTool' function (in OlvynChuru's Spell Pack, and some other mods). SCS will try to move the ClassSpellTools over to its system, so things should work fine provided SCS is installed after OlvynChuru's Spell Pack and any other mod that uses the ClassSpellTool function. However, I haven't tested this extensively. Installing OlvynChuru's Spell Pack after SCS's new-spell components will almost certainly break your game.</li>
<li>The two new-spell components alter the UI to permit more than the usual maximum number of spells to be installed. (This only happens if otherwise there is no space to add new spells.) This is done differently from OlvynChuru's 'ClassSpellTool' function (in OlvynChuru's Spell Pack, and some other mods). SCS will try to move the ClassSpellTools over to its system, so things should work fine provided SCS is installed after OlvynChuru's Spell Pack and any other mod that uses the ClassSpellTool function. However, I haven't tested this extensively. Installing OlvynChuru's Spell Pack after SCS's new-spell components will almost certainly break your game.</li>
<li>The 'improved NPC customization and management' alters the UI to correctly grant thief skills at first level. It is likely (but not guaranteed) that this will be compatible with cosmetic UI modifications, as long as SCS is installed last.</li>
</ul>
<p>I have tested SCS's UI components with Lefruet's UI and Pecca's Dragonspear UI++. They seem to work fine on both (I am more confident of this on Lefruet's UI, since I found the Dragonspear UI++ quite buggy.)</p>
Expand Down Expand Up @@ -2209,6 +2209,28 @@ <h3>Override files</h3>
<li>Player-summoned fiends now attack properly.</li>
<li>Fixed a few text typos.</li>
</ul>
</li>
<li>Version 35.2 (xx)
<ul>
<li>Updated Russian translation (thanks, RealApxu).</li>
<li>Improved compatibility with some mods (like Artisan's Kitpack and Shadow Magic) that use the ClassSpellTools function to add new spells.</li>
<li>The new elemental component now overwrites Conjure Air Elemental/Conjure Water Elemental if they're already there. (Thanks, Angel.)</li>
<li>Fixed a logic error in the strip_scs_scripts function that (possibly among other bugs) was breaking improved deployment for mages and priests and making Anadramatis unkillable. (Thanks, Angel.)</li>
<li>Tightened up the code for mages fleeing clouds, fixing a missing file for fighter/mages in the process. (Thanks to Totor for noticing the latter.)</li>
<li>Ascension Melissan now uses her Symbol:Slow correctly; previously a failure to update to the new version of Ascension was causing trouble. (Thanks, Totor.)</li>
<li>Fixed several more minor code errors - thanks to Totor for a careful read.</li>
<li>Ease of Use AI now appends new entries to the LUA language files in a way less likely to cause trouble with UI mods.</li>
<li>Fixed a library bug that was inflating the THAC0s of non-fighters.</li>
<li>Fixed a library bug that was messing with SSL installation on non-Windows systems (many thanks to Angel for tracking this down).</li>
<li>Sorted out some minor glitches in kit editing library on oBG2.</li>
<li>In the 'Improved NPC customization and management' component, points spent on Find Traps at 1st level were sometimes being routed to Set Traps.</li>
<li>The 'Improved NPC customization and management' no longer skips NPCs (like Haer'Dalis) whose death variable is longer than 8 characters.</li>
<li>Temporarily deprecated French translation since apparently it's causing some problems. (A new one is being worked on.)</li>
<li>Slightly decreased Bassilus's level, from 12th to 10th.</li>

</ul>
</li>

</ul>
</div>

Expand Down
4 changes: 2 additions & 2 deletions stratagems/elemental_cre/elemental_cre.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ DEFINE_ACTION_FUNCTION elemental_summoning_bg BEGIN

// clone that spell to create the L6 priest Water Elemental spell

CLERIC_CONJURE_WATER_ELEMENTAL,CLERIC_CONJURE_WATER_ELEMENTAL_SCROLL=spl.copy[%CLERIC_CONJURE_FIRE_ELEMENTAL%=>CLERIC_CONJURE_WATER_ELEMENTAL]
CLERIC_CONJURE_WATER_ELEMENTAL,CLERIC_CONJURE_WATER_ELEMENTAL_SCROLL=spl.copy[%CLERIC_CONJURE_FIRE_ELEMENTAL%=>CLERIC_CONJURE_WATER_ELEMENTAL|overwrite:i=1]
[
m_name:=@24
m_description:=@13
Expand All @@ -92,7 +92,7 @@ DEFINE_ACTION_FUNCTION elemental_summoning_bg BEGIN

// clone that spell to create the L7 priest Air Elemental spell

CLERIC_CONJURE_AIR_ELEMENTAL,CLERIC_CONJURE_AIR_ELEMENTAL_SCROLL=spl.copy[%CLERIC_CONJURE_EARTH_ELEMENTAL%=>CLERIC_CONJURE_AIR_ELEMENTAL]
CLERIC_CONJURE_AIR_ELEMENTAL,CLERIC_CONJURE_AIR_ELEMENTAL_SCROLL=spl.copy[%CLERIC_CONJURE_EARTH_ELEMENTAL%=>CLERIC_CONJURE_AIR_ELEMENTAL|overwrite:i=1]
[
m_name:=@23
m_description:=@14
Expand Down
1 change: 1 addition & 0 deletions stratagems/firegiant/ssl/golbur01.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ END
IF
See(NearestEnemyOf(Myself))
Global("FIN_TIME_STOP_RUNNING","GLOBAL",0)
!GlobalTimerNotExpired("BurningManFearTimer","LOCALS")
THEN
RESPONSE #100
ReallyForceSpell(NearestEnemyOf(Myself),BURNING_MAN_KEENING)
Expand Down
17 changes: 2 additions & 15 deletions stratagems/gameplay/ease_of_use_ai.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,8 @@ DEFINE_ACTION_FUNCTION ~ease_of_use_ai~ BEGIN
OUTER_SET $patch_data("USE_OFFENSIVE_SPELLS_DESCRIPTION")=724
END
END

OUTER_SPRINT to_add ""
COPY_EXISTING "L_%EE_LANGUAGE%.lua" override
PHP_EACH patch_data AS key=>value BEGIN
SPRINT string (AT value)
PATCH_IF INDEX_BUFFER ("%key%")>=0 BEGIN
REPLACE_TEXTUALLY ~%key% *=.*~ ~%key% = "%string%",~
END ELSE BEGIN
SPRINT to_add ~%to_add%%key% = "%string%",%WNL%~
END
END
PATCH_IF "%to_add%" STR_CMP "" BEGIN
REPLACE_TEXTUALLY "}" "%to_add%%WNL%}"
END
BUT_ONLY

LAF UI_add_string_array STR_VAR array=patch_data END


COPY_EXISTING "PARTYAI.2da" override
Expand Down
4 changes: 2 additions & 2 deletions stratagems/gameplay/innate_triggers.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ DEFINE_ACTION_FUNCTION innate_triggers BEGIN

// apply the wraps to the CLAB files

kit.edit_all[mage]
kit.edit_all[mage|clab_only:i=1]
[
k.kit_apply_powers{%string_mage%}
]
kit.edit_all[bard]
kit.edit_all[bard|clab_only:i=1]
[
k.kit_apply_powers{%string_bard%}
]
Expand Down
2 changes: 1 addition & 1 deletion stratagems/gameplay/shapeshift.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ DEFINE_ACTION_FUNCTION shapeshift_token_enemies BEGIN

ACTION_PHP_EACH shapeshift_enemy AS old=>new BEGIN
LAF clone_item STR_VAR item=~dw#sh%old% => dw#sh%new%~
editstring=~droppable=>0 delete_opcodes=>145~
editstring=~twohanded=>0 droppable=>0 delete_opcodes=>145~
END
END

Expand Down
1 change: 1 addition & 0 deletions stratagems/genai/genai.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ DEFINE_ACTION_FUNCTION edit_creatures_before BEGIN

LAF edit_area STR_VAR area=ar0907 editstring=~clone_trigger=>patch_data~ END
OUTER_SPRINT $patch_data(~match~) "trigger_name=Tran0906b"
OUTER_SPRINT $patch_data(~trigger_name~) "DMWWFakeExitb"
LAF edit_area STR_VAR area=ar0907 editstring=~clone_trigger=>patch_data~ END
LAF extend_area_script STR_VAR area=ar0907 bottom=ar0907 location=baf END

Expand Down
22 changes: 11 additions & 11 deletions stratagems/initial/initial.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -364,17 +364,17 @@ DEFINE_ACTION_FUNCTION general_creature_patch BEGIN
END
// these edits are BG1/2 only
PATCH_IF !is_iwd BEGIN
PATCH_IF (BYTE_AT 0x272)=lycanthrope || (BYTE_AT 0x272)=doppleganger BEGIN
WRITE_BYTE 0x271 255
END ELSE
PATCH_IF (BYTE_AT 0x273)=skeleton || (BYTE_AT 0x273)=skeleton_warrior BEGIN
SPRINT $skeleton_array("%SOURCE_RES%") ""
END
// level adjustment - deals with the various BG1 creatures with Lev2=30
// hardcoded for speed
PATCH_IF (BYTE_AT 0x235=30) & (BYTE_AT 0x234)<=15 BEGIN
WRITE_BYTE 0x235 1
END
PATCH_IF (BYTE_AT 0x272)=lycanthrope || (BYTE_AT 0x272)=doppleganger BEGIN
WRITE_BYTE 0x271 255
END ELSE
PATCH_IF (BYTE_AT 0x273)=skeleton || (BYTE_AT 0x273)=skeleton_warrior BEGIN
SPRINT $skeleton_array("%SOURCE_RES%") ""
END
// level adjustment - deals with the various BG1 creatures with Lev2=30
// hardcoded for speed
PATCH_IF (BYTE_AT 0x235=30) & (BYTE_AT 0x234)<=15 BEGIN
WRITE_BYTE 0x235 1
END
END
// save and THAC0 fixes are in IWD too
PATCH_IF !ignore_thac0 BEGIN
Expand Down
2 changes: 1 addition & 1 deletion stratagems/leveller/handle_thieves.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ DEFINE_ACTION_FUNCTION make_thief_skill_spells BEGIN
spl.make[dwlvts2p]
[
m.ab.add{}
m.ab_fx.add{s_opcode=277 s_target=2 s_timing=9 s_parameter1=5 s_parameter2=0}
m.ab_fx.add{s_opcode=91 s_target=2 s_timing=9 s_parameter1=5 s_parameter2=0}
]
// open locks
spl.make[dwlvts1p]
Expand Down
2 changes: 1 addition & 1 deletion stratagems/leveller/leveller.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ DEFINE_ACTION_FUNCTION NPCs_for_levelling BEGIN
COPY_EXISTING_REGEXP GLOB ~.*\.cre~ ~override~
PATCH_TRY
SPRINT filename "%SOURCE_RES%"
READ_ASCII DEATHVAR dv
READ_ASCII DEATHVAR dv (0x20) NULL
TO_LOWER dv
PATCH_IF VARIABLE_IS_SET $sfo_joinable_dvs("%dv%") BEGIN
PATCH_MATCH "%filename%" WITH
Expand Down
54 changes: 28 additions & 26 deletions stratagems/lib/stratagems_shared.tph
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
DEFINE_PATCH_FUNCTION strip_scs_scripts
STR_VAR arguments=""
BEGIN
PATCH_IF "%arguments%" STRING_COMPARE_CASE no_change BEGIN
FOR (i=0x248;i<0x270;i+=8) BEGIN
READ_ASCII i checkfull
READ_ASCII i check4 (4)
TO_LOWER check4
READ_ASCII i check5 (5)
TO_LOWER check5
PATCH_MATCH ~%check4%~ WITH // caster
"dw#.*" dw1r dw2r dw3r dw1m dw2m dw3m BEGIN
WRITE_ASCII i ~~ (8)
END
DEFAULT
PATCH_MATCH "%check5%" WITH
dw#mg dw#pr BEGIN
WRITE_ASCII i ~~ (8)
END
DEFAULT
END
END
PATCH_MATCH "%checkfull%" WITH wtasight wdasight wtarsgt wdarsgt _tasight _dasight _wtarsgt _wdarsgt BEGIN
WRITE_ASCII i ~~ (8)
END
DEFAULT
END
END
END
PATCH_IF "%arguments%" STRING_COMPARE_CASE no_change BEGIN
FOR (i=0x248;i<0x270;i+=8) BEGIN
READ_ASCII i checkfull
READ_ASCII i check4 (4)
READ_ASCII i check5 (5)
proceed=0
PATCH_MATCH ~%check4%~ WITH
dw1r dw2r dw3r dw1m dw2m dw3m BEGIN
proceed=1
END
DEFAULT
END
PATCH_MATCH "%check5%" WITH
"dw#mg" "dw#pr" BEGIN
proceed=1
END
DEFAULT
END
PATCH_MATCH "%checkfull%" WITH wtasight wdasight wtarsgt wdarsgt _tasight _dasight _wtarsgt _wdarsgt BEGIN
proceed=1
END
DEFAULT
END
PATCH_IF proceed BEGIN
WRITE_ASCII i ~~ (8)
END
END
END
END


Expand Down
Loading

0 comments on commit 9418978

Please sign in to comment.