Ticket #42193

dai_calc_data() income calculation does not include immediately spent part
Open Date: 2021-05-07 18:47 Last Update: 2021-07-09 14:45

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

dai_calc_data() counts only 'surplus' as income, not including what's being immediately spent. Expenses are correctly calculated. So in perfect balance 'income' is returned as zero, and expenses as some high number. Callers then think that expenses > income.

Ticket History (3/8 Histories)

2021-05-07 18:47 Updated by: cazfi
  • New Ticket "dai_calc_data() income calculation does not include immediately spent part" created
2021-05-07 22:40 Updated by: cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 2.6.5 (closed)
2021-05-07 22:46 Updated by: chippo
Comment

It applies cleanly to S3_0. Can I expect it to do anything on it's own?

2021-05-07 22:58 Updated by: cazfi
Comment

Reply To chippo

It applies cleanly to S3_0. Can I expect it to do anything on it's own?

There should be a slight improvement to overall AI performance, but you would need to apply statistical methods to see them - variations between individual games are bigger than effects of the bug fixed. With civ2civ3 #42191 might override any improved calculation correctness, so you would need to use e.g. classic ruleset.

2021-05-23 16:16 Updated by: cazfi
Comment

Reply To cazfi

Reply To chippo

It applies cleanly to S3_0. Can I expect it to do anything on it's own?

There should be a slight improvement to overall AI performance, but you would need to apply statistical methods to see them - variations between individual games are bigger than effects of the bug fixed. With civ2civ3 #42191 might override any improved calculation correctness, so you would need to use e.g. classic ruleset.

Actually, it might show up as AI having lower tax rate. It uses income calculated by dai_calc_data() when deciding how high tax rate it needs for a balanced budget.

2021-06-02 23:11 Updated by: cazfi
2021-07-09 14:45 Updated by: cazfi
  • Status Update from Open to Closed
  • Owner Update from (None) to cazfi
  • Resolution Update from Accepted to Fixed
Comment
(This comment has been deleted)

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login