Gate, Sector, Jumpdrive Info Updated

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19

Gate, Sector, Jumpdrive Info Updated

Post by AalaarDB » Mon, 23. Jan 06, 10:04

If the target gate does not exist you fly right through the start gate.

You can have gate IDs 0 - 5. They can connect and everything. Negative numbers and numbers above 5 will not register. They can exist, and they can connect to other gates, but other gates cannot connect to them and you cannot get them via get gate from gateID to destroy them.

You can have more than 4 gates in a sector and they will all work. You can have more than one gate of a gateID, and when you destroy the second one the first will remain that gateID.

Gates do not have to connect to one another. You can have a one way trip, or a loop of 3, etc.

Gates can be right next to each other, or on top of each other. They will clash but not be destroyed.

You can jump TO and FROM sectors with no gates (unconnected) without energy. Therefore, you can build an energyless jumpdrive by destroying gates, initiating the jump, and recreating the gates. This should be done atomically and may have other caveats.

Jumps initiated with the script command 'use jumpdevice on target' cannot be hurried with seta. They cannot be stopped by changing sectors, or docking, or even saving and loading. The voice will stop at nearly any event. The only way to abort that jump is to stop the script that called for it.

The sector returned by get next sector from KE to AP will be AP if both gates connect to each other. This will work even if the gate IDs are 4. With only one pointing to the other, neither next sector is the gate dest sector.

With a 3 way gate system, KE -> AP, AP -> CSW, CSW -> KE the returned next sector from AP to KE is CSW, while next sector from KE to AP is Three Worlds

The number of "gate distances" is 304.
The average distance is 63521.
There are 13 distances shorter than 25,000.
There are 19 distances shorter than 30,000.
The longest distance is in Family Rhk.
The shortest distance is in President's End.

Last edited by AalaarDB on Fri, 27. Jan 06, 11:11, edited 3 times in total.

User avatar
Posts: 5166
Joined: Wed, 6. Nov 02, 21:31

Post by giskard » Mon, 23. Jan 06, 18:59

Hi mate.

Got your pm and that file.

Im concerned about it not working too well with existing freighter scripts. Any info on that ?

It would be good if the players own freighters could make use of these jumpgates once he found the gates. Thats what im thinking. Accidently sending the player to the sector we spoke about is an idea i love :)

Especially if he arrives at a random location in the sector.

This signature has been stolen by the well known Teladi Signature Thief X Siggy.

Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 21061
Joined: Mon, 15. Nov 04, 00:26

Post by Cycrow » Mon, 23. Jan 06, 19:06

u could edit the scripts used by the freights and add the ability to use these gates as well

althou i would guess, once the gates exists, the AI should find that its the quickest path to take and use it ?

User avatar
Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44

Post by Red Spot » Mon, 23. Jan 06, 19:09

I figured I was smart by increasing the IDs to search in my gate lib ..

still come up short ..

Thanks for the info AalaarDB


User avatar
Posts: 5166
Joined: Wed, 6. Nov 02, 21:31

Post by giskard » Mon, 23. Jan 06, 23:15

Im just curious if it would work with AalaarDB dymanically created gates.

The X universe just doesnt seem that flexible to me but if it is it could be fun to mess with it :)

When time allows.

This signature has been stolen by the well known Teladi Signature Thief X Siggy.

Posts: 319
Joined: Sun, 1. Jan 06, 07:29

Destroying and creating gates in Space Empires IV

Post by zergfest90 » Tue, 24. Jan 06, 00:29

Back when I was playing Space Empires IV a lot, I remember having the ability to use Stellar Manipulation technology to create and destroy gates. Since there weren't any jump drives, it was extremely helpful to put as many "gates" (Really warp lanes) in a sector as possible to speed up transportation.

In X3, it might be nice to place a gate close to every factory--eg. that sells weapons. In some of those sectors, it really does seem like it takes forever and a day to get to the gate.

It would be really interesting if the scripts would find the new dynamic gates and use them. In the case of manual trading, it wouldn't even matter where the gates go to since you could use them for fast jumping around inside a single sector. :)

User avatar
Posts: 1128
Joined: Thu, 2. Sep 04, 01:54

Post by nuclear_eclipse » Tue, 24. Jan 06, 04:40

One major caveat to watch for:

I was working with scripts that dealt with dynamically reworking gates for the Syndicate mod, and I came across this issue. A problem occurs if you have two gates connected to each other, such as a gate route between two sectors. If you try to delete one of the two gates, the other one will automaticallybe destroyed as well! This can be very annoying if you're not expecting it, so you should watch out.

The easy solution is to grab the destination gate's information before deleting the gate in question, then after deleting, recreate the destination gate once more. It's a pretty simple solution, but I thought it might be good to let everyone know what happens.

Note that this happens even if the destination gate still has another gate connected to it, in which case the third gate does NOT get destroyed...


North gate in sector Argon Prime goes to the south gate in Heron's Nebula. You script in a third gate, X, in HN that routes to the north gate in AP. Now, if you delete the original HN south gate, it will also delete the AP north gate, but gate X will still remain, requiring you to recreate the AP north gate in order for gate X to work...


Posts: 2279
Joined: Thu, 29. Jan 04, 09:19

Post by AalaarDB » Sun, 12. Feb 06, 09:03

More info:
You can have a West Gate on the West edge of the map and so on - IE Kingdom End can have a North Gate and a West Gate. They cannot be their usual index numbers or it will not appear, but 4 and 5 work fine for this. Thus, you can have what appears to the player to be an infinite sized universe map.

User avatar
Posts: 156
Joined: Mon, 3. Nov 03, 01:34

Post by twistedtech » Sun, 12. Feb 06, 14:05

I tried using gateids higher than 5 and you can't use a gateid of 6, for example, to jump out, but I was able to use it only as an arrival gate. I didn't spend a lot of time testing this though. I will test this more and post my results in the thread, if someone doesn't beat me to it.

I spent some time playing around as well and it does appear that you can have any one gate serve as your arrival gate from any multitude of sectors your little heart desires. You could have just one in the center of a sector for all arrivals and have seperate outbound gates located elsewhere. It doesn't matter if you assign the same gateid for the outbound gate as they will all still jump out correctly. It appears though, that if you have 6 outbound gates using gateid 0 and use the same gateid for an inbound jump, the ship entering the sector will use the first gate listed as gateid 0 (in the universe map).

This has great potential. You could have a sector with one gate, use it to jump in from a couple other sectors and use the same gate as an outbound gate to an entirely different sector (as long as the id is 5 or less). This kind of layout would screw up the galaxy map though since there's no way of telling which routes are inbound or outbound. You would have to use an external map for reference during play. Effects on scripts using gates is unknown to me at the moment.

By changing the master icon file and replacing [N][S][W][E] with [G] as well as changing the appropriate text ids to just say "Gate", it won't matter which gateid is used and the game will still identify the destination when the gate is targeted (and in the sector map). It would also help reduce the feeling that you're in a "box" with boundries.

It should also be possible to reserve a couple of gateids (4 and 5) and rename them as ISTs (Inter Sector Tunnels) as they aren't used by the current game (I think) effectively making in-sector shortcuts for someone using an expanded sector in a custom universe. They could be added to the textid xmls so the player can tell them from normal gates. I was thinking of defining a "new" gate model for ISTs (a standard gate reskinned in a different color for example). Using gates as ISTs does work quite well for a player piloted ship. i don't think the AI would use them but I haven't tested this. A new icon can be added to the master icon file, , and added to the icon index so it will appear correctly in the UI.
Try not to let your mind wander... It is too small to be out by itself.

Post Reply

Return to “X³: Reunion - Scripts and Modding”