Does anybody know what the port_radius-method in shipdata actually does?
It isn't mentioned in the wiki at all (could be added perhaps?).
The value for all native stations is 500, except for Dodecs, where it is something odd like 392, rock hermits have 250.
For a new station I tried out values between 20 and 12000. I see no difference at all in the behaviour of the station or launching/docking ships.
So what does it do anyway? I would be grateful for clues.
port_radius
Moderators: winston, another_commander
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
The port_radius value is used when loading a station to set the port_position, i.e. the point at which ships spawn when leaving the station. However, it appears to be used before it is loaded from the property list, so it’s actually always 500. (The position can also be overridden by subentities whose names start with “dock”.)
I’ll look into fixing this (i.e. reading before using). If this turns out to break stuff, I’ll introduce a new key with the same effect that actually does something (say, spawn_distance). It’s on my list.
I’ll look into fixing this (i.e. reading before using). If this turns out to break stuff, I’ll introduce a new key with the same effect that actually does something (say, spawn_distance). It’s on my list.
E-mail: [email protected]
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Thanks, Ahruman!
That's actually exactly what I assumed it to be supposed to do.
Actually I was trying to have launching ships spawned in a greater distance from the dock, by setting the value of port_radius. Now you have explained why it didn't work.
For my problem I have found a work-around by giving the launching defense-ships an AI that lets them fly straight forward for 4 seconds and then switches to their intended AI. Works fine, but of course not for any other ships launched. So I'm going to wait for a fix.
That's actually exactly what I assumed it to be supposed to do.
Actually I was trying to have launching ships spawned in a greater distance from the dock, by setting the value of port_radius. Now you have explained why it didn't work.
For my problem I have found a work-around by giving the launching defense-ships an AI that lets them fly straight forward for 4 seconds and then switches to their intended AI. Works fine, but of course not for any other ships launched. So I'm going to wait for a fix.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Again, when setting up a dock, the game looks for any subentity whose name begins with “dock” and uses its position and orientation in preference to the calculated value. To use this, do something like:
where 0, 0, 1000 is the position, and 1, 0, 0, 0 is the orientation. Also add an invisible do-nothing “ship” with role dock-mclane-station to your shipdata.plist.
Code: Select all
<key>subentities</key>
<array>
<string>dock-mclane-station 0 0 1000 1 0 0 0</string>
</array>
E-mail: [email protected]