[RELEASE] Risk-based Economy

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

Moderators: winston, another_commander

User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: [RELEASE] Risk-based Economy

Post by mossfoot » Sat Jul 12, 2014 7:29 am

Would it be too ambitious to propose creating something that alters markets based on assumptions of trade in local (within one jump) systems over time, with occasionally resets of other modifying factors?

For example, there is a tech 4 commie agro planet next to Xexedi (tech 14) in galaxy 1. You'd think computers and machinery would get saturated there over time?
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim » Sat Jul 12, 2014 8:10 am

True, though the output from Xexedi gets split between seven agricultural systems and three mixed systems - and the only other properly industrial system in the region is Lerelace.

If I redo the OXP for 1.80, I'll just directly use the trader volume, which 1.80 calculates based on the government and economy of the local group.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] Risk-based Economy

Post by Diziet Sma » Sat Jul 12, 2014 8:47 am

cim wrote:The current release won't work very well with OXPs which keep secondary markets over save/load
Could you elaborate on that a little, please? I have Spara's In-System Market Restore installed as well, and am wondering if perhaps both together is not a good idea at present, in light of the above.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim » Sat Jul 12, 2014 9:30 am

Diziet Sma wrote:Could you elaborate on that a little, please? I have Spara's In-System Market Restore installed as well, and am wondering if perhaps both together is not a good idea at present, in light of the above.
Essentially the secondary markets may be adjusted again when you reload (depending on whether Spara's OXP runs before or after this one). Simple hack to avoid that: change

Code: Select all

if (!ship.isStation) { return; }
at the top of the shipSpawned function in risk-based-economy.js to

Code: Select all

if (ship != system.mainStation) { return; }
and it'll only apply to the main station markets from then on.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] Risk-based Economy

Post by Diziet Sma » Sat Jul 12, 2014 10:16 am

Ok.. thanks!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2550
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] Risk-based Economy

Post by spara » Sat Jul 12, 2014 2:17 pm

FWIW, market restore oxp restores the market (or tries to) on shipSpawned.

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim » Mon Sep 15, 2014 8:37 pm

A reworking of this for 1.81

The basic principle is the same but the internal implementation is quite different (and the prices may well differ a bit from the original)
http://compsoc.dur.ac.uk/~cim/oolite/Ri ... my_2.0.oxz

Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: [RELEASE] Risk-based Economy

Post by Zireael » Tue Sep 16, 2014 12:34 pm

YEEAH!!!

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 1997
Joined: Mon May 31, 2010 11:11 pm

Re: [RELEASE] Risk-based Economy

Post by Switeck » Tue Nov 14, 2017 7:10 am

cim wrote:
Mon Sep 15, 2014 8:37 pm
A reworking of this for 1.81

The basic principle is the same but the internal implementation is quite different (and the prices may well differ a bit from the original)
http://compsoc.dur.ac.uk/~cim/oolite/Ri ... my_2.0.oxz
Link seems broken. :(

New link in post below mine does indeed work.

I'm looking for javascript logic to work with the economic model used in Oolite v1.82 and later.
I've seen a couple OXPs/OXZs that work around the economic model but never with it. :P

I'm trying to come up with formulas to generate lowest and highest prices for a system for any given "common" (non-OXP) commodity.
Best I can do so far is use:
remotePrice = this._priceForCommodity(commodity,destinationInfo);
...over-and-over again and then pick the lowest and highest ones from the bunch.
Last edited by Switeck on Tue Nov 14, 2017 8:33 am, edited 2 times in total.

User avatar
phkb
Commodore
Commodore
Posts: 2317
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: [RELEASE] Risk-based Economy

Post by phkb » Tue Nov 14, 2017 8:03 am

This should work: Risk-Based_Economy_2.0.oxz

Post Reply