Saving At Stations
Moderators: winston, another_commander
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Saving At Stations
Why can i not F2/save at my new model? it's a test spawn, has a test role and "station" in the roles, and has the standard station AI.
as a side topic, is there no way so stopping this stupid size-related top of a radar stalk? the trace for my new model literally fills the scanner.
TIA
as a side topic, is there no way so stopping this stupid size-related top of a radar stalk? the trace for my new model literally fills the scanner.
TIA
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Saving At Stations
I'm no expert but since nobody else has replied yet, my understanding from these boards is that one can save at any station which is defined as such and which is not moving.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Saving At Stations
Then rock hermits seem to be stations, while Galactic Navy's Galcop stations are not.Cholmondely wrote: ↑Sat Oct 21, 2023 8:38 pmI'm no expert but since nobody else has replied yet, my understanding from these boards is that one can save at any station which is defined as such and which is not moving.
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Saving At Stations
In order to save at a station, the game engine needs to know that the station will be spawned at the same location every time, during system population. So, creating the station during shipWillLaunchFromStation, or shipWillExitWitchspace, is far too late in the process.
This routine should work:
"deterministic:true" is the key to allowing you to save at your station. And the "0" parameter is important, because the "addShips" function will not add any random distance to the position when spawned. It will be at the exact coordinates you specify.
As for the issue with your scanner, what zoom setting do you have? if it's currently 1:1, and the station is still filling the scanner, that would indicate the station is *huge*.
This routine should work:
Code: Select all
this.systemWillPopulate = function() {
// here we establish the position of the station. this needs to be the same every time the system is populated
// you can use the system.pseudoRandomNumber property to add "randomness" to the location if you want
// in this instance, we're just going to use the main station position, and put our station 5000m directly in front of it.
var stationPos = system.mainStation.position.add(system.mainStation.vectorForward.multiply(5000));
// next, we use the system.setPopulator to create the actual station using a callback
// "create_my_station" is a text string that uniquely identifies this populator function
system.setPopulator("create_my_station", {
callback: function(pos) {
system.addShips("my_station_key", 1, pos, 0); // the "0" parameter at the end is important
},
location:"COORDINATES",
coordinates:stationPos,
deterministic:true // < this is important
});
}
As for the issue with your scanner, what zoom setting do you have? if it's currently 1:1, and the station is still filling the scanner, that would indicate the station is *huge*.
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Saving At Stations
They are old and date back to the days when saving anywhere outside a main GalCop orbital was impossible. Maybe they move slowly?hiran wrote: ↑Sat Oct 21, 2023 8:52 pmThen rock hermits seem to be stations, while Galactic Navy's Galcop stations are not.Cholmondely wrote: ↑Sat Oct 21, 2023 8:38 pmI'm no expert but since nobody else has replied yet, my understanding from these boards is that one can save at any station which is defined as such and which is not moving.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Saving At Stations
GN’s stations were created before there was even an option of saving at stations in the core game. And no one has gone back to tweak the code to implement the required changes.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Saving At Stations
There was a time where you could not save the game at stations? But what I see is that you can just save in stations.
Where did one save the game those days?
Sunshine - Moonlight - Good Times - Oolite
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Saving At Stations
I think he means at non-main stations (eg rock hermits). A contrabandista's delight, was saving at rock hermits!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Saving At Stations
Maybe it is not too bad going back to change something. I assume the necessary tweak is more or less to set a flag, right?
If we knew where/which OXPs define a station it would be a limited list of items to check.
And with OoliteAddonScanner I can run such stunts to produce a list - if only I knew what to look for.
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Saving At Stations
Usually it's a bit more than just changing a flag. Having just done Cataclysm, the work involved in changing how the stations are spawned requires extracting them from the original logic, creating a new routine (systemWillPopulate), with a new spawning mechansm (system.setPopulator), and then making sure the logic of the original has been transferred into the new routine correctly. It's definitely a one station at a time thing.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Saving At Stations
Thanks for the replies, no biggie at the mo, but when i i come to test properly i'll try @phkb's code snippet [cheers bud] as the station is supposed to be a feature of a particular place.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Saving At Stations
Ah!
That’s no moon. It’s a space station.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
Re: Saving At Stations
i managed [it seems] to get my system-specific spawn working by using planetinfo.plist, which isphkb wrote: ↑Sat Oct 21, 2023 9:08 pmIn order to save at a station, the game engine needs to know that the station will be spawned at the same location every time, during system population. So, creating the station during shipWillLaunchFromStation, or shipWillExitWitchspace, is far too late in the process.
This routine should work:"deterministic:true" is the key to allowing you to save at your station. And the "0" parameter is important, because the "addShips" function will not add any random distance to the position when spawned. It will be at the exact coordinates you specify.Code: Select all
this.systemWillPopulate = function() { // here we establish the position of the station. this needs to be the same every time the system is populated // you can use the system.pseudoRandomNumber property to add "randomness" to the location if you want // in this instance, we're just going to use the main station position, and put our station 5000m directly in front of it. var stationPos = system.mainStation.position.add(system.mainStation.vectorForward.multiply(5000)); // next, we use the system.setPopulator to create the actual station using a callback // "create_my_station" is a text string that uniquely identifies this populator function system.setPopulator("create_my_station", { callback: function(pos) { system.addShips("my_station_key", 1, pos, 0); // the "0" parameter at the end is important }, location:"COORDINATES", coordinates:stationPos, deterministic:true // < this is important }); }
As for the issue with your scanner, what zoom setting do you have? if it's currently 1:1, and the station is still filling the scanner, that would indicate the station is *huge*.
Code: Select all
{
"0 129" = {
"script_actions" = (
"checkForShips: KWii",
{
conditions = ("shipsFound_number lessthan 1");
do = ( "addSystemShips: KWii 1 1.0" );
}
);
}
}
TIA