Arrakis.py map script discussion

Another playable version would be cool, seeing as version 1.3 of the mod is not far off.

Water for Food is now implemented so if you want we could have a Polar Sink terrain than has a higher food (water) yield.

Here's my wish list on the terrain:

I want a land terrain called 'deep desert' that has the same bonuses as the 'ocean' deep desert.

I want a land terrain for polar ice, something that looks alot like deep desert but with ice in it. Make it look like it used to be deep desert but more wet or frozen. I'm thinking I might create some dunes at the pole of this terrain, since I can't really make a 'sink' at this time. This will be the juicy stuff that everyone wants access to.

You might get rid of the 'desert' terrain. It doesn't fit with this mod since were talking aobut different kinds of desert. I think the factory maps will respect that change and it shouldn't cause problems in case someone wants to play archipelago or whatever.

Over all. I would like to see all the rock terrains less garish. No bright orange terrain please! They should be different from one another so you can tell what you're looking at, but maybe less diverse in appearance than regular civ. Make the peaks a color that works well with all the rock terrain types. Purple mountains on the black 'rugged' terrain looks terrible.
 
Over all. I would like to see all the rock terrains less garish. No bright orange terrain please! They should be different from one another so you can tell what you're looking at, but maybe less diverse in appearance than regular civ. Make the peaks a color that works well with all the rock terrain types. Purple mountains on the black 'rugged' terrain looks terrible.

I think you may have quite an old version. The bright orange Arid terrain was recoloured by me a while back. The peaks can probably be retextured to make them look nicer.
 
I think you may have quite an old version. The bright orange Arid terrain was recoloured by me a while back. The peaks can probably be retextured to make them look nicer.

The one I was most concerned about was the 'desert plains'. In my version it's very bright orange. Really, I think it would be funner for all the terrains to named by some uninviting word for rocks. 'desert plains' seems to imply something you could homestead in.
 
Ah, that was what I meant. Desert Plains - not Arid. It is now a colour that blends in much more. The terrain to the left is the new Desert Plains. Renaming is easy - if we can think up a new one that is!

attachment.php


A Polar land terrain sounds good. We can simply give it +1 or +2 water per tile. We could also have a version of the Groundwater bonus (Polar Aquifer?) that can only appear on Polar terrain that produces a bit more water than normal.
 
I want to add back the vanilla grass and plains terrain so that when terraformers start to work, some of the arid terrain upgrades to vanilla plains and ultimately vanilla grass. I have added the terrains into the xml with correct graphics as TERRAIN_TERRA_GRASS and TERRAIN_TERRA_PLAINS. Unfortunately the mapscripts all love to add this new terrain around starting positions. So we get arid and desert plains far from starting positions, and vanilla grass and plains near starting positions.

Is there a way to prevent mapscripts from ever using certain terrains?

I have tried adding:

def normalizeAddGoodTerrain(): return

to archipelago.py but that does not make any difference.

EDIT: I added an onGameStart which puts them all back, and this works unless you select "Regenerate Map". Maybe there is a different hack which would work better, but it seems like there should be a way to restrict some terrain from ever being generated. Also, there must be a step I am missing in terms of getting terrains to blend, as you can see in the attached screenshot. Does each of the N terrains have to define how it blends with the other N terrains? Blech.
 
I think it's the other way around. Starting positions are choosen next to new terrain (because they have better values I suppose). But strange that map scripts are using that new terrain at all. Normally you have to add the rules for new terrain manually in mapscripts to make it work. :confused:
 
There is also normalizeRemoveBadTerrain. In Arrakis.py all those normalization functions are together and disabled. Check there to make sure you got em all. Also, I don't have the latest version of the mod, but I made a new version of Arrakis.py. I am using TERRAIN_SNOW (rugged)for the special polar ice sand, even though it doesn't currently look right or help with water.

From now on I'll put the latest version in the first post.
 
Is it possible there is something missing/wrong in my terraininfos? I don't see what could be wrong, but I have taken all the steps I can think of to "hide" these vanilla terrains from the mapscripts. If you have a minute, could you look inside the attachment?
 
EDIT: I added an onGameStart which puts them all back, and this works unless you select "Regenerate Map". Maybe there is a different hack which would work better, but it seems like there should be a way to restrict some terrain from ever being generated. Also, there must be a step I am missing in terms of getting terrains to blend, as you can see in the attached screenshot. Does each of the N terrains have to define how it blends with the other N terrains? Blech.

Regenerate Map does not clean up and redraw the map properly. I've always had a problem with it.
 
Is it possible there is something missing/wrong in my terraininfos? I don't see what could be wrong, but I have taken all the steps I can think of to "hide" these vanilla terrains from the mapscripts. If you have a minute, could you look inside the attachment?

I don't think you can hide them outside of altering the map script or adding a tag and altering the SDK.
 
Thanks for the suggestion. I added the following and now vanilla grass/plains is not added:

Code:
def normalizeAddGoodTerrain():
    return
def normalizeRemoveBadTerrain():
    return
def normalizeRemoveBadFeatures():
    return
def normalizeAddFoodBonuses():
    return
def normalizeAddExtras():
    return

I am a little nervous about removing normalizeAddFoodBonuses on a map which has limited food. But I have gotten the immediate effect I wanted, thanks.
 
Surely normalizeAddFoodBonuses can't have much to do with the TERRA terrains being placed? I think that just relates to the iNormalize flag in BonusInfos.xml which I only have set for Groundwater.

Also: I think we should have a new terrain TERRAIN_POLAR for the polar area. I like the variety we have in the different rock types. If we create this and use the same graphics as TERRIAN_SNOW for now, then I'll get around to making it look a bit more icy (along with the zillion other things on my list).
 
Surely normalizeAddFoodBonuses can't have much to do with the TERRA terrains being placed? I think that just relates to the iNormalize flag in BonusInfos.xml which I only have set for Groundwater.

Yeah, actually this one should stay.
 
Now that 1.3 is available I will update the map with the new polar terrain and incorporate rugged with the rest of the map this weekend. It should be fun to see the new terrain art!

One more question, did you get a chance to make a desert terrain that I can use for dunes that wont have bonuses all over them?
 
deliverator said:
Surely normalizeAddFoodBonuses can't have much to do with the TERRA terrains being placed?
Yeah, actually this one should stay.

When I add a stub normalizeAddGoodTerrain only, the TERRA terrains are still present. When I add the five stub functions shown, they are no longer present. I do not see why any of the other four should prevent this terrain, but one clearly does. I will put back just nAFB and see what happens. It seems to me that since the TERRA terrains have more food in their base yield compared to the other terrains, nAFB may be placing them.

But, I would still rather learn how to prevent the TERRA terrain from being put down in the first place. There seems to be little activity on the mapscript sub-forum; where would be a good place to post to find out more?
 
When I add a stub normalizeAddGoodTerrain only, the TERRA terrains are still present. When I add the five stub functions shown, they are no longer present. I do not see why any of the other four should prevent this terrain, but one clearly does. I will put back just nAFB and see what happens. It seems to me that since the TERRA terrains have more food in their base yield compared to the other terrains, nAFB may be placing them.

But, I would still rather learn how to prevent the TERRA terrain from being put down in the first place. There seems to be little activity on the mapscript sub-forum; where would be a good place to post to find out more?

The very best place would be to have a look at the sdk. Then you can see what's really happening in these functions. I looked at the xml, and I don't see any tags that would prevent this kind of use. You do SDK work right David?
 
The very best place would be to have a look at the sdk. Then you can see what's really happening in these functions. I looked at the xml, and I don't see any tags that would prevent this kind of use. You do SDK work right David?

I can read C++ but I have never setup the makefile to build. However, it seems that a lot of the map script subroutines are in python, vanilla CvMapGeneratorUtil.py. I highly suspect the +1 food and +2 food terrains are added by nAFB because there is so little food in the starting position. This problem would not appear in vanilla, or in other mods, because Dune Wars goes much further in reducing the amount of food in the default terrains.

Maybe the best solution is to get rid of this terrain in onGameStart, and just document that "Regenerate Map" should not be used.

Still, I would like some help in understanding the blends. I added the vanilla grass and plains; as you can see from my screenshot there is no blending at all. The edges are hard. How is this controlled in the civ4artdefines_terrain? If there is a faq/tutorial, please let me know.
 
Being such an active Civ modder as you are, I suggest you get one of those new express(free) versions of Microsoft C++ so you can look around the SDK when a question such as this comes up. You can't compile with those, but the search functions are very good. I use VS 2003 for compiling, but if I just want to investigate something I have a converted project for vs 2008 express. It's much better for navigating the code. Looking through the SDK answers nearly all questions regarding game logic. Graphics are another story however.

In regards to the blanding glich on regenerate map, if you save the game and reload, I bet the glich goes away.
 
Looking through the SDK answers nearly all questions regarding game logic.

Thanks for the encouragement. I can navigate through the code fine with "vi" and "grep" (long time unix programmer). However, all too often I find a 500 line long, uncommented function, in which six different modders have added six different sections of code. So it is not necessarily an "easy" way to answer questions. Very often there are other modders who have already mastered those code segments and can answer questions.

In regards to the blanding glich on regenerate map, if you save the game and reload, I bet the glich goes away.

I'll try tonight. I call setTerrainType (newtype, true, true) which should cause the graphics to be rebuilt. Since these terrains are changed dynamically during the game, save/reload is not a good permanent solution. Is there anything stronger I can use, besides setTerraintype(true,true) to force proper reblending?
 
I just ran home for lunch to try 1.3 and it doesn't seem to have the new terrain art that Deliverator mentioned. And the polar terrain is not there yet.
 
Back
Top Bottom