HotU - Editing Volkarion

Hello guys.

I’ve been replaying NWN these days, and wanted to alter a few things while playing. Being a C# developer for a living, I thought “okay, fiddling with the editor will be a piece of cake” - oh boy was I wrong.
I spent quite some time trying to do my own research and looking at the tutorials I could put my hands on, but my problem is more about “how to find thing” than about the concepts, and most tutorials do the opposite.
So I gave up and came here for direct advices, as I’m trying to both do a few selective changes, but also get a better overall understanding so I could do other changes by myself later.

As the title shows, my first question is about editing Volkarion, our resident djinni, as I’d like to alter its price cap. But the thing is, its “merchant” reference doesn’t actually HAVE a cap. So I guess it’s defined somewhere else, and that’s where I’m stumped. Can someone point me at where (and possibly how, if it’s trickier than altering a variable/constant) it is ?

More generally, I’d also like to have some advices on how to find things in the editor, as it’s extremely confusing and unintuitive for me. It seems there are few “search” tools in the editor, and their scope is always very restricted (for example, it seems that the “search in files” icon that appears in the conversation editor only search the “general” conversations located in the left tab, and doesn’t look at the ones attached to a creature).

The Volkarion example illustrates my problem too : I could only find the bottle because I remembered where the chest was, and I have no idea where the “unique power” ability it possess is defined, if it’s calling a specific script or what, and if yes which one.

So yeah, any help appreciated ^^

One of the scripts you are looking for is named “x2_genie_store”. It is NOT saved in the HotU modules themselves, but counts as a standard game resource.
You can find and open it by opening a script with the script editor, just make sure “All Resources” is checked.

In the “Events” tab of the Module Properties there’s a slot “OnActivateItem”. The script there handles all special abilities of all special items for a module.
In HotU chapter 2 the script is named “x2_onitemactive”.
Didn’t check for chapters 1 and 3 and whether it’s saved in the module or counts as standard game resource, but you should find it easily enough.

Thanks a lot for these informations.
It doesn’t seem that the price cap is set during this script, but at least it helps understand a bit better how the editor works. I’ll have to dig deeper.

I’m still wondering about how to search for specific entries and also how to edit functions (or at least check the code to know what they exactly do), so if anyone has pointers I’m all ears.

1 Like

The price caps for Vokarions’s store are set in lines 101 (for chapter 1), 136 (for chapter 2) and 253 (for chapter 3) of “x2_genie_store”.

At last for this one :slight_smile:

As Thunderstorm_witch says, the script is a standard game ressource. So select “tools\scripteditor” → open script → mark “all ressources” (lower left) and open then mentioned script.

Within the script, find “SetStoreMaxBuyPrice” in the lines listed above. Doubleclick the function name in the script to get a brief description. Save your changes.

The modified version is now part of the module, and has a higher priority as the standard ressource. On the downside, you’ll have to repeat the procedure for every single module of the campaign.

Edit: the genie will pay only 25% for the stuff he buys. This is a very bad rate …

1 Like

Thanks a lot for you help, everyone :slight_smile:
Managed to make the changes I wanted, and I think I get the toolset better now. It’s still a pain to find anything in it with the barebone search tools.