ship part upgrading issue

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

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

ship part upgrading issue

#1 Post by Dilvish »

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:
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

User avatar
Oberlus
Cosmic Dragon
Posts: 5716
Joined: Mon Apr 10, 2017 4:25 pm

Re: ship part upgrading issue

#2 Post by Oberlus »

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.

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

Re: ship part upgrading issue

#3 Post by MatGB »

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.

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

Re: ship part upgrading issue

#4 Post by Ophiuchus »

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.

Look, ma... four combat bouts!

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

Re: ship part upgrading issue

#5 Post by Vezzra »

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.

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

Re: ship part upgrading issue

#6 Post by MatGB »

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.

Post Reply