Jump to content

How to add an unique entry to IDS


qwerty12345

Recommended Posts

that will just skip if there's such entry already. So my scripts will use this shared shout. I need a new, unique shout.
Erhm, it will skip if the UNLESS statement is true within the line... this allows you to build up a nearly endless of possibility ... say you wish a simple QHELP as the shout in your scripts, you can:

 

APPEND ~shoutids.ids~ ~131 QHELP~

UNLESS ~131~

 

Now then if the case is that the 131 is already occupied, you just...

 

APPEND ~shoutids.ids~ ~171 QHELP~

UNLESS ~QHELP~

 

Cover it... ETC.

Link to comment

You can use LOOKUP_IDS_SYMBOL_OF_INT to determine if any identifier is associated with a specific value. This will only guarantee you get a unique shout if you assume every mod that uses shouts actually adds an identifier to shoutids.ids.

 

SET val = 0
LOOKUP_IDS_SYMBOL_OF_INT identifier ~shoutids~ val
PATCH_IF (~%identifier%~ STRING_EQUAL ~%val%~) BEGIN
 // no identifier assigned to val
END

 

Combine it with a loop to keep searching until you find one that's unused.

 

 

Edit: Keep in mind that you'll need to recommend installing your mod after mods that are less careful about this sort of thing.

Link to comment

Archived

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

×
×
  • Create New...