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.
P.S. In case you did not know: you see what the item is worth to the vendor when you hover over it.
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?
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?
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.
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
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.
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.
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.
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.