PDA

View Full Version : The Incompatiblity Problem


tk102
03-26-2004, 08:24 PM
I'd like to address an elephant in the room.

A lot of people want items that invoke spells or special force powers. To do this, it seems to me that we're always going to have tweak spells.2da and/or some pre-existing script file -- making it very difficult if not impossible to share multiple custom items with each other.

The armband flamethrower for example required that I use slot #132 to work. I had originally tried using a different number (like 172) but that didn't work. The 2DA file specification says that the row number must increment normally.

Ideally, a .uti file could be created along with a custom script without having to override any existing .2da or .ncs. Dialogs should also be stored locally of course.

Maybe this is known to most already. It seems worth noting publicly however.

I'd like to ask capable modders to attempt to move in this direction if possible in order to avoid compatibility problems. With focused effort, we should be able to overcome this obstacle.

T7nowhere
03-26-2004, 09:49 PM
Normally when a new uti is made there is no need to alter 2da's. But there are times when as in the case with more complex items that it becomes nessesary.

So how exactly can you use a script instead of altering a 2da :confused:

I don't see haveing mods altering the same 2da to be a real problem If we all work together. If we keep it a constant community project then combinning mods that use the same 2da is easy and after that is done for a few mods the combined 2da's could be a template for new mods.

I just seems to me that combining 2da's is alot easyer than useing scripts.

tk102
03-26-2004, 10:11 PM
Hi T7 --
Let me clarify my meaning by providing an example. Let's say you're creating a new .uti -- and you want that item to have property 10 "Cast Spell" when it is activated. Now you run into the problem of "what spell?" If you create a new spell, then you must alter spells.2da. And that means adding a new one to the bottom of the list. Now suppose you need to modify k_inc_force or k_sup_bands for example so that they handle your new spell -- usually you reference the spell in the script by its index number. So now your custom .ncs is dependent on your custom .2da.

Now you're stuck -- if you want someone else's custom item, you're going to have to modify the .2da and .nss manually and recompile the script in order to get both items to co-exist.

So -- if a .uti can be created that can call a script directly -- without having to go through the spells.2da file -- then there's no problem. Just package the .uti with its custom .ncs file.

But can that be done?

gameunlimited
03-26-2004, 10:25 PM
There is one way that will clear out the problem with the ncs files. You can call a different script in the spells.2da file. It is under the "impactscript" column. For example my newer version force replication. In the spells.2da, it calls to a new script that I made that is unique to that particular force only (namely k_sup_replicate).

This will clear out the problem with having to edit the ncs file. Of course the spells.2da will still be a problem, but at least modifying 2da files are easier than having to mess around with ncs files.

T7nowhere
03-26-2004, 10:33 PM
OH. I see your point. I rember reading a Tutorial on the NWN bioware forum for makeing unique items HERE (http://nwn.bioware.com/forums/viewcodepost.html?post=762605) to make an item use a spell, but the it is module specific.

I was thinking of useing something like this to to have a permamnent FX on an item but I couldn't figure out how I could make it work so I put the idea to the side.

I don't know maybe you could add a new node(CResRef) to the uti to have the script fire onequip or onactivate item. Hmm it could be worth a try.

tk102
03-26-2004, 11:07 PM
gameunlimited - You are absolutely right -- that is exactly how spells.2da should be handled. And yes it is easier to manage spells.2da that way. Plus you can 'decompress' spell.2da from V2.b to V2.0 file format and work with it in a simple text editor. HazardX published a tool that does just that.

T7 -- that is really thinking outside the box! If we could figure out how to buff the uti structure to handle scripts as needed, well ... that solves the whole problem!

Off to the NWN documentation...

tk102
03-26-2004, 11:40 PM
Say, does anybody own NWN? I'm sure there must be an item that casts a spell effect when you equip it for example...

What does the .uti for that item look like in comparison to a typical KotOR .uti?

T7nowhere
03-27-2004, 12:56 AM
I have NWN(well borrowed it from a friend) but I have never played for more than an hour and I never thought to look at the file's. I'll see what I can find.

Commas
03-27-2004, 02:24 AM
i noticed this when i started working on a new force power, and decided instead of starting with the clean spells.2da to use the spells.2da from gameunlimited's replication mod, i added mine in the two slots after the three used by the replication mod, so his were 132-134 so i put mine in slots 135 and 136 in the same 2da.

when i downloaded tk's flamethrower i had to go thru and edit my spells.2da again and manually copy everything from tk's 2da to slot 137 in mine, then i had to change all the scripts and the uti, it worked, but it was tedious

after i did that i planned on just compiling one big 2da that had everything that altered spells.2da so far on this board and post it, so people modding spells.2da have a place to start that wont conflict.

plus, if you say dont want to use a spell in the 2da, you wont need to change it, because you just wont download the scripts and other files, i tested this by uninstalling the replication mod, but leaving the spells.2da that had replication, my force power and tk's flamethrower, and his spell disapeared, but mine and tk's stayed, so you dont have to ahve everything installed, but you can still have everything in the 2da

so if anyone can let me know what uses spells.2da so far i'll get started on that. i already have gameunlimited's replication, and tk's flamethrower, and im pretty sure halowan emporium uses it, but i havent added it yet, i'll be doing that next, so go ahead and post here any other mods already on the board that use spells.2da

tk102
03-27-2004, 02:24 AM
Probably everything in the Events section of NWN Lexicon is suitable in KotOR though not all events will occur with .uti files. It's a good place to look too.

[Edit] And it doesn't appear that .uti files can receive Events. Only creatures, placeables, doors, modules, etc.