FreeOrion

Forums for the FreeOrion project
It is currently Fri Oct 20, 2017 12:38 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Sep 27, 2017 1:25 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4371
I opened a github Issue on this, and then decided it probably merits a design discussion here. The following is my post in the issue:
Quote:
Ship part auto-upgrades take place via a two-step process. When an empire has researched a part upgrade tech, then that tech will increase the part's max-capacity meter during the regular meter updating process, wherever the ship is. The actual part capacity meter does not get increased until the next time that the ship is resupplied, which is something that takes place during the turn's movement phase, prior to combat. The result is that one can head into combat thinking that one's enemy's ships have a certain level of firepower, but instead they get upgraded just prior to combat. That can sometimes result in a surprise loss that had not looked possible. This is contrary to how we have generally aimed to handle the timing issues around meter updates and combat.

One possibility to deal with this could be to change this upgrade process. I think the current system was settled on both to constrain the upgrade to Supplied space, and to allow the upgrade to take place in one swoop, rather than having the part meter value slowly climb towards the max over the span of a few turns. An alternative could be to make them behave more like other max-meter increases, but with an increased regen rate akin to the boosted regen from Force-Energy Structures, high enough to let the increase take place in one turn. The trickier part would be constraining it to only take place in Supplied space, perhaps we'd need to add a last_turn_resupplied attribute for ships (and a corresponding ValueRef). And then we'd also need to figure out how to block the min 1-per-turn normal meter regen if not supplied.

Another possibility that comes to mind is to adjust the UI for the human player to show the upgraded values when it can reasonably predict that they would be about to be upgraded. I think it would be able to do this just fine for the majority of cases, and especially for the most important case which is when the enemy fleets are sitting still (clearly either supplied or not) and the player is making a decision about whether to attack them. We could also, at some point, code up some similar predictions for the AI to use.

Those are the ideas that come to mind for me-- any others?

_________________
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 Sep 27, 2017 8:10 am 
Offline
Dyson Forest
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 210
I would not touch it. I like the small chances we get to have a surprise as for the current implementation.

Regarding the predictability of this situation, I'd like it to be a matter of espionage, something like a SitRep appearing some time before* an enemy tech is researched: "Empire Yarayara will get Death Ray technology in the next two turns".

* the sooner the greater difference in espionage level between both empires.


Top
 Profile  
 
PostPosted: Wed Sep 27, 2017 11:24 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3245
I dislike it as is, partially because I can never remember when things kick in and I think a ship that's had an upgrade should show it: especially in the early game when the difference between mass driver levels makes such a difference against, eg, maintenance ships.

Vezzra's suggested in the past we should have different timings for effects processing so stuff can go off before or after combat, etc: I was opposed but am more in favour now having thought some things through, allowing nuance in when or what an effect does is good and it could also help tie up stuff with building triggered effects (colonies and terraforming being the biggest examples).

But in principle the stats displayed should be the stats in a fight unless there's an effect or tech that's specifically designed to be surprising, not just one that accidentally is due to codebase limitations.

_________________
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: Sun Oct 01, 2017 2:25 pm 
Offline
Space Kraken

Joined: Tue Sep 30, 2014 10:01 am
Posts: 196
Hm. Maybe I'm wrong, but isnt this a general tech related thing and has nothing to do specifically with combat?

E.g. dont growth techs kick in the same turn they get researched, so the predicted value is wrong?

Instead of tinkering with execution order - wouldn't it be more sane to include the effects of techs predicted to be researched next turn in the predicted effects?

This would mean that you need to recalculate effects if you change the order of techs so that the techs researched next turn change. If you get better prediction thats probably worth it. (And it wont happen often)

_________________
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 Oct 01, 2017 3:01 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4226
Location: Sol III
Ophiuchus wrote:
Instead of tinkering with execution order - wouldn't it be more sane to include the effects of techs predicted to be researched next turn in the predicted effects?
As you don't have any knowledge about which techs an enemy empire is going to complete research on this turn, that won't help with the specific problem here. Which is that an enemy empire could complete a weapon refinement tech this turn, thus get an upgrade to its weapons, which in turn leads to the issue Dilvish described: you order your fleet to attack an enemy fleet that has firepower x, only to find out in the combat report on the next turn that said enemy fleet had an increase of its firepower to y.

Annoying and definitely un-fun (at least in my book).

To be able to correctly predict the weapon stats of enemy fleets the way you suggest, you'd have to know which techs that enemy is going to complete research on. For obvious reasons that isn't (and shouldn't) be possible.


Top
 Profile  
 
PostPosted: Sun Oct 01, 2017 10:20 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3245
My ideal would be that if I've completed a tech, the bonus should show, so whenever the upgrade is parsed should be after effects are executed. That resolves the issues from my perspective.

It's roughly how other techs appear to be parsed, growth techs &c show the bonus immediately (but I'm never sure with planetary stat displays what's current turn and what's next turn).

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

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