[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #25, bug #16413 (project freeciv): Negative balance issue was reproduced and fixed in bug #18221 ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Status: In Progress = Fixed Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Assigned to:None = syntron ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Planned Release:2.2.4, 2.3.0 = 2.2.5, 2.3.0 ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #20, bug #16413 (project freeciv): rebased patch (no further changes); a negative treasure value should not be possible as in all of the functions asserts are placed which check for treasure = 0. Could you please recheck? (file #11222) ___ Additional Item Attachment: File name: 20101115-trunk-update-gold-upkeep-style-2-to-sell-alternatively-a-u.patch Size:16 KB ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #17, bug #16413 (project freeciv): I have to check this but if it is the case, the AI has to learn to take into account all the over expenses could you test the patch for bug #16677? ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Planned Release: 2.3.0 = 2.2.4, 2.3.0 ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Depends on: = bugs #16677 ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #18, bug #16413 (project freeciv): Ooops, while I was testing the other patch I have noticed a bug in this one. With gold_upkeep_style = 2, it is possible to reach negative treasure! In my test, there were no buildings to sell, and only one unit was disbanded. Note I have seen other cases were all the excess of units are disbanded. Savegame playing with slightly modded experimental ruleset. Press end turn and you will end with -2 gold. However, now that you are patching AI behavior to take into account unit gold upkeep, I do not think it is worth to try to fix this patch. (file #10303) ___ Additional Item Attachment: File name: treasurenegative.sav.gzSize:34 KB ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #19, bug #16413 (project freeciv): Oh, true, the savegame is useless without my changes to experimental ruleset... you may trust me treasure can become negative with this patch. (there is no way to edit my posts nor my attaches, doesn't it?) ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #15, bug #16413 (project freeciv): I confirm the new patch is working properly. Unfortunately, it does not solve AI bankrupts. It seems AI simply does not know to balance his economy with gold_upkeep_style != 0. Based on the behavior I see in my tests, I'd say AI set the tax/sci/lux bar based on the income per city, no matter the global economy of the nation. I have seen an AI under democracy, with tax=10%(science=90%), losing -30 gold per turn until treasure reaches 0, losing units and buildings, and still keeping science=90%. If I reload that save game with gold_upkeep_style = 0, the AI balances the economy immediatly to tax=60% and +30 income per turn. The reason I suggested this patch is I used to play gold_upkeep_style = 1, and AI seems to be unable to balance the economy when his income become negative due to amount of units supported by gold. I though to kill the excess of units would be the solution. Now I understand the problem is not that AI can't disband units, the problem seems to be that AI do not take into account the support of units and buildings unless included in the gold balance per city (not verified, just a guess). I still think it is a good think to dissband a unit and then to sell a building alternatively, as you did with this patch. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #16, bug #16413 (project freeciv): Now I understand the problem is not that AI can't disband units, the problem seems to be that AI do not take into account the support of units and buildings unless included in the gold balance per city (not verified, just a guess). I have to check this but if it is the case, the AI has to learn to take into account all the over expenses ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #12, bug #16413 (project freeciv): 1) I have played a game with unmodded experimental ruleset and gold_upkeep_style = 1, played until Corporation is researched, and it seems to work same than always. You do not have to play till Corporation is research. You could use the editor or set techlevel to a high value. file #10214 (goldupkeep2.sav.gz) does not use the experimental ruleset but a ruleset which define 'Tribal' as government file #10213 (goldupkeep1.sav.gz) seems to burn the cpu but does not go to the next turn? Can you reproduce the problem with a smaller map and perhaps 'set techlevel 100'? ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #13, bug #16413 (project freeciv): could you test the attached patch? changes: * first sell a unit, only in the second step sell a building * rework the while loop; it did run in an endless loop before ... (file #10237) ___ Additional Item Attachment: File name: 20100907-09-trunk-update-gold-upkeep-style-2-to-sell-alternatively-a-u.patch Size:16 KB ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #14, bug #16413 (project freeciv): Sure, I'll test it. I did not try to hurry you, if you can't work on it until next month, it's ok, I know you are working on many other things. I was just using this patch to learn how to help developers, to avoid wasting your time in future tests ;). Sorry me I uploaded a wrong savegame2. I had another one with same error over experimental ruleset. Note I did not played manually the savegame1 until The Corporation, I switched to AI control to see how it was working. Thank you for the new patch. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #7, bug #16413 (project freeciv): If you look into the directory where the patch was rejected, i'll find the file with the correct modifications and a .rejected and .orig files. The .orig is the original file before the patch process took over it, and the .rejected containts the parts of the patch that didn't got applied. In that file i'll find information of the code to apply and what did find the patch process. Thank you jnf. I have finally been able to apply and compile the patch over trunk revision 17877 (the day Matthias uploaded the patch). I'm still testing it, but I'm afraid it does not seem to work as expected. Units are killed even when the treasure is not under zero, and it happens even with gold upkeep style 1 that are supposedly unchanged... if I understood. I'll keep testing until I understand how exactly worked the old gold upkeep styles and how are currently working the new ones. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #8, bug #16413 (project freeciv): I'm still testing it, but I'm afraid it does not seem to work as expected. Thanks for testing; I can check it again at the end of this month ... Current Trunk revision 17939 gives me this error message when I start new game: Please report this message at https://gna.org/projects/freeciv/ in can_player_build_unit_direct() [unittype.c::631]: assertion '((void *)0) != punittype' failed. Does this happen with the included rulesets or only with your own ruleset? If it is your own ruleset, can you pin it down to one change (in units.ruleset?) ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #9, bug #16413 (project freeciv): for point 1) see patch #1936 ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #10, bug #16413 (project freeciv): You are right about error message, I forgot I had a modded default ruleset in my /home/.freeciv folder... I did not planned to report a bug unless tested with default rulesets. I'm afraid my previous results about your patch are not valid for same reason, I was changing the gold_upkeep_style in a file that was not used. Sorry me, I'm novice here, I'll be more careful with future tests, and I'll try to limit the amount of my posts :) I have tested a bit more your patch with trunk revision 17877, I'm almost sure I tested it properly this time, I attach the savegames with the error: 1) I have played a game with unmodded experimental ruleset and gold_upkeep_style = 1, played until Corporation is researched, and it seems to work same than always. If, in the middle of that game, I switching to gold_upkeep_style = 2, when I press end turn the game stops with the error: Lost connection to server!. If I switch to gold_upkeep_style = 0 the game continues normally. - in /data/experimental/game.ruleset, change gold_upkeep_style to 2, then load savegame1 and press end turn. 2) I have started another game with experimental ruleset and gold_upkeep_style = 2. As soon as my treasure falls under zero when I press end turn, the server crashes. Even when there is no gold upkeep (The corporation still not researched). - load savegame2 and press end turn. Final comment: if the purpose of the change is to reduce army size when you can not support it, I suggest gold_upkeep_style = 2 to sell alternatively one unit and one building, as you did, but starting by units. Else, the money from the building will surely be enough to support the extra units this turn, and next time you run out of money, another building will be sold. If I'm right. (file #10213, file #10214) ___ Additional Item Attachment: File name: goldupkeep1.sav.gz Size:103 KB File name: goldupkeep2.sav.gz Size:34 KB ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #3, bug #16413 (project freeciv): Did you test the upkeep problem? I'm also playing longturn and at the moment I can't build a military unit because my city is to small to support it. City size: 1 Possible military units: 1 (needs more testing; using shield upkeep) ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #4, bug #16413 (project freeciv): I'm not experienced user of svn patches and I found troubles to test this patch, maybe you can help me. When I try to patch the head version of the current trunk I receive this error FAILED at 1746: patch -p1 /Parches/20100828-01-trunk-update-gold-upkeep-style-2-to-sell-alternatively-a-u.patch patching file data/civ1/game.ruleset patching file data/civ2/game.ruleset patching file data/default/game.ruleset patching file data/experimental/game.ruleset patching file data/multiplayer/game.ruleset patching file server/cityturn.c Hunk #5 succeeded at 1694 (offset 2 lines). Hunk #6 succeeded at 1703 (offset 2 lines). Hunk #7 FAILED at 1746. Hunk #8 succeeded at 1854 (offset 3 lines). Hunk #9 succeeded at 1877 (offset 3 lines). Hunk #10 succeeded at 1885 (offset 3 lines). Hunk #11 succeeded at 1938 (offset 3 lines). Do I need to test the patch over certain previous trunk version? Or it might be something I'm doing wrong? (let me know if there is other place more apropiate for such novice questions) ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #5, bug #16413 (project freeciv): Sorry me the double post, we post previous comment at same time. I'm trying to apply the patch right now, but it is the first time I compile the svn trunk version, and I advance slowly. Did you test the upkeep problem? I'm also playing longturn and at the moment I can't build a military unit because my city is to small to support it. City size: 1 Possible military units: 1 (needs more testing; using shield upkeep) I'm not sure if I understood your post, does it mean that you already included the population limit into the patch? I'll verify it as soon as I can patch and compile it. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #6, bug #16413 (project freeciv): Now I think I understood your post... Yes, I have verified the upkeep problem. It is true that with shield upkeep you can not create or rehome units if the city production is already 0. Still, you can construct Bach's wonder (force content 2) and it would allow a city with pop = 2 to send to war as much units as his production, without any unhappiness under democracy. Pop 2 city with railroads and mines can support a lot of units, arround 10 or so. And that is much higher than the effect of police stations or Women suffrage wonder. Also, it is a known multiplayer trick/exploit to construct Shakespeare theater (no unhappy) in a city with a lot of production and to rehome all your attacking units to that city. It practically dissables the military unhappiness by Democracy/Republic governments. With gold upkeep is even worse, because there is no limit to the units you can construct or rehome, even if your income is negative. It is logical, else when you move the tax bar you would affect the max units per city. That is why I suggest to use population as an alternative limit for both gold and shield upkeep. In my civ2-3 ruleset, I solved partially the exploit of force_content, make_happy and no_unhappy, by replacing them by luxury bonuses in the central tile of cities. Because luxuries can not remove the unhappiness caused by military units (they are taken into account before), and at same time luxuries can create other happy citizens to counter the citizens unhappy by military units. But I guess people do not like such changes in default ruleset. Btw, I have been able to compile and execute the trunk, and I'm trying to edit manually the file cityturn.c with your changes, to test them. Current Trunk revision 17939 gives me this error message when I start new game: Please report this message at https://gna.org/projects/freeciv/ in can_player_build_unit_direct() [unittype.c::631]: assertion '((void *)0) != punittype' failed. That is all, sorry me the long post. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Follow-up Comment #2, bug #16413 (project freeciv): Great!, thank you for this patch. I'll try to compile the trunk just to test this patch. About the other wish/suggestion: ...a city that supports as much units as his population value, can not build new units, and you can not select it as the home city for other units. I guess it would be much more simple to implement only the second part: if a city supports more units than his population value, you can not select it as the home city for other units. And it should be enough to avoid the exploit to bypass military unhappiness. I believe it could be useful even for default ruleset, though I suppose other players should discuss it before. Let's test this one first. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
Update of bug #16413 (project freeciv): Severity:1 - Wish = 2 - Minor Status:None = In Progress Planned Release: = 2.3.0 ___ Follow-up Comment #1: 2) Another issue about Gold upkeep: I have been testing a lot this system, watching AI behavior carefully, and I have seen the AI sometimes enter banckrupt due to the ammount of units supported by gold, and when buildings start to be destroyed they lose even more money due to missing marketplaces, banks, or temples replaced by luxury... At the end I have seen some AI unable to restore positive income, losing most of the buildings in their cities, and still supporting a huge ammount of units... It might be a good idea to disband at least one unit supported by gold, everytime you end turn with negative cash. This (untested) patch changes the gold upkeep style 2 to alternatively sell an unit and an improvement. Please test it. Part 1 needs another ticket ... (file #10063) ___ Additional Item Attachment: File name: 20100828-01-trunk-update-gold-upkeep-style-2-to-sell-alternatively-a-u.patch Size:16 KB ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #16413] Gold upkeep and Military unhappiness
URL: http://gna.org/bugs/?16413 Summary: Gold upkeep and Military unhappiness Project: Freeciv Submitted by: tirolalira Submitted on: jueves 12/08/10 at 22:48 Category: rulesets Severity: 1 - Wish Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: 2.2.2 Discussion Lock: Any Operating System: None Planned Release: ___ Details: 1) There is a side effect of some wonders that allows you to bypass the unhappiness caused by military units under Republic or Democracy governments. If you have one wonder with the effect force_content (as Bach cathedral) or make_happy (as Hanging gardens) or no_unhappy (as Shakespeare theatre), then cities with same population than the wonder effect (or less), can support any number of military units out of the borders without revolt. In fact, it seems cities with pop=1 can always avoid revolt switching his only citizen to a specialist. This issue is not very important when units are supported by shields because the shield production of the city limits the ammount of units that can use this cheat/exploit, but it is a mayor issue for any Ruleset based on gold upkeep: [code] ; Method of paying unit and improvement gold upkeep ; 0 - The player's total gold must be non-negative after paying upkeep ; costs associated with each city. If for any city the player's gold ; is negative, random buildings in the city are sold off. If the gold ; is still negative, then supported units with gold upkeep are ; disbanded. ; 1 - In the first step, the player's total gold must be non-negative after ; paying upkeep for all buildings within a city. If for any city the ; player's gold is negative, random buildings in the city are sold off. ; In the second step, gold upkeep for all units is paid in a lump sum. ; If the player does not have enough gold, random units with gold upkeep ; are disbanded. ; 2 - Gold upkeep for all buildings and units is paid in a lump sum after ; all cities have been processed. If the player does not have enough ; gold, random buildings from random cities are sold. If still more ; gold is needed, then random units with gold upkeep are disbanded. gold_upkeep_style = 0[/code] It is hard to balance Rulesets based on Gold upkeep, and the main problem is that there is no limit to the ammount of units that a player can create, nor to the number of units that a city can support (under democracy you could even support thousands of units by gold). I thought a simple solution that could solve all these issues, and it would ensure balanced wars under any type of government: I would wish a new optional Rule, that sets the ammount of population as the maximun number of military units that a city can support. This way, a city that supports as much units as his population value, can not build new units, and you can not select it as the home city for other units. I have verified that AI already uses to create a number of units lower than his total population, and I think it is a balanced number, that you'd expect to find in a city a number of units equal to his population. 2) Another issue about Gold upkeep: I have been testing a lot this system, watching AI behavior carefully, and I have seen the AI sometimes enter banckrupt due to the ammount of units supported by gold, and when buildings start to be destroyed they lose even more money due to missing marketplaces, banks, or temples replaced by luxury... At the end I have seen some AI unable to restore positive income, losing most of the buildings in their cities, and still supporting a huge ammount of units... It might be a good idea to disband at least one unit supported by gold, everytime you end turn with negative cash. Please, tell me what do you think, because I feel those changes would be important to get a balanced ruleset based on gold upkeep, even when I know it is not a priority. ___ Reply to this item at: http://gna.org/bugs/?16413 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev