Orbital Drydock revision

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Message
Author
dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Orbital Drydock revision

#16 Post by dbenage-cx »

If medium ships and smaller should be repaired quickly, what is the threshold for a medium ships structure?
I realize this has been undefined on purpose and ships are not easily classified, but a target average for structure is probably warranted.

I added the minimum repair into a macro and bumped to 20.
It should have been in a macro to start with but the increase will bring starting ships down to 1 turn (2 max).
(Edit: This is not meant as a 'fix' to the previous discussion)
Last edited by dbenage-cx on Tue Mar 22, 2016 4:26 pm, edited 1 time in total.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

User avatar
Bromstarzan
Dyson Forest
Posts: 206
Joined: Sun Feb 28, 2016 9:56 pm
Location: Sweden

Re: Orbital Drydock revision

#17 Post by Bromstarzan »

If it can be done not to result in "catastrophic" low repair rates (and logical malus) then I guess I'm all in :mrgreen:
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |

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

Re: Orbital Drydock revision

#18 Post by MatGB »

Numpty here, in his test game set up for this very purpose, decided using Eaxaw was a good plan.

Consequently my recently captured drydocks are even less use to me than normal as I'm Camping all the inhabitants. Works well overall though, numbers need tweaking further but the basics are fine I think.
Mat Bowles

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

User avatar
Bromstarzan
Dyson Forest
Posts: 206
Joined: Sun Feb 28, 2016 9:56 pm
Location: Sweden

Re: Orbital Drydock revision

#19 Post by Bromstarzan »

Sounds good, Mat. As long as game mechanics follows plain logic, it doesn't really take away the fun, but rather adds more immersion.

In relation to this I must ask a newcomer's question: do AI also repair ships (at all difficulty levels)?
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |

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

Re: Orbital Drydock revision

#20 Post by MatGB »

Bromstarzan wrote:Sounds good, Mat. As long as game mechanics follows plain logic, it doesn't really take away the fun, but rather adds more immersion.
That's the plan, anyway. We get it right more often than wrong.
In relation to this I must ask a newcomer's question: do AI also repair ships (at all difficulty levels)?
Um…

They try to?

The AI team (which until relatively recently was just Dilvish and is now Cjc... and Morlic) have been working on getting them to use drydocks and anticipate the damage control techs for ages. It has got noticeably better and you do see damaged ships withdraw to repair, etc. But on the grounds it's a very circumstantial choice (how far to drydock compared to built in recovery, etc) they're not actually very good at doing it. Then, I'm not really, number of times I've sent ships back to a drydock only to have them repaired in full before they've arrived is silly.
Mat Bowles

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

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Orbital Drydock revision

#21 Post by Morlic »

MatGB wrote: The AI team (which until relatively recently was just Dilvish and is now Cjc... and Morlic) have been working on getting them to use drydocks and anticipate the damage control techs for ages.
I would rather say the AI team has not been working on that code since ages... Doesn't really strike me as priority though. First, I'd prefer to get to the point where the AI actually has a decent amount of damaged ships regularly as that implies it has actually won some battles...

But yeah, the AI tries to repair its fleets (not single ships) if it doesn't think it has better things to do with it...
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
Bromstarzan
Dyson Forest
Posts: 206
Joined: Sun Feb 28, 2016 9:56 pm
Location: Sweden

Re: Orbital Drydock revision

#22 Post by Bromstarzan »

Doesn't really strike me as priority though. First, I'd prefer to get to the point where the AI actually has a decent amount of damaged ships regularly as that implies it has actually won some battles...
I see what you're saying.
It is very hard to implement even the most basic AI, but I sure enjoy what you've got so far (I'm a total beginner though :? ).
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Orbital Drydock revision

#23 Post by Morlic »

Oh, I think we definitely have some good working basic AI for the most part which will challenge the player for quite some games. The important game aspects are all handled by the AI in some (basic) way.

It's just that due to the mostly simple decison-making, an experienced player will quickly find advantages over an AI in terms of expansion. Freeorion currently is very "snowbally" so gaining an advantage early probably means the lategame isn't much of a challenge.
There are many improvements which wouldn't be too hard but simply take time to implement. Reading through mostly undocumented and often messy legacy code and keeping the AI up-to-date or adapting it for new features unfortunately takes serious time as well. So with the little free time one has working full-time, things often progress slower than one would like to hope.

Of course, there can be no doubt that one day the AI will leave any player begging for mercy... There will be thousands of cries in the forum demanding to tune the AI down... someday...
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
Bromstarzan
Dyson Forest
Posts: 206
Joined: Sun Feb 28, 2016 9:56 pm
Location: Sweden

Re: Orbital Drydock revision

#24 Post by Bromstarzan »

Thanks Morlic, for words of input.
FreeOrion recently (late february) got me hooked just because of the opensource and spare-time-developers-concept. Not to mention the extraordinary game-play that's already there. The work put into this is really appreciated (says a FO beginner, father of two, full time employed outdoor maniac). I can easily relate to the develpment pace, it's the same as my gaming pace :mrgreen:. Who knows, perhaps one day even I can contribute a little to this on-going project? For now, I need to play, and play some more!
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |

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

Re: Orbital Drydock revision

#25 Post by Vezzra »

Morlic wrote:Of course, there can be no doubt that one day the AI will leave any player begging for mercy... There will be thousands of cries in the forum demanding to tune the AI down... someday...
You just made my day! :lol:

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

Re: Orbital Drydock revision

#26 Post by Vezzra »

Geoff the Medio wrote:
Vezzra wrote:If we make drydocks to just repair that fixed amount and throw out any kind of formula, we're back at smaller/medium ships just getting repaired fast regardless how heavily damaged they are, while the real big ships take too long, even if only moderatly damaged...
Do you have a complete list of all the features / requirements you have for this formula, then?
Taking all the input and discussion so far into account, my summary of what we want to achieve is the following:
  • Drydock repair should not be instantly. It shouldn't take long, only a few turns, just not be instant like now.
  • Smaller ships however (maybe 20 structure or less) should get repaired instantly, like now.
  • To get any repairs at a drydock at all, the happiness of the colony needs to meet a certain min level.
  • If only this min happiness level is met, the drydock runs with reduced capacity: smaller ships take a few turns, bigger ships proportionally longer.
  • Only if a second, higher happiness limit is met, the drydock runs at full capacity (smaller ships instantly, bigger fish take a few turns, like outlined in the first two points)
To achieve that, the formula could be set up like this:
  • Basic drydock repair rate is 25% of total structure (I'm pulling numbers out of my hat), meaning, an almost dead ship takes 4 turns to repair, a ship with 50% damage two turns, etc.
  • Min repair amount is e.g. 20 structure, which means all ships with total structure 20 or lower will always get repaired instantly, slightly bigger ships (25 or 30 structure) that are sufficiently heavily damaged will already take 2 turns, and ships with structure 80+ will be repaired according to the basic repair rate.
  • To factor in happiness of the colony, introduce two limits, a lower and a higher one.
  • Below the lower happiness limit (e.g. 5) no repair is done at all.
  • If the lower limit is met, but not the second, higher limit (e.g. 20), the basic repair rate and the min repair amount are reduced (e.g. to 10%/5 structure). Meaning, even smaller ships take a few turns to repair, and bigger ships proportionately longer (up to 10 turns).
  • If the second, higher happiness limit is also met, full drydock capacity (like outlined in the first two points) is applied.
I think this approach (working with certain happiness limits) is better (and more in harmony with how we use happiness now) than trying to calculate repair rate based on happiness value (with a formula like "min(Target.MaxStructure, Value * (1 + ((Source.Planet.Happiness / 20.0) * 0.25)))", see above).

Personally, I'd even prefer to scrap the second limit, and only have the low limit of 5 deciding if we get any repair at all. Like it is done with colony ship building and is planned to do with ship building in general: if you meet the limit, you can build and repair ships, if not, you can't build and repair at all. Simple and easy to comprehend, still efficiently addresses the core concern: to prevent the steamroller invasion effect (conquer shipyard, get your damaged ships instant-repaired and roll on). You've to wait a few turns before you can repair at all, and once you can repair, it still isn't instant except for small or only lightly damaged ships.

Everything else just gets too complicating without really adding much value IMO. It's already a bit too complicted for my liking, but if we want to take into account all those factors, that can't be helped. Still, we should try to keep it as simple as possible.

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

Re: Orbital Drydock revision

#27 Post by Vezzra »

MatGB wrote:Of course one side effect of reducing the happiness based macro from 25 to 15 will mean that planets with higher than 15 happiness will repair even faster, which frankly I'm quite happy with.
Me, not so much. I'd prefer to scrap that limit entirely, and only work with a low limit of 5 that determines if you get repair or not. But if you guys want to keep that second limit, at least only employ it as a second limit that has to be met to get full drydock repair capacity, and if you are above to low, but below the high limit, you get reduced repair stats.

See my previous post.

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

Re: Orbital Drydock revision

#28 Post by Vezzra »

dbenage-cx wrote:If medium ships and smaller should be repaired quickly, what is the threshold for a medium ships structure?
20 would be the absolute minimum, I'd even go with 50.

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Orbital Drydock revision

#29 Post by AndrewW »

Another possibility could be to limit drydock capacity, so only a certain number of ships get repaired per turn. This could include another building that is an extension to the existing drydock to repair additional ships, or perhaps just build another drydock.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Orbital Drydock revision

#30 Post by Geoff the Medio »

AndrewW wrote:Another possibility could be to limit drydock capacity, so only a certain number of ships get repaired per turn.
Then you, or the game for you, would have to decide how to prioritize ship repairs.

Post Reply