1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Arrakis.py map script discussion

Discussion in 'Civ4 - Dune Wars' started by cephalo, Jun 23, 2009.

  1. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    *Latest version at the bottom of this post* v.0.52

    --old info---

    Ok, I have a first draft of a Dune map script that brings up many questions. I did a bit of research, and it turns out that most of Dune away from the poles is frequently battered by 350 mph sandstorms, and is basically uninhabitable. Because nearly all of the stories and conflict occur in the north pole, most of the maps of Dune you can find are polar oriented maps. Therefore, I went with a similar configuration for this map script.
    Spoiler :


    The dune experiment went better than expected, and the existing desert terrain blends perfectly with the deep desert as long as you don't put coast around the dunes. The desert hills would look a bit better if there weren't the rocky bits in them, but overall I'm happy with the result.
    Spoiler :


    I didn't place any bonuses, because I didn't want my dunes to have grasses and junk all over them for the screenshots. That stuff really shouldn't be in the deep desert anyway. Also, the only solid terrain type is 'arid' because we don't yet have any rules for how the different terrains form. It really helps the immersiveness and believability to have rules for this sort of thing, even if they aren't particularly realistic or accurate. One thing that I learned in my research is that very close to the north pole the sand has a water content that prevent's worms from going there and where water can be mined. That sounds like prime real estate to me, and we should probably have that in the mod for people to fight over.
     

    Attached Files:

  2. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Some initial comments on the old dune wars dev thread at this post. More thoughts here, but no specific point yet. I think it is still early discussion.

    Looking at the scanned map, it seems like there are rings of peaks around basins. This kind of reminds me of the standard FFH2 mapscript which builds valleys. When I play FFH2 I don't use that script because it seems to limit movement too much. Still, I guess we need some way to get hills/peaks inside the center part of the circle. Is it possible to just throw some code from another mapscript in here for that, without making it dune-specific?

    I guess the polar cap where there is water is pretty tiny, compared to the area shown on the map, and worms could go anywhere else except peaks. I did some quick math and a polar region from 60 degrees up, is about 1/16 the surface area of the whole planet. If we go with a polar only map, the standard distance scale may not make too much sense; everything is really 16x closer together.

    In terms of putting resources down onto the map, bonusinfos.xml has some settings for min/max latitude that makes fur, for example, only possible near the poles. When you build a polar map, do those ranges automatically get converted into circles of the right radius? Then all the resources can be limited into the 60 - 90 latitudes and they won't go onto the desert. If a lot of code needs to be written into the mapscript to do that, it is more of a problem.
     
  3. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    There are no limits to what this map script can do as far as placement. I have made quite a few maps and I know the process in and out. If it's in the mod it can be put on the map in any way we choose.

    The latitude settings for bonuses would have to be ignored, but that's not too difficult. One advantage you have when making a mod is that you don't have to be so general as you would be when making a game that's intended to be modded. We could make our own rules for placement of certain resources and ignore the xml entirely if we wanted. That makes it difficult for people to make a mod of this mod, but if it makes the mod better and it's easier for us then so be it.
     
  4. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Is it possible for you to take one or two more steps so we can trying playing games on the map? It would need to have hills (for windtraps) and bonuses placed by bonusinfos.xml. If you also put up your terraininfos and graphics files, I can modify a couple of lines in the python to put spice blows on your deep desert, which is critical for commerce.

    I have a feeling the game will be quite different, but it's hard to predict how exactly.
     
  5. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    davidallen's 'pie slice' analogy from the previous thread definately sums up the strategic situation on Dune. The water at the north pole is vital, but there is no shortage of desert sand on Dune!

    That's something that we ought to recognize. The spice melange is of course very valueable in the sense that it only occurs on Arrakis. But, if you are already on Arrakis, you really have more spice than you could ever need; an inexhaustable supply. The only issue is getting rid of your competitors sharing the planet with you. In that struggle, it is water that is the key. I'm thinking that water is the real prize on Dune.
     
  6. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    Would it be alright if we reserve 'desert' land terrain for the dunes? I can forbid bonus placement on the dunes, but it might be preferable to do that in the xml, in case you guys decide that are a few resources that should go there. Another issue will be map size. Since there is little habitable terrain on these maps, they are going to have to be large in order to mesh with the default amount of players. I'm going to have to play with that so everyones not starting on top of each other. I'll try to get a playable map ready tonight after work.
     
  7. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,643
    Location:
    London, UK
    Water is precious for its necessity, but the spice is also a vital necessity in the Dune universe. Among its many amazing properties, it prolongs life and enables the Navigators to bend space - enabling space travel. And on that subject...

    I still like the two-map-space-and-Dune idea , but as was pointed out it would probably require Lutefisk Mafia to join the mod to implement, maybe there is a compromise solution more along the lines of Tholish's Future Mod where space is part of the map.

    I'm thinking with Cephalo's polar map the outer edges of the map representing the hostile southern reaches of Dune will be redundant. Also, without the context of space and the other planets (Caladan, etc) this mod lacks something of the Dune atmosphere. Could we have the polar Dune map in the centre and a band of Final Frontier style space around the edge? This would make the game feel more like a board game (not a bad thing in my opinion), but would be great for theme. What do you think?

    Edit: I did a crude mockup. See attached. I'm sure there would lots of challenges involved, but it could be interesting. Each House could have its homeworld.
     
  8. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,643
    Location:
    London, UK
    What about the tile spice issue I raised here?
     
  9. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    I think that all you need is the graphics from FF and a special terrain type to put it in, and it ought to work. It might even look better if there was a transition terrain type that served as an atmosphere glow.

    I like that there's lot's of desert, if for no reason than to convey that the deep desert is extremely vast. It doesn't really need to be utilized in full.

    We can put those tiles any old way you want. If you don't want them on the hills, we can put them on the flats. Or, if you want to design them as terrain graphics so they can be on hills, we can place them that way too.
     
  10. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,643
    Location:
    London, UK
    Gameplay wise I'm not too concerned about the spice being on hills. It's just that my current graphical solution uses flat 3D tile NIFs - it wouldn't really work on hills or any uneven terrain.

    I think in the book there are huge underground reservoirs in the southern deserts known only to the Fremen. Could be another interesting map idea.
     
  11. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    Ok here is a semi-playable version of the map. I have a decent shield wall up now, and bonuses are placed using the default placement. What I do not have yet are proper terrain placement or feature placement, as those generally require rules that are as yet undecided. You might have to place those things in the WB for now.

    Also starting positions are done the default way, and as such some people end up on some lonely dune near the equator, also they can end up on the wrong side of the shield wall which might be undesireable.
     

    Attached Files:

  12. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    I tried your mapscript, and I have some feedback.

    1. You did not include any new xml for terrains. It works, but what exactly did you do for dune placement? It seems to use the default terrains. If I had to guess, I would say you have made no graphics changes, but you are generating stripes of desert terrain among the deep desert terrain. Is that correct, or did I miss part of the effect?

    2. I used the "regenerate map" option several times in a row. The bonuses do not appear to get cleared out in between times. So after generating three maps, practically every square had a bonus.

    3. In some maps, the peaks are 3-4 squares thick. This seems somewhat overkill. Can you thin them out so that it is at most 2 squares thick?

    4. What we seem to get is a "donut" of usable land. That is, there is a big donut hole of deep desert inside. Is this on purpose? The amount of usable land seems quite small. If possible, could you fill in the center with usable land? Maybe the shape of the land disk could be less regular, so you might get a crescent shape occasionally.

    5. The percentage of the map which is deep desert, outside the shield wall, also seems high. Perhaps on a N x N map, only N / 5 of the map should be desert. That is, on 20 x 20 map, 2 squares of desert at the edges, and the inner land would have a useful diameter of 16. The land disk could be less than 16 diameter in places, but never more, so that there would be at least a thin ring of desert. There does not seem to be much benefit in making more than half the map desert which is essentially unusable.

    6. There is a standard function somewhere which turns very small extents of ocean into fresh water lakes. I have disabled this in the Archipelago.py which is in version 1.1.2 and up of Dune Wars; see function normalizeAddLakes() at the end of the file. I recommend that you cut in this function to get rid of small patches of deep desert which show up as lakes with fresh water.

    7. The graphics I have for "salt pan" are not great; but if you put down jungle in patches, you will get a "salt pan" effect. In vanilla, jungle (and also forest) give some variety to the terrain and force the player to make some tactical decisions. I'm not sure how forest should be allocated, but it may be interesting to aim to get a percentage of land coverage for "salt pan" which is equivalent to the percent coverage of jungle in vanilla.

    8. In order to avoid resources on deep desert, you may wish to create a new terrain which is a copy of desert, but call it something different ("desert dune"?). You could place this one in the deep desert, and no bonuses would be placed upon it.

    9. The vanilla mapscripts also place "rugged" terrain. Some of the resources are tuned to go on this. Could you add some of that? Maybe random distribution is sufficient, or it could be treated as "super-low hills" or something.
     
  13. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    1. Yeah it's just desert and desert hills, laid out in a pattern guided by a sand ripple texture. I wrote a separate script to convert the data into a string that I could paste into the map script. That's what all those miles of numbers are for.

    2. That might be something in the DLL, I have no bonus placement function in the script, so it's falling back on the default. I have no idea why it would not clear the bonuses.

    3. I can probably thin that out.

    4. I was hoping to put the 'water rich' terrain in the middle, but we don't have it yet. According to the dune map, there is still deep desert creeping up to the pole, and the worms are prevented only by the small circle of wet sand. You don't have to worry about storms on this sand, but worms can go up to the worm line. I was hoping to have separate continents arranged in a ring, but right now it's a donut. I'll keep working on that.

    5. I often put alot of unusable terrain on my maps purely for atmosphere. I want people to feel that the deep desert is unfathomly big. I figure that as long as the map is big enough, and there's plenty of room to play on the donut, it shouldn't get in the way.

    6. I think I did disable this. I usually don't use it on my maps.

    7. I'll definately want to put that to use.

    8. Yeah, I'm currently using desert for that. Really, it seems to me we could just reserve desert for that, and maybe change the name to 'deep desert' like the ocean. It seems clunky to has a terrain called 'desert' when were on a desert planet.

    9. Yeah, maybe I can cue the different rocky terrains by altitude, and get a little diversity this way.
     
  14. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,643
    Location:
    London, UK
    1. I think to get the look we want we need a dune feature that looks like dunes rather than hills. I don't know exactly how hills work (more new stuff to figure out - like there hasn't been enough on this mod!), but I think that would be best.

    2. I believe this post from Dale is relevant. I used to refresh bonuses and goodie huts whether the map is generated or a scenario.

    3. Yeah, I didn't particularly like the thick bands of mountains in Creation.py either. Perhaps there is a way to tackle this graphically by having more variation in the mountains. It might be good to customize the mountains to make them more Dunish.

    4. How about we create two new terrains Polar Ice and Watered Sands, and then you can have concentric circles of each at the centre of the map. I'm happy to create some graphics.

    How this would work in a game mechanics sense I'm not sure, but here's an idea. Did someone (johnny smith?) say that we could have different commerce types? The best model would be to have another commerce type of water. Some tiles produce water and some tiles (mainly the spice) produce gold. You need both. You need to have a presence to the south (the outer areas) to get gold (although there can be some deep desert/spice in the inner areas), but if you have access to the pole you get more water commerce. I'm not sure what is involved in this - but it is surely best to model spice/gold and water as separate yields.

    I agree with david that the 'rock island' areas (Arid, Desert Plans) need to be more like Archipegalo, so concentric broken circles. I'm sure you can make the solidity/brokenness of the circles parametric - like the More Islands Less Islands option in your Faire Weather script (which was great).

    5. I think it's a question of balance. To a certain extent it is not necessary to show the whole of the deep desert to tell the story that it is there. Also, the really big maps can be a performance issue in the late game for a lot of people. We want Dune Wars to be playable until the end I think.
     
  15. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    I was thinking that a really simple way to handle water would be to simply change the name of 'food' to 'water'. In regular Civ4, the human need for water is kindof abstracted away, and you can build a fine city without explicit access to fresh water. In a Dune mod, maybe it makes sense to abstract food out of the picture and instead use water for growth. Otherwise you need to teach the AI how to use the extra commerce type, and you're adding complexity to the gameplay only to accomodate a fictional aspect of the setting, wich is probably a bad reason to do so.

    I was also thinking that it might be interesting that instead of producing water to grow your population, you could import population from offworld at some cost and try to conserve water to prevent them from 'starving'. Maybe put negative production on terrain, so to work terrain you actually have to spend water. I figured this would make the mod stand out from other mods, but then again, you have to teach the AI how to prevent water shortages, and I probably don't have time for that myself.

    As far as the big mountains are concerned, that's our shield wall, so it needs to be obvious I think. I can tone it down a bit though.

    Changing the shape of the dunes will be alot of work. The plot types wich govern the shape of a tile are hard coded, and if you notice the resulting shape depends on the shape of every neighbor. If you want to use features instead of plottypes, you would still want to connect them up or else it would look bad to have a separate dune every square. Every attempt I've seen of using a feature to emulate landforms looked terrible.
     
  16. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Except for Deliverator's spice, of course. :)

    Renaming food to water has been suggested in most of the different dune dev threads. I think the windtrap mechanism we have already makes water a little bit of an issue, using the irrigation mechanism to ensure that spreading water must be planned. Right now the overall low food yield makes pop growth slow, so this effect is not very strong. Maybe it needs to be tuned so it gets in the player's way a *little* more.

    I am not an expert on the books, but I don't think the polar cap was actually "wet" or "icy". I think it just had a trace more water than the rest of the planet. Keep in mind that if there had been a lot of water there, the sandtrout would have isolated it, like the rest of the water on the planet. I certainly don't remember any comments in the books about going there to get water. Maybe we can have a terrain type which is slightly different graphically, which we can use to prevent worms from travelling through.
     
  17. Deliverator

    Deliverator Graphical Hackificator

    Joined:
    Feb 12, 2008
    Messages:
    4,643
    Location:
    London, UK
    I really like the water for food idea, I have to say. Windtraps and irrigated tiles then just produce water. It would be interesting just to switch the food graphic to water and start thinking in those terms. It could take us in some interesting directions.

    I am going to create another release of the spice soon. I still have niggles with it, but I think I am up against some limitations of the game engine. Once this is done it should be quick to create a salt pans feature using the same approach. The only issue is height. I'd need to adjust the height depending on whether the salt pans should be at deep desert (sea) level or ground level.

    It is tricky, but there are options:
    1. Reskin the desert hills to look more like dunes. This might be reasonably effective and would probably be the first thing to try.
    2. Create a dunes feature. To get the tessalation for all the different combinations I could possibly smooth out the existing Iceshelf to look like dunes. The real problem is that units don't adjust their vertical position for features, so could appear up to their neck in sand.
     
  18. Greeneyedzombie

    Greeneyedzombie King

    Joined:
    Nov 7, 2006
    Messages:
    707
    Location:
    Below the sea.
    If I remember correct, the polar regions had a more moist atmosphere compared to the rest of the planet, wich made it easier to extract water from. And the terrain was more rocky/hilly compared to the rest of the planet.
    Changing food to water sounds best to represent the scarceniss from water. Windfalls should further only be buildeble on food and hill terrain.
     
  19. cephalo

    cephalo Deity

    Joined:
    Jul 26, 2007
    Messages:
    2,058
    Location:
    Missouri, USA
    For the next phase maybe I'll arrange the most fertile areas toward the pole. The trick will be to make it look like something naturally occuring. Concentric circles would probably look dumb. There has to be a second factor along with distance from the pole that would effect habitability. Any ideas?
     
  20. Greeneyedzombie

    Greeneyedzombie King

    Joined:
    Nov 7, 2006
    Messages:
    707
    Location:
    Below the sea.
    You could create patches of mountainridges with fertile areas around it. Scattered around through the dessert.
     

Share This Page