Changing your own civ's leader?

I did this to my copy of DoC, and it's been like that for years now. Works like a charm, guaranteed. :D
 
To make things a little bit easier, you can omit the lines in DynamicCivs.py containing the method isHuman() (lines 579, 1936). That way, your own leaderhead will also change dynamically like the AI civs. :)

EDIT: Not really completely omit the lines (the method is used as a condition for if statements). Just edit the code such that it does not check if the player is human anymore.

How do I do that? Do I replace "Result none" with something?
 
How do I do that? Do I replace "Result none" with something?
Delete the line
Code:
if gc.getPlayer(iPlayer).isHuman(): return None
The method 'leader' takes a number representing a player/civilization and returns what it's leader should be. The method 'checkLeader' calls 'leader' passes its return value to two other methods, which changes the leader's image and name accordingly, as long as the passed value is different than the current leader's value and not None. This line ensures that None is always returned for the human player, and thus their leaderhead will never change. Removing it allows the code below it to run and return the appropriate dynamic leader.

In simpler terms: This line ends the method 'leader' early for humans, thus preventing their leader from changing.
 
No, you can just do it in the game. Press Shift + ~. Then type for example:
Code:
from Consts import *
pRussia.setLeader(iStalin)
You can look up Consts.py for the variable names for various civs and leaders.

I tried with Meiji from Japan. There was a message saying ErrorName: name 'pJapan' is not defined.
 
That's because this post is almost three years old. Try:
Code:
from Core import *
player(iJapan).setLeader(iMeiji)
 
Out of interest if you entered this command as the Persians or Aztecs would it be possible to change your leader to a Mexican or Iranian leader? And if so would your UU and UB etc change?
 
Yes you can, you can switch to any leader and are not limited by your current civilisation. The UU and UB are tied to your civilisation though, not your leader.
 
I don't know. It is shift + the key right of L on a German QWERTZ keyboard. I would try shift in combination with a couple of keys holding special characters.
 
I've tried shift pressing pretty much every key out there but no bueno! Do I first need to enable it somewhere?
 
Not sure, but there is no dedicated option to enable it. Maybe you need to enable cheat mode.
 
I've tried shift pressing pretty much every key out there but no bueno! Do I first need to enable it somewhere?

Just change your keyboard configuration to the one Leo uses and mentions, then go to the game and use the command. Change it back if you like, before continuing playing, so you have your usual key commands where you know they are.
 
I do not recommend switching to my keyboard configuration. If all else fails, try QWERTY instead. But I would try enabling cheat mode first, if you haven't already.
 
Top Bottom