[SCR] Station Placement Assistance script

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

[SCR] Station Placement Assistance script

Post by willyshop » Wed, 10. Aug 11, 05:54

WillyShop's Station Placement Service

[ external image ]

This is a script I created to assist in the placement of stations on a regular lattice. Anyone who has ever completed a few station building missions will know how easy it is to simply
Spoiler
Show
press numpad 5 and then select the placement beacon.
I decided it made a great deal of sense to use this same mechanic for the placement of your own stations.

This script adds a command to the the special commands menu of TL ships with trade command software mk3 installed, "deploy placement beacons". One navigation relay satellite is required in the cargo of the TL for each nav beacon deployed.

There are two options for station placement.
The first creates a spherical array of nav beacons in a cubic close packed lattice. This is designed to be best for complexes between a few dozen and several hundred stations. There is no hard coded limit to the number of stations, but I make no guarantee of performance beyond a few hundred. If there are less than a few dozen stations, this may look kind of silly as it will be a heavily pixelated sphere.

For smaller complexes, I created the next option: a simple single level hexagonal grid. This is ideal for the placement of most food/bio/energy complexes because the way the nodes are placed on the models will allow for nicely aligned tubes.
There will be 2*(w*h + w + h) stations in such a grid, so for example a one by one grid will have spots for 6 stations.


Uses page ID 9433 and command slot 557.

This is my first script, so feedback both positive and negative is welcome!

[Edit]
If your wondering what sizes are good for the minimum station distances, I've found that 1km is good for small tech fabs, 2km should be sufficient for all the food facilities, M or L, and 4-5 km is sufficient for SPP XL and mines.

There is, of course, nothing stopping from using this script recursively, say to make a lattice with a separation of 20km, then several smaller spheres of hundreds of stations at each of the nodes. Well, nothing but creditsss and your computer :P
[/Edit]

[Edit 8/10/2011]
New version. Added hex grid placement option, fixed some overflow bugs that led to rounding errors, fixed issue with double placement of a few of the beacons.
[/Edit]

[ external image ]


[ external image ]

[ external image ]

[ external image ]
Last edited by willyshop on Thu, 12. Jan 12, 00:05, edited 5 times in total.

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Wed, 10. Aug 11, 05:57

reserved

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Wed, 10. Aug 11, 06:09

Nice work. Im surprised this hasnt been done sooner. Thanks for this. Downloading now....

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Thu, 11. Aug 11, 01:11

Thanks!
I just uploaded a new version with added features and made a couple bug fixes. Highly recommended, the new hex grid placement option is extremely useful.
[edit]
Updated again. Now allows you to keep track of and delete beacons previously deployed.
[/edit]

Sorken
Posts: 6
Joined: Wed, 11. Jan 12, 13:09

Post by Sorken » Wed, 11. Jan 12, 13:37

Very interesting. But im wondering if its intended to be used for "stacking" stations of the same type or mixing in the kinds you want into a super-complex that looks good?

The line like type i understand can use all the types listed above that have models suitable for linking in a line. But the other one?

edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

Post by edwardecl » Wed, 11. Jan 12, 16:05

Seem's like a great idea,

I wonder how hard would it be for a script to somehow copy an existing complex station placements then deploy in a new sector with these beacons complete with names of the factories for the beacons?

I tend to make spaceweed and fuel complexes to fill a XL power plant as tightly packed as possible in 3 dimensions while retaining straight tube connections.

I always forget which stations go where for it to fit without collisions.

mcaule
Posts: 99
Joined: Wed, 11. Jan 12, 18:04
x4

Post by mcaule » Wed, 11. Jan 12, 18:13

Does this script work in X3:AP?
I am become Death, the destroyer of worlds...

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Wed, 11. Jan 12, 23:48

mcaule wrote:Does this script work in X3:AP?
It should, although I haven't tested it yet. My empire in AP hasn't quite gotten to the mega-complex building point yet :P
Sorken wrote:Very interesting. But im wondering if its intended to be used for "stacking" stations of the same type or mixing in the kinds you want into a super-complex that looks good?

The line like type i understand can use all the types listed above that have models suitable for linking in a line. But the other one?
I use it for super-complexes.
Station Placement Assistance Script
"Split alive!"
Not anymore, you're not.

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Fri, 13. Jan 12, 01:29

edwardecl wrote: I wonder how hard would it be for a script to somehow copy an existing complex station placements then deploy in a new sector with these beacons complete with names of the factories for the beacons?
That's not a bad idea, and shouldn't be too difficult to implement.

I was thinking it would be cool to design a few standard "boilerplate" complexes and code them in (food chains etc)

I doubt I'll get around to doing any of that, though.
Station Placement Assistance Script
"Split alive!"
Not anymore, you're not.

xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon » Sat, 31. Mar 12, 23:59

Comes with a file: DS_Store in both t and main folder.

A few questions:

- What is it?
- Is it needed or required and where should it be?
- Is it actually part of this or an unintended addition?

edit: nvm.. google tells me it's a mac thing. Honestly didn't think it would be that easy. :roll:
:headbang: Microsoft

mjl1966
Posts: 29
Joined: Fri, 2. Apr 10, 19:41

Post by mjl1966 » Fri, 19. Apr 13, 01:52

How many hex nodes on the x axis? I give up.
How many hex nodes on the y axis? I really give up.

I know how to spell dodecahedron and can't figure out what these numbers mean except they always want to deploy 12 and 16 satellites when I use numbers like 1, 2 or 6. The one time it did work, my beacons were placed 1500 Km up the y axis (when I input "2" as the separation)

After 30 minutes, I am getting nowhere.

Maybe it's just me, but some sort of write up on what the inputs mean and how to use them would be appropriate.

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Thu, 16. May 13, 22:29

Hey, Sorry. I've been gone from the forums and the x-universe in general for awhile. I'll see if I can answer your questions, if it really matters a month later :oops:
mjl1966 wrote:How many hex nodes on the x axis? I give up.
How many hex nodes on the y axis? I really give up.

I know how to spell dodecahedron and can't figure out what these numbers mean except they always want to deploy 12 and 16 satellites when I use numbers like 1, 2 or 6.
I probably could have been more clear. The number of hexes on the x and y axes means the number of full hexagons. So, 1 by 1 would be six stations, 1 by 2 would be two hexagons next to each-other, which works out to 10 stations. The first screenshot would be a 3 by 2 grid.

The one time it did work, my beacons were placed 1500 Km up the y axis (when I input "2" as the separation)


When you run the script, it will ask for a position on the map. It sounds like the one you picked was 1500 m up the y axis. The station separation will be the distance between the stations in meters. So, if you put in two you will get beacons 2 meters apart, which in the x-universe is extremely close. They will look like they're all on top of each other in the station map, and when you plop stations on them the stations will all bang into each other.

You might try putting in separations on the order of 1500 or greater, depending on the size of the stations you want to place.[/quote]
Station Placement Assistance Script
"Split alive!"
Not anymore, you're not.

User avatar
willyshop
Posts: 229
Joined: Tue, 1. Feb 11, 01:51
x3ap

Post by willyshop » Thu, 16. May 13, 22:37

willyshop wrote:
Sorken wrote:Very interesting. But im wondering if its intended to be used for "stacking" stations of the same type or mixing in the kinds you want into a super-complex that looks good?

The line like type i understand can use all the types listed above that have models suitable for linking in a line. But the other one?
I use it for super-complexes.
I Just want to clarify: The idea behind "the other one" is to get as many stations as possible into a small volume, so the stations get laid out in a lattice that puts each station the same distance from all it's nearest neighbors. See this wikipedia article
Station Placement Assistance Script
"Split alive!"
Not anymore, you're not.

FischAP
Posts: 17
Joined: Sat, 7. Dec 13, 15:42
x3ap

Post by FischAP » Sat, 25. Jan 14, 16:57

Hi!

When i try to lay down a hex-grid, 4x3, 2000m spacing, all my beacons are fixed on y=0, does not matter where i put the center.
Anyone else having this problem ?

slith
Posts: 5
Joined: Mon, 4. Jul 11, 13:59
x3tc

Post by slith » Thu, 30. Jan 14, 09:12

FischAP wrote:Hi!

When i try to lay down a hex-grid, 4x3, 2000m spacing, all my beacons are fixed on y=0, does not matter where i put the center.
Anyone else having this problem ?
Yup, same problem here. All my beacons get fixed on y=0.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”