Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
May 1999: [freeciv-dev] Patch set for GTK gold display. |
[freeciv-dev] Patch set for GTK gold display.[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Find attached a set of patches that will change the display on the GTK main info panel from (e.g.) - Gold: 257 to Gold: 257 +12/turn I wanted a feature like this so I could tell at-a-glance whether my tax rate was high enough or too high. The calculation considers only tax income and maintenance outlays, since I wanted a hint about my semi- steady-state cash flow without regard to "catastrophic" events like capturing hut money. However, there are a few issues associated with these patches, so the core maintainers need to read my comments below before deciding whether or not to use these them. BTW, this is the first time I've ever submitted code for a GPL'd project, so someone needs to teach me the secret handshake now. Bobby Bryant Austin, Texas -------- Notes: The calculation is done on the server side and the result is bundled into a new field in the existing packet structure. (Please look the packet part over carefully, since I am not very familiar with the freeciv code!) There were two other ways to do this, and I actually tried them both, but was not happy with the results: 1) Make use of the existing variable last_turn_gold_amount. I didn't like this because it includes income from huts rather than just the steady-state income. (It's also a turn behind at the point when I needed to display it, but this could be fixed by reordering a line or two of code.) or 2) Calculate the amount on the client side each time the info box is updated, using code similar to the code already used in the trade report. This would have the advantage of changing the display to predict the new value anytime you changed the tax rates by clicking one of the taxmen/entertainers/scientists in the info box. Unfortunately (and mysteriously, to me) I could not get this to make predictions that agreed with the predictions of the trade report. (The trade report seems to reliably predict next turn's increase in gold with c. 80% probability, but my implementation of (2) was somewhat lower. The scheme actually implemented by these patches seems to tell you what you gained on the most recent turn with 100% reliability, rather than predicting next turn's income.) Related issues: Unlike Civ II, the Kingdom->Tax Rate does not show your profit margin when you change your rate. So far as I can see, managing your tax rate under the GTK client currently requires you to change the rate (either by clicking the people in the info box or else by pulling down Kingdom->Tax Rate) and then pulling down the Trade Report to see whether you got the results you wanted. Repeat until satisfied. It might be a good idea to consolidate some of this. (In fact, the Kingdom->Tax Rate seems to be of little utility, since you can change your rate right on the info box on the main map. OTOH, it might help CivII players get started, since it is a familiar interface.) But overall, since the buttons are already implemented on the info panel on the main map, I think the cleanest solution for player convenience would be to ditch the Kingdom->Tax Rate menu item altogether and manage everything from the main info panel. The trade report would still be useful for obtaining more detailed info and making emergency selloffs, but if we could get my suggestion (2) above working right, you would not have to pull down the trade report except on special occasions.
cityturn.c.diff
mapview.c.diff
packets.c.diff
packets.h.diff
packhand.c.diff
player.h.diff
plrhand.c.diff
|