# Planar Gate Mechanics

Discussion in 'Civ4 - Fall from Heaven' started by Breunor, Jun 14, 2009.

1. ### BreunorDeity

Joined:
Jul 2, 2004
Messages:
2,388
Location:
Earth

But I'm not sure I understand exactly how it works. Is there a limit on total units built? By type? If I have more than one structure that allows units in, is the choice decided randomly; in my current game, it appears that the more powerful units are being built more often.

Specifically, I built a catacomb liberalis, and got all mobius witches; later, I don't think I got any mobius witches; is this occurring because mobius witches are maxed out, or because once the later buildings are made, these new units are produced more often; or neither?

Does anyone know the entire formula?

Thanks for any help,

Breunor

2. ### Skyre NoktisWarlord

Joined:
Apr 28, 2009
Messages:
271
The number of units you can get of each type depends on the Armageddon counter. It's just one per Planar Gate until AC 50, but goes up to a maximum of 4 (I believe, from memory).

To get different units, you need different buildings in the Planar Gate cities. Mage Guilds give Mobius Witches, which is why you were getting so many after building the Catacomb Libralus. There's a list of buildings you can combine with a Planar Gate in the Civilopedia (again, I think, from memory).

3. ### BreunorDeity

Joined:
Jul 2, 2004
Messages:
2,388
Location:
Earth
Thanks Skyre! The Xienwolf manual says that the number you get per gate is dependent on the armageddon counter, and how that mechanic works; but it doesn't mention a global maximum, which the threads above does mention.

Furthermore, I'm interested in the formula for what you get if you have more than one type of unit; say you have both a planar gate and a mage guild; Do you have a 50% chance of a Minotaur and a 50% chance of a mobius witch, or are the odds higher for a minotaur? Do the odds depend on how many of each type is on the board?

Best wishes,

Breunor

4. ### cytherLord of the Dance

Joined:
Jun 9, 2008
Messages:
1,033
Location:
Fane of Lessers
Here is the code for planar gates:
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 pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_PROPHECY_OF_RAGNAROK')) > 0:
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_NORTH)
if iUnit == gc.getInfoTypeForString('UNIT_MOBIUS_WITCH'):
newUnit.setLevel(4)
newUnit.setExperience(14, -1)
for i in promotions:
if CyGame().getSorenRandNum(10, "Bob") == 1:
newUnit.setHasPromotion(gc.getInfoTypeForString(i), True)```

It appears to be equal odds for each unit so you should be careful what your built in your cities.

5. ### popejubalEmperor

Joined:
Jan 13, 2006
Messages:
1,034
Location:
Allentown, PA
Additional note: Moebius Witches come with Channeling II and some random spell spheres, but they are very hard to level up because they start with a decent number of XP already pre-spent.

If you have multiple nodes of the same mana type, however, they are guaranteed to start with that sphere. 2 Death nodes = Death I for free on all Moebius Witches. 3 Death Nodes = Death II free on all Moebius Witches. Same deal with 3 Fire nodes.

I'd suggest deleting or suiciding any non-Moebius Witch units you get through a Planar Gate because Death II Moebius Witches with a few Pyre Zombies to back them up = take any cities you want with very few losses at that stage of the game.

6. ### Emptiness[]

Joined:
Jan 7, 2009
Messages:
1,922
The maximum number of Mobius Witches you can have is based on the number of Mage Guilds in your cities with Planar Gates, and by the Armageddon Counter. It isn't affected by any other factors, including the number of non-MW units you have or any other buildings you build in your Planar Gate cities.

If you avoid having any other summoning-related buildings then you can decrease the average time it will take for a new MW to appear when one dies, but you'll be giving up other summoned units to do it - which is a bad thing.

Once you reach your current cap for Mobius Witches the only way to get more is to get more cities with a Planar Gate + Mage Guild, or to raise the AC above the next threshold increase. Deleting non-MW units won't give you more Mobius Witches.

You can, however, delete a Mobius Witch that comes through with a spell combination that you don't like. A deleted MW will be replaced shortly because new ones will continue to appear periodically until the cap is reached. I recommend that Mobius Witches with sub-par or unsatisfactory spell combinations be rejected in this way.

7. ### odalrickEmperor

Joined:
Nov 12, 2003
Messages:
1,114
It isn't even affected by all those factors. Maximum number of each creature type depends only on Planar Gates and Armageddon. It's #planar gates*max(armageddon//25, 1).

Mage guilds affect only the rate at which you get creatures.

8. ### BreunorDeity

Joined:
Jul 2, 2004
Messages:
2,388
Location:
Earth
Thanks Cyther and Emptiness, I'm starting to get it!

Can I impose further on you do go through the formula on exactly how the maximum number, say of Mobius witches, is determined?

Btw, I have PLENTY of Xp's for my mobius witches. I did this by accident, but since I got the catacomb liberalis and the planar gates, I got a bunch of them early and the experienced up quite a lot. I think it is a very good strategy PROVIDED that the AI or opponents give you time to build up and not attack you early.

Best wishes,

Breunor

9. ### Emptiness[]

Joined:
Jan 7, 2009
Messages:
1,922
I see. So even one Mage Guild in a Planar Gate city will eventually summon as many Witches as 100 such cities would. I didn't realize that.

odalrick just did. Divide the AC by 25, round down to the nearest integer. If the result is 0, increase to 1. Multiply that number by the number of Planar Gates you control. That is the cap for each type of unit. In order for a unit to appear you have to have at least one city that has a Planar Gate and the building associated with the unit in question. The more such cities you have, the faster the unit is question is likely to appear, and the faster you are likely to reach the cap for that unit.

10. ### KillerClownsEmperor

Joined:
Oct 6, 2007
Messages:
1,139
Yeah, the Sheaim are the most demented species of Builder I've seen in any game. More like Unbuilders, but, yeah. They take a while to get started up (thank the gods for Pyre zombies) but once they've got the world running full-force to Armageddon...

11. ### BreunorDeity

Joined:
Jul 2, 2004
Messages:
2,388
Location:
Earth
Thanks Oldarich. That makes sense, I suspect I've maxed out the Mobius witches! I think I have the whole picture now!

Best wishes,

Breunor

12. ### BreezKing

Joined:
Oct 17, 2008
Messages:
924
Hence I have been going into my world builder each time one is created and resetting it's beginning level to 1 but leaving the xp as is. Letting me pick a few promos.

13. ### BreunorDeity

Joined:
Jul 2, 2004
Messages:
2,388
Location:
Earth
I don't know, I think they are pretty awesome as is. I certainly don't think they need a boost, but just my view.

Best wishes,

Breunor

14. ### popejubalEmperor

Joined:
Jan 13, 2006
Messages:
1,034
Location:
Allentown, PA
That's kind of the point of them, though. You get a unit that comes with free promotions and it also comes with Channeling II, so you can eventually cast Rank 2 spells. The downside is that you have to work a lot harder to get the XP necessary since low strength + lots of XP required = tough to level.

I reccomend bringing along some horses with a high retreat value to knock down the hitpoints of any unit that you're attacking so that the Moebius Witch can get her XP with less risk. Also, you get more XP than you "deserve" when you attack wounded units, so that's even better for the Witches.

If you're going to drop their level down, why not do that with all of your other units too? Wait until you get 10 XP and Combat III on your Pyre Zombies and then reset their level back to 1 so that you can grab three more promotions. Watch Rosier the Fallen migrate up through Drill IV + Blitz and then reset his level so that you can add Combat V to him as well. Moebius Witches start at a higher level as a balancing factor to keep them from being overpowered.

15. ### Keeper_GFAPrince

Joined:
Aug 20, 2008
Messages:
524
Location:
How so?

[insert filler here]

16. ### popejubalEmperor

Joined:
Jan 13, 2006
Messages:
1,034
Location:
Allentown, PA
If you are fighting a unit that has 100 HP and you have 100 HP and you both have 5 strength, your odds are 50-50. You get the "correct" amount of XP for that fight. When I say "correct", I just mean the number of XP that you would expect based on the combat odds.

The thing is, though, combat odds aren't what actually determine XP from a fight. The XP that you get from a fight comes from the strength ratio. That means fighting a 10 strength unit with 50 HP (resulting in 5 effective strength) would get you the same XP as fighting a 5 strength unit with 100 HP even though the wounded unit is much easier to defeat.

Drill also gives you better combat odds without changing the strength ratio and that results in more XP than you would get for those combat odds without the extra first strikes.

17. ### Emptiness[]

Joined:
Jan 7, 2009
Messages:
1,922
Mobius Witches start with the xp required to buy their starting promotions - meaning that if a Witch pops out that already has 10 xp, that's not some penalty. Those 10 xp have been used to buy 3 level 1 spells for the Witch. This is only a "penalty" if the Witch has bought spells you don't want. The solution for that is simple (if you are patient) - just delete the Witch and another will appear shortly. Repeat until all your Witches are satisfactory.

popejubal's main point, though, is spot-on. Resetting a Witch to Level 1 in Worldbuilder isn't correcting a weakness of the unit, it's just giving yourself free promotions.

18. ### BreezKing

Joined:
Oct 17, 2008
Messages:
924
hmmm... I have not been seeing enough promotions (spells) on them to justify level 4. I will have to relook but typically I THOUGHT I was getting 1-3 level 1 spells. Not 4 as I should have been.

It looked more to me that they were supposed to get a couple bonus level 1 spells when they started since they were not even always from mana types I had.

19. ### odalrickEmperor

Joined:
Nov 12, 2003
Messages:
1,114
There is a one in ten chance to get each(*) level 1 spell, regardless of mana considerations.
Since there are twentyish spells, on average you should get two spells for each Moebius Witch, plus whatever you get from hoarded mana.

I figure the ones you get with more than three promotions or spells you need but don't have the mana for balance the the ones with less. Especially since you can always delete the bad ones for a new chance to get a good one.

In the beginning when they come through so slow that you don't want to delete them, the super early Channeling II mage makes up for it.

(*) I'm not actually sure it's every possible spell sphere. Most though.