Jump to content

Using weidu vs. NI: which and when?


ericp07

Recommended Posts

Hello,

 

Since many things are possible and favorable by coding BGII mod files, rather than by editing files with NI, what is a good rule of thumb to follow in deciding which approach to take, while attempting to maintain efficient coding/files? Also, are there any "most recommended" aspects of mod content to be done with weidu?

 

Thanks,

Eric

Link to comment

I'm doing a fix-it mod for EasyTutu - and when using NI - some of the files are bugged from the inside. This means that they are fine until you play with them, then they error out. I proved this to myself on several of them. However, if you rebuild the broken file with WeiDU and then play with it...it is fine. In other words, some files contain hidden corruption and NI will discover it instantly if you try to play with that file.

 

Note...I keep starting over: BG has a billion flaws when an anal one such as me gets in there and looks around at the files. For example, some of the books don't have any weight (s/b 2 pounds) and I can't believe nobody has ever noticed this: the Scimitar +5, Defender is NOT a +5 weapon...it is a +3 {what the heck everyone.} :)

Link to comment
If you are modifying standard game files, use WeiDU. If you are creating a new file, use whatever you prefer.

 

In the case of a custom item that a character can use, does this mean it would be better to set it up in a .tp2, instead of exporting a copy of an existing .itm and editing the copy with NI (or other editor; I use NI as the example because that's the only tool that works on a Mac to edit IE game files)? Maybe some examples to illustrate this might help...

 

Thanks,

Eric

Link to comment
If you are modifying standard game files, use WeiDU. If you are creating a new file, use whatever you prefer.

 

In the case of a custom item that a character can use, does this mean it would be better to set it up in a .tp2, instead of exporting a copy of an existing .itm and editing the copy with NI (or other editor; I use NI as the example because that's the only tool that works on a Mac to edit IE game files)? Maybe some examples to illustrate this might help...

 

Thanks,

Eric

It depends on your priorities and goals. Say you are making armour and you want it to fit in with all the other suits of armour. In that case you're, in most cases, better off creating the armour with WeiDU during installation, because maybe the user has e.g. Full Plate & Packing Steel installed. If you want the armour to be just so, you're, in most cases, better off creating it with NI.

Link to comment

Now for some specific examples...

 

My mod NPC has a custom amulet that's unremovable. It gives her an AC bonus, as well as a bonus to hit and to damage vs. lycanthropes.

 

Her belt gives the wearer a bonus to AC and to STR while worn.

 

Her upgradeable scimitar (+2 -> +3; -> +5 in ToB) is enchanted to do extra damage to lycanthropes, to cause bleeding wounds with every hit vs. every opponent susceptible to bleeding wounds, and temporarily suppresses regeneration in opponents struck who have that ability. Some of the amounts and durations of effects are different for each version of the weapon.

 

I created each of these as .itm files, using a vanilla .itm file for each, and my .tp2 has the WeiDU coding for displaying the fact that a bleeding character is, in fact, bleeding. The only item I haven't checked for in a test game is the belt.

 

Would there be any advantage to writing any or all of these using WeiDU code in my .tp2? If so, I'd like to do it that way, thereby reducing the number of files in the mod package and enjoying greater stability. Such things as opcodes and VAR expressions are currently beyond my experience as a modder, so I'll prevail upon the fine folks here for assistance when the time is right.

 

Thanks,

Eric

Link to comment

What about a mod npc's .cre file? I'm looking at these from various mods, and I'm curious as to what character details are best added via WeiDU in the .tp2, rather than being assigned in the .cre file with an editor such as NI. In Meleryn's case, I have her gear assignments set up in the .tp2, and of course that's where her kit is defined and assigned to her. Looking now at Angelo's .cre, I notice that his portraits and scripts are assigned in the .tp2, just to name a couple details.

 

Some might say "do whichever you prefer," but I'm addressing this issue here because I don't have enough experience to have a preference yet. :)

 

Please help me to nail this stuff down. Based on the experience I do have, I feel that the more I can assign via .tp2, the better off my mod will be.

 

Thanks and best wishes,

Eric

Link to comment

Just copy your files. There's no advantage to "patching" in an item that only your character will have; same with the character that you're placing.

 

In general, patch only if there's some reason you can think of for the source to exist and/or differ from what you would copy (or if it's faster for you than to use NI). If something you copy turns into an issue at some point down the road, you can revisit the decision then.

 

For everything you've mentioned so far, there's just no point at all to "create" these resources in the TP2.

Link to comment
Just copy your files. There's no advantage to "patching" in an item that only your character will have; same with the character that you're placing.

 

In general, patch only if there's some reason you can think of for the source to exist and/or differ from what you would copy (or if it's faster for you than to use NI). If something you copy turns into an issue at some point down the road, you can revisit the decision then.

 

For everything you've mentioned so far, there's just no point at all to "create" these resources in the TP2.

 

Fair enough, then; I'll keep the files as they currently exist. The weapons could conceivably be used by just about anyone, and the belt may be worn by anyone of NG alignment. The weapons also have custom colorglow pulses, a different shade for each version, and have tested successfully in-game before.

 

Thanks,

Eric

Link to comment

Yeah, in this case, since there's just the new content, you shouldn't bother trying to come up with code to morph an existing resource to your new item.

 

Now if you have some dynamic options (say the sword could be +2 or +3 depending on components installed or by user choice or whatever), then you'd want to patch or more likely look at a combination of copy and patching. But the static content just doesn't need anything beyond copying it over and adding any new strings with SAY.

 

... the Scimitar +5, Defender is NOT a +5 weapon...it is a +3 {what the heck everyone.}
Note a +bonus Defender weapon is an AC + THAC0 = bonus item (you can choose how to allocate the bonus points); in the case of Drizzt's sword in BG, it's a static AC+2, THAC0+3 weapon (Defender +5), as intended.
Link to comment
Note...I keep starting over: BG has a billion flaws when an anal one such as me gets in there and looks around at the files. For example, some of the books don't have any weight (s/b 2 pounds) and I can't believe nobody has ever noticed this: the Scimitar +5, Defender is NOT a +5 weapon...it is a +3 {what the heck everyone.} :)

 

They have already answered you about Defender. A BG1 Fixpack (alpha version should be available) corrects the problem of the weightless books. It's only compatible with BG1 though, not (Easy)TuTu.

Link to comment

The main advantage of 'distributing' files via WeiDU code is the readability, since you only have to open a single text file, as opposed to endless mouse-clicks and windows in DLTCEP/NI.

This is useful when creating a specific-task library that you may want to use in different mods, and when dealing with a large number of similar files. In the latter case you're better off writing a generating code and feeding it input tables, because making each file manually leads to mistakes, typos and errors.

 

However, going after WeiDU code for the sake of doing it is meaningless, so unless you have enough experience to figure out what suits you better, a mere COPY is preferable.

Link to comment
The main advantage of 'distributing' files via WeiDU code is the readability, since you only have to open a single text file, as opposed to endless mouse-clicks and windows in DLTCEP/NI.

This is useful when creating a specific-task library that you may want to use in different mods, and when dealing with a large number of similar files. In the latter case you're better off writing a generating code and feeding it input tables, because making each file manually leads to mistakes, typos and errors.

 

However, going after WeiDU code for the sake of doing it is meaningless, so unless you have enough experience to figure out what suits you better, a mere COPY is preferable.

 

No doubt the same holds true for creating a custom creature that's based on an existing vanilla .cre file. Well, I'm not doing anything terribly complex with the mod files, really, and I don't want to pick up inefficient habits, so I'll carry on with NI.

 

Thanks!

Eric

Link to comment
The main advantage of 'distributing' files via WeiDU code is the readability, since you only have to open a single text file, as opposed to endless mouse-clicks and windows in DLTCEP/NI.

This is useful when creating a specific-task library that you may want to use in different mods, and when dealing with a large number of similar files. In the latter case you're better off writing a generating code and feeding it input tables, because making each file manually leads to mistakes, typos and errors.

 

However, going after WeiDU code for the sake of doing it is meaningless, so unless you have enough experience to figure out what suits you better, a mere COPY is preferable.

 

No doubt the same holds true for creating a custom creature that's based on an existing vanilla .cre file. Well, I'm not doing anything terribly complex with the mod files, really, and I don't want to pick up inefficient habits, so I'll carry on with NI.

 

Thanks!

Eric

 

It just strikes me as odd that people recommend to do things one way, and when I ask about it, they tell me never mind, do it the way you were doing before, even if that method is known to be unreliable (NI loves to corrupt files, eventually making them unusable in some cases). But I'm not pressing the issue. This is, after all, my first mod :)

 

Might be time to show everything I've got for this mod so far to someone who's willing and able to look it over and let me know what needs fixing, what could be improved (and how), etc. Not sure on that yet...

 

Cheers,

Eric

Link to comment
(NI loves to corrupt files, eventually making them unusable in some cases).
If you can reproduce this, report it with the steps to reproduce on the NI forum on PPG (as devSin requested). I know it happens because I've seen it in other mods (and have heard other modders report it). But I don't know how to reproduce it, because I don't use NI to edit such files, mainly for that very reason.

 

The only time you might want to patch your own .itm files with WeiDU during install is if, for example, a mod like Ashes of Embers is installed that alters the weapon system. That is fairly easy though (I think I've coded this for the weapons in Aurora and Thrown Hammers).

Link to comment

Archived

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

×
×
  • Create New...