Next and for now final version of the wall_builder rmgen script.
It works like I had in mind and doesn't fail if an unknown civ should be placed.
wall_builder_pack.zip 10.41K
20 downloads
Included files:
- wall_builder.js: A rmgen script for wall placing. It's inside the rmgen folder where it belongs inside the 'random' directory.
- fortresses.js/json: A simple playtest random map with fortresses added for each player of the corresponding type and style.
- wall_demo.js/json: A demo map to show the different default fortress sizes and their shapes. Documentation in the map description.
- A text file to help figuring out where to put the files.
Here's a screenshot of a small map with 6 players:
The players civs are clockwise carthaginiens, celts, hellenes, iberians, persians and romans.
Since I use the alpha8 romans are not defined. So the script warns and falls back to the palisade fortress for unknown civs.
I added some hills so the effect to the fortresses can be seen without making it unplayable.
The fortresses add 20 population bonus each. The reason can be read in above posts. I don't think it's that tragic.
To add those civ dependent default fortresses to a random map, just add the following code:
// Place fortresses
var civ = g_MapSettings.PlayerData[i].Civ;
var fort = new wallTool(civ);
fort.setFortress(civ);
fort.place(baseX, baseZ, i+1, BUILDING_ANGlE);
With:
- 'i' the player number starting from 0 for the 1st player (with default color blue) and so on
(In 'fort.place' it's i+1 because 'gaia' is 0 for template placement and 1 is the 1st player)
- 'baseX' and 'baseZ' the x and z coordinates of the players civil center the fortress should include
- 'BUILDING_ANGlE' the orientation of the fortress. (As far as I know the default name for the global orientation for buildings)
To add customized walls it's still the same mechanism as in the opening post.
Feel free to play around with it.
Edited by FeXoR, 09 March 2012 - 05:29 PM.