Jump to content

Using Weidu to alter mods not yet installed


kreso

Recommended Posts

As title says.

Is this possible or no?

 

Example of what I want to do:

SCS uses this block of code to cast Chaos:

 

IF TRIGGER
IgnoreBlock(Indiscriminate)
RequireBlock(HasL5)
IgnoreBlock(IsEvoker)
TargetBlock(EnemiesInOrder)
TriggerBlock(MR|Confused|ConfuseProof|SIEnchantment|Enemy|Helpless)
!CheckStatLT(scstarget,0,SAVEVSSPELL)
THEN DO
Combine()
Action(SpellArea,WIZARD_CHAOS|150|50)
END
I want to alter this text via Weidu, so it looks like this:
IF TRIGGER
IgnoreBlock(Indiscriminate)
RequireBlock(HasL5)
IgnoreBlock(IsEnchanter)
TargetBlock(EnemiesInOrder)
TriggerBlock(MR|Confused|ConfuseProof|SIEnchantment|Enemy|Helpless)
!CheckStatLT(scstarget,0,SAVEVSSPELL)
THEN DO
Combine()
Action(SpellArea,WIZARD_CHAOS|150|50)
END
(Bolded & crossed is stuff I'd delete as unnececary, bolded only is what I want changed).
How can this be done?
The file in question is located in stratagems/mage/ssl/bg2/combatblocks/mid_level_area.ssl.
Link to comment

You could do this with a COPY and REPLACE_TEXTUALLY. I wouldn't recommend it except for personal use, in part because it will only work if the other mod has been extracted but not yet installed.

 

e.g.

COPY ~stratagems/mage/ssl/bg2/combatblocks/mid_level_area.ssl~ ~stratagems/mage/ssl/bg2/combatblocks~

 

The REPLACE_TEXTUALLY statement(s) will vary depending on how unique these replacements are within the file.

 

A straight copy of your file would do the same trick but the file would need to be re-modified if a new SCS version provides an updated version of the file.

Link to comment

I wouldn't recommend it except for personal use, in part because it will only work if the other mod has been extracted but not yet installed.

I know...the idea is to install this before SCS, not after. The caveat is that SCS needs to be extracted, however. Not too pretty; I know...

 

e.g.

COPY ~stratagems/mage/ssl/bg2/combatblocks/mid_level_area.ssl~ ~stratagems/mage/ssl/bg2/combatblocks~

 

The REPLACE_TEXTUALLY statement(s) will vary depending on how unique these replacements are within the file.

 

A straight copy of your file would do the same trick but the file would need to be re-modified if a new SCS version provides an updated version of the file.

Augh.... :(

The problem is that this code is written in ssl language, which later (after SCS is installed) compiles into much larger .bcs files. To do this properly *after* SCS is installed, I'd have to go through several hundred SCS created .bcs scripts, some of which are above 1MB in sheer code lenght, and then do a DECOMPILE_AND_PATCH / REPLACE_TEXTUALLY on each piece of code I want altered. That's a virtually impossible task. I need to edit ssl files *before* SCS compiles them in thousands of code lines used in scripting.

Given the options I have, I'd stick to what I use. Not the most perfect or elegant of solutions, but it will work.

Another good thing is that this way is much less prone to error. And install time will be shorter. If I change bcs files, installer could take more than an hour to finish. This will finish installing in less than few minutes, and even SCS will take shorter to install with these edits.

If SCS gets updated, so will this. Likewise, if SCS updates, there's no telling what will change and if REPLACE will do any good anymore.

 

Thanks for help. SR players will enjoy this when I'm done. :cool:

Link to comment

Archived

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

×
×
  • Create New...