Real modders probably think only brain dead people would need a tut for this, but having just figured this out for myself, I want to help elevate my fellow dead-brains.
I will make this as short and unintimidating as possible.
Why you want to do this:
So you can put your custom items in any installation without stomping all over the game's dialog and text system.
Or, to share your item.
What you need:
1) Your custom .itm file. I still prefer Infinity Engine Editor Pro for making items and spells. You'll probably need to download and register the comdlg32.ocx file to get IEEP to work on modern systems. Google it.
2) Text editor. Notepad is fine for this. (but the recommended one for Weidu modding is ConTEXT with Weidu syntax highlighters. google it.)
3) Weidu.exe file. Download the latest version.
Your mod will consist of a total of 4 files, but you only need to write 2 of them. We will make them one by one. Replace all instances of "mymod" or "myitem" with the name of your mod or item.
1) mymod.tp2
This file will have 11 commands, divided into three parts. You can copy and paste the code below and modify it for your own use.
//My Item Mod //Part 1 (header section) BACKUP ~mymod/backup~ AUTHOR ~myemail~ LANGUAGE ~English~ ~mymod/english~ ~mymod/english/english.tra~ BEGIN ~MyMod~ //Part 2 (add item to game) COPY ~mymod/myitem.itm~ ~override/myitem.itm~ SAY NAME1 @1 SAY NAME2 @2 SAY UNIDENTIFIED_DESC @3 SAY DESC @4 //Part 3 (add item to an existing creature, in this case the shadow dragon, Thaxll'ssillyia) COPY_EXISTING ~SHADRA01.cre~ ~override/SHADRA01.cre~ ADD_CRE_ITEM ~myitem~ #0 #0 #0 ~NONE~ ~inv11~
If you have another item to add, simply duplicate part 2 and 3 for each item, but keep incrementing the numbers in the SAY commands (@5,@6,@7,@8 for second item, etc)
Now you may be wondering what those '@2' thingies are. They are references to our next file:
2) english.tra
This file has the text for our item, listed using the reference numbers we used in the tp2 file above.
The four text fields we need are, in order:
unidentified name
identified name
unidentified description
identified description
text is contained in ~~ instead of the usual ""
here's an example:
//////////////////////////////////////////////// //Awesomesword //////////////////////////////////////////////// @1=~Long Sword~ @2=~Awesomesword +3~ @3=~These swords are usually referred to as doubled-edged swords, war swords, or military swords. In many cases, the long sword has a single-edged blade. There is no single version of the long sword; the design and length vary from culture to culture, and may vary within the same culture depending on the era. Among the most common characteristics of all long swords is their length, which ranges from 35 inches to 47 inches. In the latter case, the blade is known to take up 40 inches of the total length. Most long swords have a double-edged blade and a sharp point at the tip. Despite the tip, the long sword is designed for slashing, not thrusting. STATISTICS: Damage: 1D8 Damage type: slashing Weight: 4 Speed Factor: 5 Proficiency Type: Long Sword Type: 1-handed Requires: 6 Strength Not Usable By: Druid Cleric Mage ~ @4=~Awesomesword <some text describing your item> STATISTICS: Equipped Abilities: awesome Combat Abilities: awesomeness: 10% chance to do some awesome shit. THAC0: +3 bonus Damage: 1D8, +1 Magical Damage type: slashing Weight: 2 Speed Factor: 2 Proficiency Type: Long Sword Type: 1-handed Requires: 11 Strength Not usable by: Druid Mage Beast Master~
OK, guess what? Your "coding" is over! All that's left is to put your mod into a nice package:
1) Copy weidu.exe and rename it 'setup-mymod.exe'. Put it in the same folder as your tp2 file.
2) Make a new folder called 'mymod' and put your .itm file in there.
3) Make a folder inside the mymod folder called 'English' and put your .tra file in there.
4) make a zip archive with your exe, .tp2, and mymod folder
And you're done!
Look at the weidu readme to learn how to do more stuff.
Edited by jastey, 27 June 2019 - 06:44 AM.
corrected code for ADD_CRE_ITEM