Demand Driven Economy OXZ

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

Moderators: winston, another_commander

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Demand Driven Economy OXZ

Post by Redspear »


Image
User avatar
phkb
Impressively Grand Sub-Admiral
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: Demand Driven Economy OXZ

Post by phkb »

Redspear wrote: Tue Mar 12, 2024 8:38 pm
probably created a few new ones
You mean like "it's" instead of "its" in the screen shot? :wink:
User avatar
Cholmondely
Archivist
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: Demand Driven Economy OXZ

Post by Cholmondely »

phkb wrote: Tue Mar 12, 2024 10:01 pm
You mean like "it's" instead of "its" in the screen shot? :wink:
So what does "asscoiation" really mean down under? ...and do I really want to know?
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: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Demand Driven Economy OXZ

Post by phkb »

Cholmondely wrote: Tue Mar 12, 2024 10:37 pm
So what does "asscoiation" really mean down under? ...and do I really want to know?
:D
Yeah, and that one too! Ha! I completely missed the obvious one, and got the subtle one!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Demand Driven Economy OXZ

Post by Redspear »

phkb wrote: Tue Mar 12, 2024 10:38 pm
Cholmondely wrote: Tue Mar 12, 2024 10:37 pm
So what does "asscoiation" really mean down under? ...and do I really want to know?
:D
Yeah, and that one too! Ha! I completely missed the obvious one, and got the subtle one!
See how easy it is? Especially after typing 216 of the damn things.

...at least I was smart enough to pre-empt them (YMMV) :P
User avatar
Cholmondely
Archivist
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: Demand Driven Economy OXZ

Post by Cholmondely »

Redspear wrote: Tue Mar 12, 2024 11:07 pm
phkb wrote: Tue Mar 12, 2024 10:38 pm
Cholmondely wrote: Tue Mar 12, 2024 10:37 pm
So what does "asscoiation" really mean down under? ...and do I really want to know?
:D
Yeah, and that one too! Ha! I completely missed the obvious one, and got the subtle one!
See how easy it is? Especially after typing 216 of the damn things.

...at least I was smart enough to pre-empt them (YMMV) :P
I'm happy to edit them, if it helps.
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
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Demand Driven Economy OXZ

Post by Redspear »

Cholmondely wrote: Tue Mar 12, 2024 11:13 pm
I'm happy to edit them, if it helps.
Criticism Feedback has been coming in from all angles in the short time since I uploaded (which is genuinely appreciated) and so I'm afraid it's worse than that.

There's at least a couple of misdesignated descriptions and there's likely to be some questionable grammer after some necessary editing for description length on my part

If you have both the time and the inclination then feel free to signpost any questionable entries (either in the file or appearing in the game).

Honestly, you're all such a bunch of peasants pedants! :P
User avatar
phkb
Impressively Grand Sub-Admiral
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: Demand Driven Economy OXZ

Post by phkb »

Redspear wrote: Tue Mar 12, 2024 11:24 pm
Honestly, you're all such a bunch of pedants!
Thanks!


That's a good thing, right?
:D
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Demand Driven Economy OXZ

Post by Redspear »

phkb wrote: Tue Mar 12, 2024 11:33 pm
Redspear wrote: Tue Mar 12, 2024 11:24 pm
Honestly, you're all such a bunch of pedants!
Thanks!


That's a good thing, right?
:D
As a card carrying member, I hope so :D

...never much of a typist though.
User avatar
phkb
Impressively Grand Sub-Admiral
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: Demand Driven Economy OXZ

Post by phkb »

Redspear wrote: Tue Mar 12, 2024 11:36 pm
As a card carrying member, I hope so :D
Yay! I've made it to the "In" crowd!

On a more serious note, there's a fairly significant bug in the way you're doing your additions to the F7 screen. You're using player.ship.targetSystem to get system information. However, if you have a multi-system jump currently set, you can use the left/right keys on the F7 screen to pull up system information on one of the in-between jump points. That changes the player.ship.infoSystem property, but not the player.ship.targetSystem property.

So, basically, you end up applying the target system information to every system in between.

Easy fix, though - replace "player.ship.targetSystem" with "player.ship.infoSystem" and you're golden.

I should point out that I made the same error in the code I shared with you, so we're probably both guilty of not spotting this one!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Demand Driven Economy OXZ

Post by Redspear »

phkb wrote: Tue Mar 12, 2024 11:44 pm
So, basically, you end up applying the target system information to every system in between.

Easy fix, though - replace "player.ship.targetSystem" with "player.ship.infoSystem" and you're golden.
My test pilot is too poor to have the ANA but even without that I noticed it when using said keys taking the player to and from present system.

Looks like v 1.7 won't be too far away but I should prob delay to find some more typos...

Meanwhile thank God for the 'find and replace' feature (that 'phrase' occurs nearly 400 times!) :lol:

Thanks phkb.

P.S. I know I should probably have used var x = what the hell ever to circumvent that but as someone who never learned to program as such, I'm making this stuff up as I go along.

... Now part of me wants to make a version where he player has to pay an additional 500 Cr to have all of the typos removed :P
User avatar
phkb
Impressively Grand Sub-Admiral
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: Demand Driven Economy OXZ

Post by phkb »

Redspear wrote: Tue Mar 12, 2024 11:52 pm
P.S. I know I should probably have used var x = what the hell ever to circumvent that but as someone who never learned to program as such, I'm making this stuff up as I go along.
Here's the code you were looking for. Add this to the top of the guiScreenChanged function, just below the "If (guiScreen ===" line:

Code: Select all

	var sys = System.infoForSystem(galaxyNumber, player.ship.infoSystem);
	var eco = sys.economy;
	var gov = sys.government;
If should end up looking like this:

Code: Select all

this.guiScreenChanged = function () {//	a little in game clue/flavour with some variance thrown in
	if (guiScreen === "GUI_SCREEN_SYSTEM_DATA") {
		var sys = System.infoForSystem(galaxyNumber, player.ship.infoSystem);
		var eco = sys.economy;
		var gov = sys.government;

Then search for

Code: Select all

System.infoForSystem(galaxyNumber, player.ship.infoSystem).economy
and replace them all with

Code: Select all

eco
Search for

Code: Select all

System.infoForSystem(galaxyNumber, player.ship.infoSystem).government
and replace them all with

Code: Select all

gov
That will (a) reduce the number of times you're using player.ship.infoSystem to 1, and at the same time reduce the number of times you're calling System.infoForSystem to 1 as well. So speed improvements included!
Post Reply