What is the best place to get started at Events?
BTW is there a sysCreateShip function?
Events
- TheLoneWolf
- Militia Captain
- Posts: 802
- Joined: Thu Nov 28, 2013 5:03 pm
- Location: Aboard the CSS Radiant
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
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 ).
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 )
<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..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
-
- Militia Commander
- Posts: 451
- Joined: Sat Jul 25, 2015 11:41 pm
- Location: repairing armor
Here's some stuff on events. Have fun!
digdug's Events docs
https://forums.kronosaur.com/viewtopic. ... nts#p68755
Game life cycle
https://wiki.kronosaur.com/modding/xml/game_lifecycle
Other stuff from the wiki
https://wiki.kronosaur.com/modding/xml/events
http://wiki.kronosaur.com/modding/xml/itemtype#events
Some events with brief descriptions
http://forums.kronosaur.com/viewtopic.p ... ght=events
digdug's Events docs
https://forums.kronosaur.com/viewtopic. ... nts#p68755
Game life cycle
https://wiki.kronosaur.com/modding/xml/game_lifecycle
Other stuff from the wiki
https://wiki.kronosaur.com/modding/xml/events
http://wiki.kronosaur.com/modding/xml/itemtype#events
Some events with brief descriptions
http://forums.kronosaur.com/viewtopic.p ... ght=events
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.
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.
Stupid code. Do what I want, not what I typed in!
- TheLoneWolf
- Militia Captain
- Posts: 802
- Joined: Thu Nov 28, 2013 5:03 pm
- Location: Aboard the CSS Radiant
xD