FreeOrion

Forums for the FreeOrion project
It is currently Tue Jun 19, 2018 4:03 pm

All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Tue Feb 20, 2018 5:23 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Hi i try to find out the feasibilty for adding PP to the stockpile via an item in the build queue.

This could be probably be simulated by building self-destructing ships (adding 1PP to the stockpile each), but that would really suck (lots of unnecessary artifacts: the ships (probably would need also need special ship hulls not influenced by upkeep costs and should not partake in combat at all), the sitreps, one extra turn delay; and also would be incompatible with stockpile input limits). Creating hidden ships not being part of your own empire would solve some of those artifacts i guess...

So there was the idea that there could project build items in the queue for which you can specify an amount and a number of turns/repetitions (similar to building the ships),

Design discussion is happening currently here: Feedback Imperial Stockpile (Rev 4,5). Unlimited input Rulez

First talk about such a feature Refining the imperial stockpile

So there are many issues at hand, which i dont know how to start about
  • adding a new type besides buildings and ship for the build queue.
  • instead of creating a finished project, transfer the PP amount into the stockpile when processing (and predicting) production queue
  • UI - somehow reuse the ship UI
  • adding the project to the build options, so you can drag'n'drop into the queue
  • FOCS/parser support(?)

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


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 5:57 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
I share the desire to have more fine-tuning available for how much PP gets sent into the stockpile. If I am playing sly, I don't like the situations where I have to pause all my homeplanet construction (like if I am only building something big like a colony ship) and send 20PP/turn into the stockpile when all I really needed/wanted was to send 9PP/turn. The challenge is to do it in a way that is not too much clutter.

A new build type, which would actually just be a single thing-- a 1PP stockpile transfer (could be stacked in blocks for larger amount, and set to repeat for however many turns) seems OK to me. I wouldn't require that the project have to "complete" before the PP is sent-- the Production queue would every turn the project was active hold back from construction PP up to that amount (less if less than that amount was available at this project's point in the queue) and transfer to the stockpile however much was held back.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 7:59 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 595
I like Dilvish idea.

If the PPs of uncompleted stockpiling batches are hold until it is finished it has less utility.


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 9:20 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Oberlus wrote:
I like Dilvish idea.

If the PPs of uncompleted stockpiling batches are hold until it is finished it has less utility.

Excellent that means regarding Question-A: What does it mean to specify higher amount of PP-into-stockpile-project than is supply-locally available?

The amount means: transfer up to this amount PP per turn.
The number of repetition means: do this transfer for the specified number of turns

That means an amount of 10 with repetition 3 does not necessarily transfer 30PP into the stockpile.

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


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 9:37 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 595
Yeah. We'll make the project go further, changing remaining turns, if we need more PPs.


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 9:58 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
Ophiuchus wrote:
Oberlus wrote:
The amount means: transfer up to this amount PP per turn.
The number of repetition means: do this transfer for the specified number of turns

That means an amount of 10 with repetition 3 does not necessarily transfer 30PP into the stockpile.


I think it will be much simpler to implement and understand if the repetition works the same as it does with other items, i.e., amount 10 with repetition 3 does indeed mean that 30 PP total will be transferred to the Stockpile, it just might take longer than 3 turns. This stockpile build item would still track its progress the same way any build item does, it's simply that the code that determines the stockpile change from one turn to the next will scan the queue for build items of this nature, and the amount of their allocation (the amount put into them this turn) would be added to the stockpile.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Tue Feb 20, 2018 10:06 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
I think that the bulk of work involved in implementing this idea would simply stem from updating all the various places where the code says "if this item is a BT_BUILDING then do X, else if it is a BT_SHIP do Y, else log an error or throw an exception.

If there are no objections, let's call the new item type BT_STOCKPILE.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 9:41 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Dilvish wrote:
Ophiuchus wrote:
Oberlus wrote:
The amount means: transfer up to this amount PP per turn.
The number of repetition means: do this transfer for the specified number of turns

That means an amount of 10 with repetition 3 does not necessarily transfer 30PP into the stockpile.


I think it will be much simpler to implement and understand if the repetition works the same as it does with other items, i.e., amount 10 with repetition 3 does indeed mean that 30 PP total will be transferred to the Stockpile, it just might take longer than 3 turns. This stockpile build item would still track its progress the same way any build item does, it's simply that the code that determines the stockpile change from one turn to the next will scan the queue for build items of this nature, and the amount of their allocation (the amount put into them this turn) would be added to the stockpile.

So in this case say you have locally 5 PP industry and 10PP max-industry. If you add at the top a 10PP and 3 repetitions PP-into-stockpile-project this means:
turn 1: 5PP is added to the project, i.e. the first repetition is halfway finished. 5PP get added to the stockpile
turn 2: 6PP is added to the project, i.e. the first repetition is finished, the second repetition gets 1PP. 6PP get added to the stockpile
turn 3: 7PP is added to the project, i.e. the second repetition has 8PP. 7PP get added to the stockpile
turn 4: 8PP is added to the project, i.e. the second repetition is finished, third repetition has 6PP. 8PP get added to the stockpile
turn 5: 9PP is added to the project, i.e. the last repetition is finished. 4PP get added to the stockpile. 5PP go to the next lower project in the same supply group.


Dilvish wrote:
If there are no objections, let's call the new item type BT_STOCKPILE.

BT_STOCKPILE sounds great, probably easier to do than a general BT_PROJECT

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


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 11:57 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12223
Location: Munich
Are these stockpile projects going to be located somewhere in particular, so that they only take PP from a particular resource group? If not, how is PP allocated to them from any resource group while taking into account their position on a queue that contains only other items that are location restricted?


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 2:10 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 595
Geoff the Medio wrote:
Are these stockpile projects going to be located somewhere in particular, so that they only take PP from a particular resource group? If not, how is PP allocated to them from any resource group while taking into account their position on a queue that contains only other items that are location restricted?
Yes, they will be supply-group located.
Extra details from this message onwards.


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 3:48 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
To be a bit more specific than Oberlus, the build item would be located at a particular planet just like any other build item (no need to go trying to change things like that). And yes we'd let it draw from the full local supply group, with the current stockpile rules there is no reason not to let it draw like that, it is just more streamlined, and K.I.S.S. If there are, or come to be, game rules which would be in conflict with that (like local limits on stockpile contributions) then this stockpile item should be disabled (could try to have its location condition reference all such other GameRules, but it would be much simpler to just have a specific GameRule either enabling or disabling the buildability of stockpile projects).

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Feb 21, 2018 3:51 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
As a further design planning detail, I'd have the stockpile item listed at top of the BuildWnd, not affected by the ships/buildings display buttons but affected by the available/unavailable display buttons.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Thu Feb 22, 2018 3:04 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Dilvish wrote:
As a further design planning detail, I'd have the stockpile item listed at top of the BuildWnd, not affected by the ships/buildings display buttons but affected by the available/unavailable display buttons.

I also think it doesnt make sense to add a third category there for a single nonstandard build type. Id be fine to consider it as ship and building as far as the BuildWnd is concerned.

The stockpile project would be part of the "available" category. Is there currently a reason why it could be unavailable?

I guess that some players might like to hide this stockpile project. For that i suggest in future to make the project obsoletable as soon as that category is available in the BuildWnd.

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


Top
 Profile  
 
PostPosted: Thu Feb 22, 2018 4:06 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4646
Ophiuchus wrote:
The stockpile project would be part of the "available" category. Is there currently a reason why it could be unavailable?

I guess that some players might like to hide this stockpile project. For that i suggest in future to make the project obsoletable as soon as that category is available in the BuildWnd.
Since it is only a single item I don't think that anyone needs to be able to obsolete it, or even should be able to, really. It would be fine with me if it were just always visible regardless of any of the ship/building/available/unavailable buttons, but it seemed simplest and most logical to just consider it always 'available' and lets its display be subject to the state of the 'available' and 'unavailable' buttons.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Sat Feb 24, 2018 1:56 am 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 389
From what I've followed so far, there are two different options proposed for this new item type.

One option is to have the item define a goal amount to send to stockpile, where the new progress each turn is transferred and the item removed once the goal is reached.
e.g. "Stockpile 50 PP" (Though this will probably first be implemented as 50 * Transfer to Stockpile)
This would need some way to distinguish that the previous progress was already spent/transferred.
The batch controls (e.g. ships) could be used for this option.

Another is for the item to complete each turn (when not paused and has some progress) with the value altered to the amount of progress.
e.g. "Stockpile up to 5 PP/turn" (Again, likely 5 * Transfer to Stockpile)
These should either default to or have an option for infinite repetition.
Would help if the height on queue can be reduced to a bare minimum and/or have controls to filter the queue (with a separate option for projects here).

These may not be mutually exclusive options, but the later would be my first choice.

_________________
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group