unknown sysFindObj criteria

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

sysFindObj seems to have some unknown criteria and I was wondering if anyone was willing to find what they mean.
Z
V
Crying is not a proper retort!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Z = exclude the player
V = include virtual objects (e.g., in St. Kats there is a virtual object that holds all the items of the arcology. The arcology itself is made up of multiple objects, but docking with any one of them redirects to the single virual object).
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

how do the redirecting to the virtual object work?
Also I notice the * criteria when used with objGetItems includes virtual items now is there a way to filter them out?
Crying is not a proper retort!
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Most interesting...

It would seem that this Event has something to do with it, but I am not certain

Code: Select all

<OnDockObjAdj>
	(if (not (objIsAbandoned gSource))
		(sysFindObject Nil "TNV +stKatsArcology;")
		Nil
	)
</OnDockObjAdj>
It is certainly not an event i have seen before. The Arcology station holding the items registers for events with all other arcology stations, but i can't see it being used for anything but the OnObjDestroyed... all very mysterious, and intriguing .]
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Very intriguing...

A new hardcoded event?
It seems each segment inherits from the virtual base arcology containing

Code: Select all

<OnDockObjAdj> 
   (if (not (objIsAbandoned gSource)) 
      (sysFindObject Nil "TNV +stKatsArcology;") 
      Nil 
   ) 
</OnDockObjAdj>
which seems to be tied to

Code: Select all

attributes=			"dockObj,stKatsArcology"
which is in the main virtual station that defines the dockscreen, trade data, static data etc.
Can we assume that <OnDockObjAdj> will redirect to a station it is registered with and has a dockObj attribute?
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

<OnDockObj> is a general-purpose event sent when the player docks with an object. The event can return another object to redirect the docking object (or Nil if no redirection is desired).

In St. Kat's case, because the arcology is composed of multiple objects, I need to use <OnDockObj> to redirect to the single virtual station no matter which arcology segment the player docks with.
User avatar
Aeonic
Militia Commander
Militia Commander
Posts: 469
Joined: Sun Jun 14, 2009 1:05 am
Location: Designing his dream ship.

george moromisato wrote:In St. Kat's case, because the arcology is composed of multiple objects.
Gah, now I have to go blow it up and see what happens.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.
Image
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

george moromisato wrote:<OnDockObj> is a general-purpose event sent when the player docks with an object. The event can return another object to redirect the docking object (or Nil if no redirection is desired).
That is a very nice event, but I assume it is a typo you made when you write <OnDockObj> and not <OnDockObjAdj>. Or is that another event?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

alterecco wrote:
george moromisato wrote:<OnDockObj> is a general-purpose event sent when the player docks with an object. The event can return another object to redirect the docking object (or Nil if no redirection is desired).
That is a very nice event, but I assume it is a typo you made when you write <OnDockObj> and not <OnDockObjAdj>. Or is that another event?
Oops--sorry, yes, a typo. Should be <OnDockObjAdj>
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

ok ;)

Thanks
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

This question is partially related to sysFindObj but more specifically to criteria in general.

When using criteria in a dockscreen's listOptions or in the (scrSetListFilter screen gShowCriteria) function are we bound to the categories and modifiers (eg "NIw +Makayev;") or is there a way to use (filter ...) or another function to manipulate the list of objects/items?

is there a global variable we have access to inside the initailize element of a dockscreen where the screen's item List is stored that we can manipulate?
Something in a dockscreen like this:

Code: Select all

<Panes>
<Default>
<Initialize>
    (block Nil
        (setq gList (filter gList theItem 
            (and (not (itmIsKnown theItem)) (leq (itmGetLevel theItem) 5)))
            )
        )
</Initialize>
....
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Yes, (scrSetListFilter ...) takes a function as its last argument.

For example:

Code: Select all

(setq myCriteria (lambda (theItem)
   (eq (itmGetLevel theItem) 7)
   ))

(scrSetListFilter gScreen myCriteria)
Look at dsExchangeBuy for an example.
Post Reply