[BtS] Seven05's World Piece

Good idea! I always wondered why the developers never thought about trying to balance naval movement points for the larger maps. This is a huge reason why I don't play any map larger than Standard-size....and your solution seems like it might be a winner.

Just curious -- if your mod mainly focuses on the larger maps, have you considered re-adjusting the air/missile unit ranges? Four squares just isn't much on a large map, let alone huge.
I kind of stole that Idea from Rhye's mod, although he treats oceans like roads for movement and I just took the easy XML-only shortcut.

What I need to do for the ships, air units and missiles is set them up to scale based on the map size like I did with national unit limits. It shouldn't be too hard but I haven't even looked at that code, maybe I'll do that tonight. The main reason I did something for the Navy right away is that with 'earth-like' oceans occupying 74-78% of the map inter-continental wars were taking forever to prepare for.
 
A few ideas:
-Make your "PublicMaps" folder "PrivateMaps" and change Allow Public Maps = 1 to Allow Public Maps = 0.
-Having the traits explained in the post would be helpful, as well as the special options (such as choose religion and permanent alliances on by default)
I should do that, I've been avoiding it because I really want to move the majority of the current map script code out of python and into the DLL to make it faster and readily compatible with all of the default scripts. But thats a pretty big project so the private maps is a good idea until I get around to that.

I'll add those other items to the initial post, since this was a 'private' mod for so long I've forgotten about a lot of the minor changes I made along the way. :)
 
Thanks :)

Yes, Civs can be configured to start in cultural groupings... sort of. The normalizer script kicks in after starting plots have been identified and then rearranges the civs on those starting plots based on the values each civ has assigned for terrains, features or resources. So you can take a cultural group, for instance meso-american, and give them a high value for the corn resource (and negative values for resources assigned to different cultures). As long as you chose a resource that isn't all over the place like fish is they should start in clusters. It's not perfect but it will work most of the time. That code is all in dreich's script that he originally made for FFH and his original script has all sorts of instructions for it's use. Lumpthing then made a version of the script with standard civs in it rather than FFH civs, the code is the same so any tricks from either script will work in the other.

The tile limit will be a configurable option later, the main reason it's there now is to help the AI. When they can't create a stack of 20+ units they do a much better job of assembling the stack with appropriate units. It also eliminates the dreaded 'stack of doom' and encourages the AI to assign multiple targets to its multiple stacks making wars generally more interesting. I was orignally enforcing the limit for the AI only, but that didn't seem fair and it made it too easy for a human player to build a SoD that was more potent than ever. In practice, a stack of eight units is still tough and two stacks of eight is just as scary as one stack of sixteen. City defense is a little more interesting too, you have a per tile advantage in the city itself so you need to keep the enemy from surrounding you to maintain that advantage.

Great! I'll be including this in my mod for sure ;) Is it easy to modify the script if you were to add new civs, or change existing ones resource preferences? I'm not too good at python/SDK.

Still not too sure about the tile limit but what you said makes sense (sort of).
 
Great! I'll be including this in my mod for sure ;) Is it easy to modify the script if you were to add new civs, or change existing ones resource preferences? I'm not too good at python/SDK.

Still not too sure about the tile limit but what you said makes sense (sort of).
Grab Lumpthing's script from the mapscripts forum and you can edit as needed, it'll work with any map if you follow the instruction in the script file itself, it's pretty easy to use. You can also look at Dreich's original as there are some examples in his script that Lumpthing didn't use.

For the tile limit, the next update will allow you to disable it if you don't want it in there, I guess thats the important part. :)
 
I just started a game and loaded a Large map using the World Piece map script:



Isn't it strange that the Arabs spawn on a coast surrounded by forests and Ice? Maybe you didn't set their starting location or something, or the code isn't complete yet. But I'd like to see these guys stick to the deserts and fertile grasslands close by the deserts, not any place where there will be ice!

Just thought I'd share.
 
Maybe it could be added that they have to start near oil and incense - but then that would put them at a bit of an advantage (though they would be sure to start near plenty of desert).

Also I was wondering with the mapscript, is it possible to choose different formations like pangea, continents, archipelago? and also to reduce the amount of ocean?
 
Unfortunately it's not quite a perfect method. Before the civs are re-assigned their appropriate start plots all of the start plots are generated based on value with one such starting plot per player. So if you have 10 players it generates 10 possible starting plots using what it determines to be the best city locations on the map (within the old world area(s)). Once that is done it then shuffles the players around based on their preferences but it does this in order which can sometimes result in a civ 'late' in the list not getting an ideal plot. This is done to make sure the starting locations are primarily good city locations first, and then probably appropriate for the civ.

So, in laymans terms, it's possible that of the starting plots created none of them were suitable or you were last on the list and got the shaft. In most cases, unless you have a bunch of civs with similar preferences, everything works out fairly well.

The order in which it processes civs can be tweaked, so if there are repeated problems with specific civs I can try that. I'll also double check the script to make sure I didn't break anything and try the Arabians myself a few times. :)
 
Maybe it could be added that they have to start near oil and incense - but then that would put them at a bit of an advantage (though they would be sure to start near plenty of desert).

Also I was wondering with the mapscript, is it possible to choose different formations like pangea, continents, archipelago? and also to reduce the amount of ocean?
It is possible to set preferences on resources but for balance reasons I decided not to. The closest to that I've come is ensuring civs with UUs or UBs that require coastal cities get a costal start (99% of the time anyway).

And there's no options for the map script yet, well there probably never will be for this particular script because of the way it works. What I need to do is figure out a way to get the new terrains working on a standard map, but that will be tough since the standard map generator generates plot types where this one generates a heightfield which it then uses to generate the climate through temperature and rain distribution, winds the whole nine yards.

What I'll have to do is create a few variations of the script since I can manipulate the way the heightmap and tectonic plates are generated it's pretty easy to force pangea type maps, snakey continents and to a limited degree archipelago (or however the heck you spell that word). I *might* be able to get some of that working with menus in the game but I never bothered because what I really want to do is use the heightfield generator in the SDK in place of the existing fractal plot generator.
 
Unfortunately it's not quite a perfect method. Before the civs are re-assigned their appropriate start plots all of the start plots are generated based on value with one such starting plot per player. So if you have 10 players it generates 10 possible starting plots using what it determines to be the best city locations on the map (within the old world area(s)). Once that is done it then shuffles the players around based on their preferences but it does this in order which can sometimes result in a civ 'late' in the list not getting an ideal plot. This is done to make sure the starting locations are primarily good city locations first, and then probably appropriate for the civ.

So, in laymans terms, it's possible that of the starting plots created none of them were suitable or you were last on the list and got the shaft. In most cases, unless you have a bunch of civs with similar preferences, everything works out fairly well.

The order in which it processes civs can be tweaked, so if there are repeated problems with specific civs I can try that. I'll also double check the script to make sure I didn't break anything and try the Arabians myself a few times. :)

Ah, I see. Have you thought about having the game check for an additional amount of start locations (maybe twice the amount of civs) and then assign the new start locations to each civ? And maybe make it such that certain civs will NEVER get put in certain terrain (like Arabs in Ice).

I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.

It was cool to see the Japanese start on the coast of a peninsula, though :)

PS - Why don't you create an .ini file that allows the user to set which terrain/feature types each civ has a preference for? TheLopez has done similar things with assigning starting techs based on resources and features/terrain by the start location. Something in that style for this would be superb :)
 
Ah, I see. Have you thought about having the game check for an additional amount of start locations (maybe twice the amount of civs) and then assign the new start locations to each civ? And maybe make it such that certain civs will NEVER get put in certain terrain (like Arabs in Ice).

I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.

It was cool to see the Japanese start on the coast of a peninsula, though :)

PS - Why don't you create an .ini file that allows the user to set which terrain/feature types each civ has a preference for? TheLopez has done similar things with assigning starting techs based on resources and features/terrain by the start location. Something in that style for this would be superb :)

I looked into it, my minimalist approach isn't the best so I've done a few tests with more terrains in the list and it works better. It's pretty easy to tweak for your own taste, look in the World_Piece_Normalize.py file in the public maps folder and you'll see the settings. What I've started doing now is adding every possible terrain type to each civ with weights for each and more use of features for weights. I've also re-ordered the priority putting 'tropical' types first, followed by 'arid' types and then everybody else. I've still refrained from including resources in the weights because while cultural groupings are kind of neat I didn't want to be that restrictive.

If you want to mess with it, here's the list of possible terrain types:
TERRAIN_GRASS, TERRAIN_HOT_GRASS, TERRAIN_COOL_GRASS
TERRAIN_PLAINS, TERRAIN_HOT_PLAINS, TERRAIN_COOL_PLAINS
TERRAIN_DESERT, TERRAIN_HOT_DESERT
TERRAIN_TUNDRA, TERRAIN_SNOW

I don't know if I can force Civ to generate more starting plots than there are players, there's probably a way to do it I just haven't looked at much of that code myself. However, if you play with a couple of extra civs on the map the results will always be better.
 
It is possible to set preferences on resources but for balance reasons I decided not to. The closest to that I've come is ensuring civs with UUs or UBs that require coastal cities get a costal start (99% of the time anyway).

I play more for fun so I'm not going to be too worried if China gets loads of rice :D I'm going to have to change this myself because cultural starting positions are a must for me (though I still don't quite understand if this will work properly.. isn't it possible to have rice all over the world therefore all the asian civs would be seperated..?) or does your mapscript prevent this?


And there's no options for the map script yet, well there probably never will be for this particular script because of the way it works. What I need to do is figure out a way to get the new terrains working on a standard map, but that will be tough since the standard map generator generates plot types where this one generates a heightfield which it then uses to generate the climate through temperature and rain distribution, winds the whole nine yards.

What I'll have to do is create a few variations of the script since I can manipulate the way the heightmap and tectonic plates are generated it's pretty easy to force pangea type maps, snakey continents and to a limited degree archipelago (or however the heck you spell that word). I *might* be able to get some of that working with menus in the game but I never bothered because what I really want to do is use the heightfield generator in the SDK in place of the existing fractal plot generator.

Pangeas are my favourite :D Well its probably hard to do but it would be really cool :) I also don't care much for archipelago and water but other peoples might :lol:
 
Gonna try this mod out. Hey, do you plan on addressing global warming at all? It would be nice to see a mod that actually has a system that isn't static.
 
Yes, global warming is planned for the future since I have the ability to change the terrain in stages to better represent climate shifts instead of simply expanding the deserts :)

Chug...
The resources try to split themselves up over a limited number of areas if they can do so while generating enough of the resource in the first place. The original Civ code was to pick the area(s) first and then put the resource in specific areas if they fit. What you'll want to do for cultural groupings is use more than one resource so the chances of having access to both in multiple areas is less likely. Since the resources are climate dependant you can use them instead of terrain types to make the groupings more likely. You can also use resources for some groups and terrains for others. What would probably work well is to handle the culture groups forst for eveything except the european civs and then defined them by terrain types. It won't be perfect but it'll be close.

I'll include a pangea version in the next update. Pangeas with this script can result in multiple landmasses connected by coast but not land, a single large landmass with some islands and very small continents around it, or a massive continent that circles the entire globe without any breaks. If you just want less water in your games you can open up the World_Piece.py script in the public maps forlder and change the land percent value up near the top.
 
...
I did a random civ and ended up as the Persians, but when I went into the WB to check out the rest of the world, I didn't see any Russians near Ice, only Arabs, lol.
...

I've fixed the script for the next update, works quite a bit better now. Also, I tried generating more starting plots than needed but the problem I was running into is that Civ4 assumes that a player will start at every plot and uses the distance between them to determine the value of each. This was making some areas VERY good because their value was decreased for the nearby starting plots which ended up being empty. So the end result was artificially de-valued plots getting extra bonuses added around them to normalize them when they didn't need normalizing.

However, as long as you end up with a decent variety of civs that don't all have the same preferences it works well with the latest changes :)
 
Global warming code is done, I think. What does everyone think about this method for global warming:

1. A random plot is selected as always, it must be a land plot and it may not be a city plot. This is unchanged from the original code.

2. Once the plot is selected I evaluate the current terrain type and then bump it to a different type based on what it currently is. So grass turns to plains and plains turn to desert (excpet in the cold climate as there is no cold desert). The climate variation doesn't change, so if it was cool grasslands it becomes cool plains.

3. If the tile has an improvement, it is destroyed as before but only if the terrain is changed.

4. If the tile has a health resource on it (corn, wheat, cows, pigs, etc) and it changes to a terrain type that isn't allowed for that resource the resource is removed.

5. If the tile has a feature (forest or jungle) on it, the feature is destroyed but only if the terrain type changes (so floodplains are effectively immune as are forests in cold climate plains tiles).


After a quick test where I launched 20 Nukes the change is much more subtle than it was before but still significant enough to be noticed. Even with 20 nukes out the chance of the same tile being hit enough to go all the way from grassland to desert is very slim, even with 200 or 2000 nukes out it still wouldn't happen too often. The impact of global warming is most significant in the warm and temperate climates where the majority of the health resources require grasslands.

It's still not 'global warming' though. I'd like to expand it further without getting extreme. One thing I was thinking about was giving it a chance of triggering one of the hurricane/tornado/blizzard events instead of always changing the terrain, or perhaps increasing the likelyhood of those events world wide or having a chance of triggering more than one. This would give it more of a feeling of 'violent changes to the eco system' rather than simply turning the world into a desert.

And then there is the issue of reducing the chance of it occuring. Should there be a way to lessen the effect? And if so, what would be a good way to go about that? Perhaps maintain a running total of forest & jungle tiles and having a small chance per tile of decreasing the nuclear explosion count, say 1% chance per 100 forest/jungle tiles. Of course this means we could do the inverse too and increse the chance of global warming without needing nuclear explosions, for instance we could say that each coal plant has a 1 in 1000 chance of incresing the nuclear explosion count.

The nuclear explosion count is how the game currently handles global warming if you're curious, and I would just as soon continue to use it since it's just a variable to hold a number despite it's scary name :) What happens is the game looks at how many nuclear explosion have occured and for each one of those it applies global warming to one tile. So if you've had 10 reactors meltdown in your game, global warming can potentially affect 10 tiles per turn (with a 25% chance per tile currently). So by increasing or decreasing that number we directly affect the intensity of global warming.
 
:( The requested URL /victor/World_Piece_0_1.zip was not found on this server. :(
Mirror too. I have no luck. Your mod is secret for me :(
 
Back
Top Bottom