Fixed Mercurians and Infernals

DrPepper836

Warlord
Joined
Oct 29, 2007
Messages
134
Recently, playing a game as Basium, I got to fed up with the way that I kept declaring war on all of the good civs to get troops, and decided to change it.

Here is what I came up with: Now, whenever a good unit gets killed, if it was a Mercurian that killed it, they get no angels! However, if the Mercurians kill an evil unit, they do get an angel, so that gives them more incentive to go after bad guys. The same thing works in reverse for the Infernals. I guess you could say that the units were converted by the sight of their glorious armies. :rolleyes:

Anyway, you can either download this file and put in the Assets>python folder, or replace the following code:

Code:
if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_COUNCIL_OF_ESUS') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_OCTOPUS_OVERLORDS') or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1')) or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'))):
				cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())
				cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())

			if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_EMPYREAN') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ORDER') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_RUNES_OF_KILMORPH') or pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MERCURIANS')):
				cf.giftUnit(gc.getInfoTypeForString('UNIT_ANGEL'), gc.getInfoTypeForString('CIVILIZATION_MERCURIANS'), unit.getExperience(), unit.plot(), unit.getOwner())

with this code:

Code:
pAttacker = gc.getPlayer(iPlayer)
			
			if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_COUNCIL_OF_ESUS') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_OCTOPUS_OVERLORDS') or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1')) or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'))):
				if (pAttacker.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_INFERNAL')):
					cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())
					cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())

			if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_EMPYREAN') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ORDER') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_RUNES_OF_KILMORPH') or pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MERCURIANS')):
				if (pAttacker.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_MERCURIANS')):
					cf.giftUnit(gc.getInfoTypeForString('UNIT_ANGEL'), gc.getInfoTypeForString('CIVILIZATION_MERCURIANS'), unit.getExperience(), unit.plot(), unit.getOwner())

			if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_EMPYREAN') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ORDER') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_RUNES_OF_KILMORPH') or pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MERCURIANS')):
				if (pAttacker.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_INFERNAL')):
					cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())
					cf.giftUnit(gc.getInfoTypeForString('UNIT_MANES'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'), 0, unit.plot(), unit.getOwner())
					
			if (unit.getReligion() == gc.getInfoTypeForString('RELIGION_COUNCIL_OF_ESUS') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL') or unit.getReligion() == gc.getInfoTypeForString('RELIGION_OCTOPUS_OVERLORDS') or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1')) or unit.isHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'))):
				if (pAttacker.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_MERCURIANS')):
					cf.giftUnit(gc.getInfoTypeForString('UNIT_ANGEL'), gc.getInfoTypeForString('CIVILIZATION_MERCURIANS'), unit.getExperience(), unit.plot(), unit.getOwner())
 
The good are separated by the bad majority, or liberated from their corrupt commanders, and the sniveling weasels in the good armies sign away their lives to a demon...
 
That's what I missed. In my last game Hippus (controlling 1/3 of map with total 7 players) has created Basium. And declared war on me (later all civs declared war on me). Stacks of enemy units was flowing to my cities every turn, I was slowly destroying them, but because all civs was good, Mercurians was getting couple of units every turn... I solved this by casting Blight Light (Sun2) in all my cities and not attacking back... Few turns later I gived it up, because it was unplayable. (~60 enemy unit per plot around my cities and increasing ... Blighting Light rulezzzz :D ) I just regret I didn't make some screenshots and that I didn't create Air node ... :D:D:D


Edit: Yes I was good player ... but this doesn't matter, when 6 good civs are attacking you
 
If you're using this mod then you won't, unfortunately. I had a lot of difficulty duplicating the circumstances of the real game in the WB, but I didn't get any errors in python, so I put it up. I started a regular game to see how it would works, and it throws an error each time. Apparently you can't call:

Code:
getCivilizationType()

from the attacker object. :sad: I'm working on it though, and should have a fixed version up in a few minutes...

Edit: Ok, it won't throw any python errors now. If you aren't getting your angels or manes, or something just happens that's weird, feel free to tell me. Also, the new version won't break the saves of the bugged version, so that's good.
 
Wait

Is good unit something with order/rok or unit controlled by a good civilization?

Played game-attacked Arendel Phaedra (she had fellowship of leaves)- no manes!
 
They have to be of the Kilmorph, Order, or Empyrean religions, or the Mercurian civilization. I was thinking about changing it to good/evil instead, but this is really just a fix to a logic falacy, not really a modmod.
 
very buggy i'm afraid to say. A lot of the events from CVeventsmanager no longer work. Try building the pact of the nilhorn and you'll see what I mean.

cool idea though :)
 
Really? I've been playing with python errors turned on, and I haven't gotten a single message about it yet. What does the error message say exactly?
 
I play without python errors so no pop-ups. I applied these changes to FiRe! manually ( i.e. replaced just the bit of code I needed, not the whole file ) but it caused all sort of whacky behaviour. I guess I did not set the correct indentation in python? another thing that I don't quite understand is that in the cveventmanager.py file you uploaded there's no "pAttacker = gc.getPlayer(iPlayer)" before all the "if (unit.getReligion()" , or so it seems. any help would be appreciated as these changes look spot on :)
 
Yeah, my file host must not have re-uploaded properly. Anyway, it should be up. Oh, and I just built PotN in my game, so no errors. You must have been playing with the download.
 
It will, unless they modded something in the SDK that would affect the above code, or seriously altered the Mercurian/Infernal civilization to the point that their basic gameplay mechanics would be unrecognizable when compared to the current version in the regular game. However, you would have to do the code insert, and not the file download to make sure that it wouldn't override any other code that had been modded.
 
trying the download again, thanks =)

*edit*

download PY file itself seems to be acting strangely, isn't coming up with readable python. I'll apply the fix manually cos it's an awesome fix =D but you might want to check the download again.
 
Back
Top Bottom