Mimics Multiplayer Modmod

:) should be fun

I've been working on a new game option "Regicide" basically it starts you out with your chosen leader as a unit, if the unit dies you lose all your traits (exactly how Basium and Hyborem work) But I need some help with this python:

CVEventManager.py
Code:
def onGameStart(self, argsList):
		'Called at the start of the game'

if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_REGICIDE):
			if iLeader = cf.getLeader(gc.getInfoTypeForString('LEADER_FALAMAR'))
			newUnit1 = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_FALAMAR'), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)

The new game option shows fine and I already tested the new unit out in worldbuilder but this code never does anything, anyone know whats wrong?

For regicide, you should just make a 'King' unit-type. You can name and place them on the first turn with a loop that goes through all the civs. In the XML, there's a tag along the lines of <PyCombatLost>. Use this to call a function when the King unit dies to remove the player's traits.
 
New game options require some DLL modifications too AFAIK. To get around it you could make a duplicate of all leaders or create a python event at the start of the game asking the player if they want their chosen leader to lead the nation as a hero unit.

I dunno, the game option isn't meant do anything. But if you tick it then it allows that event to happen, I'm pretty sure it's my own crappy coding :p
 
I dunno, the game option doesn't actually do anything. But if you tick it then it allows that event to happen, I'm pretty sure it's my own crappy coding :p
That's great news and Rystic might have just given you the solution :D
 
Ok, I see a number of bugs in the code.

Code:
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_REGICIDE):
			if iLeader = cf.getLeader(gc.getInfoTypeForString('LEADER_FALAMAR'))
			newUnit1 = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_FALAMAR'), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)

1) When you want to check for equality, use ==, not =. = means you're setting the value on the left to the right. == means you're checking if the value on the left equals the right (it returns true or false).

2) When you do a conditional branch in Python, you need a ':' at the end of the branching statement. This was probably an accident; I've made this mistake a million times.

3) Your tabbing is off. Tabs are like brackets in Python. Everything inside a conditional branch should be one tab further than the beginning of the branch (the if statements, in this case).

You should probably just change it to:

Code:
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_REGICIDE):
	if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_FALAMAR'):
		newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_FALAMAR'), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)

---

If you want to make Regicide with the King unit-type, when you make it set its <PythonPostCombatLost> to this:

<PythonPostCombatLost>postCombaLeader(pCaster)</PythonPostCombatLost>

and put this in CvSpellInterface:

Code:
def postCombatLeader(pCaster):
	if not pCaster.isImmortal():
		iPlayer = pCaster.getOwner()
		pPlayer = gc.getPlayer(iPlayer)
		for iTrait in range(gc.getNumTraitInfos()):
			if pPlayer.hasTrait(iTrait):
				pPlayer.setHasTrait(iTrait, False)
 
Are most of the Leaders same strength value? and Can Cardith Lorda upgrade into Eurabatres?

Perhaps I could see Jonas, Charadon, and Sabathiel as being a bit stronger, and Sabby with angel obviously. Maybe even give Sabby a one time immortal promo like Hyborem gets. (and add it to Basium probably)

Of course Os-Gabella should be relatively weak, like 1 or 2 strength, only with Channelling I-III and true immortality :D

Tebryn should also get pretty much imortality, or at least a one time immortality. According to the Lore his immortality is connected to Abashi, so if you could somehow link Tebryn to be immortal until Abashi is killed that could be cool.

I would bet people like Capria would also gain the "Valor" promotion alongside hero, in addition to being able to cast morale. While Sabathiel could cast courage.

Maybe you could also give Basium a "heralds call" ability like their heralds have ... just because he doesnt seem to exactly care for human life.

As far as other leaders with Chanelling III, Perpentach + the Amurite leaders seems to fit the bill.

And then Sandalphon should probably be just as withdrawally as Loki is, since he always runs away, slips away, fades away. He is probably the most skilled shade. I see his only benefit should be "invisible" and able to enter peoples cities and look inside them, that sort of thing. LIke a shadow, although I think he should somehow ignore the presence of enemy/rival units. And of course, being just as hard to kill as Loki, if not harder. maybe only 1 strength or so though. Or the strength of a Shade I guess, and probably only able to defend.

Mahala and Tasunke should start with the commando promotion, Tasunke should probably be horseman strength and speed, with EXTRA withdraw (maybe to a max of 100 withdraw? of course, you know max values are only on open plains with all movement left anyways), and if you decide to not make him super withdrawing, then perhaps let him upgradeable to a horsearcher version, and maybe even a Knight version as well.

As for Mahala, if possible she should be recon unitclass, with hunter movement and strength, upgradable to ranger strength, and able to cast the Balseraph "taunt" and the Druids "tangled vines" although hopefully able to rename it to "Cast Net", or "Net Traps", or something like that.

Auric should be able to upgrade to Auric Ascended "somehow" and start with Ice One for the slow spell. Maybe he gets 4 strength, can use weapons, and 2 movement.

Probably all melee leaders should be able to use weapons, with the more charismatic ones able to use 2 movement strength I think, to represent their flexibility. Actually, king units just make more sense to have more movement I think, except maybe the Dwarves.

I think it Would be fun for the Luichurp leaders to be riding a golem into battle, and able to upgrade into the different golem types, by buying a new Golem as a mount.

Maybe the basic King unit, for Cal leaders to use, would have 3 strength, 2 movement, and able to cast Morale and (??) to make up for their lack of flavor. Probably Hero+Valor as well.

Faerly should be a huntress, hopefully using a modified succubus model, with the Mind II Charm spell.

And thessa a mage, Arendel a priest, and Amelanchier an archer respectively.

Hannah the Irin should probably outright start with Air II, commando, bounty hunter, and Fear. Although maybe only have 2 strength to make up for it.

Mahala and Tasunke may also start out with Bounty Hunter.

Alexis and Falamar should probably be outright vampires, exactly the same, only with Losha's type of immortality. And I guess hero as well, but not having hero is almost just as well, starting from the beginning with Losha's type of immortality. Of course, since they are probably more Lordy than the Vamp Lords, I can see them having "true" immortality, although of course only Os-Gabella has certain true immortality, and Tebryn's form is fairly close as long as that rune is on the dragon's forehead.

I think the Varn Gosam unit should be a disciple type with 2 movement, for a total of 3 movement with the free mobility 1. I think the should be able to spread his State Religion on a monetary cost, like the Esus units use. Maybe a turn delay as well, of 2 turns perhaps.

If possible, Faeryl should be able to upgrade to an assasin, though keeping the Charm spell, and Varn should have divine and chanelling II, as well as a spell that changes his religion to the players state religion. Using the same code, hopefully, that enables players to keep their priests when they switch religion. (same for Arendel of the Elves, hopefully)

In any case, I think its quite fitting that the Sheiam players should have immortal king units. As well as Sandalphons hard to kill mentality, with him being the master shadesman after all.

all the dwarven leaders should probably start with Enchantment I and II, in order to perhaps simulate fine dwarven craftsmanship, straight from the underhome. And the Luichurps because they are skilled in enchanting magicks.

It would be really cool if the traits you pick on the Cal could give your vanilla king unit special abilities based upon your trait, or at least have an alternate version of them to upgrade into after the first or second turn.

Charismatic could translate to casting Morale, and allowing units on the tile to upgrade.
Raiders could translate to commando and bounty hunter (additional movement?)(marksman?) and can pillage, if they couldn't already.
Aggresive could translate to free combat I and ability for weapons promos.
Organized could translate to being able to "buy" a courthouse in a city due to a spell, probably 3/4 the cost of rushbuilding a courthouse. a one time recruit spell, and free supply costs for units in the tile.
Arcane could translate to arcane unit class and Channeling I-III
Philosophical could mean high withdrawal rates and Perfect Sight, in addition to Mind I spell.
Ingenuity could allow units on the tile to upgrade, and the ability to caste haste.
Spritual could mean- divine, ability to adopt state religion, chanelling II, AND demon if evil, angel if good, and ability to spread religion through money (and high withdrawal?) if neutral.
Financial -> bounty hunter, sentry I and II, (marksman?)
Industrious -> can build mines, lubermill, windmill, workshop, and watermill from turn 1, can chop trees from turn 1,
Defensive -> can cast recruit (once), hope, morale, courage, and can build forts. (and starts with guerilla 1, woodsman 1, homeland, and defensive promo)
Summoner -> Arcane unit type, starts with extension I + II, grants 50% vs Illusion and elemental? Its tempting to give summoner commanders' summons the Illusion promotion.
 
Cheers Rystic that was quite helpful :)

Nice ideas Tasunke, I've already done a lot of them :p so the Regicide game option will be in the next version :D
 
aye, I figured many of the king units would already have a prototype. You know how I like to sling around ideas though.

My main goal here is to make CAL king units customizable, by being trait based. Im not sure if its possible tho
 
My idea for the CAL king is to let it upgrade into either melee, magic or recon, they arent really meant to be all that powerful- they should be protected at all costs cuz if they die you lose all your traits :p of course some of them are a LOT stronger than others.
 
I think Doviello should be able to build camps from exploration, and gain +2 food and -1 commerce from camps
 
Then again losing agnostic might not be such a bad thing, if the leader is dead the people might turn to religion. (and losing all your traits and being agnostic sucks :p)
 
okay okay ... so I have some ideas for the new and improved firebow. It just allows more options for firebow diversity, and, at least im my opinion, does not encourage spamming of buildable magic.

The first Idea is to make a separate spellsphere, available to, and only to, archery units.

The FIrebow will be able to gain 2 additional fire damage in this way, through levelling, (although not gain metal promotions) as well as gain a weaker version of fireball called fire arrow, which is simply 2 fire damage and one movement.

The full version is same original stats, as well as channeling I-III, and immediate access to the spell sphere "arrow."

starting at first level up (to level 2) they can gain Arrow I, which gives +1 fire damage.
Arrow II is a castable "fire arrow" which is a ball of fire, with 2 fire damage and 1 movement.
Arrow III adds an additional +1 fire damage for a max of +2 fire damage onto the original strength of the Firebow once they gain the level ups to gain Arrow III.

at 6th level, if the Firebow has Arrow II already bought, they gain gain a promotion called "fire mastery" which gives a normal mage fireball, which I believe is 2str +2 firedamage, and 2 movement, and collateral.

Fire arrows would not have collateral.
 
Looks good, it will probably be in vers 9 :)

EDIT: got most of the leaders done now, just got the sheaim and clan to do..
no sabathiel tho :p apparently he never even entered creation.
 
Vers 9 is up, now it actually feels as though this mod was worth making :lol: if anyone wants to go through the king leaders for me and tell me how they could be changed to be more lore accurate, I'd appreciate it :)
 
hey man, are you 100% sure that the beastmen being able to build camps will not cause WoC errors, as usually happens with units that can build a improvement but can't build roads?
 
well, it seems to me that many of your tweaks make a lot of sense no matter what. kinda like a Rystic's Tweakmod ( Multiplayer Edition by mimic ) :lol:

besides, I believe it's not uncommon to play multiplayer with a couple AIs added in... say I wanna play with a friend ( one friend ) , we're probably going to add some AIs to the mix to make it more interesting.
 
Top Bottom