Jump to content

After strings have been created with Weidu...


temnix

Recommended Posts

A question for those who understand Weidu. If I assign a custom name to, for example, an ability, with the COPY command, and the tool creates a custom string, can I skip that step in new installations of the mod? Let's say I have an ability I called "Spellfire," one of the few parts of the mod visible to the player, all other files are technical stuff. It's inconvenient to have no names or wrong names before you when you mod, so I make a small tp.2 and setup file just to give that ability its name "Spellfire," and it appears properly called in my setup. Then I go on with the technicalities and other stuff to put in the tp2, and the files continue to accumulate until I want to copy the whole folder's worth of them for the installation. I don't want to write them in the tp2 file by file, so I don't want to make a special provision for the "Spellfire" string in the tp2 as well. I already have that string "attached" to that file. Can I just drop the SPL file in the folder and do a mass installation with them? Will the ability retain its name "Spellfire"?

Link to comment

Well if you edit the file during the same installation process and game, then yes, you can just dump the made files to the override folder from the copy'ed folder.

Aka:

COPY_EXISTING ~sw1h01.itm~ ~modfolder/custmit1.itm~
WRITE_...
COPY_EXISTING ~sw1h02.itm~ ~modfolder/custmit2.itm~
WRITE_...
COPY_EXISTING ~sw1h03.itm~ ~modfolder/custmit3.itm~
WRITE_...
COPY_EXISTING ~sw1h04.itm~ ~modfolder/custmit4.itm~
WRITE_...
COPY_EXISTING ~sw1h05.itm~ ~modfolder/custmit5.itm~
WRITE_...

COPY_EXISTING ~modfolder~ ~overrider~
But you do not want to split the two in different components as that will create a whole hullabaloo.
Link to comment

The text you see in the game is stored in DIALOG.TLK. Each line number in that file is called a string reference. You may have seen WeiDU mods sometimes use #12345. This is a direct reference to line 12345 in the DIALOG.TLK file.

 

When you do a WeiDU COPY ~mymod/myfile.itm~ ~override~ followed by a SAY DESC ~text~, WeiDU adds "text" to the DIALOG.TLK as a new line and stores the new line number (string reference) in the copy of "myfile.itm" that was just placed in the override.

 

The "DESC" after SAY is the offset (position in myfile.itm) where the number is stored. DESC is one of a handful of CONSTANTS that WeiDU knows about. You could use 0x### (hexadecimal offset) instead. Refer to the IESDP reference documentation for these offsets.

 

A string reference added by a mod is only good for that specific installation, because if you gave that copy of myfile.itm to someone else to put in their override folder, the same line number in DIALOG.TLK would almost certainly have different text (the only exception is if you and the other person have ALL of the same mods installed and ALL in exactly the same order and with exactly the same versions).

 

Does this clarify it for you?

 

Edit: it's also common to use @## references, like SAY DESC @43. When you load multiple tra files, they overwrite each other (last one wins) for any lines that have the same @###. Just like when you use a raw string like ~text~, WeiDU will add the text that corresponds to the @#### to the DIALOG.TLK and store the line number in your copied file. WeiDU is also smart enough to reuse the same line number in DIALOG.TLK if you SAY DESC @43 more than once in the same mod.

Link to comment

Archived

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

×
×
  • Create New...