Author Topic: More control over item identification?  (Read 1161 times)

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
More control over item identification?
« on: October 05, 2013, 07:40:30 pm »


               Here's the situation...

I've created several book items that I only want to have the full identified description revealed with some event NOT related to Lore skill or paying a merchant to do so.  (The mechanism of identification I'll address at the end because my main problem is in first creating a book item that is not identifiable by normal means.)

Setting the item as "Plot" does not seem to matter.  It still identifies off the Lore rating or from merchant.

In theory, I could set a value on the item that is too high for a Lore skill to identify but that doesn't work for two reasons: 1) book values are impossible (AFAIK) to increase high enough for any PC but one with a very low Lore skill level to identify and 2) merchants won't selectively ID items... either they ID all of them or none of them and value has no relevance. 

I have created a dummy item, in one case an ammy, that contained enough properties to set the value super high and used the description field as if it were text in a book.  That worked okay except for a merchant being able to identify the super high value anyway.  Also, it's pretty lame using an unrelated item as a book that doesn't look like one. ':blink:'

So... assuming one can design a book item unidentifiable by Lore or merchant, can the unidentified/identified switch be changed via script?  I was thinking of either a trigger area or mechanism to reveal the identified description of the item.

I'll entertain any/all suggestions as to an expeditious way to achieve my goal.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
More control over item identification?
« Reply #1 on: October 05, 2013, 08:55:09 pm »


               I working on a system that bypasses the identification system. I made a custom examine feat everyone has and then zero out skillvsitemcost.2da . This allows you run you custom function to do the ID the harder problem is it also is tied into class/race/alignment restriction properties, but that can be scripted around also along with some added custom item properties.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
More control over item identification?
« Reply #2 on: October 05, 2013, 09:02:15 pm »


               Some more info: The lore skill is related to the worth of the item, to stop a store from ID it you could make all store use a Conversation of ID or on open store function and if the pc has the book set the cost to an unreasonable amount.
               
               

               


                     Modifié par ShadowM, 05 octobre 2013 - 08:06 .
                     
                  


            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
More control over item identification?
« Reply #3 on: October 05, 2013, 09:18:43 pm »


               NWScript has the Set/GetIdentified() functions. If you're using NWNX Events, you can also catch the OnExamine event for items, which would be a convenient place to tell if the item should be identified. This way, even if the PC pays a merchant to identify it, you can reset its status whenever they try to examine it.

A more efficient way that doesn't rely on NWNX would be to just make the book identified to begin with, but only use the standard "unidentified" description. Then, when the trigger or whatever is tripped, use SetDescription() to update the book's description to the "identified" version.
               
               

               
            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
More control over item identification?
« Reply #4 on: October 06, 2013, 12:08:07 am »


               @ShadowM: The problem with trying to make a book cost unreasonable is that it can't, at least not by me using just the toolset.  It seems to cap around 33K or so after I assign properties and increase the cost to max, which results in a Lore needed of like 18 which is very low.  But I think you are right about needing to use a custom merchant convo instead of the default merchant dialog.  In that case, I would need to do a check on the "special" book tags in the convo for all merchants so that all other items could be ID'd for a fee just like normal.

Squatting Monk wrote...
NWScript has the Set/GetIdentified() functions. If you're using NWNX Events, you can also catch the OnExamine event for items, which would be a convenient place to tell if the item should be identified. This way, even if the PC pays a merchant to identify it, you can reset its status whenever they try to examine it.

Is this the infamous R-click on items I have been trying to track down? I didn't realize you could suppress the description that normally pops up.

Squatting Monk wrote... 
A more efficient way that doesn't rely on NWNX would be to just make the book identified to begin with, but only use the standard "unidentified" description. Then, when the trigger or whatever is tripped, use SetDescription() to update the book's description to the "identified" version.


I was hoping I didn't need to expand on my special circumstances further, but it is needed to get a viable solution.

I haven't explored NWNX yet, mainly because I am so much a novice scripter learning mainly by trial and error and it seems like I need a lot of downloads and expertise to use the bells and whistles of NWNX effectively.  I may be wrong about that, but that's my impression when I read the Vault descriptions.  However, NWNX functions may be the only way to do what I would like to.  The example you've furnished looks like it would help accomplish this.

So... to clarify further in detail then...

I am using a language barrier theme in this project.  The unidentified description will be written in one of several different race jargons like orcish, elvish, dwarven, gnomish, etc.  Characters using the same racial type as the language in the unidentified state will automatically be able to "translate" into common tongue without an interpreter.  The translated, common tongue version will appear only in the identified state.  In this scenario, humans would be at a significant disadvantage overall since their culture uses the common tongue openly.  I haven't decided how to handle halflings, half-elf or half-orc yet but that really doesn't enter into setting up a reliable mechanism to do the translations.  Naturally, documents written in the common tongue will exist only in the identified state since no translation is needed.  

That's the crux of the overall picture.
               
               

               


                     Modifié par HipMaestro, 05 octobre 2013 - 11:12 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
More control over item identification?
« Reply #5 on: October 06, 2013, 12:39:29 am »


               I once thought about writing a system that did the same thing.   I never got out of the planning stages though.   It did not include having the book identified though.  My basic Idea was to just change the description of the book, as Monk suggested, if the PC could read it.  The one catch would be that the PC would have to have the book in there possession in order to read it.   The text if view while the book was on the ground would always bee the foreign language.   The OnAquire/UnAquire  Events on the book could be used to change the discription of the book every time it was picked up/dropped/traded.  This way one Identification of the book by one player would not let another player read it unless they knew the language.    


Other notes:  I was planning on placing the common version of the description as a local string on the book and using the DMFI language functions to set the description to the foreign language versions.
               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
More control over item identification?
« Reply #6 on: October 06, 2013, 12:39:34 am »


               

HipMaestro wrote...

So... to clarify further in detail then...

I am using a language barrier theme in this project.  The unidentified description will be written in one of several different race jargons like orcish, elvish, dwarven, gnomish, etc.  Characters using the same racial type as the language in the unidentified state will automatically be able to "translate" into common tongue without an interpreter.  The translated, common tongue version will appear only in the identified state.  In this scenario, humans would be at a significant disadvantage overall since their culture uses the common tongue openly.  I haven't decided how to handle halflings, half-elf or half-orc yet but that really doesn't enter into setting up a reliable mechanism to do the translations.  Naturally, documents written in the common tongue will exist only in the identified state since no translation is needed.  

That's the crux of the overall picture.


If you really want the blue unidentified look how about something like this...

on acquire you set the description and identified bit as needed, depending on the acquirer's ability to read it.
So for a non-reader, unidentified you have a description that says this is all gibberish to you.  And an identified description which says "this looks like Elvish, too bad I can't read it" or some such.

The you can allow merchants and lore to "identify" the language as normal, but not translate it. And have your
onacquire (for an Elf in this case) or other translation mechanism replace the descritpion with the real text.

You do have to script the translation outside of the identifiied state, which you seem to be trying to avoid,
but I think it adds depth. 
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
More control over item identification?
« Reply #7 on: October 06, 2013, 12:47:37 am »


               For items that are to be read, and are in different languages I think it is best to have the contents in data rather than in the description of the book. Give all books a custom on used property called "Read". This property launches a script that accesses the contents of the book from data ("data" could be a local string or from a database), before the string is given to the PC language is checked, and either run through a cypher or given in readible format. You could give this as a message sent to the PC, or you could deliver it in a conversation that they step through.

The basic idea however stands. Store the book in data, and use one script for retrieving.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
More control over item identification?
« Reply #8 on: October 06, 2013, 01:51:12 am »


               I was not talking about making the book cost more I was talking about changing the store ID cost with SetStoreIdentifyCost function. With the examine system you have to have my system in place where it removes the standard examine function, which will make you use the custom examine function because the standard will not ID any item no matter the pc lore skill level. With the custom one you could set any way you want the items to be ID. If you using NWNX then monk idea is best. I love everyones ideas though very interesting to read. '<img'>
               
               

               


                     Modifié par ShadowM, 06 octobre 2013 - 12:56 .
                     
                  


            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
More control over item identification?
« Reply #9 on: October 07, 2013, 04:14:28 pm »


               It seems, like ShadowM has devised, a custom OnExamine is needed to produce what I would like so NWNX is my next stop.  I am sure it will be an adventure for a novice like myself but if it broadens functionality it may solve several other unrelated issues as well.

I believe it is important to keep both translated and untranslated text versions on a single object, if possible.  That way it just becomes a matter of using a single function to toggle the state.  I prefer that the information be presented as text in a book (or note) item rather than as journal entries, game log echoes or some other message display mainly because I envision some rather lengthy text strings which will be rather tedious to manage via DB and annoying to be obliterating the screen with volumes of text.   There is some authenticity associated with the storage of text within a static object like a book or note.  I prefer not to use a variable to track the object state and feel swapping two item versions would become unnecessarily tedious.  The ID'd vs. UnID'd item state of a book item just seems a natural to me for this application.

I expect there will be at least several of this kind of book item, perhaps over 20 of them, to maintain their ID status. 

Not that it is necessary, but I think an item tag naming convention like elf_book00n or dwf_book00n would be helpful to establish the race bias and applicable language for each item and therefore easily determine how each character can interface with the text contained within a single object.

I don't see a major problem with merchant IDing the controlled items since a convo should take of that by checking against the list of potential books to be translated and suppress the ID function entirely for those items.  At least it SEEMS easy to control that issue.  We'll see.

The key/first hurdle is the item itself just laying unID'd either on the ground or within a container and able to be ID'd via default examine without placing in inventory, a common practice.  In that situation the OnAquire event won't fire although the OnUnaquire event would be a good one to customize since, once procured, it could be passed on to other players or dropped randomly in the ID'd state.  In that situation, it would be better to reset to UnID'd at that point and allow the cycle of race determination to begin anew for each new potential examiner.  Theoretically, two or more players could attempt to examine it at the same time though I am not aware of how the game sychronizes such actions.

I may start a new topic in the scripting subforum as I begin to experiment with NWNX since I anticipated that this issue could be solved via the toolset which it cannot be.  

Thanks to all who have contributed thus far with perspectives that will factor into the solution.
               
               

               
            

Legacy_MrZork

  • Hero Member
  • *****
  • Posts: 1643
  • Karma: +0/-0
More control over item identification?
« Reply #10 on: October 07, 2013, 06:57:47 pm »


               Unfortunately, for your purposes, there is an easy way around having two (or more) store-opening conversations for each merchant, with one allowing the store's ID-for-fee function and another not allowing it. The PC can simply drop the item (or give it to another toon) when talking to the merchant to open the store and then retrieve the item (without closing the store) once the store is open and the ID-for-fee function is available.

BTW, are you using CEP with your module? CEP adds a Value Increase property to the available item properties that should be able to make the value of the item quite high. Even a book with no other properties can have a value well over 5 million gold with Value Increase +50 and, as far as I can tell, that property can be added more than once.

It would seem that the OnUnAcquireItem and OnAcquireItem events should serve your purpose for making sure an item isn't IDed by one toon and then passed around. Even putting an item in the barter window triggers the event. The issue with getting merchants to ID mentioned above is still a problem. However, it may be possible to trigger an action (empty convo or something?) that closes the merchant inventory when the item is acquired. That way, there would be no way to have the ID-for-fee merchant window open while possessing the item.
               
               

               
            

Legacy_rogueknight333

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +0/-0
More control over item identification?
« Reply #11 on: October 07, 2013, 08:16:28 pm »


               

HipMaestro wrote...

I am using a language barrier theme in this project.  The unidentified description will be written in one of several different race jargons like orcish, elvish, dwarven, gnomish, etc.  Characters using the same racial type as the language in the unidentified state will automatically be able to "translate" into common tongue without an interpreter.  The translated, common tongue version will appear only in the identified state...


Maybe I have missed something, but it appears everyone is overlooking a very simple way to achieve this basic effect. Just make a book with a unique power that when used starts a conversation, and place the contents of the book into the conversation rather than the description. Within a conversation it would be quite easy to provide a race-specific translation option with only the most basic of scripting.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
More control over item identification?
« Reply #12 on: October 07, 2013, 08:47:13 pm »


               

rogueknight333 wrote...

HipMaestro wrote...

I am using a language barrier theme in this project.  The unidentified description will be written in one of several different race jargons like orcish, elvish, dwarven, gnomish, etc.  Characters using the same racial type as the language in the unidentified state will automatically be able to "translate" into common tongue without an interpreter.  The translated, common tongue version will appear only in the identified state...


Maybe I have missed something, but it appears everyone is overlooking a very simple way to achieve this basic effect. Just make a book with a unique power that when used starts a conversation, and place the contents of the book into the conversation rather than the description. Within a conversation it would be quite easy to provide a race-specific translation option with only the most basic of scripting.


+1 since I proposed this above.
               
               

               
            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
More control over item identification?
« Reply #13 on: October 08, 2013, 12:22:18 am »


               I think I'm suffering from tunnel vision on this one, so NO, rogueknight, you are not missing something... I am.

I really wanted to use the book as a book with pages rather than redirecting the output to convo screen or game log but as you and henesua have suggested, it's probably the most direct and easiest way to achieve the translation control I desire.  Then I wouldn't have to deal with the ID's/non ID'd state at all and all the pitfalls of trying to keep the state of the book adjusted for all possible contingencies... like the one MrZork pointed out with the merchant IDing.

And no, MrZork... no CEP is being used with this content at this point.

I also realized that NWNX requires the extender to be running on the server to use its functionality so that means single player is out.  Most likely, this content will be used for LAN gaming but I would like to keep it also in SP format if possible.

Too bad using the ID-toggle creates so many problems that need custom solutions to control but it does. I am fairly good scripting convo qualifiers and have been using them already in NPC-to-PC racial interactions.  Actually, the NPC interpreters wre the first race/language-specific objects I created.  So now I need to change an item into an interpreter via added property.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
More control over item identification?
« Reply #14 on: October 13, 2013, 07:08:36 pm »


               Ok finished overriding the hard-coded ID system to run through my custom examine system. Can now control it with custom functions.I made some custom openstore, closestore scripts to handle that also. I had to also put in custom functions for UMD.  I mainly wanted the system for handling artifacts which cannot be ID without finish a quest to open up their secrets and ignore UMD. Ohh and fixed the bug where they could hand off or pick up the item after the store was opened. HipMaestro I hope you get your system working for your module '<img'>
               
               

               


                     Modifié par ShadowM, 13 octobre 2013 - 06:09 .