Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven

Notices

Reply
 
Thread Tools
Old Sep 25, 2009, 02:38 AM   #1
DarkxL0rd
Warlord
 
DarkxL0rd's Avatar
 
Join Date: Mar 2008
Location: Houston
Posts: 256
black mirrors for everyone

I noticed that the balseraphs keep building my units. I first thought that it was some weird illusion trick or puppet trait as i have never played as the clown civ. however, they keep building alazkan over and over again. sometimes twice in the same turn! Its not a game breaker cause they are just illusions, but they keep dropping black mirrors so now i have 7 at this point. is this supposed to happen? i feel like im cheating.
__________________
Sorry I couldn't hear you over my own awesomeness
DarkxL0rd is offline   Reply With Quote
Old Sep 25, 2009, 03:55 AM   #2
Psychic_Llamas
Wizard in the Making
 
Psychic_Llamas's Avatar
 
Join Date: Nov 2005
Location: Western Australia
Posts: 6,366
Images: 6
are you attacking one of their cities with Alazkan? they have a UB called the Hall of Mirrors which makes an illusion of the attacker under clown control.

but this is a huge bug, you should post it in the bug thread.
__________________
Civ 4 Warhammer: Heart of Chaos Mod
Try it... You know you want to...
(Forum) (Download) (Design Overview) (Design Discussion)
AVATAR Mod Development
(Main Development Thread)
Psychic_Llamas is offline   Reply With Quote
Old Sep 25, 2009, 08:01 AM   #3
dyx
Chieftain
 
Join Date: Mar 2009
Posts: 87
It's quite an old bug and yes, it's because of the mentioned Hall of Mirrors. You attack, they get illusions, probably attack you and drop the Black Mirror if they die. I guess that works with other items too, I only had it with Alazkan.
They probably forgot fixing it, so mentioning it again shouldn't hurt.
dyx is offline   Reply With Quote
Old Sep 25, 2009, 09:59 AM   #4
Emptiness
[]
 
Join Date: Jan 2009
Posts: 1,886
Either A) Mirror copies that die should not drop any equipment based on their promotions.

or B) Mirror copies should not be created with copies of equipment promotions.

or C) Every equipment promotion needs an illusionary counterpart, which is given to mirror copies when they are created instead of the normal equipment promotion. These promotions would function identically to the normal promotion, with the exception that when a unit that has the promotion dies nothing is dropped. (If a unit with an illusionary equipment promotion picks up that piece of equipment then the illusionary promotion would need to be removed to avoid being able to double-up effects.)

would solve the problem.

A has the serious problem that if a mirror copy picks up a piece of real equipment and dies then the equipment will be permanently destroyed.

B denies the copy access to some or much of the power of the unit that is being copied, which lessens or defeats the purpose of the Hall of Mirrors.

C is probably the hardest to implement, but it's the best solution. Mirror copies will be functionally identically to the unit they are copying, but will not drop copies of equipment yet will be able to pick up real equipment and use it without destroying it if they die.
Emptiness is offline   Reply With Quote
Old Sep 25, 2009, 10:50 AM   #5
Valerarren
Chieftain
 
Join Date: Jul 2007
Posts: 80
Quote:
Originally Posted by Emptiness View Post
Either A) Mirror copies that die should not drop any equipment based on their promotions.

would solve the problem.

A has the serious problem that if a mirror copy picks up a piece of real equipment and dies then the equipment will be permanently destroyed.
One easy way around this. Can one make it so illusions can NOT pick up equipment? I'm not sure they should be able to pick up equipment anyways.
Valerarren is offline   Reply With Quote
Old Sep 25, 2009, 11:11 AM   #6
MagisterCultuum
Great Sage
 
MagisterCultuum's Avatar
 
Join Date: Feb 2007
Location: Kael's head
Posts: 14,061
Well, the Mirror spell only works on living units, so even if they can pick it up they shouldn't be able to use the Black Mirror.

The Mirror spell is set to remove equipment from the illusionary copy it makes. I was surprised to find that the Hall of Mirrors building's effect does not do the same.

Code:
def reqMirror(caster):
	iPlayer = caster.getOwner()
	pPlot = caster.plot()
	if caster.isImmuneToMagic():
		return False
	if pPlot.isVisibleEnemyUnit(iPlayer):
		return False
	return True

def spellMirror(caster):
	pPlayer = gc.getPlayer(caster.getOwner())
	newUnit = pPlayer.initUnit(caster.getUnitType(), caster.getX(), caster.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
	for i in range(gc.getNumPromotionInfos()):
		newUnit.setHasPromotion(i, caster.isHasPromotion(i))
		if gc.getPromotionInfo(i).isEquipment():
			newUnit.setHasPromotion(i, False)
	newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ILLUSION'), True)
	newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IMMORTAL'), False)
	if newUnit.isImmortal():
		newUnit.changeImmortal(-1)
	newUnit.setDamage(caster.getDamage(), caster.getOwner())
	newUnit.setLevel(caster.getLevel())
	newUnit.setExperience(caster.getExperience(), -1)
	newUnit.setHasCasted(True)
	newUnit.setDuration(1)
Code:
		if pCity.getNumRealBuilding(gc.getInfoTypeForString('BUILDING_HALL_OF_MIRRORS')) > 0:
			if CyGame().getSorenRandNum(100, "Hall of Mirrors") <= 100:
				pUnit = -1
				iX = pCity.getX()
				iY = pCity.getY()
				eTeam = gc.getTeam(pPlayer.getTeam())
				for iiX in range(iX-1, iX+2, 1):
					for iiY in range(iY-1, iY+2, 1):
						pPlot2 = CyMap().plot(iiX,iiY)
						if pPlot2.isVisibleEnemyUnit(iPlayer):
							for i in range(pPlot2.getNumUnits()):
								pUnit2 = pPlot2.getUnit(i)
								if eTeam.isAtWar(pUnit2.getTeam()):
									pUnit = pUnit2
				if pUnit != -1:
					newUnit = pPlayer.initUnit(pUnit.getUnitType(), pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
					newUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ILLUSION'), true)
					if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_SUMMONER')):
						newUnit.setDuration(5)
					else:
						newUnit.setDuration(3)
Illusions from the Hall of Mirrors don't get the same promotions as the units they copy, but instead start with whatever promotions that unit has from its xml defines. It can thus make an unlimited number of Black mirrors from an equipmentless Alazkan, of Netherblades from an equipmentless Rathus, of Orthus's Axes from an equipmentless Orthus, of Empty Biers from an equipmentless Donal, etc.

It seems that Illusions from the Hall of Mirrors can also be immortal while Black Mirror Illusions cannot be. Their duration has not been changed since the Summoner trait's extra duration was reduced either.

I just noticed that it is not limited to living units as I remembered it. There seems to be nothing stopping it from copying Basium, Hyborem, Auric Ascended, etc., and costing the Balseraphs their traits when these units die.

I'm starting to think it would be best for the Hall of Mirrors not to effect World Units. That would probably be the simplest way to stop it from duplicating equipment (as I don't think any non-world unit has an equipment promotion in its xml define; ok, so in my version Wizards do as Spellstaves were made equipment, but I've been thinking of changing that to Enchantment III or Twincast instead anyway) or units whose deaths can cost you your traits.
__________________
Economic Left/Right: 0.38
Social Libertarian/Authoritarian: -5.38
http://www.holisticpolitics.org/

MagisterModmod for FfH2 last updated on 4/8/2013 at around 2:30 pm.

You may download the Installer here or the Archive here.

Last edited by MagisterCultuum; Sep 25, 2009 at 11:20 AM.
MagisterCultuum is offline   Reply With Quote
Old Sep 25, 2009, 12:58 PM   #7
Emptiness
[]
 
Join Date: Jan 2009
Posts: 1,886
Doesn't that mean that if Donal (for example) were to pass his Bier on to another unit and then die in combat another Bier will be created if he is Resurrected? Maybe having equipment as part of unit xml defines is a bad idea altogether. Perhaps equipment associated with units should be placed on the unit as a separate function, triggered only the first time the unit is created.

As for blocking world units from being mirrored, I grant that this seems like a very easy solution but it seems to violate the spirit of the Hall of Mirrors. (Maybe vampires shouldn't be copied. Do the vampires of Erebus cast reflections? But I digress...) Perhaps the death of Basium (for example) should only cause the loss of traits if it is a Basium under Mercurian control that dies, rather than anyone's Basium affecting the Mercurians negatively. In addition, it seems like it should be possible for the routine that removes the Mercurians' (and others) traits to first check to see if the unit that died was an Illusion, and if so then not remove anything.
Emptiness is offline   Reply With Quote
Old Sep 25, 2009, 02:15 PM   #8
MagisterCultuum
Great Sage
 
MagisterCultuum's Avatar
 
Join Date: Feb 2007
Location: Kael's head
Posts: 14,061
Yes, it could make a copy of the unit form of the equipment. I thought I remembered Kael fixing hat a while back, but it seems he did not.

Illusions cannot take equipment but there does not seem to be anything stopping a unit from taking illusionary equipment.

I was thinking that each piece of equipment was a world unit, but it seems I was wrong. I guess checking for world units alone isn't the best idea.




Yes, the PythonPostCombatLost calls can easily check to make sure that the unit has the right leader before removing traits. I actually have had it like that in my version for quite some time. I used similar functions for more units, so I combined most of them (not Auric Ascended's since his call was more complicated since it checked for the godslayer) into one function with 2 more parameters, one strong for the leader and one for the trophy. My suggestion was just for what I thought would be the simplest solution.

Blocking these functions if the unit was an illusion would also be trivial.
__________________
Economic Left/Right: 0.38
Social Libertarian/Authoritarian: -5.38
http://www.holisticpolitics.org/

MagisterModmod for FfH2 last updated on 4/8/2013 at around 2:30 pm.

You may download the Installer here or the Archive here.
MagisterCultuum is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Project & Mod Development > Civ4 - Fall from Heaven > black mirrors for everyone

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hall of Mirrors? Lord Bayushi Civ4 - Fall from Heaven 3 Feb 22, 2008 09:50 AM
any other mirrors? impe20 Civ4 - Fall from Heaven 7 Jan 21, 2007 09:12 AM
Mirrors onejayhawk Humor & Jokes 2 Jul 11, 2003 03:29 PM


Advertisement

All times are GMT -6. The time now is 07:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR