Bizarre locations of Stranger's World Stations

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Bizarre locations of Stranger's World Stations

Post by Cholmondely »

phkb wrote: Thu Feb 01, 2024 12:43 am
I'm a bit hesitant to share this, as I've not really tested it at all. But it might at least set you on path to achieving what you're looking for.

CommiesOrbitUpdate.oxz

This is to be used in addition to the standard Commies mod, and the Orbital Stations mod, both of which are set as requirements.

Changes were need in the AI's, shipdata, and scripting. With the AI's, I am *really* not sure what will happen. Exciting, eh?


Sorry it took me so long to get back to you on this one.

Failure!

Not utter and abject failure - in Vetitice the SLAPU moved from being 30,000km from the sun to being 25,000km from the sun. But it is still on the wrong side of the main planet!

Thank you for trying!



How should I mangle the original code given above? What do I comment out? And can I just bung in Stranger's code or is there more to do? I would hope that I'm currently at the stage where can work out how to tweak his code - but I do know that I don't understand exactly what I need to comment out in Commies.
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?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Bizarre locations of Stranger's World Stations

Post by phkb »

Ok, I’ll set aside some time tomorrow to actually load up a SW environment and debug this properly.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Bizarre locations of Stranger's World Stations

Post by Cholmondely »

phkb wrote: Sun Feb 04, 2024 1:26 am
Ok, I’ll set aside some time tomorrow to actually load up a SW environment and debug this properly.
Thank you for this. I've just been rereading the earlier sections of this thread. Horrendous memories... javascript...

1) Stranger's placement of his stations works for his solar station (KOS-M). It's not close enough for my tastes, but I presume that I'd be able to tweak it.

2). The HIMSN code also places the stations where they should be when I'm in Stranger's World. This code seems to work under any conditions.

3). BUT. The Commies code fails. As does that in several other solar-orbiting OXPs: Hathor, (and some of the unfinished OXP's such as Solar Harvest's solar station).

4) Other misplaced non-Solar-Orbiting stations include The Collector's private hideaway. And also Taxi Galactica's taxi stations.

I'm most interested in Commies & Hathor. I'm perfectly happy for the Collector to be in the middle of nowhere. And I don't see how a Thargoid/pirate-ridden Ooniverse fits in with the existence of lots of taxi stations!


Reference: HIMSN code (I presume that this is all of it!)

Code: Select all

// Add Navy Base to Birera (G3) and Xeer (G1):
	if ((galaxyNumber == 0 && system.ID == 150) || (galaxyNumber == 2 && system.ID == 36))
	{
		system.setPopulator("himsn-system-base",
		{
			priority: 200,
			location: "STAR_ORBIT",
			locationSeed: 67812,
			groupCount: 1,
			callback: this._addNavySystemBase,
			deterministic: true
		});
		// 5% chance of patrol appearing:
		patrolchance = 0.05;
		// 0.5% chance of recon appearing:
		reconchance = 0.005;
		// 3% chance of another patrol appearing on any lane:
		if (Math.random() < 0.03)
		{
			system.setPopulator("himsn-extra-patrol-2",
			{
				priority: 210,
				location: "LANE_WPS",
				groupCount: 1,
				callback: this._addNavyPatrol
			});
		}
	}
I don't think that the SLAPUs/CZGFs actually need to orbit the sun...
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?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Bizarre locations of Stranger's World Stations

Post by phkb »

OK, here's version 1.1 of the utility: CommiesOrbitUpdate.oxz

I've tested this and can confirm the Commies stations will orbit the sun.

To adjust the height of that orbit, extract the files and edit shipdata-overrides.plist:

Find these lines:

Code: Select all

            solar_radii = 3; // change this value to change the height of the orbit. must be an integer
and

Code: Select all

            solar_radii = 4; // change this value to change the height of the orbit. must be an integer
And change the numbers to whatever you prefer. I've already reduced the numbers from where the KOS-M is located (for that station, the equivalent number would be 10), but you might like to reduce them further.

Let me know who it goes.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Bizarre locations of Stranger's World Stations

Post by phkb »

I should mention, Astromine Penal Colonies are spawned in system as replacements to Rock Hermits, so they wouldn't get orbiting mechanics, even in SW I believe.

(Note to self: "Extra Rock Hermits" is probably breaking Commies Astromine spawning logic - must investigate)
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Bizarre locations of Stranger's World Stations

Post by Cholmondely »

Umm.

Inonri:

Launched. Sun (Sapidum Lupus) was 45,000km ahead at 5 o'clock. SLAPU was 47,000km behind at 9 o'clock.

Code: Select all

"commies_slapu":{"coordinates":[20914648,-20410920,-34614144],"location":"COORDINATES"},
"system-features-rings":{"coordinates":[0,0,660220],"priority":1000},
"system_features_sunspots":{"coordinates":[18099128,-20115120,-35045236],"priority":1000},
"system_features_sunspots":{"coordinates":[18532130,36962716,30199636],"priority":1000},

I've just checked and all my Stranger's World OXZs are still the originals I downloaded from the in-game Expansions Manager. Untweaked.



By the way, there is a missing semi-colon in the manifest.plist (AppleMacs - yay!)



What fun, eh? The joys of wrestling with Strangers World Orbital mechanics. Makes all that Newtonian stuff seem simple as bally heck!

Did you know that Sir Isaac Newton was Master of the Mint in his old age? It's all his fault that the Guinea ended up being worth 1 pound and 1 shilling (£1.05 in modern money). A disparity developed between the prices of silver (shillings) and gold (sovereigns) and Sir Isaac revalued it down from the earlier 1 pound and one and a half shillings (£1.07.5). There was debate about bimetallism under Gladstone, with people arguing that we should be on both the gold standard and the silver standard. Never took off.



Any chance of just being told which chunks of the javascript I need to comment out and replace with one of the other codes? (Not to say that coming up with an "oxp-fix" for others is not eminently worth-while).
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?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Bizarre locations of Stranger's World Stations

Post by phkb »

Wierd.

Ralaes.
Launched. Sun is 53700 km in front of me. SLAPU is 13000km in front of me, towards the sun. KOS-M station is around 10000km in front of me.
Cholmondely wrote: Mon Feb 05, 2024 11:18 am
Any chance of just being told which chunks of the javascript I need to comment out and replace with one of the other codes? (Not to say that coming up with an "oxp-fix" for others is not eminently worth-while).
That's the problem with SW issues. If it was so easy that a simple one-liner would fix the problem, everyone would be doing it. And I'm trying *really hard* to not rewrite all the station spawning/moving code to something a little more efficient.

Let me have another look. Stand by.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Bizarre locations of Stranger's World Stations

Post by Cholmondely »

phkb wrote: Mon Feb 05, 2024 12:48 pm
Wierd.

Ralaes.
Launched. Sun is 53700 km in front of me. SLAPU is 13000km in front of me, towards the sun. KOS-M station is around 10000km in front of me.
Cholmondely wrote: Mon Feb 05, 2024 11:18 am
Any chance of just being told which chunks of the javascript I need to comment out and replace with one of the other codes? (Not to say that coming up with an "oxp-fix" for others is not eminently worth-while).
That's the problem with SW issues. If it was so easy that a simple one-liner would fix the problem, everyone would be doing it. And I'm trying *really hard* to not rewrite all the station spawning/moving code to something a little more efficient.

Let me have another look. Stand by.
Relaes on my AppleMac:
Arrived at Witchpoint: SLAPU is 57,000km directly in front of me, beyond the main planet. The sun is down at 5 o'clock (just about still in front) and is 53,000km away.

I'm quite happy with new code if you are. I can't imagine that Stranger would be too upset either. But isn't it bizarre that the most "Russian" of our OXPs should be so problematic when mixed with Stranger's World?

But as regards distances, I'd be moving the SLAPU much nearer to the sun (as it is supposed to be - "Solar Laboratory And Production Unit, with solar panels using the sun's energy). The superb deals on computers justify the lengthy journey there - especially if one can dock there too (or use "Save in Flight"). But I'd expect to tweak those myself.
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?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4644
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Bizarre locations of Stranger's World Stations

Post by phkb »

OK, try this one: CommiesOrbitUpdate.oxz v1.2
User avatar
Cholmondely
Archivist
Archivist
Posts: 4997
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Bizarre locations of Stranger's World Stations

Post by Cholmondely »

phkb wrote: Mon Feb 05, 2024 1:58 pm
OK, try this one: CommiesOrbitUpdate.oxz v1.2
That does indeed fix it. Just 3,000km between the two of them in Relaes, despite the 50,000km distance to the sun!

Thank you!

It is one of the things that has bugged me for over two years now. The others I can live with, but that particular one has been a really irksome bugbear!

I'll weave in your fix to the various SW pages on the wiki, as well as the Commies page.

I can't believe it!



Update: I've updated the Stranger's World & Sun Gear wiki pages. Also the Commies, SLAPU & CZGF pages. The download link is to your Box account, as above.
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?
Post Reply