You see, I usually play v05 because I think it's "finished" and "definitive". But alas, it turned out at least one new bug was introduced (in v03). But I want a definitive civdos experience.
In civdos v01 AI can produce diplomats and will use them to steal tech from you. In v03 and later, a bug was fixed when produced AI caravan is not spawned but game tries to create a trade route from non-existent caravan anyway. This is, however, introduced a new bug: AI cannot longer produce diplomats, because new rule includes not only caravan, but also diplomat (which is not spawned yet so it's always -1 at the moment) and also some other code.
This patch for JCivED restores AI diplomat spawning from v01 in civdos v03, v04 and v05 (english version). It keeps caravan fix, but removes new condition from "set timer to talk with player, if nuke was produced and total amount of nukes of AI civ is 1 after that" and from "change production after previous production (unit) is finished". In the case of nuke, this condition from v03 does not really matter and it does not fix any bugs, and my patch simply reverts this part of game logic to v01. In the case of "change production" this patch actually fix a pretty serious new problem in v03 and later: when AI reaches its unit limit (127 units), it cannot change production in a city when unit production is completed. (EDIT 2022/12/13: in v03/04/05, if AI failed to add a produced unit, it nullified the shield storage of the city. As by-product of this patch, this behavior is averted too, so it is like in v01)
Second patch here (only for v05) includes:
1) AI diplomats patch
2) AI space ship launch conditions fix
3) fix of AI rule to speed-up production a first nuke with gold
and
4) fix for destroyed Great Library: it no longer "works" in this case, so barbarians will no longer try to get civ. advances from destroyed GL (which led to stack overflow). Stack overflow still will happen when city with the GL is captured by barbarians, this case is not fixed.
Problem with (2): to check that player has more than 1000 gold, game uses "active civs flags" variable instead of "player civ" variable, this has no sense and this causes the game to read beyond the array in most cases, and even when it reads within the array (when only white and green civs are active), it still has no sense.
Problem with (3): game uses "city flags" field of city structure instead of "current production" field. This is clearly a typo, the result has no sense, and the game can read beyond the array in the cases when current production is not a unit.
Other possible fixes (dubious):
1) AI rule to speed-up palace with gold: cannot be sure that this was Palace and not Militia. But if Palace was intended, game reads beyond the array so it should be fixed.
2) trade arrows from trade routes should be like they are shown on a city screen. Logically, it should be so, and also in this case pre-calculated corruption will actually be used for something, and previous trade routes will not increase income from the next ones. But it will decrease trade routes per-turn profit for both you and AI, and also there's a small chance that "increase current trade route income according to previous trade routes income" behavior was intentional.
3) rule "AI can't build a WotW on chieftain, if player doesn't know civ. advance to build a city improvement with the same id as a wonder". Rule "AI can't buld a wonder on chieftain, if player doesn't know civ advance to build this wonder" looks much more sensible, especially bearing in mind that there's a rule "AI can't build a wonder on Chief or Lord, if player is building this wonder". And it looks like a typo. But it's possible that this rule was intended this way, so it should implement kinda random element.
4) change a year in rule "1 turn = 1 year, when SS is launched". Now it's 1750. This rule creates some buggy effects now and everything will look even more buggy if we will change it, for example, to 1000 AD or to 1 AD. Maybe the art of 20-year space ship is a better solution.
5) make it so that AI actually declares the war on 3rd civ in "mercenary" routine in diplomacy. But the price is so extremely low here, that maybe it was intended for AI to trick you here... And it's hard to implement such a patch in a neat and not ugly way (without jump to beyond the routine and then back).
Maybe I will create 3rd patch that will include these dubious fixes.
EDIT: patch IDs fixed, forgot to change them from "enable debug in vv03-05" patch
In civdos v01 AI can produce diplomats and will use them to steal tech from you. In v03 and later, a bug was fixed when produced AI caravan is not spawned but game tries to create a trade route from non-existent caravan anyway. This is, however, introduced a new bug: AI cannot longer produce diplomats, because new rule includes not only caravan, but also diplomat (which is not spawned yet so it's always -1 at the moment) and also some other code.
This patch for JCivED restores AI diplomat spawning from v01 in civdos v03, v04 and v05 (english version). It keeps caravan fix, but removes new condition from "set timer to talk with player, if nuke was produced and total amount of nukes of AI civ is 1 after that" and from "change production after previous production (unit) is finished". In the case of nuke, this condition from v03 does not really matter and it does not fix any bugs, and my patch simply reverts this part of game logic to v01. In the case of "change production" this patch actually fix a pretty serious new problem in v03 and later: when AI reaches its unit limit (127 units), it cannot change production in a city when unit production is completed. (EDIT 2022/12/13: in v03/04/05, if AI failed to add a produced unit, it nullified the shield storage of the city. As by-product of this patch, this behavior is averted too, so it is like in v01)
Second patch here (only for v05) includes:
1) AI diplomats patch
2) AI space ship launch conditions fix
3) fix of AI rule to speed-up production a first nuke with gold
and
4) fix for destroyed Great Library: it no longer "works" in this case, so barbarians will no longer try to get civ. advances from destroyed GL (which led to stack overflow). Stack overflow still will happen when city with the GL is captured by barbarians, this case is not fixed.
Problem with (2): to check that player has more than 1000 gold, game uses "active civs flags" variable instead of "player civ" variable, this has no sense and this causes the game to read beyond the array in most cases, and even when it reads within the array (when only white and green civs are active), it still has no sense.
Problem with (3): game uses "city flags" field of city structure instead of "current production" field. This is clearly a typo, the result has no sense, and the game can read beyond the array in the cases when current production is not a unit.
Other possible fixes (dubious):
1) AI rule to speed-up palace with gold: cannot be sure that this was Palace and not Militia. But if Palace was intended, game reads beyond the array so it should be fixed.
2) trade arrows from trade routes should be like they are shown on a city screen. Logically, it should be so, and also in this case pre-calculated corruption will actually be used for something, and previous trade routes will not increase income from the next ones. But it will decrease trade routes per-turn profit for both you and AI, and also there's a small chance that "increase current trade route income according to previous trade routes income" behavior was intentional.
3) rule "AI can't build a WotW on chieftain, if player doesn't know civ. advance to build a city improvement with the same id as a wonder". Rule "AI can't buld a wonder on chieftain, if player doesn't know civ advance to build this wonder" looks much more sensible, especially bearing in mind that there's a rule "AI can't build a wonder on Chief or Lord, if player is building this wonder". And it looks like a typo. But it's possible that this rule was intended this way, so it should implement kinda random element.
4) change a year in rule "1 turn = 1 year, when SS is launched". Now it's 1750. This rule creates some buggy effects now and everything will look even more buggy if we will change it, for example, to 1000 AD or to 1 AD. Maybe the art of 20-year space ship is a better solution.
5) make it so that AI actually declares the war on 3rd civ in "mercenary" routine in diplomacy. But the price is so extremely low here, that maybe it was intended for AI to trick you here... And it's hard to implement such a patch in a neat and not ugly way (without jump to beyond the routine and then back).
Maybe I will create 3rd patch that will include these dubious fixes.
EDIT: patch IDs fixed, forgot to change them from "enable debug in vv03-05" patch
Attachments
Last edited: