Jump to content

A little help for a WeiDU implementation of one of my mods


Prof Errata

Recommended Posts

Well, I need to have a little help from experienced modders here for my mod, Kaya_v2 here. I have precised in the read-me that Spell Revisions v3.1.03 is mandatory before the install of my mod, but I’ve decided otherwise and I hope that someone will help me with some additional lines of code : what I wish is that the install of Kaya v2 now checks  at the beginning if SR 3.1.03 is installed :

- if it’s the case, no problem -> installation as usual

- if SR isn’t installed, there is no installation and a message is sent showing that SR 3.1.03 have to be installed before this mod

That’s all. Thank you by advance

Note Kaya_v3 will be available when SR will have its definitive v4 version.

 

Kaya_v2.rar

Link to comment

I doubt anyone uses SR v3 these days... and certainly nobody should be using it. 

Anyway IIRC SRv3 is technically still in beta as well, so you should be targeting SRv2 if that’s your concern. 

More realistically, SRv4 is feature complete and only waiting for a full Readme and a bit of bug-fixing. v4 is what you should be considering. 

Link to comment

Thank you for your response, Subtledoctor, but the problem is that SR_v4 is slow to be finalized, and well SR_v3.1.03 functions well until now, so I prefer now that the present available versionof SR in the G3 download section have to be used. I hope that my proposal for my mod will be implemented quickly, because I don’t think it would be difficult task to do for an experienced modder. Thank you by advance.

Link to comment

Here the section of the SR tp2 file. What Have to do now ?

 

/*------Spell Revisions------*/

BEGIN @9996
DESIGNATED 0
REQUIRE_PREDICATE (ENGINE_IS ~soa tob~) @8996 // ~This mod is designed for the Baldur's Gate II engine and will not function on other games.~

INCLUDE ~spell_rev\shared\cre_spell_immunity.tph~ // function used to make creatures immune to certain spells

/* ----Various---- */

// Scroll Of Restoration: no longer needed since addition of spellbook fixing code in v3
// adscroll.itm still copied over in case someone wants to CLUAConsole it for use on an old save game
COPY ~spell_rev\shared\adscroll.itm~     ~override~
  SAY NAME2 @10000    SAY IDENTIFIED_DESC   @10001
COPY ~spell_rev\shared\adscroll.bam~     ~override~


COPY ~spell_rev\shared\dvimhere.mrk~      ~override~  // Used to detect if SR is installed
COPY ~spell_rev\shared\dvsrv3.mrk~      ~override~  // Used to detect if SR V3 is installed

STRING_SET ~27982~ @5410 // replaces 'Protection from Illusions removed' with 'Illusionary protections removed'

 

 

NB : I use BG2ToB

Link to comment

It's that "used to detect" file.  So I don't know what your code looks like or how you are trying to use this, but a very rough example would be something like:

BEGIN ~install my fancy mod~
REQUIRE_PREDICATE (PLAYER_IS_COOL) @733T

COPY ~my_fancy_mod/data/this.itm~ ~override~
COPY_EXISTING ~that.spl~ ~override~
  PATCH_IF (I_FEEL_LIKE_IT) BEGIN
    LPF do_some_stuff END
  END
BUT_ONLY_IF_ITS_FRESH

ACTION_IF (FILE_EXISTS_IN_GAME ~dvsrv3.mrk~) BEGIN
----------------------------------------
  COPY_EXISTING ~files.spl~ ~override
    LPF do_some_SR_v3_stuff END
  BUT_ONLY_IF_ITS_HYPE
----------------------------------------
END

In between those lines is where you would put code that is dependent on SRv3 being installed.

NB, you could then have another section:

ACTION_IF (FILE_EXISTS_IN_GAME ~dvsrv4here.mrk~) BEGIN
----------------------------------------
  COPY_EXISTING ~mo_files.spl~ ~override
    LPF do_some_SR_v4_stuff END
  BUT_ONLY_IF_ITS_NICE
----------------------------------------
END

And include code that is geared for SRv4.  That way you can introduce v3 of your mod and it will support whichever version of SR the player wants to use, instead of having one version of your mod that supports one version of SR, and another version of your mod that supports another version of SR.  Why not support both?

Link to comment

I see. Well I’ve downloaded SR_v4 beta 18, and created a sorceress in a ToB session in order to see the changes of the arcane spells : they aren’t not bad at all and perhaps I will try a BG2 game with this new mod in a near future. But I’ve noticed that 5 arcane spells have a green background, do you think that these graphic annoyances will be deleted soon - the end of this month - in the next version of SR_v4 (beta 19?)? And if it’s the case, will we have once for all the definitive version of this mod ? I hope it will be the case, with a new readme and the last fixes.

PS : if you have some time, could you help me with the traification of my other mod please ? It will help me a lot.

Link to comment
8 hours ago, Prof Errata said:

I see. Well I’ve downloaded SR_v4 beta 18, and created a sorceress in a ToB session in order to see the changes of the arcane spells : they aren’t not bad at all and perhaps I will try a BG2 game with this new mod in a near future. But I’ve noticed that 5 arcane spells have a green background,

It's an aesthetic bug found in a few of the new icons, but it has no impact on the mod's function or how other modders can code for compatibility. 

8 hours ago, Prof Errata said:

do you think that these graphic annoyances will be deleted soon - the end of this month - in the next version of SR_v4 (beta 19?)? And if it’s the case, will we have once for all the definitive version of this mod ? I hope it will be the case, with a new readme and the last fixes.

There's no such thing as "last fixes."  There's only the point at which mod maintainers disappear and the remaining bugs are left forever.  (This is true of all software, not just mods - and BG2 and BG2EE are prime examples...)

I would bet good money that SRv3 has a lot more bugs than SRv4.

Link to comment
2 hours ago, subtledoctor said:

 

Well, my dear Doctor you have persuaded me about the use of SR_v4 in my next BG2 games, but I hope that nevertheless all  these aesthetic bugs will be removed once for all in a near future - beta 19 ? -. And feel pity for the poor Illasera,  she has acted as spell target for my sorceress…her demise have been horrible, ha ha !…and I’ve tried to eliminate her with others spellcasters, it has well worked, these new spells are well thought out.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...