Minor Leaders

Glad to hear you liked them! :D Yeah, you could be right about the Agile trait-- I admit that I'm a bit unclear as to how strong Ljosalfar archers actually are, being a mostly Clan/Doviello player, so I could easily have overshot. (See what I did there? Eh? Eh? :cool:).

Anyhow, I'll post more as I finish them!
 
Yes, yes it does. The Mercs are underpowered compared to the Infernals, so I'm okay with that.

And I believe I answered the soul question in the last post... As it currently stands, the Angels will go to ALL mercs, and manes will go to all Infernals. So if there should be 2 manes, but all 7 infernals are in, 14 manes will spawn, 2 for each. Not sure atm whether to leave it, or make them go to a random civ rather than all civs.

Hmm... I rather like the idea of a purely demonic power struggle over the collected souls, so I definitely support choosing a random demonic faction to grant the Mane to (therefore introducing an incentive for Infernal players to go after the "competition.") I also think this will do a lot to diminish the crazy power of Infernals after they've got their first 50 pop city up and running, although this could also be easily done by limiting Infernal cities to a pop of about 25 or so-- big, but not "complete Nature's Revolt in 2 turns" big. But that's a different topic.

As for Mercurians, I definitely feel like you don't want multiple angel spawns per good death-- that'd make for crazy overpoweredness if you had more than one on a team, especially since the Mercurian Gate is pretty easy to build. (Which is to say, if you could build the first one before anyone else, chances are you could build the second and third before others reach the appropriate tech, and so be able to easily overpower other good civs.)

EDIT: Oh god, a triple post. *facepalm* My bad!
 
Haha, don't worry about it. :lol: I've done it before.


I think that's the way I'm going to go with the Infernals... The Mercs, I've got a few ideas on. I'm going to make the Gate buildable once by each TEAM, rather than player. One thing I've been thinking about it is making it force a team between any preexisting Mercurian factions... So if there's already a Merc team, and someone else summons a new merc, they're all forced onto one team. Could eventually unite all good civs, without making it so the same team is able to summon all of them.
 
One thing I've been wondering about: What if you summon the "wrong" leader? What if you summoned Dauvum/Bertus/Ferthegis when you wanted Basium or you summoned Lethe/Ouzza/Meresin/etc. when you wanted Hyborem?

You won't get a second chance, since you can't summon another Infernal/Mercurian with the same civilization. So can you choose which leader you summon, or are you forced to restart/reload?
 
There's also the different traits. I may for example decide I want Basium's traits rather than Ferthegis', or I may be interested in Bertus' Charismatic which I can't get otherwise.
 
@Valkrionn: You mean there will be a Bertus hero, a Dauvum hero, etc.?

Anyway, you could launch an event that would let you choose the leader you want to summon.
 
Yes, yes I do. Don't want multiple Basiums. :lol: There already are for the Infernals, although they're clones... I'm about to change them all. Now that I've added the first three of those traits. :goodjob:

And the event is the basic idea if I decide to do it. It'll be interesting to figure out how to limit an option if the leader already exists though.
 
Yes, yes I do. Don't want multiple Basiums. :lol: There already are for the Infernals, although they're clones... I'm about to change them all. Now that I've added the first three of those traits. :goodjob:

And the event is the basic idea if I decide to do it. It'll be interesting to figure out how to limit an option if the leader already exists though.

are there any limits to this guy's madness? :eek:
 
I'm thinking it would be a good idea to consolidate the <PythonPostCombatLost> defines for units' whose death cost you traits, especially if all your new Mercurian/Infernal leaders fall in this category. I've been meaning to change them all to use this in my version for a while, but haven't gotten around to it.

Code:
def postCombatLeaderUnit(pCaster, pOpponent, sLeaderName, sTrophyName):
	if not pCaster.isImmortal():
		iPlayer = pCaster.getOwner()
		pPlayer = gc.getPlayer(iPlayer)
		if pPlayer.getLeaderType() == gc.getInfoTypeForString(sLeaderName):
			for iTrait in range(gc.getNumTraitInfos()):
				if iTrait != gc.getInfoTypeForString('TRAIT_FALLOW'):
					if pPlayer.hasTrait(iTrait):
						CyMessageControl().sendApplyEvent(5013, EventContextTypes.EVENTCONTEXT_ALL, (iPlayer,iTrait,False))
			pOppPlayer = gc.getPlayer(pOpponent.getOwner())
			if pOppPlayer.isHuman():
				if sTrophyName != -1:
					if not CyGame().isHasTrophy(t):
						CyGame().changeTrophyValue(t, 1)
This could significantly reduce the size of CvSpellInterface.py, and it stops you from loosing your traits if you somehow capture another leader's leader unit and then loose it.

Obviously, this would mean changing <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent)</PythonPostCombatLost> to <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent, 'LEADER_BASIUM',"TROPHY_DEFEATED_BASIUM")</PythonPostCombatLost>, and so on for the other units.


Edit: Oh, I just remembered this is FF so you'll probably want to consolidate them through a <PythonOnDeath> call instead, or maybe consolidate all the trophies into one ,PythonPostCombatLost> call and all the trait losses into one <PythonOnDeath>.




If you move the Infernal/Mercurian spawning to an event, then limiting it based on what leaders are in the game should be easy. Each option would just have a different <PythonCanDo> to check to see if the unit has been in the game, each like this:
Code:
def canDoSummonHyborem(argsList):
	iEvent = argsList[0]
	kTriggeredData = argsList[1]
	
	if CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_HYBOREM')):
		return false
	return true
The actual creation of the Infernal/Mercurian civ under the right leader summoning would be moved to a <PythonCallback> for each option, with CvEventManager only being used to trigger the event.
 
I'm thinking it would be a good idea to consolidate the <PythonPostCombatLost> defines for units' whose death cost you traits, especially if all your new Mercurian/Infernal leaders fall in this category. I've been meaning to change them all to use this in my version for a while, but haven't gotten around to it.

Code:
def postCombatLeaderUnit(pCaster, pOpponent, sLeaderName, sTrophyName):
    if not pCaster.isImmortal():
        iPlayer = pCaster.getOwner()
        pPlayer = gc.getPlayer(iPlayer)
        if pPlayer.getLeaderType() == gc.getInfoTypeForString(sLeaderName):
            for iTrait in range(gc.getNumTraitInfos()):
                if iTrait != gc.getInfoTypeForString('TRAIT_FALLOW'):
                    if pPlayer.hasTrait(iTrait):
                        CyMessageControl().sendApplyEvent(5013, EventContextTypes.EVENTCONTEXT_ALL, (iPlayer,iTrait,False))
            pOppPlayer = gc.getPlayer(pOpponent.getOwner())
            if pOppPlayer.isHuman():
                if sTrophyName != -1:
                    if not CyGame().isHasTrophy(t):
                        CyGame().changeTrophyValue(t, 1)
This could significantly reduce the size of CvSpellInterface.py, and it stops you from loosing your traits if you somehow capture another leader's leader unit and then loose it.

Obviously, this would mean changing <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent)</PythonPostCombatLost> to <PythonPostCombatLost>postCombatBasium(pCaster,pOpponent, 'LEADER_BASIUM',"TROPHY_DEFEATED_BASIUM")</PythonPostCombatLost>, and so on for the other units.


Edit: Oh, I just remembered this is FF so you'll probably want to consolidate them through a <PythonOnDeath> call instead, or maybe consolidate all the trophies into one ,PythonPostCombatLost> call and all the trait losses into one <PythonOnDeath>.

Yeah, PythonOnDeath would probably be better. I've already thought about that. :goodjob:

If you move the Infernal/Mercurian spawning to an event, then limiting it based on what leaders are in the game should be easy. Each option would just have a different <PythonCanDo> to check to see if the unit has been in the game, each like this:
Code:
def canDoSummonHyborem(argsList):
    iEvent = argsList[0]
    kTriggeredData = argsList[1]
    
    if CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_HYBOREM')):
        return false
    return true
The actual creation of the Infernal/Mercurian civ under the right leader summoning would be moved to a <PythonCallback> for each option, with CvEventManager only being used to trigger the event.

And that's about what I thought. I've barely touched events, so I wasn't sure if they had a python callback or not. It'll be easier than I thought, then.

Just remember to use (send/on)ModNetMessage if you create an event to govern your choices so you can remain compatible with multiplayer.

Haha, unfortunately I have no idea what you mean here. Care to elaborate? :p
 
Unfortunately most people don't understand those functions too well. About the best I can say is to look in python for
sendModNetMessage

, and also look at

def onModNetMessage


It is a function that sends 5 integer values to all other players in an MP game, and the only way to notify them of decisions that you make which aren't part of the normal notification process. Most events are fairly safe, so you can try going without it first as long as you ONLY use the Event system to run the entire selection process. But if you slip in any fancy python work to make life easier on yourself for initial coding, you make it hell for yourself for the sync portion.
 
Hey so if I get the gist of this thread correctly, these minor leaders may be providing new traits?
 
What do you mean by providing new traits?


Updated the second post to show the new traits... Hydromancer and Reckless for the Amurites, and Egalitarian for the Kuriotates. The Kurios have a nice range of leaders now... Protector, granting amazing city defenders for all of your settlements, Raiders, which is a very different gameplay style for them, and Egalitarian, letting them grow larger and faster. :goodjob: 25hour did a good job with them. :lol:
 
Top Bottom