TP2 Code Generator can help you:
http://forums.blackw...?showtopic=2372
Thanks to berelinde and cmorgan for the testing and suggestions!
Thanks to Sir-Kill for creating the program icon!
Edited by Baronius, 21 December 2006 - 07:31 AM.
Posted 21 December 2006 - 06:47 AM
Edited by Baronius, 21 December 2006 - 07:31 AM.
Posted 21 December 2006 - 11:11 AM
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
Posted 21 December 2006 - 11:48 AM
Edited by Baronius, 21 December 2006 - 12:02 PM.
Posted 21 December 2006 - 12:57 PM
It can't at the moment, but I can add this to the new version, if somebody reports the deficiency.The mod I'm developing has stores as well. WeiDU says this --automate works only with CRE/ITM/SPL/CRE files. Is there a way (command) to do the same for STO and EFF files? (I don't have 50 stores but it's easy to forget to make code for strrefs at certain offsets).
It does for ITM and SPL, I'm unsure of CRE - but again, I can code this for the next version.Also, does Weidu detect strrefs in embedded effects in ITM/CRE?
It does this automatically.Furthermore, I want to control the scope of TRA entry re-use (i.e. not to generate a new entry for each string if the same text is used 111 times in my mod)
Just use multiple directories and files, along with --traify#.to set it to use different TRA starting indices for different filetypes
You can use --traify-comment.and to add tp2 comments automatically (such as creature's names and items names to sign their COPY block)?
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
Posted 21 December 2006 - 01:22 PM
Posted 21 December 2006 - 01:35 PM
As I've said before, this isn't a good way to go about developing a quest mod. Build your content in WeiDU form as you go along, rather than converting it at the end. You still do lots of typing, but it's broken up so it's less painful.Typing them to the TP2 manually is a lot of time for a big quest mod,
Edited by SimDing0, 21 December 2006 - 01:35 PM.
Posted 21 December 2006 - 02:00 PM
Retired from modding.
Posted 21 December 2006 - 02:38 PM
The method you suggest is not bad and also offers a certain level of self-documentation, but in case of large mods, it's not the best idea to develop your mod on implementation level. Simply because it distracts your attention from the important parts if you have to deal with the implementation details on such a low level (file copying, file manipulation, bitwise (!) operations etc.) Keep in mind, I'm talking about very big, complex mods. However, obviously I'm not implying either that a large quest mod should be developed in the "make new Cre with dltcep, test it in game, make new item in dltcep, test it in game...." style. Ad-hoc development would be hopeless here. A proper methology is needed here, to determine the necessary processes of design, implementation and validation (and more, if needed).As I've said before, this isn't a good way to go about developing a quest mod. Build your content in WeiDU form as you go along, rather than converting it at the end. You still do lots of typing, but it's broken up so it's less painful.Typing them to the TP2 manually is a lot of time for a big quest mod,
Posted 21 December 2006 - 02:46 PM
Experience dictates otherwise.but in case of large mods, it's not the best idea to develop your mod on implementation level.
Posted 21 December 2006 - 02:54 PM
Posted 21 December 2006 - 03:11 PM
#!/bin/bash if [ -n "$2" ]; then output=$1 directory=$2 echo 'BACKUP ~tmp~ AUTHOR ~me~ BEGIN ~~ //IGNORETHISLINE' > tmp-stub.tp2 for a in spl itm cre eff sto are; do if [ -d $directory/$a ]; then echo "automating and traifying the $a files" ( echo echo '////////////////////////////////////////////////////////////////////////////////' echo "// handle $a files //" echo '////////////////////////////////////////////////////////////////////////////////' echo ) > tmp-stub1.tp2 weidu --automate $directory/$a --out tmp-tmp.tp2 cat tmp-stub.tp2 tmp-stub1.tp2 tmp-tmp.tp2 > tmp-$a-part.tp2 echo echo Starting Number for $a files? read b weidu --traify tmp-$a-part.tp2 --traify# $b --traify-comment --out res-$a.tp2 fi done echo "Merging all files" cat res-*.tp2 | grep -v "//IGNORETHISLINE" > $output.tp2 cat res-*.tra > $output.tra echo echo 'Cleanup?' read a a=`echo $a | tr '[:upper:]' '[:lower:]'` if [[ $a == y || $a == yes ]]; then rm res-*.tp2 res-*.tra tmp-*.tp2 fi else echo "usage: $0 out-tp2-file mod-base-dir" echo echo "out-tp2-file shouldn't contain the .tp2 extension" echo "the directories mod-base-dir/(spl|itm|cre|eff|sto|are) will be checked" echo "the files out-tp2-file.tp2, out-tp2-file.tra will be overwritten" echo "the files res-*.tp2, res-*.tra, and tmp-*.tp2 will be deleted" exit 1 fi
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
Posted 21 December 2006 - 04:25 PM
My first comment:In any event, I threw together a small shell script to do (almost) all the tasks you requested in about half an hour[..]
I see a little self-contradiction here, though I'm sure you didn't mean it in that way. Adapting better to my tastes -- an utility used only once? The utility exactly ensures that for any number of tasks & problems, I can customize it to meet my current task's requirements. So it's definitely not something that I use once. Furthermore, you exactly did it with your code above: one code for a specific problem class. With TP2CG, I can customize everything quickly, without having to change code lines. And think of the users who can't make code that you've posted. Remember, clicking checkboxes or setting booleans?Obviously, a new program would allow you to make your output code adapt better to your tastes - but IMHO I'd prefer to spend a week on the mod rather than on an utility program I'd use only once
Edited by Baronius, 21 December 2006 - 04:32 PM.
Posted 21 December 2006 - 04:33 PM
The sad truth is "I don't organize it".Without knowing how you organize your design phase
Posted 22 December 2006 - 02:31 AM
STO was already there, but I see your point nonetheless1. No STO and EFF files. "They can be added in the later version if more people want it" doesn't help on me
Ah, I must've misunderstood you, there's no quick way for WeiDU to do this2. As I said, I want to control the scope of TRA entry reuse. Because e.g. for a group of certain files of a type (itm, for example) I might not want to use the same entry for them even if they have the same description, because modification will be problematic in the future. (If you change description of MISC1A.ITM, a new entry will be needed or it will affect MISC1B, MISC1C too because they all have the same @number in the tp2. Complicated.)
That's why we have the --automate-min option - otherwise, WeiDU starts from the SoA new strings.3. I don't want to distribute the UNIDENTIFIED_DESCRIPTION and NAME for the items[...]
Yes, obviously. It's just that I'm mostly set in the Unix mindframe, rather than the Windows one, and I love the CLI, so I have some troubles thinking in the newbie wayYes, you can solve practically everything in such a way and format that you've introduced in your previous post, but this is exactly why you use the GUI of your operating system for your everyday activities on your computer.[...]
Well, I could always either redistribute the script (so that they don't have to re-type every time all the program), or I could have written it in OCaml and stacked a simplicistic GUI on it - but then, I'm talking more about "don't reinvent the automate wheel and use/adapt WeiDU" rather than "don't write the guide TP2 at all", so I guess that my real point by now would be that the ideal way IMHO to have asked for extensions to WeiDU so that TP2CG would just do all the command combination, rather than having to implement the TLK reader, traificator, againThe fact that such a code that you've posted is required to solve those tasks I've listed, exactly proves that there is little user-friendliness here, amateurs would have little chance. If you had provided 10 weidu commandline inputs, the case would be a bit different, but you provided a composite programming structure instead -- which might not even be readble by amateurs, not that they make such a code from scratch.
Italian users: help test the Stivan NPC!
Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator
If possible, send diffs, translations and other contributions using Git.
Posted 22 December 2006 - 09:40 AM
As I've already mentioned, WeiDU has shown unusual behaviour to me in the past, and not just once, and it really isn't much effort to implement a TLK handler.I guess that my real point by now would be that the ideal way IMHO to have asked for extensions to WeiDU so that TP2CG would just do all the command combination, rather than having to implement the TLK reader, traificator, again
Edited by Baronius, 25 April 2007 - 04:54 PM.