NPC Ships In-Game?
- Aeonic
- Militia Commander
- Posts: 469
- Joined: Sun Jun 14, 2009 1:05 am
- Location: Designing his dream ship.
What exactly do you have to do to get newly created friendly or enemy ships to show up in the game? I'd be much more inclined to make them if I knew how to get them to show up.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.


- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Well ships are generally associated with stations so you need to have a station for it to belong too. There are many you can overwrite and just add your ship to its ships. Then all you would have to do is play the game and find the station and you will see if it worked. (if you make it random you might have to find more than one of those stations)
You can also create ships from in script using sysCreateShip.
You can also create ships from in script using sysCreateShip.
Crying is not a proper retort!
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
For scripted appearance ships (ie, missions), yes, you need an event to trigger (such as onCreate, onDestroy, or onInvoke, (for things like autons)).
However, for ships that appear around stations, you can simply add your ship to that stations:
<Ships>
<Reinforcements>
<Encounters>
However, for ships that appear around stations, you can simply add your ship to that stations:
<Ships>
<Reinforcements>
<Encounters>
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
- Aeonic
- Militia Commander
- Posts: 469
- Joined: Sun Jun 14, 2009 1:05 am
- Location: Designing his dream ship.
What about things like raider platforms or scavengers?? How do those work?
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.


- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
You can see how both work in the "encountersVol01.xml" file: the raider platforms/ranx dreadnoughts/tripoli's are all given the order="wander"Aeonic wrote:What about things like raider platforms or scavengers?? How do those work?
The scavenger is given the order="scavenge"
List of ship orders:
traderoute
scavenge
wander
patrol (+ patrol radius) (+ target, not for stations)
guard (+ target, not for stations)
gateonthreat
escort (NOT for stations) (+ target)
gate (kinda dumb to use with stations, since they will gate out immediately)
wait (not really useful with stations, as they sit in the gate)
attack (+ target, unless used at a station, in which case it auto-defaults to the player's ship as the target)
dock (+ target) (I am not sure it works with stations)
loot (+ target) (I am not sure it works with stations)
When I say something may/maynot work with a station, I mean in its ships/reinforcements/encounters tabs, NOT its events, as you can use any of these in the event scripts.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
If you just want to test them out to try installing something like this on the ship you use for testing,
you will have to install it as a device and change scRanxDreadnought with the unid of the ship you want to test, and then you can spawn as many as you want as wingmen!
Code: Select all
<ItemType UNID="&itHangar;"
name= "MiniFighter Hangar"
level= "2"
value= "2000"
mass= "5000"
frequency= "uncommon"
numberAppearing= "1"
modifiers= "MajorItem; Auton"
description= "This is a hangar bay for fighters."
sortName= "hangar"
>
<Image imageID="&rsItems1;" imageX="96" imageY="192" imageWidth="96" imageHeight="96"/>
<CargoHoldDevice
cargoSpace= "100"
/>
<Invoke key="L" installedOnly="true">
(block Nil
(setq ftr (sysCreateShip
;; change this to the ship UNID you want to test
&scRanxDreadnought;
gSource &svPlayer; "Fleet"))
(shpOrderEscort ftr gPlayerShip (random 10-20))
)
</Invoke>
</ItemType>
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!
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!
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
yes, it can do that.schilcote wrote:Also, the GOD mod can spawn ships I think.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
- Periculi
- Fleet Officer
- Posts: 1282
- Joined: Sat Oct 13, 2007 7:48 pm
- Location: Necroposting in a forum near you
They work just like every other ship in the game, but sometimes the 'station' that is in charge of the spawns is actually disguised as something else. You can have an asteroid spawning ships if you like.Aeonic wrote:What about things like raider platforms or scavengers?? How do those work?
You aren't restricted to having a ship spawn from a station, either. You can add them to the game with script, if you want to.
The stations are simply the easiest mechanism to get ships to spawn in star systems without scripting them.
The only real oddball in the mix is the CSC which is a special ship-station hybrid combination that requires both elements to function correctly.
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
Well the CSC is not that difficult really: it's basically a ship spawned by an encounter, and you could essentially equate it with a really advanced version of the mule, xml-wise.Periculi wrote:They work just like every other ship in the game, but sometimes the 'station' that is in charge of the spawns is actually disguised as something else. You can have an asteroid spawning ships if you like.Aeonic wrote:What about things like raider platforms or scavengers?? How do those work?
You aren't restricted to having a ship spawn from a station, either. You can add them to the game with script, if you want to.
The stations are simply the easiest mechanism to get ships to spawn in star systems without scripting them.
The only real oddball in the mix is the CSC which is a special ship-station hybrid combination that requires both elements to function correctly.
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>