FreeOrion

Forums for the FreeOrion project
It is currently Sun May 27, 2018 9:27 pm

All times are UTC




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sat Apr 14, 2018 5:31 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
Ophiuchus wrote:
I made a PR-2072
Rather busy this days, but I'll try to (learn to) merge it and give it a try.


Top
 Profile  
 
PostPosted: Mon Apr 16, 2018 11:26 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Dilvish wrote:
Just to doublecheck (I don't think this is the case), are you thinking that fast focus switching needs more of a penalty currently? If so, please give an example with numbers.

I did not mean in the generic case. The case I originally meant is the FAST-CHANGE-MICROMANAGEMENT i already described before: There is an enemy fleet approaching, i want to boost production at a certain shipyard out of main supply. Lets say I need 30PP extra stockpile extraction starting in two turns. With 1 PP growth I need to switch 15 planets to stockpiling (accumulating first turn +15 (15*1), second turn +30 (15*2)) As a micromanager before turn three I switch back focus of 5 planets (+30 (10*3)) and before turn four another 2 planets (+32 (8*4)), before turn five another two planets (+30 (6*5)) and so on. With fast switching (and local stockpile of about 3) you would switch 3 planets (first turn +18 (3*6), second turn +36 (3*12)), switching back 1 planet before turn three (+48 (2*24)) and also 1 planet before turn four (+48 (1*48)). Of course i didnt consider max stockpile in this example, but it should give the feeling of what im trying to do here.

Dilvish wrote:
Or is it that you are wanting to make a more valuable tech providing the fast growth here and then felt that needed to be counterbalanced somehow to prevent fast switching?

No the idea was originally to start the fast growth very low (e.g. 0.1, 0.2, 0.4, 0.8, 1.6, 3.2,...) so it takes about five turns to get 1PP. Or in other terms: With a growth like 0.1 if you need next turn 20PP, you need to switch 200 planets which is easily to understand a bad idea cost-wise. Then having the fast growth and you waited five turns, you only needed to switch seven planets for the same effect.
.

But then i didnt know how to script that without using another planet meter to distinguish the stockpile limit effect from focus from other stockpile limit effects.
(I think it is not possible to find out how much a single effect did the last turn... actually thinking more about it i could do this using TurnsSinceFocusChange). I pushed a fix to (and rebased) the PR which works like I intended. Without focus always +0.1 growth, with stockpile focus first turn +0.2, 2nd turn +0.4, 3rd turn +0.8 ...

Dilvish wrote:
In either case, I'm not really seeing how the slow default growth rate actually discourages fast switching, could you explain that more?

I think I mixed up the ideas so the current implementation doesnt work like i wanted it. You are right, it the steady slow growth was not about focus switching. There are some stockpile limit bonus by using the growth focus (e.g. so you can "boost" stockpile +1PP before researching the focus) which would only have the slow growth.

So for simplicity of planning and reducing possible micromanagement it would maybe make more sense to skip the meter growth completely and have a simple timer before the focus effect kicks in completely. I mean - if the focus would give you e.g. 8PP extra limit, for the time the timer is running e.g. five turns the limit would get nothing extra and in the sixth turn you get the full 8PP extra. So doing the focus dance like above would not help you at all. For the timer I could use TurnsSinceFocusChange. I could add a neglible effect (+0.001PP) to the stockpile limit to inform the player how many turns one has to wait (stringtable: "Expecting focus effect to kick in in turn xx").

But maybe as i restricted the planet types (and therefor the number of planets you can switch to stockpiling focus) there is no need for the timer and we could go to target effect in a single turn(?).

edit1: correction of why the slow growth actually has an effect (if you set the growth focus).

edit2: pushed a change to the PR for implementing stockpile growth like intended

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


Last edited by Ophiuchus on Mon Apr 16, 2018 12:34 pm, edited 5 times in total.

Top
 Profile  
 
PostPosted: Mon Apr 16, 2018 11:32 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Oberlus wrote:
Ophiuchus wrote:
I made a PR-2072
Rather busy this days, but I'll try to (learn to) merge it and give it a try.

As these are only scripting changes probably you would not need to merge (until some bigger changes go into the master which also affect scripting).

You could simply download the default directory from github and point your scripting directory in freeorion settings there.

_________________
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: Mon Apr 16, 2018 2:17 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
Ophiuchus wrote:
Lets say I need 30PP extra stockpile extraction starting in two turns....
Thanks for writing that up with numbers like I asked. I did notice, though, that (unless I really overlooked something) you didn't tally up the PP and RP that would be paid as penalty in order to boost the stockpile like that-- with or without the current PR that lost PP and RP is going to be the actual cost paid for increasing the stockpile meter by whatever amount and so I think we need to look at that. And rather than twiddling with the stockpile meter growth rate I would like to suggest that you simply look at adding a Stockpile meter clause (having the same structure as those for Industry and Research) into the FOCUS_CHANGE_PENALTY macro found in species/common/general.macros; I think that by itself would entirely resolve the concern you have identified, and in a way consistent with our other meter handling.

_________________
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 Apr 18, 2018 1:57 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Dilvish wrote:
you didn't tally up the PP and RP that would be paid as penalty in order to boost the stockpile like that-- with or without the current PR that lost PP and RP is going to be the actual cost paid for increasing the stockpile meter by whatever amount and so I think we need to look at that.

Well yes we need to look into it more and no, i did something like that last year and it would have made writing it up a lot less transparent. If you need 20 ISPP at once and you have two turns of wait, you pay about 60PP for waiting and another 60PP, so 120PP for 20ISPP with the next turn switching 10 planets back 40PP for 20ISPP. I think playtesting is the way to go there.

Quote:
And rather than twiddling with the stockpile meter growth rate I would like to suggest that you simply look at adding a Stockpile meter clause (having the same structure as those for Industry and Research) into the FOCUS_CHANGE_PENALTY macro found in species/common/general.macros; I think that by itself would entirely resolve the concern you have identified, and in a way consistent with our other meter handling.

I am not completely happy how the FOCUS_CHANGE_PENALTY implementation works (growth is calculated somewhere else although highly coupled and no UI explanation at all).

I could do something similar for the stockpiling focus like stopping growth for three or four turns which would penalize the switch in a meaningful way i think. But I am not convinced that stockpile should work the same way as industry and research do as its quite a different beast. If we want it to behave the same way at least it should decrease the same way industry and research does.

Im still thinking a lot about it and i think timer and then 100% is the best way to go. Very easy to predict and fits the way the stockpile/stockpile focus works (i.e. a way to prevents all reasons to do the switch-dance). As the (in my opinion) best option i would like to give this a fair round of playtesting before doing it industry-growth style.

_________________
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 Apr 18, 2018 3:13 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
Ophiuchus wrote:
I am not completely happy how the FOCUS_CHANGE_PENALTY implementation works
Just what about it is it that you do not like?

Quote:
As the (in my opinion) best option i would like to give this a fair round of playtesting before doing it industry-growth style.
It seems to me that, as a matter of general design principles, the far more compelling case is to take the opposite approach from what you are wanting-- the standard focus change penalty should be tested first, and only if we find it unsuitable should we move on to try something different. It sounds like you have already formed a personal opinion that it is unsuitable, but you'd need to convince the rest of us to share that view.

_________________
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 Apr 18, 2018 8:43 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Dilvish wrote:
Ophiuchus wrote:
I am not completely happy how the FOCUS_CHANGE_PENALTY implementation works
Just what about it is it that you do not like?

Quote:
As the (in my opinion) best option i would like to give this a fair round of playtesting before doing it industry-growth style.
It seems to me that, as a matter of general design principles, the far more compelling case is to take the opposite approach from what you are wanting-- the standard focus change penalty should be tested first, and only if we find it unsuitable should we move on to try something different. It sounds like you have already formed a personal opinion that it is unsuitable, but you'd need to convince the rest of us to share that view.

What i dont like about the maceo implementation / e.g. if I add the stockpile there, the growth and decrease are in a different file. And the macro depends on growth being exactlz one. If we change growth for some rreason one needs one wise old one to know whz suddenly the values are off and where to fix it. Also if the penalty is not exactly one turn you probably would like to know how much longer zou need to wait.

Well if you need convincing just try to use stockpiling focus to finish building e.g. a ship in minimal time with minimal waste.

_________________
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 Apr 19, 2018 8:58 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
Ophiuchus wrote:
What i dont like about the maceo implementation / e.g. if I add the stockpile there, the growth and decrease are in a different file.
That looks to me like a relatively trivial aspect of how the macros & their files are organized. Here our focus has been first and foremost on how the mechanic should work, and then on how to script that up. Any choices about partitioning of scripts into macros split amongst the various files could then follow, but should certainly not drive the actual design decisions about how things should work ingame.

Quote:
And the macro depends on growth being exactlz one.
No it doesn't. After Force Energy Structures is researched, increasing the Industry/Research meter growth/decline rates to +3/-5, this focus change penalty is still left at one to my recollection (or if I'm wrong and it was scripted up to change then you could still leverage that same code). Which also brings up the point to consider adding the stockpile meter treatment into Force Energy Structures (which seems to me would make sense, especially if we add the stockpile meter into the focus change penalty group).

Quote:
If we change growth for some rreason one needs one wise old one to know whz suddenly the values are off and where to fix it.
That can be dealt with by an appropriate comment, it certainly doesn't seem to me like something that should be a design consideration

Quote:
Also if the penalty is not exactly one turn you probably would like to know how much longer zou need to wait.
I'm not sure I fully understand the comment, but I think I understand enough to see that this concern would apply to any choice we make here at all. It really seems like you are just grasping at straws here.

Quote:
Well if you need convincing just try to use stockpiling focus to finish building e.g. a ship in minimal time with minimal waste.
Is that something that you are wanting to be do-able? It sounds an awful lot like a fast-focus-switching scenario that I thought this discussion was about preventing....

_________________
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: Fri Apr 20, 2018 8:45 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Dilvish wrote:
Quote:
And the macro depends on growth being exactlz one.
No it doesn't. After Force Energy Structures is researched, increasing the Industry/Research meter growth/decline rates to +3/-5, this focus change penalty is still left at one to my recollection (or if I'm wrong and it was scripted up to change then you could still leverage that same code). Which also brings up the point to consider adding the stockpile meter treatment into Force Energy Structures (which seems to me would make sense, especially if we add the stockpile meter into the focus change penalty group).

Ah, i also forgot about the force energy structure. I thought it was intentionally kept at 1 to be in line with normal growth.

Dilvish wrote:
Ophiuchus wrote:
What i dont like about the maceo implementation

...it certainly doesn't seem to me like something that should be a design consideration

No, you asked what i didnt like about the implementation so i told you.

Quote:
Quote:
Also if the penalty is not exactly one turn you probably would like to know how much longer zou need to wait.
I'm not sure I fully understand the comment, but I think I understand enough to see that this concern would apply to any choice we make here at all. It really seems like you are just grasping at straws here.

Huh? Please refrain from this ("grasping at straws"). If you dont understand what I am saying, please ask appropiate questions. If you have an effect which lasts ten turns you probably want to see know if that effect will finish in one or in nine turns. If the effect is only there for one turn you already know without an explanation. And with the effect accounting we have a way of communicating such things. So I thought the implementation is very specific, not directly usable for the stockpile, in the wrong place and without documentation.
Anyway I will be out of the project in a week or so. So if i find time i will do the industry-thing with the stockpile although sticking to the same mechanism for very different things is not-a-good-idea(TM). You guys will have to finish the polishing and discussions anyway.

Quote:
Quote:
Well if you need convincing just try to use stockpiling focus to finish building e.g. a ship in minimal time with minimal waste.
Is that something that you are wanting to be do-able? It sounds an awful lot like a fast-focus-switching scenario that I thought this discussion was about preventing....

I dont want this scenario, but probably it will just come up in the game - so I think building a ship in minimal time with minimal waste is a realistic and legitimate aim . And yes, it leads to the fast-focus-switching scenario that i want to prevent. Ok, so we seem to agree on this one. So you don't seem to think that it is relevant - could you please explain? Cost-ratio?

_________________
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: Sat Apr 21, 2018 8:48 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
JFYI, industry style increase/decrease just got pushed.

_________________
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 May 16, 2018 8:10 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
In my last game, with Chato and mature galaxy, my homeworld was surrounded by bad light systems (heck, two black holes and two neutrinos and many red dwarfs, only three blue/white starts with no toxic planets on them), and I spotted a nice blue system with two toxic planets (one huge, one medium) 5 hops away and close to two enemy homeworls. I went for it as my first colony, and was a bad idea: I couldn't defend it at the same time than my homeworld (a third enemy was close to my homeworld and attacked my second, closer-to-homeworld colony).
So I have the sense that non-stealthy empires cannot make use of IS for early distributed expansion (it's much easier to have a distributed empire if you don't need to defend your undetectable planets). And this is fine.
On the other hand, Sly does not need to get IS techs because they can do better never using the stockpile planetary focus. With the initial +1000% IS output rate they are better focusing on research for isolated, non-producing colonies, and production for the connected, producing (bubble colonizers) colonies.
Laenfa has more chances to find stockpiling planetary focus useful, so they could have some interest on getting the IS techs.
Trith (stealthy, non-stockpiling species) is the best candidate to get some value from the IS techs as they are.

Overall, I think the current system already adds value to the game, enabling more strategies, although not for every species. I think that is fine. Other tech trees (like defense) never get researched by many players and that's not a problem.

So I think you could consider this job done for 0.4.8 release.

Anyway, I think it could be worth considering to increase the fixed bonus from the stockpiling planetary focus (from +3 to +6, or with some pop-dep bonus, like +3 +0.2*population). This would make stocpiling planetary focus more interesting.


Top
 Profile  
 
PostPosted: Wed May 16, 2018 9:52 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
Side note: I think it is mandatory to enable stockpiling planetary focus on every planet, not only on your homeworld. I'd never trade tens of PPs/RPs per turn for a sad +5 IS output, but I could trade the +7 PPs I'm getting for the industry focus of that tiny exobot colony for some extra IS output sometimes.


Top
 Profile  
 
PostPosted: Wed May 16, 2018 10:15 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 455
Oberlus wrote:
Overall, I think the current system already adds value to the game, enabling more strategies, although not for every species. I think that is fine. Other tech trees (like defense) never get researched by many players and that's not a problem.

So I think you could consider this job done for 0.4.8 release.

:)

If you have the time for a could you give the Fulver a spin? With their advanced weapons, stockpile and attacktroops the move which failed for the chato may succeed for them(?)
Id just like to know if you think if they are over- or underpowered and if the good stockpile is underpowered.

Oberlus wrote:
Anyway, I think it could be worth considering to increase the fixed bonus from the stockpiling planetary focus (from +3 to +6, or with some pop-dep bonus, like +3 +0.2*population). This would make stocpiling planetary focus more interesting.

You are talking about the generic supplies focus effect, right? Adding a population based bonus would add another effect of which there are probably too many(?).

Oberlus wrote:
Side note: I think it is mandatory to enable stockpiling planetary focus on every planet, not only on your homeworld. I'd never trade tens of PPs/RPs per turn for a sad +5 IS output, but I could trade the +7 PPs I'm getting for the industry focus of that tiny exobot colony for some extra IS output sometimes.

I think we need some way to restrict the number of planets which may be switched to stockpiling focus to prevent the focus-switching-dance. So ~homeworlds was the easy thing to do. Note it should work on all homeworlds and on your capital. There are some suckish natives which you can use for the stockpile focus. And you can move your capital to a tiny place. Is that enough?

_________________
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 May 16, 2018 10:46 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
Quote:
You are talking about the generic supplies focus effect, right? Adding a population based bonus would add another effect of which there are probably too many(?).
Probably. Just increase it so that it can be useful enough to be preferred over more production/research.
However, if I can only use stockpiling focus on homeworlds, I will not use it:
If you need the stockpiling effect, that is most probably because your supply chains were cut and more PPs than desired went into the IS. In that situation, in order to get say 100 PPs from the IS at 10 PP per turn (ten turns until IS depleted) you need to sacrifice 30 PP/turn from a homeworld. So to get back "faster" 100 PPs from IS you lost 300 PPs from regular production. No-no. Os stockpiling focus provides WAY more output rate or it can be used in planets with poor production (that are seldom homeworlds, which will most probably be better focused on production, research or growth, never on stockpiling).

I'll try those Fulver, are they already in the test version?


Top
 Profile  
 
PostPosted: Fri May 18, 2018 3:51 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
One thing I noticed with the new techs-- I definitely like it that in most (or all?) situations, growth focus gives the stockpiling bonus.

But then we should probably adjust the focus-change macro so that changing focus to growth does not trigger a penalty to the stockpile meter. edit: this previous sentence was actually just based on my expectation, shaped by previous discussions here, that Stockpile was using a Target type meter where the focus change penalty would matter. Currently it is using a Max type meter, and so the penalty simply does not currently matter. If we did switch it to a Target type meter then I think this growth focus interplay should be taken into account at that time.

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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