CorsixTH icon indicating copy to clipboard operation
CorsixTH copied to clipboard

Implement statistics for "AI" hospitals

Open N3XUS12 opened this issue 9 years ago • 10 comments

Hi there,

I have just downloaded the latest patch (0.50) of CorsixTH and everything is working smoothly and I have no issues, other than the charts which show you in competition with other hospitals in the area.

I can't seem to find a thread with this topic which has a solution. Is this a feature which is known to still not work, or is it something that is supposed to work but isn't for me?

N3XUS12 avatar Jan 22 '16 16:01 N3XUS12

I believe it was working before in version 0.40. Which would make this a bug report

wolfy1339 avatar Jan 22 '16 17:01 wolfy1339

Could you check if there are any errors in your gamelog.txt and if so paste them here.

TheCycoONE avatar Jan 22 '16 17:01 TheCycoONE

Do you still get the charts or are you saying there is nothing recorded for the other hospitals?

If the latter, that has not been added.

MarkL1961 avatar Jan 22 '16 19:01 MarkL1961

I should be more clear. I still get the charts, however only my own stats are recorded. Nothing is recorded for the other hospitals

N3XUS12 avatar Jan 22 '16 20:01 N3XUS12

Ok, in that case other hospitals are not implemented yet.

TheCycoONE avatar Jan 22 '16 21:01 TheCycoONE

Ah, that's cool then.

Is there a estimated timeframe for when this will be implemented?

As I said it is only a minor issue, so thankyou for the swift reply. At least I know it isn't a bug now

N3XUS12 avatar Jan 22 '16 22:01 N3XUS12

No I don't have a time frame, no one is working on it at the moment. I'm not sure how the original game came up with it's numbers. The level files have lines like: #computer[0].Skill.StaffLevels.Luck.Speed.Comfort.GuessAt.Playing 3 4 3 30 7 90 1 ORAC It's likely that the original game had a formula involving those numbers and other information in the level file with some randomness thrown in.

TheCycoONE avatar Jan 23 '16 02:01 TheCycoONE

AI Hospitals, I have a cut of my code in progress https://github.com/CorsixTH/CorsixTH/compare/master...mugmuggy:aihospitals

And a build

I do know it crashes sometimes on annual report and I still have to validate all the patient/hospital processing. I'm yet to play through part of every level yet to see if it's as competitive as the original.

mugmuggy avatar Feb 22 '18 12:02 mugmuggy

I thought I would just add a few more issues here to this one around the annual report.

  • Charts title year is year + 1, ie first year should be 2000, not 2001
  • When statistics are implemented for other hospitals, the getIndex function fails to accurately retrieve the index (I forgot to include my fix in the above build/branch - which won't crash, it gives this index issue)
  • it is possible to be awarded trophies in an opened but inactive hospital - run a full year and don't build/hire or do anything you get rewarded
  • reputation awards are percentage, based not fixed value + some randomness value - see #1222 for similar discussion
  • some awards are given incorrectly or not at all when they should be possible for example TrophyMayorBonus depends on num_vip_ty and pleased_vip_ty, but pleased_vip_ty is never reset whereas num_vip_ty is reset to 0 in Hospital:onEndYear - this makes sense only if you can get it once ever uptil the year of the first vip visit

mugmuggy avatar Feb 23 '18 12:02 mugmuggy

Link PR #1361 to this issue

lewri avatar Jun 09 '20 14:06 lewri