i've got an idea, and I'm willing to implement it (very slowly because time, you know...).

But before spending days on developing it, I'd like to know what you think about it.

Mainly, it's this: developing a background of wars, attacks, victories, defeats, alliances, treachery and taxation for Oolite systems.
This background would evolve on a turn-by-turn basis, each turn happening during a jump of the player.

The main advantages as I see it:
- the player would be taxed (depending on their chosen base system and the system they enter), which would erode their money and balance the game (too much money being a problem),
- the background of wars could be understood as a developing (hi)story by the player,
- the oxp would provide some hooks for other oxps to know and react (on which system attacks which system, who defends, who loses, what are the alliances, the enemies, the bankrupt systems, what is the current economy (size, taxation), what is the goodwill of a system towards others... ),
- the story sentences could be enriched by other oxps ( )) )

Programmatically, I think a simple (!) machine state could be enough.

What do you think ?

Day

Last edited by Day on Thu Mar 16, 2017 2:16 pm, edited 1 time in total.

I think this kind of thing might work best if it had periods or relatively high activity (one turn per jump) with much longer periods of no activity. Otherwise I get the impression that the story could become rather dominant.

The money issue is a tricky one as early on in game it's not that easy to come by and only really becomes a problem later on.

This might be a good way of adding more flavour to systems cursed by occasional/frequent civil wars and also limiting this oxps influence (so that many systems are neutral) might be a way to 'season the pot' without overpowering the main ingredients of the game.

I think this kind of thing might work best if it had periods or relatively high activity (one turn per jump) with much longer periods of no activity. Otherwise I get the impression that the story could become rather dominant.

Interesting remark, I hadn't thought that the story becoming dominant could be a problem. But you're right, for certain types of players, like miners, it could be boring.
Hmm... Frequency could be configurable, and episodes too. And maybe some would not be informed of everything happening in the galaxy. And maybe some could not (a system which information are blockaded...).

Thank you Redspear

Quote:

The money issue is a tricky one as early on in game it's not that easy to come by and only really becomes a problem later on.

Yes. In fact, the idea came from having too much money. For what is money mainly consumed in our world? War through taxation, of course!
I haven't decided yet how in-story the player is taxed. Do they have a tracer? Nope, so how? It should allow a progressive tax, so beginning players aren't taxed.

Quote:

This might be a good way of adding more flavour to systems cursed by occasional/frequent civil wars and also limiting this oxps influence (so that many systems are neutral) might be a way to 'season the pot' without overpowering the main ingredients of the game.

Yes. In fact, I think I'll have lots of experiments to do to see how galaxies evolve without converging towards a fixed state, or a boring state. And I'll take all suggestions on this.

Hmm... Frequency could be configurable, and episodes too. And maybe some would not be informed of everything happening in the galaxy. And maybe some could not (a system which information are blockaded...).

I haven't decided yet how in-story the player is taxed. Do they have a tracer? Nope, so how? It should allow a progressive tax, so beginning players aren't taxed.

You can take Docking Fees OXP and hack it for your needs to achieve this. For instance, my locally hacked version takes into account the gov/econ/TL of the system and the cargo bay size of the ship. The F7 screen gives other system properties that could be used too. The only drawback I've found is that if you press F1 by accident (it happens to me from time to time), you may have to pay twice which may or may not be a problem depending on how high are your taxes.

Well the attitude of the rich is you can never have to much money. So I hope some form of aggressive tax evasion will be available to the richer players.

Good idea !

Tax reduction is generally done through three means:
- investment on projects deemed strategic to the society by the government (reduction),
- identifying falsely the money usage as strategic investment (fraud),
- identifying the money owner as another system's citizen (evasion).

If you see something else, please propose

Reduction may be proposed as a hook to other oxps XD
Fraud, idem I suppose.
Evasion... I need to think on this. It's related to the looting, the spoils of wars. Historically, one put its money elsewhere to protect it from one's own government and from war. So, it's related to the way the tax is in-story known and collected.

You can take Docking Fees OXP and hack it for your needs to achieve this. For instance, my locally hacked version takes into account the gov/econ/TL of the system and the cargo bay size of the ship. The F7 screen gives other system properties that could be used too. The only drawback I've found is that if you press F1 by accident (it happens to me from time to time), you may have to pay twice which may or may not be a problem depending on how high are your taxes.

this is the version 0.1 of the Diplomacy OXP. Its intended goal is to allow historical events to happen between systems (attacks, loots, alliances, taxes...),
and to have actions depending on this (news, massed flottillas, state racket, who knows?).
Technically, I see it as a war/diplomacy framework.

What's currently implemented?

Functionality-wise, the oxp currently adds flavour by displaying a Tax level and a Treasury level in the F7 system information.
Each system treasury is increased by taxation each player jump.
Why taxation? Because wars require money, and countries are defeated either by battles or by bankruptcy, sometimes the latter producing the former.
So systems treasury should be a main factor in a war/diplomacy framework.

Technically the oxp contains an Engine which defines some useful classes (between double quotes) and not-classes (between single quotes) for oxp developers:

An 'EventType' is a string defined by an oxp developer. As an example, the system taxation EventType is "SELFTAX".
EventTypes are stored in an ordered array, so that "Event"s' "Response"s and "Action"s may be executed in a designed order
(for example, "VICTORY" should follow "ATTACK" and not happen before ).
For a same EventType, recurrent "Action"s are executed before "Event"s.

An 'ActorType' is a string defined by an oxp developer. As an example, the system ActorType is "SYSTEM".
ActorTypes are stored in an ordered array, so that "Event"s' "Response"s and "Action"s may be executed in a designed order
(for example, "SYSTEM"s should act before "ALLIANCE"s as information come to alliances through their systems ).
For a same ActorType, recurrent "Action"s are executed before "Event"s.

An "Action" may be said init (only executed once at the creation of an Actor) or recurring (executed each turn).
An "Action" encapsulates a function, which typically will fire Events, or act onto the Oolite world.
It contains: an 'EventType', an 'ActorType' (whose kind of actors will execute this action?), and a function.

An "Event" is something done by an "Actor", to which other Actors may react by some "Response"s.
It contains: an 'EventType', the acting Actor id, and some args to be used by the Responses (defined by the oxp developer).

An "Actor" is everything which should react to events. Systems are Actors, Alliances will be.
It contains : an 'ActorType', the Actor id, its responses, and the observing other actors' ids.
An Actor observer is another actor which may react onto that actor events.
This is useful so that for example only near systems may react to an event, and not far away systems.
It's useful to limit the cpu load too by at least a factor 100.

A "Response" encapsulates a function.
It contains: an Id, the 'EventType' to which it responds, the 'ActorType' of actors which will use this response, and a function which may use the args given in the event.

Now, how do an oxp developer interact with the engine to use these marvelous concepts?

To be written
But check DayDiplomacy_1_Systems.js and DayDiplomacy_2_Tax.js to see how the systems and the taxation were implemented in less than 70 lines each

==============================
Effects on game difficulty

None yet.

==============================
Compatibility

==============================
Dependencies

==============================
Instructions

Do not unzip the .oxz file, just move into the AddOns folder of your Oolite installation.

==============================
License

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License version 4.0.
If you are re-using any piece of this OXP, please let me know by sending an e-mail to david at pradier dot info

==============================
Changelog

0.1 First version of the Diplomacy engine. Systems are introduced as a type of "Actor". "SELFTAX" is introduced as an event for systems. Tax level and treasury are displayed on the F7 screen.

Last edited by Day on Fri Mar 17, 2017 2:43 pm, edited 1 time in total.

And what's the current main limitation?
A performance bottleneck: 1024 systems emitting events which are processed by 1024 other systems means millions of processed events each turn.
So next version will be assigned to performance improvement, and load repartition (probably on frame callbacks when in-station).

Bug-free as much as i know. For this version, I didn't test deeply the Event+Response functionalities.
Systems/Taxes were implemented through Init/Recurrent actions.