Fully Linked Topology Example

A place to discuss mods in development and concepts for new mods.
Post Reply
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Here is an example of a fully linked topology for you to play around with:

(link removed)

You will need a clean version of TranscendenceSource files to use this. The zip contains a Transcendence xml to overwrite the main xml, and an extension file that will need to be placed in the extensions folder.

You will need to open PlayerShips.xml, and find the PlayerSettings for the ships you want to use- where it says startingSystem= "SE" you will need to change to read startingSystem= "Test1"

This mod uses a boring, planets only system definition that has 50 stargates in it. It builds a linear topology from Test System 1 to Test System 50.

You can change the structure of the network to connect any system to any other systems- even linking all the systems from a single system by adjusting the values in the gateKey located in the extension.

For every system node in the topology, a gateKey is listed- the key uses a letter to indicate which of the 50 gates to turn off or on- "I" means inactive, "A" means active.

Test System 1 has a gate key that reads:

Code: Select all

			(setq gateKey (list "I" "A" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I"))
Notice that there are exactly 50 items on the list. This is because there are exactly 50 stargates in the system.

With only one "A", this gateKey activates only the gate to system 2.

Notice that the "A" is in the second position on the list. Each position corresponds to a gate to a system- from 1 to 50 (items 0 to 49).

If you wanted to make the linear system a looping network, you could turn on gate 50 by adding an "A" where the last "I" in the list is (item 49, or Gate 50):

Code: Select all

			(setq gateKey (list "I" "A" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "A"))

I built this network to see how the game engine would handle a topology that was fully linked- every system links to every other system.

To turn off the gate switch entirely, open transcendence.xml and find the SystemTypes.

You will see only one type of system definition in this mod: ssFullConnectSystem;

This system definition has an OnCreate event that calls for the gate switch function. You can disable it by adding a ; in front of (modGateSwitch)

Gate Switch is on:

Code: Select all

<Events>

<OnCreate>

(modGateSwitch)

</OnCreate>

</Events>
Gate Switch is off:

Code: Select all

<Events>

<OnCreate>

;(modGateSwitch)

</OnCreate>

</Events>
Easy, yes? When the gate switch is off, you can see all the gates in the system and go through any of them to any other system in the entire topology.

I just thought I would share that. Why am doing this? Well, if I make all the systems connect, I don't need to use a huge static data array for the System26 mod- I can just tell the mapper which system I want to connect to.

It should make things much simpler for the topology, allow for better network design, and also make the processing and memory required for the system 26 mod much much much smaller and faster.


Now to see if the game engine will handle 100 fully linked systems :twisted:
Last edited by Periculi on Fri Sep 05, 2008 11:03 pm, edited 1 time in total.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

hmm what would be very useful is to derive that key from something simpler like
(list "I" "A" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I")
would be (nodeList 50 (1))

and

(list "I" "A" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "I" "A")
would be (nodeList 50 (1 49))

of course the name isn't important
Crying is not a proper retort!
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 used the list like that because it was ready to go code from previous gate switch functions.

That list gets created during the process of changing a user map to a gate switch in system 26- I just grabbed the removal code and made a blunt list of what I wanted without getting into too much new coding or complication.

In the Sys26 user maps, the system info is stored in a simpler format, which then gets used to derive that gate switch list and store it locally.

The reason that I use the list in that form is because it gets used in a For loop that creates the name of the target gate- on each pass the specific gate is searched for, based on the gate's attribute (a number) so that it can be specifically targeted.

For example:

First Pass: index 0 is looked up and the 'key' stored, A stargate with attribute Gate1 is looked for and if the key is an "I" the gate is removed.

Second Pass: increments the values by 1 and does the same thing- repeated for all 50 gates.

That list is more than just a list of what is wanted- it is a processing tool.

I don't understand what the samples you posted would do. Is nodeList a function of some kind that you are passing the 50 and the list too? I suppose that would work just as well or better. I haven't really looked into upgrading the gate switch- I was just tinkering with fully connected topology networks to see if the game would allow them in large enough numbers to make an effective network system out of. :)
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I think you misunderstand.

nodeList is just a helper function that can create the list of A and I (it passes back the created list)

the format it simple the first argument in the length of the result list (so to be flexible in case you change how many links there are)

I did think of a new twist

(nodeList listLength default alternate alternateIndexesList)

listLength: obvious I think
default: What the default setting for the list.
alternate: What is the alternate setting for the list.
alternateIndexesList: A list of indexes where the alternate setting is used.

this way you can have alot of active and still have a short list.
It would also allow for any changes in the A I format. (not that I think you will do that but it is a feature)

You never have to use the function it is just something that makes automation easier and writing links out by hand easier.
Crying is not a proper retort!
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Oh, I kind of have that- like I said, in the 'real' version that list gets generated automatically and stored on each system locally.

I know you have seen the user maps- they don't use the A I gateSwitch format at all- just a simple list:
(NodeID LinkID LinkID ...)

Which gets stored on NodeID as the full gate switch list to be processed


You can look it up in the System26v1.xml, actually.

In the full version I also added a "R" for random gate activation. :)
Post Reply