In the Loyal Fleet Settlements mod the stations offer system and military map ROMs to the player (maximum of 2 each). The desired result is to show a list of map ROMs which are all identified which the player can select from. Easily done in previous versions.

Using (scrSetProperty gScreen 'showActualItem True) in <OnDisplayInit> identifies them but multiple ROMs don't stack. They appear as separate identical items. For info, this only works in <OnDisplayInit>.

If there isn't currently a way to easily set all unknown types for an item to identified can this feature be added please? Or if it is possible add the code/method to the API 45 topic? Thanks.

george moromisato 15 Oct 2019:

Ignore this. Didn't ready the original closely.

Would using showActualItem: True help? That's how Auton dealers show all autons (without actually identifying). Look at the code that the auton dealer uses.

Basically, you can use (scrSetProperty gScreen 'showActualItem) to force a listbox to show identified versions of the item.

george moromisato 15 Oct 2019:

In 1.9 Alpha 2 I added a new item property: unknownTypeIndex

(objSetItemProperty gSource theItem 'unknownTypeIndex 0)

You can use it on an item to set it to a specific unknown item type.

dsRPGCommoditiesExchangeBuy will automatically reset the unknown item type index so that unknown items stack together. [Make sure your station has a property called rpg.showActualItem set to True.]

relanat 11 Nov 2019:

Awesome. The Fleet settlements mod is working fine now.

Reopened because I was also looking for a code solution to permanently identify all of the unknown types for a particular type.
Something like:

(itmSetKnown item/type 'all True)
or possibly more intuitively
(typSetKnown unid True)
or
(typSetProperty unid 'allKnown True)

This would identify every unknown type for that particular type regardless of whether an item was present or not.
Very handy in godmods.

This code will eventually identify all types but it has to be run 5 to 8 times to ID everything.

(enum (itmGetTypes '*) listEntry (itmSetKnown listEntry True))

I think (guessing) the engine is selecting an unknown type randomly for ~itmSetKnown~~ and identifying it. Running that code again has the chance of selecting the same unknown type again even though it has already been identified. So it can take a couple of goes for each unknown type before all are known.

Or possibly some way of listing the unknown types for a type so they can be 'enum'ed to 'known would work.

george moromisato 11 Nov 2019:

I'll add a property as you suggest.

george moromisato 12 Nov 2019:

Fixed in 1.9 Alpha 3.

Both of these set all unknown types for the given UNID.

(typSetProperty unid 'known True/Nil)
(itmSetProperty unid 'known True/Nil)