[Freeciv-Dev] [bug #21629] civ2 - barb cities can't build anything due to waste
Follow-up Comment #2, bug #21629 (project freeciv): Using the scenario editor, I had a barb capture my highest shield-producing city in a game of Civ2 Test of Time that I was playing. Apparently, barb cities have no waste at all but almost max corruption (see both screenshots). It's possible that trade can't go below 1. There is a way to set an effect for this, is it not? (file #20015) ___ Additional Item Attachment: File name: barb_city_before_redistribution.png Size:591 KB ___ Reply to this item at: http://gna.org/bugs/?21629 ___ 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 #21629] civ2 - barb cities can't build anything due to waste
Follow-up Comment #3, bug #21629 (project freeciv): Oops didn't realize that there was an upload cap, but the missing screenshot pretty much shows the same thing. (file #20016) ___ Additional Item Attachment: File name: barb_city_after_redistribution.png.zip Size:586 KB ___ Reply to this item at: http://gna.org/bugs/?21629 ___ 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] [patch #4491] SDL clients: Handle more than one diplomat asking for what action to take
URL: http://gna.org/patch/?4491 Summary: SDL clients: Handle more than one diplomat asking for what action to take Project: Freeciv Submitted by: sveinung Submitted on: Tue 11 Feb 2014 02:59:50 PM UTC Category: client-sdl Priority: 5 - Normal Status: In Progress Privacy: Public Assigned to: sveinung Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: Make the SDL clients move on in the queue of diplomats asking for input in stead of stopping after one. ___ File Attachments: --- Date: Tue 11 Feb 2014 02:59:50 PM UTC Name: 0001-Support-diplomat-queue-in-the-SDL-clients.patch Size: 13kB By: sveinung http://gna.org/patch/download.php?file_id=20017 ___ Reply to this item at: http://gna.org/patch/?4491 ___ 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 #21507] Finer controll of ZoC
Follow-up Comment #3, bug #21507 (project freeciv): I added new patch with comments reidented, and included rescription in all rulesets. I also have some comments, suggestions: why use inconsistent indentation in code and rulesets (code - spaces over tabs, ruleset tabs over spaces)? I see no point in having flag descriptions/ruleset help copied in multiple places. It seems only thing it does is polute changelogs, and additional work to add changes in all places(which also increases chance for errors/mistakes). I think we can presume that anyone writing rulesets is using normal editor (vim, emacs etc have multiple windows buffers) or IDE (mostly have tabbed interface) and not ms notepad or such, thus there is little advantage in having flags at the top of the file when you can simply have separate tab/buffer open with all explanation. If you agree with this I open new bug and let me know I can do such minuscule changes. As for ruleset, lets say it is for testing (though I myself tested it with classic). But to be fair I'm fairly confident that this flag is *very sensible* for most non military units, and would strongly suggest considering adding it classic if not all rulesets. Also I think with this there is no reason to have speceal treatment of zoc for air and water units, but thats other discussion. (file #20018) ___ Additional Item Attachment: File name: HasNoZOC_new.diff Size:6 KB ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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] [patch #4491] SDL clients: Handle more than one diplomat asking for what action to take
Update of patch #4491 (project freeciv): Status: In Progress = Ready For Test ___ Additional Item Attachment: File name: 0001-Support-diplomat-queue-in-the-SDL-clients.patch Size:13 KB ___ Reply to this item at: http://gna.org/patch/?4491 ___ 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 #21639] Minimized chat-view after reconnect
URL: http://gna.org/bugs/?21639 Summary: Minimized chat-view after reconnect Project: Freeciv Submitted by: cazfi Submitted on: Tue 11 Feb 2014 09:15:48 PM EET Category: client-gtk-3.0 Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: ___ Details: 1) Lose connection to server 2) Reconnect See how chat-view has zero height, with mapview filling entire screen. This has now happened several times in the first multiplayer game where I use gtk3-client. ___ Reply to this item at: http://gna.org/bugs/?21639 ___ 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 #21507] Finer controll of ZoC
Update of bug #21507 (project freeciv): Status:None = In Progress Assigned to:None = sveinung ___ Follow-up Comment #4: I added new patch with comments reidented, and included rescription in all rulesets. Thank you. Assigning this ticket to my self. That makes it my job to review and, if accepted, to commit your change. I also have some comments, suggestions: I'm not a native English speaker. Please assume that I intended to be polite and friendly if I got the tone wrong. Let me know if something isn't clear or if I misunderstood you. why use inconsistent indentation in code and rulesets (code - spaces over tabs, ruleset tabs over spaces)? The long term goal for the code is spaces everywhere. When only changing something small in a differently formatted section using the surrounding white space style is OK. The reason you shouldn't change white space for areas you don't modify is that it will make it more difficult to back port bug fixes. I assume this applies to rule sets as well. I see no point in having flag descriptions/ruleset help copied in multiple places. The point is that people should be able to fork any bundled rule set and still have it documented. The disadvantages you mention are the price we pay for this. I think we can presume that anyone writing rulesets is using normal editor (vim, emacs etc have multiple windows buffers) or IDE (mostly have tabbed interface) and not ms notepad or such Non programmers that modify Freeciv rule sets do exist. We can't assume they know how to take advantage of advanced text editors and IDE's. I'm fairly confident that this flag is very sensible for most non military units, and would strongly suggest considering adding it In that case you may wish to file a patch ticket in our patch tracker that makes a rule set start using the flag. (I suggest starting with one rule set to keep the task smaller) Some advice on what to consider when you argue for a rule change: * What will your change do to the game balance? (What strategies will become possible/easier/harder/impossible because of it?) * How will it impact current users? (Will old save games work? Will it confuse existing players?) This is more important for old and popular rule sets that have been stable for years than it is for new and unpopular rule sets that change often. * Will your change help/hinder rule set specific goals? (The goal of the civ1 and civ2 rule sets is the be as close to the original games as possible. If a rule set has a README it may be a good idea to have a look at it) * If you identify problems you should of course explain why the benefits of the change makes them worth it. Also I think with this there is no reason to have speceal treatment of zoc for air and water units That may be a candidate for generalization[1]. But, like you said, that is another discussion. [1] Generalization = to move hard coded rules to the rule set ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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 #21507] Finer controll of ZoC
Follow-up Comment #5, bug #21507 (project freeciv): and not ms notepad or such I think Windows users are actually our biggest end-user group nowadays. And for casual Windows user notepad and wordpad are the only ASCII editors. Maybe changing the flag name to something that makes it obvious which way it works is in order. People have already confused existing ZOC flags. CausesNoZOC? Existing flags could (in separate ticket) then be renamed as NotAffectedByZOC (or NotSubjectToZOC) for consistency. Also I think with this there is no reason to have speceal treatment of zoc for air and water units You mean changing the rulesets, or is there something missing in ruleset format level? ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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] [patch #4468] Rework road gfx tags
Update of patch #4468 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4468 ___ 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 #21637] civ2civ3 rules: enabled loss of techs
Update of bug #21637 (project freeciv): Category:None = rulesets Status:None = Ready For Test Assigned to:None = cazfi Planned Release: = 2.5.0, 2.6.0 ___ Follow-up Comment #2: Nitpick: This is a new feature, not a bug, so should be in patch-tracker side. ___ Reply to this item at: http://gna.org/bugs/?21637 ___ 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 #21637] civ2civ3 rules: enabled loss of techs
Update of bug #21637 (project freeciv): Depends on: = bugs #21623 ___ Reply to this item at: http://gna.org/bugs/?21637 ___ 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] [patch #4469] Reset curl handle between uses
Update of patch #4469 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4469 ___ 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 #21612] Use of uninitialized redraw
Update of bug #21612 (project freeciv): Status: Ready For Test = Fixed Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?21612 ___ 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 #21507] Finer controll of ZoC
Follow-up Comment #6, bug #21507 (project freeciv): You mean changing the rulesets, or is there something missing in ruleset format level? I don't know what he meant but zoc creation has a hard coded rule that ignores the zoc if the source tile or the target tile is_ocean_tile(). See common/movement.c: can_step_taken_wrt_to_zoc(). ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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 #21507] Finer controll of ZoC
Follow-up Comment #7, bug #21507 (project freeciv): Review of file #20018 * Marko is right that the flag name could be clearer. * In the auto generated help text: zones of control = zone of control * In the auto generated help text: missing space between it (before your line break) and will (after the line break). * You forgot the tab on the same line as the flag in the rule set documentation comments. * You forgot a space in the indention after your broke the if statement ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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] [patch #4492] Alignment keeping ASSEMBLE_RGB DISEMBLE_RGB
URL: http://gna.org/patch/?4492 Summary: Alignment keeping ASSEMBLE_RGB DISEMBLE_RGB Project: Freeciv Submitted by: cazfi Submitted on: Wed 12 Feb 2014 01:56:40 AM EET Category: client-sdl Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.4.3, 2.5.0, 2.6.0 ___ Details: Clang gives a lot of warnings about how ASSEMBLE_RGB and DISEMBLE_RGB have been written assigning pointers to types of different alignment. Write those macros in alignment-safe way. ___ File Attachments: --- Date: Wed 12 Feb 2014 01:56:40 AM EET Name: AlphaBlitMacroAlignment.patch Size: 21kB By: cazfi http://gna.org/patch/download.php?file_id=20020 --- Date: Wed 12 Feb 2014 01:56:40 AM EET Name: AlphaBlitMacroAlignment-S2_5.patch Size: 11kB By: cazfi http://gna.org/patch/download.php?file_id=20021 ___ Reply to this item at: http://gna.org/patch/?4492 ___ 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 #21507] Finer controll of ZoC
Follow-up Comment #8, bug #21507 (project freeciv): review of file #20018 I missed one. Sorry: * data/helpdata.txt should be updated ___ Reply to this item at: http://gna.org/bugs/?21507 ___ 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 #21637] civ2civ3 rules: enabled loss of techs
Follow-up Comment #3, bug #21637 (project freeciv): ok, thank you. ___ Reply to this item at: http://gna.org/bugs/?21637 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #4477] Better configure check for detection of unknown compiler options
Update of patch #4477 (project freeciv): Status: In Progress = None Planned Release: 2.4.3, 2.5.0, 2.6.0 = Summary: Better configure check for detection unknown compiler options = Better configure check for detection of unknown compiler options ___ Follow-up Comment #1: Options supported by gcc aren't making this easy - the way I hoped to fix this doesn't work. ___ Reply to this item at: http://gna.org/patch/?4477 ___ 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] [patch #4493] Options to enable sfx and/or music
URL: http://gna.org/patch/?4493 Summary: Options to enable sfx and/or music Project: Freeciv Submitted by: cazfi Submitted on: Wed 12 Feb 2014 03:31:05 AM EET Category: client Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: Add options to enable/disable sound effects, in-game music, and menu music. ___ File Attachments: --- Date: Wed 12 Feb 2014 03:31:05 AM EET Name: AudioOptions.patch Size: 7kB By: cazfi http://gna.org/patch/download.php?file_id=20022 ___ Reply to this item at: http://gna.org/patch/?4493 ___ 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] [patch #4487] [Metaticket] Music switching system
Update of patch #4487 (project freeciv): Depends on: = patch #4493 ___ Reply to this item at: http://gna.org/patch/?4487 ___ 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] [patch #4481] --without-freeciv-manual
Update of patch #4481 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4481 ___ 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 #21640] AI set taxes 0% to luxury, and 0% science, in wrong situations
URL: http://gna.org/bugs/?21640 Summary: AI set taxes 0% to luxury, and 0% science, in wrong situations Project: Freeciv Submitted by: bardo Submitted on: mié 12 feb 2014 02:48:44 UTC Category: ai Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: 2.5 Discussion Lock: Any Operating System: None Planned Release: ___ Details: I have noticed for some time (since v2.5) that AI often set the taxes to maximize the gold (to the max allowed by the government, for example 60% under Despotism), and the rest of the taxes are set to generate luxury (40% in the example), even when celebrations are not allowed and luxuries are not really needed. I attach a savegame played with S2_5 (civ2civ3 rules, cheating AI level), and the related log of AI TAXES of this turn. You will see some of the AIs are stuck to 0% science, max % allowed set to gold, and the rest % to luxury. For example: Wilhelm I [max] rate=70 Wilhelm I [old] (Sci/Lux/Tax)=0/30/70 Wilhelm I [tax] estimated=-34 real=97 (delta=-131) Wilhelm I [tax] trade=113 gold=246 expenses=113 Wilhelm I [tax] Tax=0 income=-48 Wilhelm I [tax] Tax=10 income=-37 Wilhelm I [tax] Tax=20 income=-25 Wilhelm I [tax] Tax=30 income=-14 Wilhelm I [tax] Tax=40 income=-3 Wilhelm I [tax] Tax=50 income=8 Wilhelm I [tax] min=30 balanced=50 Wilhelm I [sci] estimated=57 real=0 (delta=57) Wilhelm I [sci] trade=113 bulbs=112 upkeep=0 Wilhelm I [sci] Sci=0 research=-5 Wilhelm I [sci] min=0 balanced=0 Wilhelm I [res] balanced! (Sci/Lux/Tax)=0/0/50 Wilhelm I [new] (Sci/Lux/Tax)=0/30/70 I have found the same weird AI behavior with and without tech upkeep, and both at normal and cheating AI level (but it seems more often at cheating AI level). However, I have not seen it with classic rules, so I'm not sure about the trigger. I'm checking the file aihand.c because I'm almost sure there is a bug there, but it is a bit complicated for me. ___ File Attachments: --- Date: mié 12 feb 2014 02:48:44 UTC Name: civ2civ3-taxes.txt Size: 9kB By: bardo http://gna.org/bugs/download.php?file_id=20023 --- Date: mié 12 feb 2014 02:48:44 UTC Name: civ2civ3-taxes-T0128-Y00560-auto.sav.bz2 Size: 93kB By: bardo http://gna.org/bugs/download.php?file_id=20024 ___ Reply to this item at: http://gna.org/bugs/?21640 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #4494] helptext_extra()
URL: http://gna.org/patch/?4494 Summary: helptext_extra() Project: Freeciv Submitted by: cazfi Submitted on: Wed 12 Feb 2014 05:31:50 AM EET Category: client Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.6.0 ___ Details: Combine helptext_base() and helptext_road() sharing a lot of code to one helptext_extra(). I resist temptation to make helptext common property of all extras yet - I don't want ruleset format to include helptext field for those extras that are neither roads nor bases until it's actually used (shown somewhere). ___ File Attachments: --- Date: Wed 12 Feb 2014 05:31:50 AM EET Name: ExtraHelp.patch Size: 16kB By: cazfi http://gna.org/patch/download.php?file_id=20025 ___ Reply to this item at: http://gna.org/patch/?4494 ___ 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] [patch #4483] Correct dai_plr_data_get() logmsg
Update of patch #4483 (project freeciv): Status: Ready For Test = Done Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/patch/?4483 ___ 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 #21602] Failure to find alternative gfx for specialist is ignored
Update of bug #21602 (project freeciv): Status: Ready For Test = Fixed Assigned to:None = cazfi Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?21602 ___ 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 #21640] AI set taxes 0% to luxury, and 0% science, in wrong situations
Follow-up Comment #1, bug #21640 (project freeciv): I found the cause, and it is not a bug, but a bad design, imho. It is related to this code inside aihand.c /* Put the remaining to tax or science. */ if (!adv_wants_science(pplayer) || dai_on_war_footing(ait, pplayer)) { rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); log_base(LOGLEVEL_TAX, %s [res] crazy (Sci/Lux/Tax)=%d/%d/%d, player_name(pplayer), rates[AI_RATE_SCI], rates[AI_RATE_LUX], rates[AI_RATE_TAX]); } else { rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); log_base(LOGLEVEL_TAX, %s [res] sane (Sci/Lux/Tax)=%d/%d/%d, player_name(pplayer), rates[AI_RATE_SCI], rates[AI_RATE_LUX], rates[AI_RATE_TAX]); It seems the ai set the taxes to be able to pay the upkeeps (techs and buildings), and the remaining taxes are send, in this order, to science, gold and luxury... (this is good to me) except if the ai is on_war_footing, then the remaining taxes are send to gold (ok), luxury, and science. It seems the AI ends often in this on_war_footing state, and they prefer luxury over science. It was hard to notice in versions previous to 2.5 because HARD or CHEATING AI levels overide the limits to taxes by governments, and the result was taxes set 100% to gold; instead of 60% to gold, and 40% to luxury like now. I'll upload my suggested solution to prioritize the remaining taxes this way: 1) if (!adv_wants_science(pplayer) then gold, luxury, science 2) if dai_on_war_footing(ait, pplayer) then gold, science, luxury I think it improves a lot the researching capability of the AI when taxes are limited by H_RATES. ___ Reply to this item at: http://gna.org/bugs/?21640 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21640] AI set taxes 0% to luxury, and 0% science, in wrong situations
Follow-up Comment #2, bug #21640 (project freeciv): I found the cause, and it is not a bug, but a bad design, imho. It is related to this code inside aihand.c /* Put the remaining to tax or science. */ if (!adv_wants_science(pplayer) || dai_on_war_footing(ait, pplayer)) { rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); log_base(LOGLEVEL_TAX, %s [res] crazy (Sci/Lux/Tax)=%d/%d/%d, player_name(pplayer), rates[AI_RATE_SCI], rates[AI_RATE_LUX], rates[AI_RATE_TAX]); } else { rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); log_base(LOGLEVEL_TAX, %s [res] sane (Sci/Lux/Tax)=%d/%d/%d, player_name(pplayer), rates[AI_RATE_SCI], rates[AI_RATE_LUX], rates[AI_RATE_TAX]); It seems the ai set the taxes to be able to pay the upkeeps (techs and buildings), and the remaining taxes are send, in this order, to science, gold and luxury... (this is good to me) except if the ai is on_war_footing, then the remaining taxes are send to gold (ok), luxury, and science. It seems the AI ends too often in this on_war_footing state, and they prefer luxury over science. It was hard to notice in versions previous to 2.5 because HARD or CHEATING AI levels overide the limits to taxes by governments, and the result was taxes set 100% to gold, instead of 60% to gold, and 40% to luxury. I'll upload my suggested solution to prioritize the remaining taxes this way: 1) if (!adv_wants_science(pplayer) then gold, luxury, science 2) if dai_on_war_footing(ait, pplayer) then gold, science, luxury I think this fix improves a lot the researching capabilities of the AI when taxes are limited. ___ Reply to this item at: http://gna.org/bugs/?21640 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21641] When gold_upkeep_style = 2, building upkeep not taken into account for taxes
URL: http://gna.org/bugs/?21641 Summary: When gold_upkeep_style = 2, building upkeep not taken into account for taxes Project: Freeciv Submitted by: bardo Submitted on: mié 12 feb 2014 06:26:21 UTC Category: ai Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: all Discussion Lock: Any Operating System: None Planned Release: ___ Details: When gold_upkeep_style = 2, AI does not take into account the upkeep of Buildings when they decide the tax rates. I knew there was something wrong with gold_upkeep_style for long time, but I was unable to debug the code until now, and finally I found the exact cause. Related code in aihand.c: /* Find total trade surplus and gold expenses */ city_list_iterate(pplayer-cities, pcity) { if (NULL != trade) { *trade += pcity-surplus[O_TRADE]; } if (NULL != expenses) { *expenses += pcity-usage[O_GOLD]; } if (NULL != income) { *income += pcity-surplus[O_GOLD]; } } city_list_iterate_end; if (game.info.gold_upkeep_style 0) { /* Account for units with gold upkeep paid for by the nation. * (game.info.gold_upkeep_style = 1 2) */ unit_list_iterate(pplayer-units, punit) { *expenses += punit-upkeep[O_GOLD]; } unit_list_iterate_end; } } Latest time that I reported this bug, someone added the part to sum the expenses due to upkeep of units, but we forgot to sum the upkeep of buildings for game.info.gold_upkeep_style = 2, because in this case they are not included in city expenses. You can verify by watching the value of variable expenses in game. I do not know the code enough to create a patch. ___ Reply to this item at: http://gna.org/bugs/?21641 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21641] When gold_upkeep_style = 2, building upkeep not taken into account for taxes
Follow-up Comment #1, bug #21641 (project freeciv): After many autogames watching the AI with different gold_upkeep_style, I suspect there is a similar bug that affect the decission to build improvements by AI, but I'm not sure and I do not know this part of the code. When there are units with gold upkeep, I have noticed that the AI seems to build less improvements if gold_upkeep_style = 0, where upkeep of units is taken into account by each city. While rulesets with gold_upkeep_style = 1 behaves similar to classic rules, where the only upkeep paid by each city is due to buildings. Then, it was this buggy gold_upkeep_style = 2 where AI seems to build more improvements, but it was alwasy losing them due to bankrupt. If the code was right, I suppose it should be immposible to notice any AI difference. In the other hand, the only reason why I used different gold_upkeep_style in my rulesets was because they affected the AI behavior, so I'm not sure if this part was intended or not. ___ Reply to this item at: http://gna.org/bugs/?21641 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21640] AI set taxes 0% to luxury, and 0% science, in wrong situations
Follow-up Comment #3, bug #21640 (project freeciv): After some tests, I suggest simply to remove this condition: || dai_on_war_footing(ait, pplayer) When at war, some extra money could help the AI to win some battle, but extra science is more useful to win the war. I see no reason to stop all kind of researching in this case. My suggested code: /* Put the remaining to tax or science. */ if (!adv_wants_science(pplayer)) { rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); } else { rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI] + RATE_REMAINS(rates)); rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX] + RATE_REMAINS(rates)); rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX] + RATE_REMAINS(rates)); This simple change makes the AI much more efficient in my opinion, no matter if there are limited taxes or not. I do not attach any patch, I let developers decide the best way to fix it, but I find a game breaker the current code where luxuries are prioritized over science. (note there are some leftover log entries in previous post, sorry) ___ Reply to this item at: http://gna.org/bugs/?21640 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #21629] civ2 - barb cities can't build anything due to waste
Follow-up Comment #4, bug #21629 (project freeciv): In civ3, corruption/waste could not reduce the production of a city under 1. I like this solution, if possible. ___ Reply to this item at: http://gna.org/bugs/?21629 ___ Mensaje enviado vía/por Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev