Jump to content

Oy vey, a mod uninstall wiped baldur.bcs clean!


temnix

Recommended Posts

The BCS saves the value, not the reference name, so if your install when the BCS was compiled had WIZARD_CUSTOM_SPELL in spell.ids with value 5, the BCS will have value 5, which will either be a nonexistent spell, or a different spell if you use that BCS in a different install where some other mod was installed first and took value 5 for a different custom spell.

 

Similarly for any strings, they will be resolved in the BCS as specific strref numbers, which will be pointing to the wrong strings in any other installation where the order of strings in dialog.tlk was not the same. When you use a baf file, WeiDU searches your dialog.tlk at install time to see if the desired string exists, and uses the corresponding strref number; if it is not in dialog.tlk, WeiDU adds the string as a new entry at the end of dialog.tlk and uses the new strref number in the BCS file.

Link to comment

The BCS saves the value, not the reference name, so if your install when the BCS was compiled had WIZARD_CUSTOM_SPELL in spell.ids with value 5, the BCS will have value 5, which will either be a nonexistent spell, or a different spell if you use that BCS in a different install where some other mod was installed first and took value 5 for a different custom spell.

 

Similarly for any strings, they will be resolved in the BCS as specific strref numbers, which will be pointing to the wrong strings in any other installation where the order of strings in dialog.tlk was not the same. When you use a baf file, WeiDU searches your dialog.tlk at install time to see if the desired string exists, and uses the corresponding strref number; if it is not in dialog.tlk, WeiDU adds the string as a new entry at the end of dialog.tlk and uses the new strref number in the BCS file.

 

Well, it's something to keep in mind. But, in the case of custom spell states. You say that if I write in a custom spell state, e.g. no. 242, then it may be a wrong state or there may be no such state. But a) how can it be a non-existent state, if I'm adding it myself with, e.g.

 

APPEND splstate.ids %242 INTERRUPT%

UNLESS %242 INTERRUPT%

 

So, if there was nothing there at that position in splstate.ids, there will be. But, and this is b) if there is another entry there already at 242, let's say something called RED_DRAGON_BREATH, why would that be a problem? I'm adding a position to the ids file so that my spells can set the 242 state and so that scripts can react to it. If instead of INTERRUPT I get this RED_DRAGON_BREATH, whatever it is, at 242, then my spells will just set and react to that state. So what? The custom state doesn't do anything by itself, it's just a marker. The chances of some accidental overlap of functions with my state and the original RED_DRAGON_BREATH that would be noticeable in the game are one in a million. Script triggers will read, if anyone opens them, a strange custom state name, but they will still be about the same number. So long as I can set the number and refer to the number, I don't see a problem. Even a double entry in an ids file, if Mike is to be believed, is not a source of bugs.

 

With text strings, I'd like to know how Weidu will search dialog.tlk if not by the content of the string, i.e. by what it says? Well, if it finds ("resolves") the string, that means it's the right string, so it won't have to create it. Good. And if it doesn't find the string, then it's going to create it and assign a number to it. If I entered string numbers directly in bcs files myself, then yes, I see a problem. But I've yet to do that.

 

All in all, so far it looks like bafs are only useful for one limited case, quoting tlk strings.

Link to comment

if there is another entry there already at 242, ... that would be noticeable in the game are one in a million.

Ghrm, because you could also use a unique splstate.ids entry... like say x, by reading the last .ids and add one to it and then extend the .ids file that way.

Say like:

(function that figures what the x would be good, aka unused)
APPEND splstate.ids ~%x% INTERRUPT~
UNLESS %INTERRUPT%

This is how the ADD_SPELL function in weidu works... it's made to add the spells ids entry and you just need to use the same name you give to the function to use in your .baf scripts.

Yeah, one in a million might sound distant... but get an SCS clash with it and it's in every second moded game...

Link to comment

Archived

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

×
×
  • Create New...