Adventure Extensions Introduction (basic)

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1259
Joined: Sat Oct 13, 2007 7:48 pm
Location: By the beach

Thu Aug 28, 2008 7:43 am

I did a test to see if attributes for systems could be added in a system table and that works fine, and you can put everything else in there too:

Code: Select all

         <System>
		<Table>
            <System chance="50" name="test1" UNID="&ssEarthSpaceStandard;" attributes="alphaModel, Eridanus, newBeyond" level="1"/>
            <System chance="50" name="test2" UNID="&ssEarthSpaceAsteroids;" attributes="betaModel, Eridanus, newBeyond" level="3"/>
		</Table>

         </System>
This makes the test node have 2 possible systems- test1 or test2. They each have own name, UNID, attributes, and level. The table sets one of the 2 choices to be the real system that gets placed when the topology is created. You can put together larger tables, as long as the chances all add up to 100%.

If you have ever wanted an alternate starting system, one way to do this would be to use a <Table> such as this:

Code: Select all

		<Table>
            <System chance="50" UNID="&ssStartonEridani1;" attributes="alphaModel, Eridanus, newBeyond"/>
            <System chance="50" UNID="&ssStartonEridani2;" attributes="betaModel, Eridanus, newBeyond"/>
		</Table>
This allows a differently arranged Eridani to be used for the starting system by switching the UNID of the system for node SE.

F50
Militia Captain
Militia Captain
Posts: 995
Joined: Sat Mar 11, 2006 5:25 pm

Thu Aug 28, 2008 7:18 pm

What if I want a system to contain mostly (or only) Ares stations, or xenophobe stations, :twisted: or none of the stations from the base-game (only modded stations with a certain attribute)?

User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1259
Joined: Sat Oct 13, 2007 7:48 pm
Location: By the beach

Thu Aug 28, 2008 8:06 pm

That would be a topic for a whole new tutorial. The topology has no control over what gets placed in a system structure- only what system structure gets placed in a nodeID.

Controlling systems from the system element is easy. You could quickly adjust the <RandomLocation element to filter for whatever station attributes you wanted.

Controlling systems from script is a problem- the first major snag is that sysCreateStation doesn't accept attribute filters.

F50
Militia Captain
Militia Captain
Posts: 995
Joined: Sat Mar 11, 2006 5:25 pm

Mon Sep 01, 2008 1:37 am

in that case could I have a quick tutorial on how to use XML to do that?

User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1259
Joined: Sat Oct 13, 2007 7:48 pm
Location: By the beach

Wed Sep 03, 2008 6:48 am

Well, you know where the request a tutorial thread is.

Post Reply