Little help setting starting locations?

Capt_Blondbeard

Chieftain
Joined
Dec 20, 2008
Messages
49
Location
Mannheim, Germany
I was hoping someone could steer me towards the right section of code to set player's starting positions. I'm admittedly more of a trial and error guy than a serious python programmer, but after several days of more errors than successes I thought I'd ask for help.

What I want to do is modify a script (for example terra) to place civs next to each other, like they do if you set them as the same team, without actually having them be on the same team.

I play mostly multi-player LAN games in a sort of "semi-cooperative" mode, where the players generally trade and cooperate, but don't like the limitations of being on the same team (when one player makes a treaty, it applies to all, etc.)

Thanks!
 
As far as I can tell (I haven't actually messed with the scripts), findStartingPlot is what handles it.

There is a built-in function but you can override it if needed.
 
Moving the players on a team next to each other is handled in the normalizeStartingPlot (or something like that) function, I would imagine that you can modify that to use the check for human players rather than teams. I can't check right now to tell you axactly where to fund the code for that but I think it's in the MapUtils python file. You can do this directly when assigning starting plots but that will require re-writing a bit more code than it would to use the normalizer.
 
Thanks for all the responses. So far no luck, but I have a few more ideas. The team battleground script gave me a few ideas. Funny thing is, that team distance is defined in XML under global defines, but I can't find where its being used. Anyway I thought the simplest solution is to just the player number sequence. The placement routine seems to use a loop, so if I could get it to place Player X at a certain maximum distance to player X-1 it should insure that the human player are all next to each other. Since the non-human players are always (in our games) random, it shouldn't matter that they are placed sequentially. Thats the theory anyway, now I have a weekend to see if I can get it to work.
:p
 
any progress there ?
i have the idea to set the players, which are chosen by the human player or randomly before starting the mapscript, at a concrete location, like : Player Germany starts always at x=29/y=24 . Additionally the MapScript is creating the map from a publicMaps file, so that the actual map is always the same.
The result is, i.e. a WorldMap with correct starting locations for any civilization.
What bothers me with civ4 public maps is the static set of civilizations, like: Earth with 18 unchangeable Civs.
 
Do you always use the same map? If not wouldn't that risk the player starting in the middle of the ocean?

About the only success I've had so far is with a modification of the Earth Flavor map mod. You can cluster players around a resource, but it only works with a resource that is distributed in cluster, not evenly spread around. I was toying with creating a new resource that does nothing and appears one time, and using that to cluster the players, but haven't really fooled with it yet (you can set a minimum and maximum latitude for resources)
 
Ideas for a novice (python) programmer!? I was wondering what some good ideas for a complete beginner to computer programming would be. I should clarify. I am looking for programming 'projects' to do for fun. I have no direction as far as what i should build. I've seen builds for converting temperatures from fahrenheit to celcius for example. Thats only a few lines of code though. Any slightly bigger examples?
 
Back
Top Bottom