itempicker ListOptions query

Freeform discussion about anything related to modding Transcendence.
Post Reply
relanat
Militia Commander
Militia Commander
Posts: 382
Joined: Tue Nov 05, 2013 9:56 am

itempicker ListOptions query

Post by relanat » Thu Dec 08, 2016 3:48 am

Is there a way to get a list of every item in an itempicker list without referring to an object as the source? All the examples I've seen use either dataFrom= "player", "station" or "source" (from what I can work out "source" just means multiple stations). Is there a shortcut which allows all items to be displayed? Something like dataFrom= "universe" or similar?

Ideally something like dataFrom= "universe" list="*a" would be great.

I'm having trouble with custompickers because the items don't always seem to come up as items.
This would make it easier in my GodPlayership to get any item. Or will I have to create a virtual station and fill it with every item and then dock with it and filter for what I want?

Also is customitempicker just an older name for custompicker or is there a difference?

relanat
Militia Commander
Militia Commander
Posts: 382
Joined: Tue Nov 05, 2013 9:56 am

Re: itempicker ListOptions query

Post by relanat » Thu Jun 22, 2017 5:04 pm

A way of doing this.

Create a virtual station which has an inventory of one of every item using this code.

Code: Select all

<StationType UNID="&stAllItemsVirtualStation;"
		virtual=	"true"
		>

	<Events>
		<OnCreate>
			(block Nil
				(setq allList (itmEnumTypes "*" list (objAddItem gSource list 1)))
			)
		</OnCreate>
	</Events>
</StationType>

And in the dockscreen where you want the items to appear (in this case devices that aren't weapons or shields) have the list options set as this:

Code: Select all

<ListOptions
	dataFrom=	"=(setq nonStation (sysCreateStation &stAllItemsVirtualStation; Nil))"
	list=		"*"
	>
	(scrSetListFilter gScreen "d ~ws")
</ListOptions>

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests