Jump to content

Sword Coast Stratagems v28 bugfix thread


Mad Mate

Recommended Posts

Thanks for that. I did actually manage to get the correct HP by copying the genie.tpa HP boost formulas and changing fiend_hp to null in the TPH. This worked for all but the Chromatic Demon, who for some reason got 300 HP when his vanilla HP is 140. His fiend_hp in the TPA file is 90, so it seems like SCS did 140*1.5 + 90. But Demogorgon's hp_fiend in my edited TPA file was 290 and now his HP is correctly 435, so don't know why they worked differently.

Link to comment

Thanks for that. I did actually manage to get the correct HP by copying the genie.tpa HP boost formulas and changing fiend_hp to null in the TPH. This worked for all but the Chromatic Demon, who for some reason got 300 HP when his vanilla HP is 140. His fiend_hp in the TPA file is 90, so it seems like SCS did 140*1.5 + 90. But Demogorgon's hp_fiend in my edited TPA file was 290 and now his HP is correctly 435, so don't know why they worked differently.

fiend\fiend.tpa is fine, you don't have to change it.

fiend_hp is boost that should be added to vanilla HP. Only thing that was missing from calculation is the read of current HP and sum of boost+HP.

Hitpoints that were in SCS2v21 and in SCSv28 (if you use my fix) are:

 

 

Chromatic Demon 230 (normal), 345 (50% boost) 140 (vanilla) 90 (normal/without fix) 135 (50%/without fix)

Demogorgon 400 (n), 600 (50%) 290 (vanilla) 110 (normal/without fix) 165 (50%/without fix)

Lesser Demon Lord 220 (n), 330 (50%) 120 (vanilla) 100 (normal/without fix) 150 (50%/without fix)

all other fiends also get boosted

 

 

Link to comment

Another error that comes up in the improved fiends install:

 

[tb#_compile_eval_buffer/stratagems_external/workspace\ssl_out\gorchr.baf] PARSE ERROR at line 19 column 1-23
Near Text: )
[Polymorph] argument [iC_ICE_GOLEM] not found in [Animate.IDS]
Think this is related to the Chromatic Demon. Can this be fixed by change IC_ICE_GOLEM to GOLEM_ICE?
Link to comment

 

Another error that comes up in the improved fiends install:

 

[tb#_compile_eval_buffer/stratagems_external/workspace\ssl_out\gorchr.baf] PARSE ERROR at line 19 column 1-23
Near Text: )
[Polymorph] argument [iC_ICE_GOLEM] not found in [Animate.IDS]
Think this is related to the Chromatic Demon. Can this be fixed by change IC_ICE_GOLEM to GOLEM_ICE?

 

 

That should work for an install on BG2EE, as it is the same ID as IC_ICE_GOLEM in BG2, 0xE0F0.

 

For a cross-platform BG2/BG2EE solution, I guess either using the hex id 0xE0F0 directly, using an evaluated variable in gorchr.baf, or adding a line to ANIMATE.iDS (i.e., adding IC_ICE_GOLEM to BG2EE or GOLEM_ICE to BG2) would be needed.

Link to comment

For a cross-platform BG2/BG2EE solution, I guess either using the hex id 0xE0F0 directly, using an evaluated variable in gorchr.baf, or adding a line to ANIMATE.iDS (i.e., adding IC_ICE_GOLEM to BG2EE or GOLEM_ICE to BG2) would be needed.

So just:

ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN
APPEND ~animate.ids~ ~0xE0F0 IC_ICE_GOLEM~ UNLESS ~\bIC_ICE_GOLEM\b~
END
In a .tp2 level(or where ever) before the gorchr.baf gets compiled.
Link to comment

 

For a cross-platform BG2/BG2EE solution, I guess either using the hex id 0xE0F0 directly, using an evaluated variable in gorchr.baf, or adding a line to ANIMATE.iDS (i.e., adding IC_ICE_GOLEM to BG2EE or GOLEM_ICE to BG2) would be needed.

So just:

ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN
APPEND ~animate.ids~ ~0xE0F0 IC_ICE_GOLEM~ UNLESS ~\bIC_ICE_GOLEM\b~
END
In a .tp2 level(or where ever) before the gorchr.baf gets compiled.

 

 

That would do it. Unless it's sure that Improved Fiends is the only component that uses this (Improved Golems too?), probably in an ALWAYS block, if there is one.

 

Technically, I guess you don't even need the GAME_IS check. Then APPEND should not happen for BG2 or BGT since they already have the line.

Link to comment

Technically, I guess you don't even need the GAME_IS check. Then APPEND should not happen for BG2 or BGT since they already have the line.

Yeah, but would it be faster to check IF "the game is" OR "the files content has" ... yeah, we probably talk about milliseconds here or there yeah, but whatever... :p ... also I added the check in the later edit, so.

Mad Mate gets to set it up in the fix anyways...

Link to comment

 

For a cross-platform BG2/BG2EE solution, I guess either using the hex id 0xE0F0 directly, using an evaluated variable in gorchr.baf, or adding a line to ANIMATE.iDS (i.e., adding IC_ICE_GOLEM to BG2EE or GOLEM_ICE to BG2) would be needed.

So just:

ACTION_IF GAME_IS ~BG2EE~ THEN BEGIN
APPEND ~animate.ids~ ~0xE0F0 IC_ICE_GOLEM~ UNLESS ~\bIC_ICE_GOLEM\b~
END
In a .tp2 level(or where ever) before the gorchr.baf gets compiled.

 

Rather than cluttering up animate.IDS with redundant entries, better to replace IC_ICE_GOLEM in gorchr.ssl with %ice_golem_animation% and then put

 

   ACTION_IF enhanced_edition BEGIN
      OUTER_SPRINT ice_golem_animation GOLEM_ICE
   END ELSE BEGIN
      OUTER_SPRINT ice_golem_animation IC_ICE_GOLEM
   END
prior to the compile instruction. (That's what v29 does.)

 

(By the way, I use ACTION_IF enhanced_edition rather than ACTION_IF_GAME_IS ~BG2EE~ because then I don't have to change hundreds of lines of code when some new variant of the enhanced edition (e.g. EET) comes out. You just set the enhanced_edition variable once in an ALWAYS block.)

Link to comment

To get correct (like in SCS2) hitpoints in all fiends you have to change in fiend\fiend_shared.tph in line 47:

DEFINE_PATCH_FUNCTION fiend_hp
STR_VAR arguments=""
BEGIN
   LPF check_label STR_VAR label=dw#fiend_hp RET value=value END
   PATCH_IF value=1 BEGIN

to

DEFINE_PATCH_FUNCTION fiend_hp
STR_VAR arguments=""
BEGIN
   LPF CRE_read_hp_current RET hp=value END
   SET arguments=(arguments + hp)
   LPF check_label STR_VAR label=dw#fiend_hp RET value=value END
   PATCH_IF value=1 BEGIN

I'm sure that DavidW will do it neater in v29, but if anybody need qiuckfix, I tested this and hitpoints are OK in both options for this component.

 

Edit: You don't have to change anything in fiend\fiend.tpa to make this work.

Thanks Mad, it works. Though I managed it in a very silly way...

Link to comment

To get correct (like in SCS2) hitpoints in all fiends you have to change in fiend\fiend_shared.tph in line 47:

DEFINE_PATCH_FUNCTION fiend_hp
STR_VAR arguments=""
BEGIN
   LPF check_label STR_VAR label=dw#fiend_hp RET value=value END
   PATCH_IF value=1 BEGIN
to

DEFINE_PATCH_FUNCTION fiend_hp
STR_VAR arguments=""
BEGIN
   LPF CRE_read_hp_current RET hp=value END
   SET arguments=(arguments + hp)
   LPF check_label STR_VAR label=dw#fiend_hp RET value=value END
   PATCH_IF value=1 BEGIN
I'm sure that DavidW will do it neater in v29, but if anybody need qiuckfix, I tested this and hitpoints are OK in both options for this component.

 

Edit: You don't have to change anything in fiend\fiend.tpa to make this work.

 

Alternatively, just replace all the fiend_hp=>[integer] entries in fiend_shared.tph and fiend.tpa with fiend_hp=>hp_current.

Link to comment

This isn't working:

 

 

Standardise spells between BG and BG2

The locations of the new spells are as follows.

  • Davaeorn: Remove Magic, Stoneskin

He doesn't get them.

 

Edit:

I think I know what could fix it.

 

spell/standardise_bg1_spells.tpa; under

 

ACTION_DEFINE_ASSOCIATIVE_ARRAY cre_to_scroll BEGIN
add a line for Davaeorn.
davaeo=>STONE_SKIN
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...