Quick Modding Questions Thread

I want to create a new terrain, it should call TERRAIN_NEW for example. I want to put my new terrain in Archipelago maps, Fractal maps, Balanced maps and etc. If i choose Balanced map or any other, my new terrain is not on the map, i can only place him with worldbuilder. What to do?
 
Terrain is similar as Grassland (i will change texture and other what is need - !this will be new terrain!). If i create new feature terrain and put in game, i can found new features (swamps for example). What i must to do? Some tutorial?
 
Features work, if i create swamp and choose any map a can found my swamps in game, its not problem. Purpose: Some new terrain. I create Marsh for example (a long time ago in some my test mod) and i choose any map and i can not found my Marsh terrain on map (map don't set Marsh terrain) this is problem, but if i open worldbuilder i can set Marsh terrain. Do you have a similar problem?
 
Oh, it works for features? Didn't know that.

And I meant what does the terrain do? What type of terrain is it?
I'm sure a new type of terrain can be coded in, but not without knowing where and how it should be placed.

Last year when we added new terrains to C2C it required someone to go through every mapscript and rewrite it to be aware of the new terrains. Which requires a good amount of python knowledge.:(
 
Oh, it works for features? Didn't know that.

And I meant what does the terrain do? What type of terrain is it?
I'm sure a new type of terrain can be coded in, but not without knowing where and how it should be placed.

Yes for feature it's work you can add everything what you want :)

Last year when we added new terrains to C2C it required someone to go through every mapscript and rewrite it to be aware of the new terrains. Which requires a good amount of python knowledge.:(

Ouch, that's a bit hard :sad:.
Thought it could maybe be done at some central point, without dealing with every script. No, that's too much, no chance I'll do that.

Oh no :( i don't know to do that :sad:
My python knowledge is very bad :sad:
 
One alternative maybe to find a new mapscript (mod release) as these are not as one or more of these maybe less complicated, the standard mapscripts (from my little exploration) seem to be very complicated and use a number of files together. where as Fury Road maps (if i remember rightly) have various lists of terrain in the mapscript file, so you can just scroll through and find the terrain references and add another one on underneath.

You may or may not find success with this, but it maybe a way to get success with out the huge amount of python work and knowledge.
 
One alternative maybe to find a new mapscript (mod release) as these are not as one or more of these maybe less complicated, the standard mapscripts (from my little exploration) seem to be very complicated and use a number of files together. where as Fury Road maps (if i remember rightly) have various lists of terrain in the mapscript file, so you can just scroll through and find the terrain references and add another one on underneath.

You may or may not find success with this, but it maybe a way to get success with out the huge amount of python work and knowledge.

Thank you :D this is maybe the best solution for now.
 
Ouch, that's a bit hard :sad:.
Thought it could maybe be done at some central point, without dealing with every script. No, that's too much, no chance I'll do that.

That would require SDK. Someone is working on a modcomp that among other things would do that.
 
Oh, really? Might be interesting.

But not sure if SDK is really required. At least some of the mapscripts take parts of their code from anoter Python file, and I once tried to modify it, but somehow it didn't work out in a mod. Not sure if it was my inability, or if it's just not possible, but I also don't think that I have the motivation to look into that again :dunno:.
 
You can make new map scripts import and use another python file as library yes;
There is also a CvMapGeneratorUtil.py (within Vanilla Civ's Python folder) which contains the basis classes for all the fractal-based maps (fractal, continents, big&small, etc); You could take a look at generateTerrain and generateTerrainAtPlot functions there;

Also the RandomScriptMap.py has a collection of script-variants (fractal, archipelago, terra, pangea, hemispheres...). For all of them i had subclassed the standard fractal generator from the CvMapGeneratorUtil; So by adding overrides for the geerateTerrain functions in there you would get the changes into a few different world types at once as well, without risk of screwing other standard scripts that might be using the same library.
 
That would require SDK. Someone is working on a modcomp that among other things would do that.

What would happen if I use your C2C maps with all your terrain. You have Air and Water pollution on maps. Is that with maps script (Think on pollution) or with some another file. I don't want to have Air and water pollution.

You can make new map scripts import and use another python file as library yes;
There is also a CvMapGeneratorUtil.py (within Vanilla Civ's Python folder) which contains the basis classes for all the fractal-based maps (fractal, continents, big&small, etc); You could take a look at generateTerrain and generateTerrainAtPlot functions there;

Also the RandomScriptMap.py has a collection of script-variants (fractal, archipelago, terra, pangea, hemispheres...). For all of them i had subclassed the standard fractal generator from the CvMapGeneratorUtil; So by adding overrides for the geerateTerrain functions in there you would get the changes into a few different world types at once as well, without risk of screwing other standard scripts that might be using the same library.

This is nice idea. But one question, me need python or SDK for this?
 
The changes\file i was talking about are all Python.
 
What would happen if I use your C2C maps with all your terrain. You have Air and Water pollution on maps. Is that with maps script (Think on pollution) or with some another file. I don't want to have Air and water pollution.

I'm confused what you are asking here. If you use ALL of the C2C terrains and features with the C2C mapscripts and all of their dependancies it should work fine. Pollution is handled by an SDK component and has nothing to do with map generation, it is calculated during the game.
 
The changes\file i was talking about are all Python.

Thank you, maybe i can manage with python.

I'm confused what you are asking here. If you use ALL of the C2C terrains and features with the C2C mapscripts and all of their dependancies it should work fine. Pollution is handled by an SDK component and has nothing to do with map generation, it is calculated during the game.

Thanks. Maybe i can confuse person with my questions sometimes, but if i understand you, if i use all C2C maps, terrain and map_scripts i can put that in my mod without problems. But for C2C maps (terrains, maps, mapscripts) me is need XML and Python files or XML, Python + SDK files?
 
Top Bottom