Jump to content

Cure moderate wounds icon/name missing?


kreon

Recommended Posts

1 hour ago, Jarno Mikkola said:

Hmm, but if that is the case, is the legitimate fix to actually fix it in SCS, or fix it in the source of the problem and FIX the sppr315B/C.bam to be sppr215B/C.bam in the spell

Didn't read the link, did you? 

I'll summarize:

- With SR4b18 installed, the spell's base (spellbook) icon is "sppr315c," and the icon in each header (the main UI icon) is "sppr315b."  That is not ideal; since the spell is added by ADD_SPELL we don't know at install time what its RES is.  Best practice would be to, in Weidu, find its RES after it is installed and name the icon files to match that RES.  Or, even better, use brand new icon files with the DV__ modder prefix.  But even though SR is not perfect here, it is certainly functional - this spell's icons, and the 3rd- and 4th-level Cure spells' icons, are all correct and functional in-game after installing SR.

- SCS v33 changes the icons.  I don't know what the code looks like, but it sets the base (spellbook) icon to "sppr216c," and it sets the main UI icon in the first header to "sppr216b;" then it sets the (main UI) icons in all subsequent headers to "sppr401b."  No matter what SR does to its icon names, it seems like SCS is going to break it, and break it in different ways in different parts of the spell file.

The fix is conceptually easy: SCS should simply not change the spell's icon at all.  How easy it would be to change the SCS code to achieve this, alas, I don't know.

Link to comment
38 minutes ago, subtledoctor said:

Didn't read the link, did you?

Misquoting me will give you the impression, but that's your misquotion that causes it. Not my original post.

As it gives the fix in the same freaking sentence that you went and REMOVED !!!! As it fixes this:

38 minutes ago, subtledoctor said:

- SCS v33 changes the icons.  I don't know what the code looks like, but it sets the base (spellbook) icon to "sppr216c," and it sets the main UI icon in the first header to "sppr216b;" then it sets the (main UI) icons in all subsequent headers to "sppr401b." 

In this case, the spells resource probably ends up being sppr216.spl, which doesn't match the icon name it has, so the SCS needs to fix it. Why you ask, so it can use the ADD_SPELL itself.

And my propersition is then that to fix that in SR, so the SCS doesn't need to fix the resource binding as it's what the SR would set -in this particular case- while copying the sppr315..bam's files to be sppr216..bam's via the ADD_SPELL's resource reference look up function that it has.

Quote

No matter what SR does to its icon names, it seems like SCS is going to break it, and break it in different ways in different parts of the spell file.

You sure about this, cause if it sets the icon to be the same as the spells original name, it shouldn't.

Cause the way I see this is that it tries to fix the icon to be the same as the resource. So there is no mismatches of 20 different spells with same looking icons.

Edited by Jarno Mikkola
Link to comment

I already said that in a very ideal world, SR should be renaming that icon, so yes, I agree with you to that very limited extent.  But really, SR - and every mod - should be using a unique modder prefix for every file it adds to the game... even, probably, for icons to be used in SPPR___ files.  Even, probably, for files that are native to a different game like IWD.  (I noticed that IWDification uses the "CD" prefix in most places, while SCS' IWD Spells uses the same resources names that are in IWDEE.  The SCS version works really well and I am currently using it myself... but all else being equal, I would prefer to see the prefix.)

And anyway, as I said, SCS changes some of the icon references in the spell to sppr401.bam, which makes no sense and makes me wonder if anything done on the SR side would fix the problem.  SCS has a component that adds Cure Moderate Wounds; and it seems to have code that messes with the spell icon on the assumption that a particular version of the spell was added.  But SR adds Cure Moderate Wounds in a way which preempts the SCS version.  Worth clarifying: the SCS code that changes the spell's icons is in the "IWD Divine Spells" component - i.e. the icon-changing code is working on the assumption that the spell has been added contemporaneously in the self-same component.  So the fix seems simple (again, conceptually): if the spell is already present at the moment the SCS IWD spells component is installed, then it should be exempted from any patching done in that component.

Can SR names the icon references in such a way that it will fool SCS patches into working correctly?  Maybe... but unlikely.  For one thing, the SR version and the SCS/IWD version have a different number of headers.  My guess is that whatever SR does, that spell is likely to be mishandled by the SCS patching code.

...

Note: Sunscorch might be affected by a similar interaction.  I recall in my recent install that at the end, I had to manually alter the spell's name in Near Infinity.  It was a small-enough problem that I didn't bother to track down the source of the issue, but as I discuss this now, it occurs to me that it might be a similar circumstance:

  • SR installs a spell that is in IWD
  • SCS IWD component defers to SR, and does not overwrite the spell
  • In the same component, SCS has code that patches the spell

That patching code does not seem to be aware that earlier in the component, SCS declined to install its own specific version of the spell.  So the patches proceed, and lead to minor glitches.

Link to comment
45 minutes ago, subtledoctor said:

Can SR names the icon references in such a way that it will fool SCS patches into working correctly?  Maybe... but unlikely.  For one thing, the SR version and the SCS/IWD version have a different number of headers.  My guess is that whatever SR does, that spell is likely to be mishandled by the SCS patching code.

Well, as long as the spell.ids files don't equate as each others in either part, number or the X_Y_Z, this is easy to disprove, but if they do, it will cause havoc in multiple ways. This is at least my assumption... but there could be other things as well.

Edited by Jarno Mikkola
Link to comment

I agree with @subtledoctor that this is clearly an SCS problem. No, SR shouldn't be using a hardcoded non-prefix-guarded name for a resource, and yes, changing that might help to some extent, but ultimately, if my code is mangling a spell's name string then it's not working correctly, and needs fixing on my side. (I just haven't had a chance to sort it out.)

19 hours ago, subtledoctor said:

But really, SR - and every mod - should be using a unique modder prefix for every file it adds to the game... even, probably, for icons to be used in SPPR___ files.  Even, probably, for files that are native to a different game like IWD

FWIW I don't (quite) agree with this. I think of the IWD/BG/BG2 namespace as basically shared - mod files should avoid overlapping any of it (prefixes basically achieve this) but it's okay to move resources between them (unless there's actually namespace conflict). Otherwise you end up with a huge amount of unnecessary (and bug-inducing) work in doing resource transfer between games. I also think it's fine to follow BG2 naming conventions for child resources (SPWI315c.bam for SPWI315.spl's bam, SPWI315b.spl for SPWI315.spl's secondary spell, etc), provided you do it dynamically. The point of these naming rules is to avoid namespace conflict: if all resources either use modder prefixes, or dynamically conform to the rules, there's no problem*. (I think the SR problem is being caused because it's using a static name for a resource without a modder prefix.)

*Well, provided you don't get namespace conflict within a single modder's files, something I'm getting increasingly worried about for my own mods...

Link to comment

I don't really disagree.  I think the "always use a prefix for anything you add to the game" rule is, in general, a good rule.  All else being equal, I like to see that.  Of course, all else is not always equal...

On 10/27/2020 at 1:22 PM, DavidW said:

provided you don't get namespace conflict within a single modder's files, something I'm getting increasingly worried about for my own mods

I've actually hit that once or twice myself... kind of crazy.

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...