how to set human name and nation automatically
Posted: Wed Apr 18, 2018 1:53 am
Now that I've figured out how to get my custom ruleset working, there's another thing I'd like. I always play with the same nation and leader name, and I'd like that to happen when I select my ruleset. My attempt in script.lua is -
but it fails. I think it's because the event signal name "map_generated" is in the Server (ruleset) only scope and the Player name and nation variables are in the Game scope.
Anyone have an idea how to do this? or is it not possible?
Code: Select all
function set_human_name()
human = find.player(0)
human.name = "Dino"
human.nation = find.nation_type("American")
return true
signal.connect("map_generated", "set_human_name")
Anyone have an idea how to do this? or is it not possible?