Events

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
TheLoneWolf
Militia Captain
Militia Captain
Posts: 799
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

Wed Apr 13, 2016 8:58 am

What is the best place to get started at Events?

BTW is there a sysCreateShip function?

shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1392
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska

Wed Apr 13, 2016 10:33 am

well, to be a Party Planner the first thing you need is Imagination. You would be surprised at how many people actually do not have an Imagination, but good thing for you that you have all of us to attempt to inspire you with Insane things :)

<Events> can be anything you want </Events>
Here is a piece out of Midst of Dragons where I replace a ship with alternative ships depending on a Player's choices in a dockscreen. The event of calling out the new ship also has the "ObjFireEvent" that causes the original ship to 'gate leaving the Player with just the designated ship to Dock with later.

However, I did not come up with the Events ( beyond the <OnCreate> until I was into the dockscreen and decided on what I wanted as I was building the interaction text between the Player and Characters )

So if you are not sure about exactly what you want in an <Event> at your starting point, it's fine - you can always add it later, like I did by simply making the <Event> and having the "objFireEvent" added into the dock screen someplace useful ( usually before the Player will exit the screen ).

You will notice the First <Event> tells the ship to destroy itself if it's not in St. Katherine's Star, this is useful If the ship and station are not explicitly set to only spawn in one place - I often re-use the same station to place ships in different places, the ships I don't want running around are set to look for their designated system - Also it prevents the ship from showing up in the Intro Battle Screen that plays all the listed ships in the game against each other ( especially if the ship is Unarmed ).
<Events>

<OnCreate>
(block Nil
;if not where we belong we go bye
(if (not
(eq (sysGetNode) 'SK)
)
(objDestroy gSource)
)
; otherwise we are in metropolis so we hold
(shpOrder gSource 'hold)
)
</OnCreate>

<PilotShip>
(block (newShip)
; Replace the ship with the second one
(setq newShip
(sysCreateShip &scPilotShip;
gSource
&svIndependentTrader;)
)
(shpOrder newShip "Hold")

(objFireEvent gSource "FireGate")
)

</PilotShip>

<FireGate>
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'gate)
)
</FireGate>

<PilotShipTwo>
(block (newShip)
; Replace the ship with the second one
(setq newShip
(sysCreateShip &scTugBoatShip;
gSource
&svIndependentTrader;)
)
(shpOrder newShip "Hold")

(objFireEvent gSource "FireGate")
)
</PilotShipTwo>

</Events>


A Second Example, not as long as the first, is where I have a Ship simply spawn out of the Original and the Original is quietly destroyed ( because the Player would be close by the ship and you don't want a mission ship to gate in plain sight - it would freak out the Player )
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Wed Apr 13, 2016 11:23 am


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

Tue Apr 19, 2016 3:54 am

Re: does a function exist?

Download the Avian Enterprises-Utility pack by AP.

Use the Function Help mod which is one of six.

This generates a list of all the functions in the game.

Convert the output into a text file.

I've found it invaluable when modding.

User avatar
TheLoneWolf
Militia Captain
Militia Captain
Posts: 799
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

Tue Apr 19, 2016 9:33 am

xD

Post Reply