Planetary "systems"

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Ok guys, here it is: a quite basic, completely minimalistic but working example of planetary "systems".

To get it to work, however, certain changes must be made to Transcendence.xml, apart from downloading and putting this .xml to Extensions folder.

First, every SystemType which contains planets with their own subsystems, must have a <Marker objName="PlanetEntry"/> added immediatelly after the definition of the star. In my example, I turned Morgana into a planet with a subsystem. So I added the above marker right here

Code: Select all

   <Station type="&stG-TypeStar;" name="Epsilon Eridani"/>

   <Marker objName="PlanetEntry"/>   <!-- add marker here -->
Next, we need to add the planetary <SystemType> and the corresponding <Node> inside <SystemTypes> and <StarSystemTopology>, respectively (sadly, I can't do it inside an Extension - except if I c&p the entire <SystemTypes> and <StarSystemTopology> ... ). We also need to add UNIDs for those new entities.

So, to the doctype section we need to add:

Code: Select all

   <!ENTITY stCrateredPlanetO		"0xD10A03A1">
	
   <!ENTITY stCrateredPlanetI		"0xD10A03C1">
   <!ENTITY stExitDummy			"0xD10A03C2">
	
   <!ENTITY ssCrateredPlanetSys	"0xD10A03E1">
Inside the <SystemTypes> we need the following quite minimal planetary "system":

Code: Select all

<SystemType UNID="&ssCrateredPlanetSys;">

   <SystemGroup>

      <!-- Planet -->

      <Station type="&stCrateredPlanetI;" name="Morgana"/>
			
      <Orbitals count="8" distance="600" scale="light-second" angle="equidistant">
         <Marker objName="Start1"/>
         <Marker objName="Start2"/>
         <Marker objName="Start3"/>
         <Marker objName="Start4"/>
         <Marker objName="Start5"/>
         <Marker objName="Start6"/>
         <Marker objName="Start7"/>
         <Marker objName="Start8"/>
      </Orbitals>
			
      <Orbitals distance="900" scale="light-second" angle="random">
         <Group>
            <Station type="&stExitDummy;" showOrbit="true"/>
         </Group>
      </Orbitals>
   </SystemGroup>
</SystemType>
And inside <StarSystemTopology>, we need the following node definition:

Code: Select all

   <Node ID="SEM">
      <System name="Morgana"				level="2">
         <System UNID="&ssCrateredPlanetSys;"/>
      </System>
		
      <StarGates>
         <StarGate Name="Inbound" DestID="SE" DestGate="OutboundPlanet"/>
      </StarGates>
   </Node>
It refuses a node which isn't 'connected' somehow to the topology of nodes. So we also need to add <StarGate Name="OutboundPlanet" DestID="SEM" DestGate="Inbound"/> inside the <StarGates> list of Starton Eridani node definition. It doesn't matter that no such stargate exists either in Eridani system or Morgana system; it appears the game just requires those nodes to be connected this way, regardless of the actual stargate stations.

Oh yes, of course, we also need to replace the actual Morgana planet definition inside the Eridani systemtype definition, with our altered planet definition which supports docks and gating inside the Morgana "system":

Code: Select all

<Station type="&stCrateredPlanet;" name="Morgana"/> 

                      |
                      v

<Station type="&stCrateredPlanetO;" name="Morgana"/>
Now if you are lazy to make all these changes I'm going to attach the altered Transcendence.xml with all the neccessary alterations but otherwise unchanged (no other fancy mods etc, just those changes to support Morgana planetary system).

How does it work? It allows you to 'dock' with Morgana planet (easy to make other planets do the same) which then provides an option to 'Enter' planetary orbit, which transports you to the Morgana 'system'. Right now I didn't put anything cool in that system, except the planet itself in the center, and a dummy station far away from it, which draws an 'orbit' designating the distance where the game will automatically transport you back to the Eridani system (as in 'leaving the orbit'). This is done with a recurring event that checks the distance of your ship from the center, every 1 second; and if the distance is greater than the orbit distance, it transports you back. Alternatively, you can dock with the planet in the center of the "system" and use 'Exit orbit' option. Of course, in some real example the entire system would be filled with defensive turrets, fleets of pirate ships and whatnot. I'm going to work on it myself now but I just wanted to share this already with you guys.

Let me know what you think of this. Here it is:
http://rapidshare.com/files/75133103/planets.zip.html
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

You were able to get the game to accept the Topology in an extension, if you placed the entire thing there? I thought it would crash if the topo wasn't in the main trans xml.

To get a node to not need to be connected to the topo you can add rootNode to the node tag: <Node ID="Floats" rootNode="true">

edit- It works quite well. And I really like the idea- this could make planets and larger interplanetary objects have much more impact on the game, and I think we could do some other very interesting effects with the proximity-type gating.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

At the very least gating into a planetary system would prevent you from hiding on top of planets.
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Periculi wrote:You were able to get the game to accept the Topology in an extension, if you placed the entire thing there? I thought it would crash if the topo wasn't in the main trans xml.
I didn't even try, actually. I assumed the problem way that the <SystemType> and <Node> tags are contained within <SystemTypes> and <StarSystemTopology> respectively, so in order to change anything you'd need the entire <SystemTypes> and <StarSystemTopology> in an Extension, but I never actually tried it, didn't seem worth it. So I guess it really doesn't work even if you c&p the entire thing.
Periculi wrote:To get a node to not need to be connected to the topo you can add rootNode to the node tag: <Node ID="Floats" rootNode="true">
I tried that but the game hanged for some reason. True, I didn't even have an outbound stargate at that time... BTW, if you make it a "rootNode" doesn't it make the system a potential starting point of the game? Or how else does the game know where to place your ship at the beginning?

As for the proximity triggers. For making them really smooth they need to be very fast. However, when I made them fire several times a second there was this nasty side effect: when you leave the system and then reenter, the game lags really badly for a few seconds and the harddrive spins like crazy in a very unpleasant way. Guess it's a racing condition or somesuch, that occurs with such fast recurring timer events. Normally the fastest one is 150 frames, charon revenge checks. While I needed events that fire ever 5 frames, or else they wouldn't get called quickly enough and you would fly too close to the planet.

I don't know why it happens though. Think I'm gonna write about it in Bugs forum... edit: or maybe not. I just checked the charon fortress recurring event and it doesn't cause such a lag even if I make it fire every 5 frames. So it perhaps has something to do with the way my event handler was made. ..
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

I tried that but the game hanged for some reason. True, I didn't even have an outbound stargate at that time... BTW, if you make it a "rootNode" doesn't it make the system a potential starting point of the game? Or how else does the game know where to place your ship at the beginning?
The game knows the starting position due to it being stated in the Playership module, where it goes into player info for each of the ships. It points to the Start marker in Eridani from there, and also gives you starting cash and other initial player info.

In that sense, any node with the proper marker could be a starting point.

I am not entirely sure what rootNode is meant to be, but I do know that it allowed me to set up a system of nodes with no stargate tag at all. You may have been crashing the game due to another reason- possibly the gate, if the node has a gate link listed but there isn't a gate made in the star system, it crashes.
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Periculi wrote:I am not entirely sure what rootNode is meant to be, but I do know that it allowed me to set up a system of nodes with no stargate tag at all. You may have been crashing the game due to another reason- possibly the gate, if the node has a gate link listed but there isn't a gate made in the star system, it crashes.
Hmm hmm hmm, for me it was exactly the opposite. BTW I made another version of planetary systems, like you suggested, with a recurring event that checks the distance from the planet, and if you get too close, it automatically transports you to the corresponding planetary system. From there, also, you get automatically transported back, if you go too far away from the planet. It even checks from which side you approached the planet, and then transports you to the appropriate side of the planetary system! That feels awesome.

But about this rootNode thing, see it for yourself. Right now, the things work, even though I have a 'stargate' pointing to the Morgana planetary system, no matter that there is no such stargate in the Eridani system. Also, in the Morgana system node I have this: <StarGate Name="Inbound" DestID="SE" DestGate="OutboundPlanet"/>
- even though no such stargate actually exists in the Morgana system. And things work nonetheless. However, if I make Morgana system 'rootNode=true' and REMOVE this stargate definition, the game refuses to start. Can you look at my Transcendence.xml here and say what I am doing wrong?

http://rapidshare.com/files/75396348/planets.zip.html
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Well, I think it's crashing from the inbound gate- if you had added the StarGate name="OutboundPlanet" which points to the inbound gate of SEM but no gate is there it would crash- making it rootNode="true" won't fix broken incoming links from crashing it. rootNode just allows the node to not be strictly attached to the node network, much as Elysium is floating.

Also, you say that there aren't actual gates in the system that you are using the node to point to? I have had problems with that- where I have a node that calls for a gate but the system type tag doesn't have the gate being placed in the system build it will crash. Extra gates in a system, without node pointers, seem to be fine- they just end up nonfunctional.

It seems like you don't even need the gates, or the node pointer. Couldn't the proximity or docking screen script just use markers for the jumps like the other beacon and stargate mods do?
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Periculi wrote:It seems like you don't even need the gates, or the node pointer. Couldn't the proximity or docking screen script just use markers for the jumps like the other beacon and stargate mods do?
Ok, I tried it, but it still doesn't work. I mean, you are right, the game does start OK when I erase all inbound and outbound Morgana stargates from the topology. BUT, in that case I'm unable to objGateTo that system (it says 'invalid node')! With Elysion it works because it has outbound stargates defined. So I guess a node MUST be connected at least to something else. Didn't your maze topology also have them point to some drain system as well?

So, I don't have real stargates pointing to Morgana system (nor does Morgana have an outbound stargate in it) BUT, I do have those pointers in the topology. They are just dummy pointers to make things work, I don't use them really, I use markers just like in my stargate mod.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

:lol: I added the drain so that the ships could exit the system, I had had the gate pointing to itself- (and I guess I added gates back in to make things work, now that I think about it)- and the gates became traffic jams of ships repeatedly gating out and not going anywhere.
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Periculi wrote::lol: I added the drain so that the ships could exit the system, I had had the gate pointing to itself- (and I guess I added gates back in to make things work, now that I think about it)- and the gates became traffic jams of ships repeatedly gating out and not going anywhere.
Ah. But can you try removing your stargate pointers completely from all nodes in the topology? Will it still work then (with gate objects I mean)?

Like I said, when I try the same I get the message 'invalid node' when I try to objGateTo that system (in the proximity check). Download this modded .xml, and try it yourself :wink:
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Download this modded .xml, and try it yourself
clicky?

I already have the planetary sample.
Ah. But can you try removing your stargate pointers completely from all nodes in the topology? Will it still work then (with gate objects I mean)?
I know that I got the game to load up with no <stargate> tags in the topology, but I must have put the single gate back in to get the game to work with the gate items, or the gates wouldn't be there. I was trying for a formless topology- where you move around in what systems you know of or have access to rather than set paths.
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Periculi wrote:
Download this modded .xml, and try it yourself
clicky?

I already have the planetary sample.
Ah. But can you try removing your stargate pointers completely from all nodes in the topology? Will it still work then (with gate objects I mean)?
I know that I got the game to load up with no <stargate> tags in the topology, but I must have put the single gate back in to get the game to work with the gate items, or the gates wouldn't be there. I was trying for a formless topology- where you move around in what systems you know of or have access to rather than set paths.
thats pretty cool, al though, it would be cooler without the gate effect. :P
Now that could have potential, is that suppposed to be near the planet? orbit? Why not make it bigger? But thats a great start. Exept it says welxome ot the X system.
Image
Image
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Ttech wrote: thats pretty cool, al though, it would be cooler without the gate effect. :P
Yup, I tried giving Nil instead of &efStargateOut, but then it would just hang there for the duration of the effect, and also, it would display &efStargateIn no matter what. Guess it's hardcoded in objGateTo, sadly.

www.askgeorgetosupportit.com :twisted:

A nice invisible (plyGoToSystem node entryPoint) would be great heheheh, no effects, no entry messages.. just get me there plz
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Apemant wrote:
Ttech wrote: thats pretty cool, al though, it would be cooler without the gate effect. :P
Yup, I tried giving Nil instead of &efStargateOut, but then it would just hang there for the duration of the effect, and also, it would display &efStargateIn no matter what. Guess it's hardcoded in objGateTo, sadly.

www.askgeorgetosupportit.com :twisted:

A nice invisible (plyGoToSystem node entryPoint) would be great heheheh, no effects, no entry messages.. just get me there plz

Well, maybe check how the Heratic gate works. Beause ut does not hsow the "Explosion"
Image
Image
Apemant
Commonwealth Pilot
Commonwealth Pilot
Posts: 94
Joined: Mon Dec 03, 2007 12:51 pm

Ttech wrote:Well, maybe check how the Heratic gate works. Beause ut does not hsow the "Explosion"
Which gate, the game ending one? I'm not even sure it doesn't display the effect, and even if it doesn't, it's probably precisely because it's the game ending gate. Can't really use that, now can I? :twisted:
Post Reply