1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

AND2 and SVN Bug Reports - A New Dawn 2 ONLY

Discussion in 'Rise of Mankind: A New Dawn' started by 45°38'N-13°47'E, Aug 31, 2012.

  1. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    So... About Movement Limits: The bug has reappeared while doing my own little modmod changing only XML stuff. I have loaded a save file and the game asked for a recalc so I did so. But ML was nowhere
    Civ4ScreenShot0658.JPG
    Than I saved the game again, quit, reload and it was back
    Civ4ScreenShot0658.JPG
    See the tile with the sign on it.

    Maybe this behavior has something related to recalc?
     

    Attached Files:

  2. rtt4a

    rtt4a Chieftain

    Joined:
    Mar 3, 2009
    Messages:
    437
    I mean desert and plains atleast and tiles where wasnt flood plains before razing city. It adds flood plains..
    No of course not all plains and desert tiles suppose to be automaticly flood plains, atleast not BTS nor ROM or ROM-AND before.. I havent seen this earlier, than lets say 1075..

    Its true that ROM-AND it was changed so that building city wont erase flood plains as it does in normal BTS but razing city should not add flood plains.
     
  3. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    I don't know if it is only me or intended behavior but combat with barbarians not produce slaves even tough enslavement is set to 50% in my own modmod. Is that intended? :confused:
    Civ4ScreenShot0329.JPG
    There was a turn when around 20 barbarian units (not animals) attacked me in a row, killed them all but no slave was created.
     
  4. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    An other thing:
    Is OverrideResourceBuilding tag proved to work fine? Because it doesn't work for me.

    I modified a couple of melee units to have <OverrideResourceBuilding>BUILDING_MERCENARY_CAMP</OverrideResourceBuilding> you don't need metal to train mercenaries as they bring their own weapons. But it doesn't work.
    Civ4ScreenShot0670.JPG
    As you see there is a Mercenary Camp but I still cannot train Spearmen.
    Spoiler XML code of Spearman :

    Code:
            <UnitInfo>
                <Class>UNITCLASS_SPEARMAN</Class>
                <Type>UNIT_SPEARMAN</Type>
                <UniqueNames/>
                <Special>NONE</Special>
                <Capture>NONE</Capture>
                <Combat>UNITCOMBAT_MELEE</Combat>
                <Domain>DOMAIN_LAND</Domain>
                <DefaultUnitAI>UNITAI_COUNTER</DefaultUnitAI>
                <Invisible>NONE</Invisible>
                <SeeInvisible>NONE</SeeInvisible>
                <Description>TXT_KEY_UNIT_SPEARMAN</Description>
                <Civilopedia>TXT_KEY_UNIT_SPEARMAN_PEDIA</Civilopedia>
                <Strategy>TXT_KEY_UNIT_SPEARMAN_STRATEGY</Strategy>
                <Advisor>ADVISOR_MILITARY</Advisor>
                <bAnimal>0</bAnimal>
                <bFood>0</bFood>
                <bNoBadGoodies>0</bNoBadGoodies>
                <bOnlyDefensive>0</bOnlyDefensive>
                <bNoCapture>0</bNoCapture>
                <bQuickCombat>0</bQuickCombat>
                <bRivalTerritory>0</bRivalTerritory>
                <bMilitaryHappiness>1</bMilitaryHappiness>
                <bMilitarySupport>1</bMilitarySupport>
                <bMilitaryProduction>1</bMilitaryProduction>
                <bPillage>1</bPillage>
                <bSpy>0</bSpy>
                <bSabotage>0</bSabotage>
                <bDestroy>0</bDestroy>
                <bStealPlans>0</bStealPlans>
                <bInvestigate>0</bInvestigate>
                <bCounterSpy>0</bCounterSpy>
                <bFound>0</bFound>
                <bGoldenAge>0</bGoldenAge>
                <bInvisible>0</bInvisible>
                <bFirstStrikeImmune>0</bFirstStrikeImmune>
                <bNoDefensiveBonus>0</bNoDefensiveBonus>
                <bIgnoreBuildingDefense>0</bIgnoreBuildingDefense>
                <bCanMoveImpassable>0</bCanMoveImpassable>
                <bCanMoveAllTerrain>0</bCanMoveAllTerrain>
                <bFlatMovementCost>0</bFlatMovementCost>
                <bIgnoreTerrainCost>0</bIgnoreTerrainCost>
                <bNukeImmune>0</bNukeImmune>
                <bPrereqBonuses>0</bPrereqBonuses>
                <bPrereqReligion>0</bPrereqReligion>
                <bMechanized>0</bMechanized>
                <bSuicide>0</bSuicide>
                <bHiddenNationality>0</bHiddenNationality>
                <bAlwaysHostile>0</bAlwaysHostile>
                <bWorkerTrade>0</bWorkerTrade>
                <bMilitaryTrade>0</bMilitaryTrade>
                <UnitClassUpgrades>
                    <UnitClassUpgrade>
                        <UnitClassUpgradeType>UNITCLASS_PIKEMAN</UnitClassUpgradeType>
                        <bUnitClassUpgrade>1</bUnitClassUpgrade>
                    </UnitClassUpgrade>
                </UnitClassUpgrades>
                <UnitClassTargets/>
                <UnitCombatTargets/>
                <UnitClassDefenders/>
                <UnitCombatDefenders/>
                <FlankingStrikes/>
                <UnitAIs>
                    <UnitAI>
                        <UnitAIType>UNITAI_RESERVE</UnitAIType>
                        <bUnitAI>1</bUnitAI>
                    </UnitAI>
                    <UnitAI>
                        <UnitAIType>UNITAI_COUNTER</UnitAIType>
                        <bUnitAI>1</bUnitAI>
                    </UnitAI>
                    <UnitAI>
                        <UnitAIType>UNITAI_CITY_COUNTER</UnitAIType>
                        <bUnitAI>1</bUnitAI>
                    </UnitAI>
                    <UnitAI>
                        <UnitAIType>UNITAI_ATTACK_CITY</UnitAIType>
                        <bUnitAI>1</bUnitAI>
                    </UnitAI>
                </UnitAIs>
                <NotUnitAIs/>
                <Builds/>
                <ReligionSpreads/>
                <CorporationSpreads/>
                <GreatPeoples/>
                <Buildings/>
                <ForceBuildings/>
                <HolyCity>NONE</HolyCity>
                <ReligionType>NONE</ReligionType>
                <StateReligion>NONE</StateReligion>
                <PrereqReligion>NONE</PrereqReligion>
                <PrereqCorporation>NONE</PrereqCorporation>
                <PrereqBuilding>NONE</PrereqBuilding>
                <OverrideResourceBuilding>BUILDING_MERCENARY_CAMP</OverrideResourceBuilding>
                <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
                <TechTypes/>
                <BonusType>NONE</BonusType>
                <PrereqBonuses>
                    <BonusType>BONUS_COPPER</BonusType>
                    <BonusType>BONUS_IRON</BonusType>
                    <BonusType>BONUS_OBSIDIAN</BonusType>
                </PrereqBonuses>
                <ProductionTraits/>
                <Flavors/>
                <iAIWeight>10</iAIWeight>
                <iCost>35</iCost>
                <iHurryCostModifier>0</iHurryCostModifier>
                <iAdvancedStartCost>100</iAdvancedStartCost>
                <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
                <iMinAreaSize>-1</iMinAreaSize>
                <iMoves>1</iMoves>
                <bNoRevealMap>0</bNoRevealMap>
                <iAirRange>0</iAirRange>
                <iAirUnitCap>0</iAirUnitCap>
                <iDropRange>0</iDropRange>
                <iNukeRange>-1</iNukeRange>
                <iWorkRate>0</iWorkRate>
                <iBaseDiscover>0</iBaseDiscover>
                <iDiscoverMultiplier>0</iDiscoverMultiplier>
                <iBaseHurry>0</iBaseHurry>
                <iHurryMultiplier>0</iHurryMultiplier>
                <iBaseTrade>0</iBaseTrade>
                <iTradeMultiplier>0</iTradeMultiplier>
                <iGreatWorkCulture>0</iGreatWorkCulture>
                <iEspionagePoints>0</iEspionagePoints>
                <TerrainImpassables/>
                <FeatureImpassables/>
                <TerrainPassableTechs/>
                <FeaturePassableTechs/>
                <iCombat>4</iCombat>
                <iCombatLimit>100</iCombatLimit>
                <iAirCombat>0</iAirCombat>
                <iAirCombatLimit>0</iAirCombatLimit>
                <iXPValueAttack>6</iXPValueAttack>
                <iXPValueDefense>3</iXPValueDefense>
                <iFirstStrikes>0</iFirstStrikes>
                <iChanceFirstStrikes>0</iChanceFirstStrikes>
                <iInterceptionProbability>0</iInterceptionProbability>
                <iEvasionProbability>0</iEvasionProbability>
                <iWithdrawalProb>0</iWithdrawalProb>
                <iCollateralDamage>0</iCollateralDamage>
                <iCollateralDamageLimit>0</iCollateralDamageLimit>
                <iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
                <iCityAttack>0</iCityAttack>
                <iCityDefense>0</iCityDefense>
                <iAnimalCombat>0</iAnimalCombat>
                <iHillsAttack>0</iHillsAttack>
                <iHillsDefense>0</iHillsDefense>
                <TerrainNatives/>
                <FeatureNatives/>
                <TerrainAttacks/>
                <TerrainDefenses/>
                <FeatureAttacks/>
                <FeatureDefenses/>
                <UnitClassAttackMods/>
                <UnitClassDefenseMods/>
                <UnitCombatMods>
                    <UnitCombatMod>
                        <UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
                        <iUnitCombatMod>100</iUnitCombatMod>
                    </UnitCombatMod>
                </UnitCombatMods>
                <UnitCombatCollateralImmunes/>
                <DomainMods/>
                <BonusProductionModifiers>
                </BonusProductionModifiers>
                <iBombRate>0</iBombRate>
                <iBombardRate>0</iBombardRate>
                <SpecialCargo>NONE</SpecialCargo>
                <iSpecialCargoSpace>0</iSpecialCargoSpace>
                <DomainCargo>NONE</DomainCargo>
                <iCargo>0</iCargo>
                <iTotalCargo>0</iTotalCargo>
                <iConscription>4</iConscription>
                <iCultureGarrison>4</iCultureGarrison>
                <iExtraCost>0</iExtraCost>
                <iAsset>2</iAsset>
                <iPower>6</iPower>
                <UnitMeshGroups>
                    <iGroupSize>3</iGroupSize>
                    <fMaxSpeed>1.75</fMaxSpeed>
                    <fPadTime>1</fPadTime>
                    <iMeleeWaveSize>3</iMeleeWaveSize>
                    <iRangedWaveSize>0</iRangedWaveSize>
                    <UnitMeshGroup>
                        <iRequired>3</iRequired>
                        <EarlyArtDefineTag>ART_DEF_UNIT_SPEARMAN</EarlyArtDefineTag>
                    </UnitMeshGroup>
                </UnitMeshGroups>
                <FormationType>FORMATION_TYPE_DEFAULT</FormationType>
                <HotKey/>
                <bAltDown>0</bAltDown>
                <bShiftDown>0</bShiftDown>
                <bCtrlDown>0</bCtrlDown>
                <iHotKeyPriority>0</iHotKeyPriority>
                <FreePromotions/>
                <LeaderPromotion>NONE</LeaderPromotion>
                <iLeaderExperience>0</iLeaderExperience>
                <TrainCondition>
                    <Not>
                        <Has>
                        <GOMType>GOM_CIVIC</GOMType>
                        <ID>CIVIC_BANDITS</ID>
                        </Has>
                    </Not>
                </TrainCondition>
            </UnitInfo>
    

    Did I do something wrong? :confused:

    Can my bugs be caused by renaming the mod folder from Rise of Mankind - A New Dawn to Chronicles of Mankind? I don't think it should matter.
     
  5. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    6,083
    I don't think it works properly at the moment. The tag is currently applied to Fast Battleship in conjunction with Omnifactory. If I set up a coastal city with an Omnifactory but remove Omnifactory's Steel and Oil Products resources, then I can't build a Fast Battleship when I have all techs except Advanced Warmachines. Both resources are red-tagged if I turn on "show untrainable units".
     
    Osk21 likes this.
  6. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    I had a look in the debugger and found the following issue:

    CvPlot::canTrain(...) fails to check for the unit's OverrideResourceBuilding tag being set. This feature was never implemented for the OR requirement, only the AND requirement.

    I've implemented it and it works correctly now

    @Zeta Nexus I checked that your xml works just fine with my fix :)
     
    Last edited: Feb 14, 2019
  7. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    Might be connected to recalc then, I'll have a look when I have time.

    Uh, never noticed. I remember I tried that tag and it was working, but maybe something got lost in the update. I'll fix it in the next update. Thanks for pointing it out.
     
    Osk21 likes this.
  8. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    There is a another serious issue with the AND requirement as well:

    Assert Failed
    File: CvCity.cpp
    Line: 18082
    Expression: eIndex >= 0
    Message: eIndex expected to be >= 0
    ----------------------------------------------------------

    Triggers when pCity->getNumRealBuilding() is called with NO_BUILDING. We have to add a check for kUnit.getOverrideResourceBuilding() being valid (i.e. != NO_BUILDING) .
     
    Last edited: Feb 14, 2019
  9. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    By the way, I've been running a debug build and I am seeing several dozen different assertions firing. Some are quite serious, like issues with the training \ building \ plot yield cache which could potentially seriously confuse the AI. I've fixed maybe half a dozen so far (not too bad for a single day of debugging the code base though :p)
     
    Last edited: Feb 14, 2019
    45°38'N-13°47'E and Zeta Nexus like this.
  10. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    Again, in a later case of recalc this same issue did not reoccur :dunno:

    Could it be also changed so that it checks not for a building <Type> but for a <BuildingClass>? So it would be working with a UB replacement too.
    ...or make <OverrideResourceBuilding> a list where you can define more building types. Whichever is easier.
     
  11. rtt4a

    rtt4a Chieftain

    Joined:
    Mar 3, 2009
    Messages:
    437
    I tested it now and looks like razing city adds floodplains only desert and plains (not grass) tiles on river shore. It should add only city ruins. Im sure that this is wasnt happening few revisions ago, im still in 1079 my self.
     
  12. devolution

    devolution Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    255
    Gender:
    Male
    Location:
    Stavanger, Norway
    Just implemented a fix, it works correctly now. However, the following gametext is missing: TXT_KEY_ROUTE_SEA_TUNNEL
     
  13. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    IIRC it's intended. Enslavement ratio is lower when fighting Barbarian units if I'm not mistaken.
     
  14. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    Would you mind posting your changes here so I can check and upload them in the next update (adding you to the credits page of RAND, of course)? Or you might want to become part of team? About assertions, I know there are some bugs, some are very old, even before I started working on RAND 6 years ago, but to tell the truth I didn't bother to fix them as they were not crippling the game from what I see, so I sticked with "if it's not broken, don't fix it". But we might carefully try to fix those assertions and see what happens. Let me know. :)
     
  15. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    Why?
    And how much less?
     
    Alpaya and Osk21 like this.
  16. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    I checked the code, no, behaviour is the same for barbarians and other units. Only animals cannot be enslaved because there's the hunt mechanic for that. And sea units because there's war prizes for that. IIRC anyway, if you change the enslavement ratio, make sure you recalc or reload by quitting the game completely before checking if the modified enslavement ratio applies.
     
    Osk21 likes this.
  17. Osk21

    Osk21 Barbarian Killer and Beast Trainer & Solar System!

    Joined:
    May 11, 2006
    Messages:
    153
    Gender:
    Male
    Location:
    Rockford, IL
    I like this mod
     
  18. Zeta Nexus

    Zeta Nexus Chieftain

    Joined:
    Jan 23, 2014
    Messages:
    3,294
    Location:
    In a constant brainstorm...
    I had lot's of recalcs followed by many fights with barbarians but never ever enslaved any in my current game. Now I am not at the stage of fighting wars with other civs so I cannot tell if the 50% chance is really 50% chance or not. Will report when I know more...
     
    Osk21 likes this.
  19. ManinBlack

    ManinBlack Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    9
    Are you now unable to abandon cities? Have just taken a barbarian city and unable to raze it (it asks to occupy or be released to the Babylonians - minor civ, the original Zulu owners are long dead and the Babylonians turned up next door)

    Trying to raze and get told its only possible in cheat mode?
     
  20. IPEX-731BA5DD06

    IPEX-731BA5DD06 Chieftain

    Joined:
    Dec 15, 2005
    Messages:
    2,716
    Location:
    Melbourne, Victoria, Australia
    City razing has changed, you need to pillage the city to Zero population WHILE it is in anarchy. Each pillage, has a chance to reduce population by 1 pop, and extend the length of anarchy.

    No you can't "Auto Raze" a city, only pillage it till zero population, then it will be 'razed'
     
    Osk21 and 45°38'N-13°47'E like this.

Share This Page