itempicker ListOptions query

Freeform discussion about anything related to modding Transcendence.
Post Reply
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 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?
Stupid code. Do what I want, not what I typed in!
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

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>
Stupid code. Do what I want, not what I typed in!
Post Reply