Imperial resource supply distribution (Imperial stockpile)

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#16 Post by Vezzra »

Ophiuchus wrote:Following design questions need to be answered by solutions regardless of supply ships/supply group ships/remote supply buildings:
On functional level
a. Mechanism to build scanning facilities at outposts (e.g. special ship part which creates the building there)
Why? By designing the Scanning Facility as a building with a certain cost this thing isn't intended to be buildable at a remote outpost outside your supply range. IMO the Scanning Facility in its current form has to go or be revised drastically anway, because right now it's a "build everywhere" building, something we specifically do not want.

And it's definitely not meant to be put on far away, disconnected outpost, especially at the current price that's totally overpowered.

But that aside, assuming we want to enable the player to set up something that can monitor the surroundings of a far remote system that's in a strategic key location, why bother with a ship part that creates a Scanning Facility on an outpost? Just let the ship part take over the function of the Scanning Facility (essentially a scanner part with enhanced range), make it sufficiently expensive (maybe even a core part), and instead of a ship creating a building, the ship does what the building was supposed to do. Simpler :)
Mechanism to use PP produced at disconnected supply groups (e.g. put them in a local stockpile until the area is supply connected)
Well, here we're getting closer to the heart of the matter. PP produced at disconnected supply groups are supposed to be very difficult or even impossible to preserve (of course you can always enqueue something at that system that has been cut off you might want to build there anyway at some point), and part of why you might want to cut enemy supply lines - to make them loose/waste PP.

Any mechanic/feature that enables the player to circumvent/counter that problem should not be easy to get, it should have a high price and severe limitations/drawbacks.
Mechanism to build faster at disconnected planets/supply groups (e.g. construction ship using PP from different planet)
Basically the same as above: If there is a disconnected part of your empire, building there is supposed to be slower and more difficult. Cutting off a part of an enemy empire to disrupt production there needs to stay a viable strategy.

Being able to counter this should come at a respective cost, and with respective limitations/drawbacks.
Optional: Mechanism to make use of excessive PP (e.g. stockpile them)
Well, why having a resource that's stockpileable and "location-dependent" (because only distributable along supply connections) isn't a good idea has already been covered.
Decision how and if an enemy should be able to disrupt this
If: oh yes, definitely! If an enemy can't cut your supply lines because you can distribute your PP e.g. through something like a stargate-like supply network, we need to provide some means by which that can be disrupted/blocked/countered.

How: some ideas off the top of my head: "Stockpile Siphon": a tech that enables you to somehow "hack" into the supply network of an enemy that constitutes the global stockpile and siphon PP from there to your own stockpile. "Virus Injector": a tech that allows you to inject a deadly virus into the supply network of an enemy, which spreads to their colonies and kills off population.

I'm sure you now probably got some nasty ideas of your own... :twisted:
Decision if and by how much this way of production is more expensive than the usual way
If: again, definitely yes! Like stargate travel remains the special case even once you get that tech, distributing PP among disconnected supply groups should stay the special case, it should extend, not replace the usual way, and that's best done by making it costly. I'd start with a 1:10 ratio, where you have to put 10 PP into the stockpile to get 1 out of it. Or at least 1:5. Being able to increase efficiency via research is definitely a very good idea, but the cap should be a 1:2 ratio (at maxed out tech).
Decision if supply groups are actually necessary for PP distribution (or if a imperial pool suffices)
Definitely yes again. As I said above, the usual way should remain, even once you got the tech for the "enhanced" way. Otherwise the thing becomes far too overpowered.

Requiring a sufficiently expensive building to connect a supply group to the global stockpile is a must have IMO. The player should have to invest to be able to do that, and the mechanic shouldn't enable the player to connect a lone outpost, like stargates, the disconnected supply group should have to be large enough to sustain production of the building.

Connecting far remote outposts or even lone colonies should be particularly difficult (albeit not impossible). E.g. a very high-end late-game tech that gives you a very expensive core ship part, like a ship based mini-stargate, which has a tight limit on how much PP it can retrieve from the global pool per turn.
Check that player decisions how to allocate PP to projects need to be made by just manipulating the queue.
Yep, that's important.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Help needed with scripting supply ships

#17 Post by Geoff the Medio »

I thought I indicated it earlier, but perhaps I didn't: Any PP stockpile mechanism that can circumvent supply connection requirements would definitely need to have a severe penalty to PP sent to it. I'd probably also have a cap to how much PP can be stored. It would also need to be unlocked by tech and/or producing buildings, at least with the earliest available methods for doing so. Perhaps at the start of the game, things generally work as they do now. Then with a mid-game tech, one can unlock buildings that let one send PP to the stockpile, which can be spent anywhere, or perhaps just anywhere connected to one of the buildings. Then later, it could be spent anywhere, even if not connected to a buidling (but still not added to the stockpile from anywhere). Additional techs (or buildings) would slightly improve the tax for putting into the stockpile, say form 90% to 85% and then 80%, and increase the stockpile capacity. Getting substantially close to not having to worry about supply connections should only be possible, if at all, at the late game, when empires are nearly ascending anyway. Might also consider having a species train related to granting stockpile access, at a relatively basic level.

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#18 Post by Vezzra »

Geoff the Medio wrote:I thought I indicated it earlier, but perhaps I didn't...
Or maybe I missed it somehow. Anyway, that sounds much better. I'd still prefer to be more restrictive in some aspects (e.g. always requiring a building to connect a supply group to the global stockpile, even with the most advanced techs, or at least a very expensive high-end tech ship), but these are details and I have to be willing to compromise too of course. ;)

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#19 Post by Vezzra »

Ophiuchus wrote:Actually I don't see the need for a building as I do not see the need to restrict access.
A building requires a substantial (if priced properly) investment and takes some time to build. Which achieves two things: a disconnected part of your empire needs to be large enough to sustain the production of the building (you can't just easily connect every single little remote outpost or small distant colony), and it takes some time to establish the connection. So if an enemy cuts off part of your empire, you can't reconnect immediately, you loose at least some turns and the PP required to build the "stockpile connector" building. Meaning, you are able to connect a disconnected part, but it's not too easy and too quick.

Also, a building ties the ability to connect to the global stockpile to a specific location, which can be attacked and destroyed, so your connection to the global stockpile needs to be properly defended, and can be cut off. If an enemy manages to do that, you can of course rebuild on a different colony within the disconnected part, but at least you again loose valuable resources.

These are very important elements to impose a proper cost, weakness and limits on the feature, to balance the powerful advantage it gives you.

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#20 Post by Vezzra »

Ok, some more comments from my side, to close my series of posts:

I've to admit, provided this idea is designed and implemented properly, meaning, with the respective costs (both research and build costs), weaknesses, drawbacks and limitations that keep it balanced, possibilities for an enemy to disrupt/interfere with it, and done so that it never completely replaces/obsoletes the normal way of PP distribution (or at least can only come close to that under special circumstances), then I can definitely warm up to it. The more I think about the possibilities and potential new things this offers for gameplay, the more I like it! :D

That said, one thing is clear: given how big a change/addition to a basic key mechanic this is, I suspect the AI adjustments are going to be substantial. @Morlic & Cj, can you give a (of course very rough) first estimate how much effort that might require? Just to get an idea what we're getting ourselves into. ;)

Meaning, this can't go into master anytime soon. 0.4.7 is completely out of the question, and even 0.5 won't be possible if we want to preserve any hope to get that out in 2017. Of course, we can decide to have this and the Influence stuff in 0.5, but then we'll have one excessively long release cycle to deal with, because in that case I don't expect 0.5 to be ready before summer 2018. Especially since the Influence stuff will require even more AI adjustments...

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Help needed with scripting supply ships

#21 Post by Morlic »

I've to admit, provided this idea is designed and implemented properly, meaning, with the respective costs (both research and build costs), weaknesses, drawbacks and limitations that keep it balanced, possibilities for an enemy to disrupt/interfere with it, and done so that it never completely replaces/obsoletes the normal way of PP distribution (or at least can only come close to that under special circumstances), then I can definitely warm up to it. The more I think about the possibilities and potential new things this offers for gameplay, the more I like it! :D

That said, one thing is clear: given how big a change/addition to a basic key mechanic this is, I suspect the AI adjustments are going to be substantial. @Morlic & Cj, can you give a (of course very rough) first estimate how much effort that might require? Just to get an idea what we're getting ourselves into. ;)
Currently, the AI does not really check if an enemy system is supply-connected or isolated afaik. So having the human player do some "magic" PP-shifting does not worry me.

Letting the AI actively use that feature is another topic. Not sure how much work that is, probably depends on the system that is implemented and how complicated the logic would be when and how to use it. As long as it is a mechanic which is only useful in edge cases and the current PP distribution along supply lines is the default case which works as before, I would actually be fine with implementing the feature without having the AI use it (until someone finds the time and interest to implement it). There are many current gameplay nuances that the AI does not understand or use.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#22 Post by Vezzra »

Morlic wrote:There are many current gameplay nuances that the AI does not understand or use.
That's true, point taken. Still, I expect that to be one of those gameplay nuances which are of the more serious kind that the AI is ignorant of, and where the human player gains more than just a slight advantage by being able to use it.

But I guess you're right, it's not serious enough that we absolutely have to have AI adjustments in place before we can include the feature into the game. Which makes things much easier of course, and we should be able to integrate this mechanic much quicker.

Which in turn leads me to a suggestion: Instead of following 0.4.7 (fighter/carrier release) up with 0.5 (Influence/colony upkeep release), we could do a 0.4.8 release in between, which would primarily be about this new mechanic. Given that Ophiuchus has already an implementation ready to put up a PR (or is close to that point), that could in theory be done by autumn. Of course, 0.5 would be delayed until 2018 if we decide to do this.

Comments, opinions, votes?

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Help needed with scripting supply ships

#23 Post by Morlic »

Vezzra wrote:I expect that to be one of those gameplay nuances which are of the more serious kind that the AI is ignorant of, and where the human player gains more than just a slight advantage by being able to use it.
I am not sure how many cases there are where the new mechanics are actually that useful. Probably I am simply too uncreative to think of (m)any. Here is what I come up with:
  • Building Colony buildings on outposts --> Not really needed as you can use Colony ships.
  • Building some star-dependent improvement (Black Hole Generator) --> Either requires supply lines anyway or comes so late that having a suitable location already is expected (-> edge case)
  • Building Scanning Facilities / Lighthouses --> No good AI logic exists for that yet even for existing mechanics
  • Building some special shipyard at some location --> No good AI logic exists for that yet even for existing mechanics
  • Fancy stargate stuff --> AI doesnt use those yet
  • Supplying shipyard that is blockaded by an enemy --> Questionable if the planet isn't conquered by the enemy when ships are finished
  • Stockpile resources while nothing too useful can be built --> Probably the most important part... How useful that is depends on the actual implementation. A limit on the global stockpile (possibly increased by techs) can easily make this point "mostly" useless (e.g. a stockpile of 10k can be used to suddenly build 30 ships but if the limit is 50PP, then at most 1 additional ship can be built...)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6100
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Help needed with scripting supply ships

#24 Post by Vezzra »

Probably depends what galaxy shapes you prefer to play, and how likely it is that parts of your empire could be cut off from the rest. Nevertheless, your assessment is probably right and mine wrong, but as you said, that of course depends on how the new mechanic actually is going to work. Only playtesting will show how much of an advantage a human player can gain by using this when the AI can't.

One strategy that's not viable now might become possible: trying to establish a group of colonies at a far removed corner of the map (that is, far removed from your empire) and then linking it to the main body by that new mechanic. Of course, there'd have to be something really valuable in that corner you'd want to acquire at all costs, which makes this an edge case too, an extremely hypothetical at that... ;)

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Help needed with scripting supply ships

#25 Post by Morlic »

Only playtesting will show how much of an advantage a human player can gain by using this when the AI can't.
Which is actually an argument for merging this before the relevant AI changes.
Which in turn leads me to a suggestion: Instead of following 0.4.7 (fighter/carrier release) up with 0.5 (Influence/colony upkeep release), we could do a 0.4.8 release in between, which would primarily be about this new mechanic. Given that Ophiuchus has already an implementation ready to put up a PR (or is close to that point), that could in theory be done by autumn. Of course, 0.5 would be delayed until 2018 if we decide to do this.

Comments, opinions, votes?
As far as I am concerned, I am fine with that... I have some half-finished rework for the AI production lying around that could probably be extended to include the new mechanics (if there are actually use cases that are relevant for the AI).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Ophiuchus
Programmer
Posts: 3459
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Help needed with scripting supply ships

#26 Post by Ophiuchus »

Wow that was a lot of comments in a short time.

Two things. First I'll reiterate my reason to invent the idea:

I wanted to enable a certain playing style based mostly on deep-space exploration (sneak inbetween enemies, try to grab rather "better" than "more" planets) which is ATM doable but doesnt make any sense as any other strategy will perform better. You can't defend disconnected planets (so hiding is the only real choice there). And they won't add to your production in a meaningful way (no supply-connection to specials and buildings).
With older freeorion versions there were the overlapping supply networks, so you have overlapping empires as well. Having heavily invested in sneaky tech ("unstoppable by the enemy") but not being able to support disconnected planets felt really wrong.

Having Supply ships are a solution to this. The current version works and could be improved by using ships as production location mechanic.


Geoff thought supply-ships too micro-managy, so we devised the imperial stockpile as a simpler mechanic in terms of user interface. I see that you think that imperial PP distribution is a very powerful thing. What is so powerful is all the bonus you get if you have supply connection to specials and buildings (KI spice, industrial center, black hole generator...). So you will always want to connect your planets to the supply line. Especially if you make PP in the stockpile more expensive. Who would want to get only half the number of ships for the same effort?

My imperial stockpile implementation works well enough for basic playtesting and it is quite easy to use. I did one game now where I really used the feature on multiple occasions. I think it was handy but not a game changer.

What is missing mostly now is caps, UI and scriptability.
The minimum I would need in scriptability I think:
* an action to transfer all overproduction PP to the stockpile and attach a limit and multiplier
So one could guard this with technology, buildings and locations etc...
But maybe this is to hard. Hope you have some advice for me.

And of course the code needs refactoring and cleanup (and removing the 500PP you get in the beginning in the stockpile ;) )
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Help needed with scripting supply ships

#27 Post by Geoff the Medio »

Ophiuchus wrote:What is missing mostly now is caps, UI and scriptability.
The minimum I would need in scriptability I think:
* an action to transfer all overproduction PP to the stockpile and attach a limit and multiplier
So one could guard this with technology, buildings and locations etc...
But maybe this is to hard. Hope you have some advice for me.
I'd implement both the stockpile capacity limit and the fraction of put in PP that gets converted to stored PP as empire meters. No need to add any scriptable actions to do any transfers; it should all be handled in C++ as part of the production update and queue allocation.

Ophiuchus
Programmer
Posts: 3459
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Help needed with scripting supply ships

#28 Post by Ophiuchus »

Geoff the Medio wrote:
Ophiuchus wrote:What is missing mostly now is caps, UI and scriptability.
The minimum I would need in scriptability I think:
* an action to transfer all overproduction PP to the stockpile and attach a limit and multiplier
So one could guard this with technology, buildings and locations etc...
But maybe this is to hard. Hope you have some advice for me.
I'd implement both the stockpile capacity limit and the fraction of put in PP that gets converted to stored PP as empire meters. No need to add any scriptable actions to do any transfers; it should all be handled in C++ as part of the production update and queue allocation.
Ill give the meters a try.

I was thinking a while about UI considerations and I don't think that a PP stockpile limit is a good idea. You would need to differentiate between PP used normally, PP put to the imperial stockpile and PP wasted completely.
As far as I understood the main concern was that you could suddenly build a lot faster where you need it (e.g. a big fleet suddenly pops up in the other corner of the galaxy) which should be end game tech like the star gate.
I think putting a limit on how much PP from the stockpile you may use per turn would also suffice for that and would not have so many UI issues.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Help needed with scripting supply ships

#29 Post by MatGB »

Ophiuchus wrote: Two things. First I'll reiterate my reason to invent the idea:

I wanted to enable a certain playing style based mostly on deep-space exploration (sneak inbetween enemies, try to grab rather "better" than "more" planets) which is ATM doable but doesnt make any sense as any other strategy will perform better. You can't defend disconnected planets (so hiding is the only real choice there). And they won't add to your production in a meaningful way (no supply-connection to specials and buildings).
With older freeorion versions there were the overlapping supply networks, so you have overlapping empires as well. Having heavily invested in sneaky tech ("unstoppable by the enemy") but not being able to support disconnected planets felt really wrong.
Aaah.

This explains what you're going for far better than I'd read before and changes my perspective on it a fair bit: it's part of a make "stealth as a strategy" work, and as such the way you're trying to do things does make a lot more sense.

I was very much opposed to the idea at all as it does go against the basic design principles thus far, but I'm also very keen on getting stealth to be a usable strategy, especially in the early to mid game, where it currently is a fairly hit and miss all or nothing thing, and I can definitely see the appeal of playing as, say, Laenfa and trying to hide all your planets, only coming out when you want to/are ready.

And the new supply mechanics do make a disparate hidden empire substantially harder to create in a way I hadn't really tested: I had until now just been thinking "why don't you just conquer and extend supply" but your rationale makes the basic plan a lot more appealing, we should be able to allow sucha strategy within the mechanics.

But it does need to be balanced, carefully: on that I agree completely with Vezzra, something built that ties planets together, perhaps linked to existing stargate techs (at the very least to the prerequisite techs), but with basic functionality available earlier in some way would be good, buildings or focus settings should very much be needed.

It reminds me very much of the Hydrogues in Kevin Anderson's Saga of the Seven Suns: while I gave up on the series out of boredom at the plot, the setting was really interesting, and having an entire civilisation completely hidden from the other powers but linked together via a wormhole network is an interesting idea.

I have wanted to do some balancing work on stealth for ages, it's kept getting knocked down the priorities for other things, although some of the ideas have come in with, for example, recent changes to the Spatial Flux hull. I have zero problem with the idea of inserting an extra 'project' before Influence assuming that's going to be delayed anyway, but I would want to keep the release cycle quicker if at all possible. If we combine this idea with some changes to the numbers for existing stealth parts, detectors and techs to allow for refinements and searching/scanning in some way this could be a very interesting plan.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Ophiuchus
Programmer
Posts: 3459
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Help needed with scripting supply ships

#30 Post by Ophiuchus »

@Vezzra regarding cutting the thread - If it helps - could you please split the thread at http://www.freeorion.org/forum/viewtopi ... =30#p86484 and set subject like "Imperial supply distribution discussion"? The supply ships were finished at that time and the more general approachs started being discussed. Could also move it to (other?) game design. Would be great. I'll try to get it right from the beginning next time.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply