Skip to content

samboy/Totestra-mapscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

2021 update

Since I have gotten multiple complaints that the Totestra code is messy and hard to maintain, I have moved the older code to the old/ directory. The version of Totestra in old/ has a lot more features and may still be useful, but the current version has been streamlined.

Totestra.py

I have created a simplified version of Totestra; see the old/ folder for the original version of Totestra. This discards a large number of changes Totestra made, and only includes the most relevant features (allow everyone to start on same landmass; have more resources by default on map with resource control option; remove coastal mountains; etc.) The maps will be the same as generated by Totestra with the same features selected.

One useful feature this map script has which the older Totestra doesn’t have is the ability to make extra huge 192x128 maps. The option for these big maps is a little hidden, but can be seen in the options (since bigger maps take longer to generate).

The code should be more maintainable compared to the older Totestra.

To install, place the Totestra.py file in the relevant “PublicMaps/” (maybe “PrivateMaps/” if using it with a mod) folder in one’s Civilization 4 files.

Note that the newer Totestra.py, with a given seed, will still make the same map as the older Totestra.py.

Changes from PerfectWorld.py

  1. Ability to select climate
  2. Ability to use fixed random seed
  3. Remove mountains next to coast (fix coastside mountain ring bug)
  4. Allow everyone to start on same landmass (biggest or 2nd biggest)
  5. Have options for changing resource distribution
  6. Note random seed on sign placed in the arctic
  7. Ability to have bigger (192x128) or smaller (96x64) height maps

How extra huge maps are made in Totestra.py

I should explain why it’s useful to change the height map size when we already have the ability to adjust the map size via the standard “size” control. The way Totestra.py handles size is like this: It makes a really large (144 wide, 96 high by default) map which it then runs plate tectonics and weather simulation with to act like a reasonably realistic planet. Then, once it has this 144x96 map generated, the script then scales down this really large map to the size requested by the user (44x28 for duel, 60x40 for tiny, 80x52 for small, 96x64 for standard, 120x80 for large, and 144x96 for huge) This way, if we have the same seed but select different map sizes, we get more or less the same planet generated.

What “bigger maps” does is change the size of that underlying height field. This allows us to make maps which break the 144x96 cap on map sizes and have maps as large as 192x128. (This results in a different map being generated for a given seed.) Totestra.py scales up all of the smaller map sizes (56x36 for duel, then 80x52, 104x68, 128x84, 160x104, and finally 192x128 for huge) when a bigger map is selected. This option is a little hidden because it takes a lot more time (and memory, so make sure to only make a really huge map right after starting a new Civ4 session or a memory allocation failure may happen) to make this bigger map.

I also was able to add an option to make this underlying height field smaller (96x64 instead of the default 144x96); this is for running the generator on older computers when it’s more important to fairly quickly generate a smaller map than to generate a large or huge world. All the smaller maps are scaled down; e.g. a duel map is only 32x20.

About

This is Totestra, a mapscript for Civilization IV

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Languages