[RELEASE] Risk-based Economy

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

Moderators: another_commander, winston

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 »

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: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim »

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: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] Risk-based Economy

Post by Diziet Sma »

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: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim »

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: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] Risk-based Economy

Post by Diziet Sma »

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: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] Risk-based Economy

Post by spara »

FWIW, market restore oxp restores the market (or tries to) on shipSpawned.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: [RELEASE] Risk-based Economy

Post by cim »

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 »

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

Re: [RELEASE] Risk-based Economy

Post by Switeck »

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
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4646
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [RELEASE] Risk-based Economy

Post by phkb »

This should work: Risk-Based_Economy_2.0.oxz
Post Reply