Looking for some tips on creating an item mod that involves cromwell and cespenar
Daeros_Trollkiller
Member Posts: 327
Heya folks, I am looking for some tips on how I would go about using WeiDu to add some additional SoD items into BG2:EE as well as some new upgraded items that would be created from them using new recipes added to cespenar.
I am still very much a novice at WeiDu, but I am learning quickly.
So far, I am comfortable with being able to modify items in NI, then import them into the games with new/updated descriptions using WeiDu.
Thanks in advance for any help or examples of TP2's that I could use as a starting point.
I am still very much a novice at WeiDu, but I am learning quickly.
So far, I am comfortable with being able to modify items in NI, then import them into the games with new/updated descriptions using WeiDu.
Thanks in advance for any help or examples of TP2's that I could use as a starting point.
0
Comments
Thank you! I havent had time to digest this yet, but it looks to be exactly what I was looking for.
And Cryosaur, thank you for that suggestion as well. I did look at it, but I'm still too green to pick apart a mod that advanced just yet
Check out CrevsDaak's Thalantyr Item Upgrade mod instead for a much simpler example. If you strip away the legacy game support and the extra bags it adds, you'll see that its TP2 only does a few things:
- copy new ITM files with names and descriptions
- compile a dialogue file, which adds to Thalantyr's conversation options
Though rudimentary, this should give you a better foundation to understand how that G3 example should be laid out in various files, even if this mod does the new item "creation" inside of the dialog instead of via a script (.baf) like for Cromwell.Some of the things I get confused most by are the @%number% references I see in these mods. I can tell in many cases that they refer to entries in other files for things like item descriptions, but I'm still having a hard time wrapping my head around what refers to what, and how it all works together.
If I could get an example mod of just adding a single new item and recipe to cromwell/cespy that would give me a better understanding of how it all works and I could build off of it.
For a basic mod, you need the following:
-the setup-yourmod.exe (renamed current weidu.exe)
-a mod folder "yourmod"
Indise the folder, you need the setup-yourmod.tp2. Basic of this would be:
Now you need to put the dialogue for Cromwell into a file "itemmod.d" and inside a subfolder "dialogue".
The script addition into a file called "myitem.baf" and into a subfolder "scripts".
From your other thread:
itemmod.d would look like this:
myitem.baf would look like this:
EDIT: forgot the actual item... see below.
That's for a basic mod all you need. Texts can all be inside the files, UNLESS you want to use non-latin letters or symbols. But English without symbols but with normal apostroph (') works fine for EE, too, without the need of text formatting using HANDLE_CHARSETS.
https://www.gibberlings3.net/forums/topic/1649-community-filename-prefix-reservations/#comments
Inside the tp2, you need to copy your mod's item, somewhere below the "BEGIN":
And inside a subfolder called "itm", you put your mod item file dtkswd01.itm.
I do have a couple of questions:
I assume each item will need its own .d and .baf files? And if so, what is considered "best practice" in the TP2 file to reference each?
Lastly, and I hate to even ask this because it seems silly: How does one go about putting em or en dashes for item descriptions? If I use the ascii code it appears correctly in the TP2 file, but in-game it turns into a ⯀. If I use two hyphens, it just remains two hyphens.
Your second question I am not sure I understand correctly. Do you want to use non-latin letters in your item name/description?
For the second item, I am referring to the longer dashes used in item descriptions. For example:
Long Sword
— 1d8 damage
When I attempt to do this in the TP2 file for the item description, once I install the mod it shows in-game as the below:
⯀1d8 damage
Does that make sense?
For long dashes, you'd need to work with tra-files and use HANDLE_CHARSETS so they get formatted to the needed utf-8 without BOM upon installation.
Or your mod is only available for the EE, then you can just provide the tra files in utf-8 without BOM and don't need iconv.exe for the text transformation.
Again, I want to thank you for all the help. This portion of creating the mods I want to make seemed insurmountable at first.
I am going to see what I can put together by looking at other mods, but if you have any tips for how I would go about structuring my mod to include an english translation that could later be expanded to include others I would be most grateful.
Into this subfolder "tra/language" you also put the folder "iconv", which you can copy from any other mod that uses it and which contains the iconv.exe and some other files needed.
iconv.exe
libcharset1.dll
libconv2.dll
libintl3.dll
I researched it and found that the issue may be due to the encoding, so I used notepad++ to make sure it was encoded in UTF-8 w/o BOM first, and then I tried again with it in ANSI, and got the same result.
If you have the time, would you mind taking a look at my mod in it's current form to see what I am doing wrong?
https://github.com/DaerosTrollkiller/InfinityEngineMods/raw/master/Cromwell%20mod%20test.zip
@Wisp said that including the zip file that is also contained in some of the mods should be in there because of the open source license iconv.exe comes with. I am sloppy with this in my own mods, I have to admit.
Before looking at your mod: make sure all lines in the tra are like this:
@x = ~text~
The ~~ tildas around the texts are important. My guess is that one is missing somewhere, probably at line 37 or above.