Totestra: A new PerfectWorld2 fork

Thank YOU very MUCH for your quick response!

Does this really work? Whow!!! It is a good & elegant solution!
(I was under the impression, the game removes coast tiles, which aren't besides land, and replaces them by ocean - at least in a cleanup after a worldbuildersession.)
Have to look when I come home on friday ...

+# 4 makes Lateens (I mean Tirames) far more useful

Haha, I mix them up frequently too :D galley is the early transport, trireme the early warship ... Ti Ra Messes sounds kind of preancient, phaRaohnian ...


>The rule would be: "Some resources only appear on a single continent."
>The question is, is that rule wrong?

NO!! My last game was BIG FUN. I started alone and had only fish, stone, pigs & wine until i was able to make caravels ... all the world was happy that I had to sell 5 wine & 4 pigs ... me too :)
 
I read this other BIG thread for the last hours ...
1. I'm dizzy.:D
2. I'm tempted to limit general resource cluster size to 3 or 4.
3. I'm tempted to avoid clusters of stone/marble in starting locations.

Usually I threw away those 'nasty', not so juicy starts and regenerated ... regretably without having looked on the starting locations of the others:

>>> Which of course does not mean your starting positioning sweetening code isn't seriously flawed, it just works out well enough in a lot of cases - and very badly in other cases, as I pointed out long long time ago when I reported how I got clusters of stone and marble.
>> I think that having a super food boosted capital is an arbitrary expectation. I don't see anything wrong with the challenge that comes with not having one, especially when others on the map have it worse.

"Especially when others on the map have it worse."

Is this true??? Do the others really have 'even worse' starting conditions (foodwise)? What are your experiences?

-------------------------

Your bigger coasts work very well. Thanks again!
Your solution moved already from map generation into my standard module, because bigger coasts depend now on technolgies ...

Standalone version (everybody is free to copy my tiny part of it):
Spoiler :

Code:
def techAcquired(iTechType, iPlayer):
   'called FROM onTechAcquired(self, argsList) when a player acquires a tech'
...
      if ( ((iTechType == eMetalCasting) and not cyTeam.isHasTech(eCompass))
           or ((iTechType == eCompass) and not cyTeam.isHasTech(eMetalCasting)) ):
...
         iTerrainMap = list()
         iGridWidth = cyMap.getGridWidth()
         iGridHeight = cyMap.getGridHeight()
         COAST_SIZE = 2
         iMatrix = 1 + 2*COAST_SIZE                  # self + both sides
         iOffset = COAST_SIZE*(1 + iGridWidth)       # COAST_SIZE*(columns + lines)

         for ii in range(iOffset):                   # margin to handle map wrapping "left&down"
            iTerrainMap.append(eOcean)
         for ii in range(iGridHeight*iGridWidth):    # copy current map
            iTerrainMap.append(cyMap.plotByIndex(ii).getTerrainType())
         for ii in range(iOffset):                   # margin to handle map wrapping "right&up"
            iTerrainMap.append(eOcean)

         for ii in range(iGridHeight*iGridWidth):    # generate broader coastlines
            if iTerrainMap[iOffset + ii] == eOcean:
               for iy in range(iMatrix):
                  for ix in range(iMatrix):
                     iCoastFocus = iTerrainMap[ii + iGridWidth*iy + ix]
                     if (iCoastFocus != eOcean) and (iCoastFocus != eCoast):
                        cyMap.plotByIndex(ii).setTerrainType(eCoast, True, True)
                        break
 
I saw that this project is now complete.

But...

Some suggestions:

* Option for larger quantity of rivers
* Option for planet humidity
* It does not generate scrubland in RI
* Option for fat and thin continents
 
I saw that this project is now complete.

Exactly. I won't update the code to implement your wish list items...but I will help you change the code yourself.

* Option for larger quantity of rivers

It sounds like I am going to have to set up a FAQ for this project, since I have already told someone in this very same thread exactly how to increase or reduce the number of rivers:

http://forums.civfanatics.com/showpost.php?p=11532061&postcount=41

* Option for planet humidity

If I understand you correctly: I think what you want is to increase the minimum amount of rain dropped. This is a parameter that can be edited by altering the source code; look for this line:

Code:
self.minimumRainCost = 0.01

And make 0.01 a higher value.

* It does not generate scrubland in RI

Changing the terrain Totestra/PerfectWorld generates to make mod-specific terrain is a little tricky. To get an idea of how it is done, look at the changes I made to it to make more arid/desert maps for the Legends of Ancient Arabia mod, which should give you an idea where to start changing the code to add support for mod-specific terrain:

http://samiam.org/Civ4/Arabia/SandBar.py
http://samiam.org/Civ4/Arabia/SandBar.diff

The second file is a standard UNIX diff file; lines that begin with '+' indicate lines added to change Totestra to SandBar; '-' indicate removed lines.

* Option for fat and thin continents

Already done. Increasing the "Continent amount" will cause the map generator to make thinner and more stringy continents.
 
Exactly. I won't update the code to implement your wish list items...but I will help you change the code yourself.

Thanks, have you any tips/links for how to create options screens in this script?
The idea is that the player can modify these options when start the map without having to make changes within the script.
 
No mapscript will work with C2C without being specifically converted to work with C2C. This is wrong and will confuse people.

It worked for me; however, since you claim (without giving technical detail) this won't work, I put in a "some claim this won't work but it worked for me" disclaimer and downgraded C2C compatibility for this map script down from "YES" to "MAYBE".

- Sam
 
>>vktj: Cephalo's resource allocation code resulted in a lot of complaints and even prompted FuYu to revamp that code. I would use his changes, but don't have permission from him in writing to do so.
>FuYu: I claim no ownership, especially not by any kind of copyright law, of anything I made available in these forums or elsewhere on the internet, everyone can take what they want and do what he want with it. Telling me about it would be nice but is not required either. In other words: Yuo didn't need my permission, but you definitely have it now.

Any chance to see a unification of 2 good versions depending on the same great 2.06 code?

I have done it already in my private version, can (would love to) provide it, along with my extensions to FuYu (higher ignore area chance, if current bonus is in deficitBonusList = could not be placed normally// ignoreTechRestrict & a bit! more stones after "food is abundant" >42 etc.),
but I don't want drive the thread in a direction, which nobody wants. Opinions?

---------------------------

>Thanks, have you any tips/links for how to create options screens in this script?
Simply search in the script for strings you see on the existing options screen buttons and add there those you need.

>The idea is that the player can modify these options when start the map without having to make changes within the script.
PLEASE NOT, there are already a lot of options and to check them all for every mapgeneration whether one has changed back to any default or is mistakenly altered ... IS WORK
And: how many more do you want? 10, 20, 50 ... all?:eek:

PS. From my experience a project has stopped when you shoot the developer.:D
 
>>vktj: Cephalo's resource allocation code resulted in a lot of complaints and even prompted FuYu to revamp that code. I would use his changes, but don't have permission from him in writing to do so.
>FuYu: I claim no ownership, especially not by any kind of copyright law, of anything I made available in these forums or elsewhere on the internet, everyone can take what they want and do what he want with it. Telling me about it would be nice but is not required either. In other words: Yuo didn't need my permission, but you definitely have it now.

Any chance to see a unification of 2 good versions depending on the same great 2.06 code?

I have done it already in my private version, can (would love to) provide it, along with my extensions to FuYu (higher ignore area chance, if current bonus is in deficitBonusList = could not be placed normally// ignoreTechRestrict & a bit! more stones after "food is abundant" >42 etc.),
but I don't want drive the thread in a direction, which nobody wants. Opinions?

Make available for download.

>Thanks, have you any tips/links for how to create options screens in this script?
Simply search in the script for strings you see on the existing options screen buttons and add there those you need.
>The idea is that the player can modify these options when start the map without having to make changes within the script.
PLEASE NOT, there are already a lot of options and to check them all for every mapgeneration whether one has changed back to any default or is mistakenly altered ... IS WORK
And: how many more do you want? 10, 20, 50 ... all?:eek:


PS. From my experience a project has stopped when you shoot the developer.:D
I'd like 2 or 3 more "options screens" and no "options inside existing screens" and I'd like that the map would generate scrubland and savanna for use in RI.
 
It worked for me; however, since you claim (without giving technical detail) this won't work, I put in a "some claim this won't work but it worked for me" disclaimer and downgraded C2C compatibility for this map script down from "YES" to "MAYBE".

- Sam
The technical detail is that C2C has several more terrain types that would not be placed without some conversion work on the script (similar to what I originally did with PW2/3).
So while it would generate a map fine, it would not be a proper C2C map.
 
The technical detail is that C2C has several more terrain types that would not be placed without some conversion work on the script (similar to what I originally did with PW2/3).
So while it would generate a map fine, it would not be a proper C2C map.

Exactly. Sorry for the lack of detail on that.
 
>Make available for download.
Sorry, as the creator of the thread/the Totestra module is silent, I'll publish nothing what contains his work.

All I will do beyond running it now and then on my PC at home is this (maybe bugreport):

The function
>>>>>>>def getCityPotentialValue(self,x,y):
already in cephalo's PerfectWorld2.06 version provides inconsistent values for the returned food (at least as I understand it):
CORN,WHEAT,RICE with IrrigationAvailable are 5, 5, 4 food ok
CORN,WHEAT,RICE withOUT IrrigationAvailable are 4, 4, 1 food !!! maybe the underlying functions build then cottages instead of farms on rice ...
similar:
PIG, SHEEP on PLOT_LAND: 4, 3 food ok
PIG, SHEEP on PLOT_HILLS: 1, 1 food !!! maybe the underlying functions build mines instead of pastures on hills? ...
In my modification I use also boni restricted by tech, so I feel this values do not fit well: WINE: 0, DEER: 1, SUGAR: 0, BANANA: 0, SPICES: 0
e.g. in the game wine is always on plains and adds 1 food to the 1 from plains, so I think this should count at least 1 food point (fish counts 4) ...

Spoiler :
Code:
        for i in range(gc.getNUM_CITY_PLOTS()):   # civjo: mines instead of pastures? what makes AIplayer?
            plot = plotCity(x,y,i)                # BONUS_PIG, PLOT_LAND: 4, PLOT_HILLS: 1!
            if plot.isHills():                    # BONUS_SHEEP, PLOT_LAND: 3, PLOT_HILLS: 1!
                if plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_PIG"):
                    totalFood += 3
                if plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_SHEEP"):
                    totalFood += 2
            # BONUS_CORN&BONUS_WHEAT, NOirrig: 4, irrig: 5 | BONUS_RICE, NOirrig: 1!, irrig: 4  (cottage?)
            if not plot.isIrrigationAvailable(True) and \
               plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_RICE"):
                totalFood += 2
            # BONUS_WINE: 0!, BONUS_DEER: 1!, BONUS_SUGAR: 0!, BONUS_BANANA: 0!, BONUS_SPICES: 0!
            # mixed calculation: consider terrain (plains, tundra) & tech (calender)!
            if plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_WINE") or \
               plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_DEER") or \
               plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_SUGAR") or \
               plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_BANANA") or \
               plot.getBonusType(TeamTypes.NO_TEAM) == gc.getInfoTypeForString("BONUS_SPICES"):
                totalFood += 1

        return totalFood,totalValue

... and Thank You for the fish!!!

[edit: Did I mention how disappointed I was, when I made once a nice map for Civ2 and the evil AIplayer cleared a _Jungle tile with BANANA bonus_ in order to receive a _grassland tile_ ...
---------------------------------------------------------------------------------------
lunatic follower of Sol Invictus ]
 
Hey, Guys.

It's time for me to put closure on Totestra. I had a lot of fun making Cephalo's excellent map script even better, and I hope you guys enjoy using and modifying this map script. I am no longer providing support for Totestra and will probably not post on this thread again, but I have absolutely nothing against anyone else taking the reigns and modifying Totestra any way they want to.

I am attaching the final version of Totestra as well as some supporting documentation to this message so it can be downloaded as long as CivFanatics is online, even if my personal web site should ever go down (It's actually been around longer than CivFanatics, but I never know what tomorrow may bring). I have no plans to remove any Civ4 content from my site, but it's always good to have a backup download link.

- Sam
 

Attachments

  • Totestra-20120615.zip
    69.1 KB · Views: 429
I blogged about why years ago at http://maradns.blogspot.com/2009/09/rant-putting-closure-on-project.html

As an open-source developer, I have a responsibility to put closure on my projects. When a given open-source project is something I realize I have no interest in working on any more, I let the project go, via a formal announcement. For example, I announced the end of my Kiwi Spam program on October 17, 2001; while I got a couple of emails expressing disappointment the project had ended, I never got a maintainer for the project. Recently, after making a few minor updates to ObHack, my fork of a random map generator for Doom-type games, I announced I would no longer be working on this code. There was enough interest in the code I was able to hand over maintenance duties over to Fritz, who has since then fixed a bug I never fixed and made a couple of releases of ObHack.

Closure is, IMO, very important for an open-source project. It tells the world “I’m responsible enough to know when to start a project, and, just as importantly, when to finish a project.” It allows the community of users to know you’re no longer interested in a project, making it possible for them to become the maintainer if there is still interest in a given project (such as what happened with ObHack).

Everything has a beginning and an end. A responsibly done open-source project is one that knows when it’s time to pack up and go home.
 
It looks like the various control options for this script are unavailable through the Fall From Heaven UI. Is there a guide somewhere that maps the menu options to the code in a way that I could easily manipulate the python file to reflect things?

My first two maps in FFH are ... flooded with plains. Very, very few hammers anywhere in sight, and I suspect there is a combination of options that would result in the map producing more rugged and peaked results.
 
i just tried this map for the first time, and it gets my vote as the best general map script around! easily.


i've pretty much tried them all and i've always found some issues. :confused:

thank you for your work and the excellent addition to the community vktj! :goodjob:

*starts marathon ancient era expanded reborn game using totestra map*
 
Top Bottom