Planar Gates create units over the building limit

Slarki

Warlord
Joined
Aug 5, 2011
Messages
232
When I build the Planar Gate, I get more units than the maximum allowed level for each Planar Gate and Armageddon Counter. So far I have 6 Moebius Witches but only 4 Planar Gates.
 
Where did you see that the number of Moebius Witches would be limited by the number of Planar Gates or anything else? It doesn't say anything about that in the Civilopedia, but maybe you've seen that somewhere else? Moebius Witches are mage substitutes, so not limited that way. I THINK I've had the Planar Gates give me a national unit over the limit, but I'm not even sure that happened.
 
in the orginal fall from heaven manual as well as the planar gate description. I'm talking about the automatic spawning. I haven't build any Moebius Witches myself.
 
Planar gate description only says the AC affects how often it spawns and how many units you can get. It does not tell you the exact numbers. I saw nothing in the in game manual for AC referencing planar gates. AFAIK the only way to tell exact number for max spawn would be to dig through the code.
 
Planar gate description only says the AC affects how often it spawns and how many units you can get. It does not tell you the exact numbers. I saw nothing in the in game manual for AC referencing planar gates. AFAIK the only way to tell exact number for max spawn would be to dig through the code.
From the fan manual of the orginal Fall from Heaven 2.

I don't see any documentation of this been changed. My feeling is that it is bugged out because I get way too many units without doing anything. This feels overpowered.
 

Attachments

  • Screenshot_216.png
    Screenshot_216.png
    133 KB · Views: 208
So this is the code in question and if I'm reading it right at AC less than or equal to 50 you get up to just under 2 times the number of planar gates you have. So 4 planar gates would give you up to 7 mobius witch at AC 50 or less. If you feel that's too much you are welcome to create your own modmod of MNAI and reduce the numbers /shrug I'd also like to make mention that this isn't the original FFH2. This is MNAI which I guess is the closest to the original but it's not the original and nowadays the developer of the original (Kael) is being paid to do this stuff and hasn't done anything that I know of with FFH2 in years. There are years of development that has gone into FFH2 and it's many modmods so it's unlikely you've read all the patch notes for everything up to now and it's almost guaranteed that a fan manual would be out of date.
Code:
       if pCity.getNumRealBuilding(gc.getInfoTypeForString('BUILDING_PLANAR_GATE')) > 0:
           iMax = 1
           iMult = 1
           if CyGame().getGlobalCounter() >= 50:
               iMax = 2
               iMult = 1.5
           if CyGame().getGlobalCounter() >= 75:
               iMax = 3
               iMult = 2
           if CyGame().getGlobalCounter() == 100:
               iMax = 4
               iMult = 2.5
           if CyGame().getSorenRandNum(10000, "Planar Gate") < gc.getDefineINT('PLANAR_GATE_CHANCE') * iMult:
               listUnits = []
               iMax = iMax * pPlayer.countNumBuildings(gc.getInfoTypeForString('BUILDING_PLANAR_GATE'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_GAMBLING_HOUSE')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_REVELERS')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_REVELERS'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_MAGE_GUILD')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_MOBIUS_WITCH')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_MOBIUS_WITCH'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_CARNIVAL')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_CHAOS_MARAUDER')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_CHAOS_MARAUDER'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_GROVE')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_MANTICORE')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_MANTICORE'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_PUBLIC_BATHS')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_SUCCUBUS')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_SUCCUBUS'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_OBSIDIAN_GATE')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_MINOTAUR')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_MINOTAUR'))
               if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_TEMPLE_OF_THE_VEIL')) > 0:
                   if pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_TAR_DEMON')) < iMax:
                       listUnits.append(gc.getInfoTypeForString('UNIT_TAR_DEMON'))
               if len(listUnits) > 0:
                   iUnit = listUnits[CyGame().getSorenRandNum(len(listUnits), "Planar Gate")]
                   newUnit = pPlayer.initUnit(iUnit, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
                   CyInterface().addMessage(iPlayer,True,25,CyTranslator().getText("TXT_KEY_MESSAGE_PLANAR_GATE",()),'AS2D_DISCOVERBONUS',1,gc.getUnitInfo(newUnit.getUnitType()).getButton(),ColorTypes(8),pCity.getX(),pCity.getY(),True,True)
                   if iUnit == gc.getInfoTypeForString('UNIT_MOBIUS_WITCH'):
                       promotions = [ 'PROMOTION_AIR1','PROMOTION_BODY1','PROMOTION_CHAOS1','PROMOTION_DEATH1','PROMOTION_EARTH1','PROMOTION_ENCHANTMENT1','PROMOTION_ENTROPY1','PROMOTION_FIRE1','PROMOTION_LAW1','PROMOTION_LIFE1','PROMOTION_MIND1','PROMOTION_NATURE1','PROMOTION_SHADOW1','PROMOTION_SPIRIT1','PROMOTION_SUN1','PROMOTION_WATER1' ]
                       newUnit.setLevel(4)
                       newUnit.setExperience(14, -1)
                       for i in promotions:
                           if CyGame().getSorenRandNum(10, "Bob") == 1:
                               newUnit.setHasPromotion(gc.getInfoTypeForString(i), True)
 
Last edited:
You sound a little irritiated. This hasn't anything to do with how much respect I have towards the developer. I searched this thread for any changelog. That this mod has changed the values of the orginal Fall from Heaven 2 is something I am aware of. Thank you for showing me the code in question.
 
I am though not really at you. AFAIK the change logs are posted with the thread for each individual update so you'd have to look at each of those threads to see the full change log, that could take a while lol. There are a few things I think should be more explained in game than they are but some people like things being a bit mysterious so ehh. If you find something you don't like then changing it isn't too difficult though merging your changes with any future updates can get a little annoying if you are not careful to keep track of what files you changed.
 
Top Bottom