FreeOrion

Forums for the FreeOrion project
It is currently Mon Dec 11, 2017 5:00 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Sat Sep 02, 2017 2:16 am 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
Geoff the Medio wrote:
Though why not instant upgrade to the latest available fuel capacity when in supply range?

The current revision of the PR does not require supply line for upgrade (by design).
May add to confusion for new players as it is not consistent with other tech improvements.
If supply will not be required, the pedia entries should probably note the exception (possibly with some flavorful reasoning).

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


Top
 Profile  
 
PostPosted: Sat Sep 02, 2017 4:44 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
dbenage-cx wrote:
Geoff the Medio wrote:
Though why not instant upgrade to the latest available fuel capacity when in supply range?

The current revision of the PR does not require supply line for upgrade (by design).
May add to confusion for new players as it is not consistent with other tech improvements.
If supply will not be required, the pedia entries should probably note the exception (possibly with some flavorful reasoning).


I strongly share what I understand to be Geoff's preference on this, that the upgrade be done when in supply range.

_________________
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 Sep 02, 2017 5:02 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3286
Doesn't make much difference though, you only really refuel when in supply, having a larger notional tank while unable to fill it doesn't help that much (haven't had time to look at the scripts but...)

Consistency with other effects is good, thus in supply for an upgrade is preferred but in a case like this it doesn't actually matter.

_________________
Mat Bowles

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 Sep 02, 2017 9:16 am 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12040
Location: Munich
I was mainly questioning the slow increase of max part...
Ophiuchus wrote:
I would suggest that max_fuel increases in old ships slowly to the current tech given one if the ship is supply-line connected.
Maybe 0,5 per turn?

If there is almost / actually no way to regain fuel without being in supply, then immediately increasing the max fuel meter when a new fuel tech is acquired, regardless of ship location, is probably fine.


Top
 Profile  
 
PostPosted: Sat Sep 02, 2017 2:04 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
Geoff the Medio wrote:
If there is almost / actually no way to regain fuel without being in supply
Sounds rather like you must consider the existing ways to refuel out of supply as "almost no way", but it leaves me puzzled as to why you chose to express it in this indefinite way. Are you trying to indirectly flag that the question would have to be revisited anytime another refueling mechanism is proposed?

And our summary of the policy, for explaining things to new scripters, would go from something like "a ship has to be in supply range for parts on it to be upgraded" to "a ship has to be in supply range for parts on it to be upgraded, except fuel parts can be upgraded anywhere so long as no one adds a way to refuel outside of supply range that is more significant than ways X, Y and Z"?

I fail to understand the benefit of this more complicated policy.

_________________
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 Sep 02, 2017 2:21 pm 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12040
Location: Munich
Dilvish wrote:
I fail to understand the benefit of this more complicated policy.
The benefit would mainly be not having to add a separate meter to track MaxMaxFuel, which is set by tech effects and hull hull and part stat effects, and then set MaxFuel equal to MaxMaxFuel whenever a ship is in supply range and is allowed to receive upgrades, and then set Fuel equal to MaxFuel whenever in supply range to refuel. If there are just MaxFuel and Fuel meters, there's no way to keep track of what a ship's current MaxFuel is independent of what it would be while in supply range, and thus anything that increases the Fuel meter would do so up to the current MaxFuel, which would have a value determined by researched techs regardless of whether it has been in a situation that would normally allow upgrades to take effect. You can't just say the MaxFuel meter gets a boost when it's in supply range, as then that boost will go away when it leaves supply range.


Top
 Profile  
 
PostPosted: Sat Sep 02, 2017 5:43 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
Geoff the Medio wrote:
The benefit would mainly be not having to add a separate meter to track MaxMaxFuel, which is set by tech effects and hull hull and part stat effects...
I'll grant that MaxMaxSomething is a not-so-appealing kind of name, but that seems hardly significant, and besides, couldn't we avoid that by just renaming MaxFuel as FuelCapacity, and then our new meter would be MaxFuelCapacity?

And regarding the bit about adding the extra meter and dealing with using it, well, I'm not seeing the notable difference between that versus the meter you added for upgrading weapons. Though I'll confess I am perhaps not quite 100% conversant with the weapon upgrade handling (and looking through the scripts I find myself puzzled about the meaning for weapon SetMaxSecondaryStat since it only seems to apply to base values and not upgrades).

It also seems to me we should keep in mind that all this same reasoning will likely apply to Fighter Hangar capacity if we were to add some way to upgrade that.

_________________
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 Sep 02, 2017 9:03 pm 
Offline
Dyson Forest

Joined: Tue Sep 30, 2014 10:01 am
Posts: 211
Dilvish wrote:
It also seems to me we should keep in mind that all this same reasoning will likely apply to Fighter Hangar capacity if we were to add some way to upgrade that.


Would it be possible to remember the last time a ship got upgraded and the turn a technology was research?
Then one could write a generic macro for checking if an supply-based upgrade should happen.
You would not need an extra meter for each part type.

I mean like:
  • I build a ship in turn 10 - its upgrade turn is 10
  • In turn 15 i research a weapon upgrade
  • In turn 20 i research deuterium tanks
  • In turn 15 to 22 the ship is not in supply range. The fuel max and the weapon damage stays where it is.
  • Ship comes back to supply in turn 23 - fuel capacity and weapon damage gets boosted, upgrade turn is 23
  • In turn 23 to 29, the upgrade turn is higher than turn 20 when deuterium tanks were researched, so no further boost.
  • In turn 30 i research antimatter tanks.
  • The upgrade turn is lower than 30, so the antimatter tank boost applies. The upgrade turn is set to 30.

_________________
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: Sun Sep 03, 2017 12:28 pm 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12040
Location: Munich
Dilvish wrote:
I'll grant that MaxMaxSomething is a not-so-appealing kind of name, but that seems hardly significant, and besides, couldn't we avoid that by just renaming MaxFuel as FuelCapacity, and then our new meter would be MaxFuelCapacity?
The point isn't the names, but the (to me) excessive number of meters to track (debatably) one thing. With weapons, it works nicely, in that there aren't many ways to increase current weapon strength without being in supply, so that getting the benefit of upgrades naturally happens when in supply range, and the actual value of the max meter for the weapon strength doesn't matter. If fuel is in practice different, and players are often getting increases to fuel while not in supply range, then to me the solution is to accept that and to either not upgrade fuel parts in that manner (previous or existing behaviour), or to phrase the description of how it works differently (and not to add another meter and associated support code to replicate the behaviour that happened automatically for a different part type).
Quote:
And regarding the bit about adding the extra meter and dealing with using it, well, I'm not seeing the notable difference between that versus the meter you added for upgrading weapons.
It's not objectionable to me to add a max meter to something that doesn't have one, because there are already many cases in which there are current and max meters that work together in the existing game mechanics. To me, it's a choice between whether something just has an current value (eg. detection) or has separately tracked current and (max or target) meters. It's not just a trivial distinction either, as there are various cases in the code or UI that work with two paired meters or a single meter, but which aren't set up to also know what to do with three related meters.
Quote:
It also seems to me we should keep in mind that all this same reasoning will likely apply to Fighter Hangar capacity if we were to add some way to upgrade that.
Hangar capacity should work just like other current/max meter pairs, similar to weapon strength. As long as ships aren't generating fighters when out of supply, then the existing game mechanics will work for getting upgrades by only replacing lost fighters when in the same situations that should, to a player, result in getting the benefits of upgrades... "Getting an upgrade" and "replenishing fighters" are effectively the same thing.
Quote:
...looking through the scripts I find myself puzzled about the meaning for weapon SetMaxSecondaryStat since it only seems to apply to base values and not upgrades...
The part secondary stats have max and current values so that the standard upgrade mechanics can be applied to them if desired. I set up the engine to support this, so that any current or future parts (eg. Flak Cannon) that make use of a secondary stat to determine their behaviour would be possible to upgrade when in supply range.


Top
 Profile  
 
PostPosted: Sun Sep 03, 2017 10:33 pm 
Offline
Vacuum Dragon
User avatar

Joined: Sun Sep 25, 2011 2:51 pm
Posts: 500
Geoff the Medio wrote:
Hangar capacity should work just like other current/max meter pairs, similar to weapon strength. As long as ships aren't generating fighters when out of supply, then the existing game mechanics will work for getting upgrades by only replacing lost fighters when in the same situations that should, to a player, result in getting the benefits of upgrades... "Getting an upgrade" and "replenishing fighters" are effectively the same thing.

It's a bit ironic, that I was considering learning focs by creating a core slot fighter factory.

_________________
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556


Top
 Profile  
 
PostPosted: Mon Sep 04, 2017 7:30 am 
Online
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12040
Location: Munich
Ophiuchus wrote:
Would it be possible to remember the last time a ship got upgraded and the turn a technology was research?
Is there a difference between when a ship is in range to be resupplied and to be upgraded? In particular, when in allied vs its own supply network, or allied but not actually join through adjacency to its own? Or more so should there be?


Top
 Profile  
 
PostPosted: Mon Sep 04, 2017 2:55 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3286
em3 wrote:
Geoff the Medio wrote:
Hangar capacity should work just like other current/max meter pairs, similar to weapon strength. As long as ships aren't generating fighters when out of supply, then the existing game mechanics will work for getting upgrades by only replacing lost fighters when in the same situations that should, to a player, result in getting the benefits of upgrades... "Getting an upgrade" and "replenishing fighters" are effectively the same thing.

It's a bit ironic, that I was considering learning focs by creating a core slot fighter factory.

Core slots are allowed to break the rules, IIRC if you're out of supply and get an increase in current capacity you'd do so at the current rate until/unless you get back into supply.

Having said that, I suspect it'd be a more complex script than you'd expect, a cool idea but possibly for your second thing not to learn with? ;-)

(seriously, we need to add more core slots, we need to do more with fighters than just have them, and I'd happily playtest that idea: if CPO Tyrell can build fighters in his spare time in BSG then a galaxy spanning empire should be able to).

_________________
Mat Bowles

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 Sep 04, 2017 3:14 pm 
Offline
Dyson Forest

Joined: Tue Sep 30, 2014 10:01 am
Posts: 211
Geoff the Medio wrote:
Ophiuchus wrote:
Would it be possible to remember the last time a ship got upgraded and the turn a technology was research?
Is there a difference between when a ship is in range to be resupplied and to be upgraded? In particular, when in allied vs its own supply network, or allied but not actually join through adjacency to its own? Or more so should there be?

Ah. Funky stuff. I think there could/should be a difference. So we maybe should define that differently. If I could get it free I would vote for:
For upgrading the ship must be directly or indirectly (via allied supply lines) supply-line connected to your empire.
Maybe it could be more specific and a connection to one of your shipyards is necessary.
Maybe even certain parts need to be connected to certain buildings/specials.
Not sure how implementation should work in an efficient way there.
But is it necessary to figure that out right now? Having any kind of (allied) supply connection is a useful restriction in itself i think.

Was your post a general idea or an answer to my post?
My post was about tracking the turn of the last upgrade.
I don't think we should track the turn of the the last resupply.

_________________
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 Sep 04, 2017 7:53 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
Seems to me that tracking the turn of last resupply (along with tracking what turn techs were acquired on) is the route with most promise to simplify things. Upgrade techs would apply to all ships whose last resupply turn was on or after the turn that the upgrade tech was acquired on. At first glance at least it seems to me that would let us avoid the MaxMaxSomething kind of meters, but I'll confess I haven't taken enough time to fully review meters & max meters, etc.

_________________
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 Sep 05, 2017 9:57 am 
Offline
Vacuum Dragon
User avatar

Joined: Sun Sep 25, 2011 2:51 pm
Posts: 500
Dilvish wrote:
Seems to me that tracking the turn of last resupply (along with tracking what turn techs were acquired on) is the route with most promise to simplify things. Upgrade techs would apply to all ships whose last resupply turn was on or after the turn that the upgrade tech was acquired on. At first glance at least it seems to me that would let us avoid the MaxMaxSomething kind of meters, but I'll confess I haven't taken enough time to fully review meters & max meters, etc.

On the other hand the MaxSomething and MaxMaxSomething wil give a good visual cue, that the ship needs retrofitting in supply zone. Especially, if accounting label for the max something would include the upgrade, but the current value would not (until upgraded in supply).

_________________
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  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