Ships not repairing as fast as they should?

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Ships not repairing as fast as they should?

#1 Post by mem359 »

I had a fleet of Ravenous ships in orbit around a (newly) conquered colony that had an Orbital Drydock.
All star lane supply lines are solid.
After two turns, they still weren't fully repaired?

The ships that I'm looking at have a maximum of 107 structure (started with 90, and added 17 "Organic growth").
They only repaired +11 the last turn.
I would have expected +21, even without the Drydock (10% Fleet Repair + 10% Advanced Damage + 1 Basic Damage).

I'm using the latest build SVN 7311, but I think I've seen this sort of behavior a long time before (but I didn't notice a good example until now).

(That particular system was conquered on turn 229. That first ship in that fleet had 33 structure on turn 230.)
Attachments
Turn 232
Turn 232
turn232.jpg (95.3 KiB) Viewed 1930 times
Turn 231
Turn 231
turn231.jpg (95.9 KiB) Viewed 1930 times

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

Re: Ships not repairing as fast as they should?

#2 Post by Geoff the Medio »

SVN 7311 changed damage repair mechanics. Possibly Drydock fast repair was (I think unintentionally) broken in the process?

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

Re: Ships not repairing as fast as they should?

#3 Post by MatGB »

I've also noticed occasionally weirdness with repairs, especially involving drydocks (for example, and I need to test it, it appears multiple drydocks in the same system stack, thanks stupid AI for building three in the same place so I could find that bug).

Do you have copies of the logs from those turns?

Also, is there a chance there's something stealthed there triggering an unknown combat? (I'm thinking specifically a space cloud or similar)—that wouldn't explain why you're getting some repair but not all, but it would explain, well, something.

You have definitely got all three damage control techs, right? (we have to rule these things out, I've reported glitches and then noticed it was my fault more than once).

@Geoff: It looks like Basic Damage Control is working and Drydock is working (are there sitreps) but Fleet Field Repair and Advanced DC aren't working, from the numbers—I didn't touch Drydock except to copy/paste code.
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
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Ships not repairing as fast as they should?

#4 Post by Geoff the Medio »

It should be possible to list the last turn a battle happened at systems in the objects list.

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

Re: Ships not repairing as fast as they should?

#5 Post by MatGB »

Doesn't appear to, I get "last attacked on" for planets. Oh, wait, system.

Mem, use the Objects menu, change the filters to display systems but not display planets, "all" is probably easiest. Then sort it alphabetically, find the system, right click on it and it gives you the option to "debug data dump".

That will output a pile of info on the system into the messages window, included in that is "last combat on turn: xxx" which will be useful.

FWIW, I had a turn awhileback in the game I'm currently playing, before I researched Fleet Field Repair, in which I swear one of my two damaged Robotic hulls was repairing itself and the other wasn't. But I was busy with other things and loading the previous turns autosave just to check wasn't something I was in the mood for.

I'm wondering if there has always been a problem with effects process in some way but it's not been obvious until my patch made repairs a lot less thorough and with far more restrictions, drydocks not working or similar before meant very little if advanced damage control repaired a huge amount anyway.

I'm now switching in my current game from using self-repairing robotics to trick free fractals, I'll keep an eye on them and see if anything weird is happening.
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
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Ships not repairing as fast as they should?

#6 Post by mem359 »

MatGB wrote:FWIW, I had a turn awhileback in the game I'm currently playing, before I researched Fleet Field Repair, in which I swear one of my two damaged Robotic hulls was repairing itself and the other wasn't. But I was busy with other things and loading the previous turns autosave just to check wasn't something I was in the mood for.
That sounds familiar (one ship repairing, other not).
If I find any practical examples in the future, I'll post 'em.

In the attached image, the last battle was turn 227.

I'm wondering... Does the Drydock only work on ship hulls that could be built in that system?
In this example, a Ravenous ship was in a system that did not have the Xenocoordination Facility.
(The text for Drydock doesn't imply this... I'm just guessing wildly. I remember other games where the Quantum Hull was not being repaired by Drydock planets.)

All techs are researched, except Transcendence.
(I double checked that my empire had completed Omni-Scanner, Basic Damage, Advanced Damage, and Fleet Repair.)

I'll have to pay more attention to the ship repair techs in my next game, to see how they (and the Drydock) function as the techs are discovered.
Attachments
Shouldn't be any hidden ships, with 200 sensors.
Shouldn't be any hidden ships, with 200 sensors.
alathar.jpg (50.43 KiB) Viewed 1921 times

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Ships not repairing as fast as they should?

#7 Post by mem359 »

Looking at buildings.txt, the Drydock only repairs 10 structure a turn.

The current Pedia text does not reflect this:
"..abilities to repair damaged ships in a single turn."

(Single turn made me think that all damage would be repaired, not just +10.
I'm guessing the Drydock ability was reduced at some point, but the description was not changed.)

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

Re: Ships not repairing as fast as they should?

#8 Post by MatGB »

Drydock currently repairs all ships, and yes, it was at some point changed to 10 points per turn and I've updated the text in the patch I uploaded yesterday for review, we're considering the idea that a ship built at a Xenocoordination or whatever can only repair fully at one, but that's not implemented yet.

I honestly can't see what's up, it's definitely working at some points for most of the time, I'm watching it on my install, it's possible the drydock is somehow blocking the other repairs but that makes no sense, very weird. Why is it working at some points and some locations and not others.
Mat Bowles

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

Chriss
Dyson Forest
Posts: 231
Joined: Sun May 11, 2008 10:50 am

Re: Ships not repairing as fast as they should?

#9 Post by Chriss »

I noticed that drydocks stack, too. Had one drydock each on multiple planets / asteroids / gas giants in one of my systems that the AI "borrowed" for a while. There are multiple siterep messages for that, so it was quite obvious what was happening in that case.
Attached patches are released under GPL 2.0 or later.

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Ships not repairing as fast as they should?

#10 Post by mem359 »

I went to the same save game for the images above.

If I keep the ships in orbit, they repair +11 per turn, for turns 232 and 233.

I reloaded the game, and flew them to the nearby empty system.
(The ships have max structure 107 or 108, depending on the Organic Growth.)

On turn 231 (in orbit), ship 1 has 44 structure, and ship 5 has 69.
On turn 232 (empty system), ship 1 has 66 structure (+22), and ship 5 has 97 structure (+28).
On turn 233, ship 1 has 92 structure (+26). Ship 5 maxed out at 108.
  1. Drydock appears to be inhibiting the other repair techs (except Basic Damage?)
  2. Different ships had different repair rates
  3. Ship's repair rate was not consistent by turn
The repair rate looks like it might depend on the current structure value, except the "techs.txt" file says it uses the MaxStructure of the ship.

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

Re: Ships not repairing as fast as they should?

#11 Post by Vezzra »

Can we please change drydock repair rate up to full repair in one turn again for 0.4.4? The current setup is kind of ridiculous - Fleet Field Repair and Advanced Damage Control can each repair a ship in the field as fast as a drydock? And multiple drydocks that stack? How - by sending half of the ship to one and the other half to the second drydock? Just give them full repair capability again, and all these curiosities go away.

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

Re: Ships not repairing as fast as they should?

#12 Post by MatGB »

I would be quite happy for that TBH, if you return you get repaired. But, is there an easy way to script that they won't work on the turn they're captured? I always thought it a bit daft that your orbital troop insertion manages to capture the planet and immediately repair all your orbital ships. I'll look at it later.

Mem, try moving them to the adjacent system from the same save?

It makes zero sense that zome are being repaired and some not, that means the script is missing some targets, which isn't supposed to be possible.
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
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Ships not repairing as fast as they should?

#13 Post by mem359 »

MatGB wrote:Mem, try moving them to the adjacent system from the same save?

It makes zero sense that zome are being repaired and some not, that means the script is missing some targets, which isn't supposed to be possible.
If you look at the image, the Alathfar system is connected to an empty system. That's what I meant by moving them (after I reloaded the turn 231 save).

I only mentioned ships 1 and 5 from Fleet 6019, because 2-4 were at full structure. (So its not that some were being skipped.)

I don't understand why the ships are repairing at different rates. Just reporting what I'm seeing. :?
(If it would help, I can take screen snapshots, like I did in the first posting.)

------

Edit: A different example from the same game... Sent a bunch of ships to get hammered by Black Krakens. Put 4 ships, with different levels of damage, in the same fleet, and spent two turns moving them to an empty system. They all have the same maximum structure (built on the same turn). I put the numbers in a table, and attached the image. No Drydock, so all repair should be from the technology. The numbers are the ships structure, with the change from the previous turn put in parentheses.

The results of turn 235 was fine. All four ships repaired 22 structure.

Turn 236: Ship four repaired at least 28 (it hit the maximum value).
Turn 237: Ship two repair rate jumped from 22 up to 30.

Definitely something odd going on.
Attachments
Repair rates
Repair rates
repair.jpg (53.17 KiB) Viewed 1877 times

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

Re: Ships not repairing as fast as they should?

#14 Post by MatGB »

It's fine. The only thing I can think of regarding the different rates thing is that in some way some Effects aren't processing properly and it's missing some targets on occasions. Because repair is now smaller overall and split between three to five effects there's more chance that something gets skipped. I have on occasion thought that, for example, focus changes weren't always processed properly for every planet, but it's been a niggling doubt, etc.

For the effects to process on one ship but not another in an identical situation is just completely wrong, it shows that if there's something wrong with my script it's very obscure, and is probably something wrong deeper in the code (and thus beyond me).

I think we need to pay more attention to overall effects (I've thought I've noticed something wrong with some Derelicts, for example, and there are sometimes random losses of fuel within fleets that recover the next turn for the affected ship) and see if it's more than just repair that's sometimes skipping things.

I might have to *shudder* turn on verbose logging for a bit, I'll do that on a MUCH smaller game than the one I'm currently running.
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
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Ships not repairing as fast as they should?

#15 Post by Geoff the Medio »

MatGB wrote:But, is there an easy way to script that [a buidling on a planet] won't work on the turn they're captured?
No. Planets have a variable to track if they were just conquered, but it's not in a form easily added to scripting... There would need to be a whole new condition to work.

It could be reworked to track the turn on which a planet was last conquered, which would more easily be exposed to scripting as a number that could be used with the existing Turn condition, but I wouldn't want to do that now.

Post Reply