Displaying Item Cost


Is there a way to alter the examine window so that the specific item costs of an item are displayed when you examine it?

I think it would be a great improvement to know which loot is worth to be grabbed.

Thanks for any hints and tips on this!

I don’t know unfortunately, but if anyone could answer this I bet it would be @Lance_Botelle. He’s the master of xml coding around here.



If setup correctly, item values vary according to each vendor you may try to sell to. Therefore, while it may be possible to add a generic price that might be “offered” if sold, it would unlikely be the actual selling price. That is, PCs with a good appraise skill who have a favourable trade with vendors may be offered more than one who has a less favourable reaction.

In my own campaign, I decided to add the base value of some items in their descriptions - gems for example. However, as I say above, just because this may be what the gem is “worth”, that does not mean that is what the PC will get for it due to different vendors offering different values. (But, you can add any value you want to the description if you wanted to and that would then show on its examine.)

There is also the potential added point that plot items will always report zero worth, even if the builder actually has a conversation setup that may offer more for the PC for that particular item.

Basically, an item is only worth as much is someone is prepared to pay for it. :slight_smile:

P.S. In case you did not know: you see what the item is worth to the vendor when you hover over it.


Thank you both @Lance_Botelle and @andgalf!

I am aware that the price a vendor offers will differ from an item‘s base cost, but I think it would be most helpful to have the base cost included in the examine window. E.g, if you loot both a small totem and a very heavy golden armor it would be nice to see whether the light totem is maybe way more valuable than the heavy armor, especially if your character is already loaded up with loot.

So I was wondering what specific line one would have to add to the existing examine-XML to display the base cost of an item?

Thanks again!

There should be a strong role for the Appraise skill in revealing an item’s base cost. Otherwise, what’s the point of putting skill points into Appraise?


And that’s after you pass the Lore skill check.

1 Like

Sorry, I’m actually specialized for NWN1, but this makes me curious. There is an xml? Xml is actually no script, so I don’t think it’s possible to add something to the displayed content on runtime.

But I would like to have a look on it. Where can I find it (I’ve NWN2 installed).

Btw. I can think of displaying the base value of an item in the on_acquire event (after a proper lore check …), but within the item description?

You find all the xml files (there are A LOT, since this is what all the gui windows are made of) in the NWN2 Complete\UI folder. I would guess it’s the one called examine.xml.

I don’t know the inns and outs of this, like I said, @Lance_Botelle is the expert, but you can call upon scripts through the xml, and you bring up xml uis through scripting for exmple with the function DisplayGUIScreen.

Lance managed to change a portrait of one of my companions midgame through xml scripting (yes, the player can do this him/herself, but this was done automatically) in a dialogue in my fourth module.

1 Like

Yup, that’s it. Imo, it describes the appearance of the examine window, but there’s no pointer to the text-contents. The definition, which text is to display must be somewhere else, maybe it’s a hardcoded procedure …

Hmmm, adding the base value to the “identified description” of each item should solve the issue :smiley:

1 Like

You can write what text is to be displayed directly in the xml code or in a separate script.

Lance could explain this in more detail.

1 Like

To do that for hundreds of items would take ages :anguished:

And you can also easily add any text to the examine window by changing the xml. All I would need to know is how to display the specific item‘s base cost from the Baseitems.2da …


This can probably be done without requiring an XML edit, as @Mmat says. They are correct that the description can be updated using SetDescription, after getting the item value with GetGoldPieceValue.

There are a couple of caveats, however:

(i) SetDescription does not alter a description, unless it has been examined once already (iirc). (See description of issue here.)

(ii) GetGoldPieceValue will return zero on plot items.

If you would like a scripting tutorial, I have written one for some guidance here: Scripting Tutorial For Beginners (NWN2) | The Neverwinter Vault There is also another link to an XML coding tutorial there too.

That said, I did update my Examine XML to allow some extra description texts to be added to the current description with some homebrew functions. However, it was designed for a specific purpose and involves more explanation to easily put into practice.

Now, this boils down to a gaming issue, in that the PC would never really know if picking up one thing to take is better than another, unless, as @rjshae and @GCoyote say, the PC has developed skills that may give them such knowledge. Therefore, such checks would also need to be in place to ensure such a PC is not just having a “free skill” to adjudicate such decisions.

Again, as an example, in my own campaign, I have a TREASURE find system, which means when a PC picks up an item, they effectively appraise that item upon acquisition, and give feedback to the player as to what the PC believes that item to be worth in accordance to how much it weighs. From this appraisal, the treasure item is given a “value to weight” percentage figure. The player must then decide if carrying this particular item is worth it compared to another treasure item.

For example, is it better to try to carry an item that weighs 200lb worth 200 gp, or four items worth 20 gp each, but weigh only 1lb each? That is, carrying the item worth 200gp would probably overload the PC to carry anything else, and so choosing to carry the four lighter items worth only 20 gp each would probably, practically speaking, be the better option.

If you want to see how this sort of thing is coded, you could download my module, The Scroll, have a play and/or take a look. Warning: You need to know a bit about scripting first - and if you do want to go down the XML path, then you would need to understand a little more about that too.

All the best. :slight_smile:

Sometimes, it requires this to do some things, but I think you could get away without doing so in this case. But, I have had to update many items to do some things. That is another reason why building a module to the way you want it can take a long time. For me, it’s been years.

1 Like

Yes. My remark wasn’t really meant serious …

What I have to offer is my item-id system, which is built-in in any of my modules. It identifies items on acquire (if the PC has the skill) and could be easiely expanded to add some lines to the description.

Warning: this is NWN1 and requires some skills in scripting. And I don’t know if the “which-skill-is-needed-to-identify-an-item-of-value-x” table in NWN2 ist the same.

1 Like

Thank you, @Lance_Botelle and @Mmat for your most helpful feedback.

I’ll have closer look at the „on acquire solution“ to display item costs to the player. Thanks again!

1 Like