[MOD] Colonization: 2071

Originally Posted by orlanth View Post
No I haven't heard anything from Nightingale lately
Me neither. I think he teleported off the planet or something
phew, it's a relief you are back! :goodjob::clap: it's been taking a lot of research points and Fusion Cores just to decipher the various intricacies of the M:C research system. Not to mention the currently less-than-intricate appearing python screen resolution formatting etc :crazyeye:
I was worried you'd been abducted by the Empire of the Greens or the Sasquatch.. if they've researched the 4th-tier Invasive Probing tech you might never be the same! :assimilate::faint::p

Originally Posted by Drakarska View Post
@ Nightinggale; Just a suggestion concerning your teleport idea, you may want to check with Psicorps over in the Babylon 5 mod team thread (civ iv) as I think they have used that code as a base for their jump gates idea. They may be able to give you some ideas/thoughts to help you out.
That sounds interesting. In fact just trying more Civ4 mods (with sources) might not be a bad idea for rapid expansion of the code base.
I don't know much about Babylon 5, but the Civ4BtS mods for Fall From Heaven 2 (and its modcomps like Fall Further and Master of Mana) invested thousands of programming hours (by teams of fairly skilled programmers too, AFAIK) into developing & optimizing a vast selection of xml-configurable game features. While these won't all be something you'd want in M:C, their modmodders guides are definitely worth a browse through for a few new unit/building/promotion tags that might be cool to incorporate. Dunewars also implemented features including terraforming and various new Improvement options.

Modders Guide to Fall Further
Modders Guide to FFH2

Originally Posted by Drakarska
Platy jumps from project to project, and absolutely loves any type of Python challenge (I think he takes it as a personnel affront at times if he can't figure something out ), so PM'ing for help really shouldn't be an issue. After all, the worse that could happen is him saying no, right
...
While I haven't modded in a rather long time, taking a quick peek at the code looks quite similar to vanilla civ (lol, if I remember correctly). IMO, getting some cross modder help could bring in all sorts of possibilities. After all, you folks don't have to be on your own little planet after all, do you ?
Well that makes sense, & it could definitely be a huge help to have someone experienced with ins & outs of Civ4 python on board (or at least to do a little tinkering if he's willing). Maybe I will PM him to see if he'd be willing to take a look at the M:C python to see if any enhancements can be made. Is there a way to issue an "invitation" for an outsider to access the project github, or would the github http link itself be enough?
 
Is there a way to issue an "invitation" for an outsider to access the project github, or would the github http link itself be enough?
First of all I'm the one who can add people on github because I started the project. Nobody else has permission to do so. Also everybody has read access even without a github account. Adding people to the project is only needed to provide write permission. I don't want to add people unless they want to actively work on the mod as too lax permission donations could easily become messy. As an absolutely minimum the person should request write permission personally and show their first commit and/or work in another mod to reveal that they aren't full of hot air. One troll can ruin a lot, which is why no github project should give write permissions lightly.

Having said this I would love to add more people and people known from other projects shouldn't have a hard time getting write permission. However they do have to ask themselves. Just adding write permission to all modders hoping that some of them will start working for us isn't the way to go ;)

Also when given write permission there is "the talk" about what to commit and what not to commit. My last pull failed because somebody committed the DLL file again :trouble:
I'm thinking of writing a commit hook, which makes the commit fail if it adds the DLL file. The hardest part is that I need other people to install this script in a hidden location on their own computer. I would like to push it to github, but I'm not sure I can do that, which is the main reason why I haven't worked on it yet.

Maybe the problem would go away with another client. You could try this one: http://www.syntevo.com/smartgithg/
It provides a list of files in the commit when you write the commit message and there is a checkbox next to each file to select which files to commit. I have been using this client ever since I found it as it has a good interface to tell precisely what you changed before you commit. The same interface can be used to tell precisely what changed between different commits in the commit log.
 
I have been looking at python and didn't find something, which would be as plug-and-play as I would like. In fact I only found one interesting thread: http://forums.civfanatics.com/showthread.php?t=517549
I'm not sure we can use the code, but remembering the concept in future additions wouldn't be bad.

I did come up with another idea though. We should make a list of missing python code. It could be a good idea for everything, but starting with python is a start. We could use the wiki, but I propose using the issue tracker: https://github.com/Nightinggale/Medieval_Tech/issues
It's not like we really use it right now anyway. I could add labels saying DLL, python and so on.

I will start to make a brief list here until we know where to actually put it.
  • tech screen resolution
  • City screen resources
    Yields not yet invented should be hidden. The main problem is that the list of resources is generated on game start/load rather than when the screen is opened. This makes it tricky to add something during a game.
  • Special resources should be hidden on the map until invented
    To my knowledge no special resources have been linked to inventions yet

This is what I remember as outstanding tasks. I might have forgotten some as we do not have a list of such tasks (yet). It would be nice if somebody would take a look as I have my hands full with DLL tasks alone.
 
I meant no offense to you or your mod NG, I was honestly trying to help and give you some potential help with your python. I'll stay out of it from now on.
 
I meant no offense to you or your mod NG, I was honestly trying to help and give you some potential help with your python. I'll stay out of it from now on.
:confused:

I'm not offended at all. I would welcome any help you can provide, be it actual coding or just providing info or ideas. If I want people to leave, then I will be a whole lot more clear about it and it needs a very valid reason (like severe spamming or something)

What I wrote about "the talk" was aimed at orlanth as he is the one who committed the DLL and caused a little problem in my end. I wrote it like that because it is like the third time that precise scenario happened. I have no intention of getting orlanth to stop posting or modding either ;)

EDIT: ok now I'm ready to kick myself. I somehow read it as adding Platy to the project without asking him first, hoping that he would join us. I'm not sure why :crazyeye:
However I think we agree that adding somebody like that would be a rather questionable approach, right? :lol:

Adding Drakarska to the project would be entirely different and I have no reason to object. Github still provides read access. Writing access is done by the user creating an account on github himself and then I add that account to the project. I don't think there is an invite function. Github runs statistics on committers, which gets confused if somebody appears under multiple names. Make sure username is set up correctly even before committing locally.
 
Ok, I PMed Drakarska and moved Python stuff to its own thread in the M:C Forum. I'm hoping M:C & 2071 can continue to use the same Python but I guess there may be a few cases where it may need to be different, or have some code chunks with a conditional that checks for a mod flag. (Mainly the issues are that it's currently not possible to access a regular Europe (Earth) screen, and there's the separate Immigration screen rather than picking up emigrants from Earth.

somebody committed the DLL file again
Arg, I didn't even realise that happened :hammer2: The Github for Windows GUI application had actually stopped working properly for me meaning that I had to change to typing git shell commands. I'll try installing smartgit..:crazyeye:
 
Ok, I PMed Drakarska and moved Python stuff to its own thread in the M:C Forum. I'm hoping M:C & 2071 can continue to use the same Python but I guess there may be a few cases where it may need to be different, or have some code chunks with a conditional that checks for a mod flag. (Mainly the issues are that it's currently not possible to access a regular Europe (Earth) screen, and there's the separate Immigration screen rather than picking up emigrants from Earth.
There is a git feature called "cherry-pick" (at least smartGIT calls it that) where you select a commit from the log and add it to your working copy (like you retyped it). This is really interesting because you can get the log for any branch. When I committed the line endings for 2071 I cherry-picked the very same change from M:C. This could be really useful for python changes. However we can also just simply copy the files if they keep being 100% identical, but cherry-pick provides a log and it also works if the files are 98% identical.

My plan is to use the same python files for both mods. I already added gc.isMedievalConquest() and gc.isColonization2071() to tell python what the DLL was compiled for. It returns a bool and the value of this bool is hardcoded at compile time meaning we get this answer with no (serious) performance hit. I even designed this part of the DLL to make it easy to add even more mods (if we are lucky enough for that to happen someday).
 
I found a very interesting mod: http://forums.civfanatics.com/showthread.php?t=193618
I wonder if it can be merged into M:C. That would save some time when updating the tech tree.

Then again is it worth it when you look at coding time? I need to take a closer look to figure it out.

EDIT: I think this would likely be a bad idea. The DLL alone contains 453 blocks of new code. Looks like totally overkill for avoiding some XML editing :(
 
yeah, though a GUI like that could be nice it's not worth that epic amount of DLL work! :crazyeye: - especially since M:C techs aren't exactly like BtS techs which would require even more tweaking. Though the current setup is a little cumbersome it can still be manageable for modders using XML; though some things could use revisiting when Civics are added, e.g. the 6 M:C hardcoded techs, and why should categories like MEDIEVAL_CENSURE, MEDIEVAL_TRADE_TECH, NATIVE_TECH themselves have to be entries in Civ4CivicInfos.xml.

I installed smartGIT and figured out how to clone the M:C master branch from github using it, but what steps should I take in smartGIT to clone the 2071 branch in another folder on my PC? I tried entering https://github.com/Nightinggale/Medieval_Tech/tree/colonization2071 in smartGIT but it couldn't clone from this URL.
 
I started writing a git guide on the wiki. I'm not happy with the result and will need some updating. Feel free to edit layout and add missing info. I wrote a quick start guide really quickly :lol:
https://github.com/Nightinggale/Medieval_Tech/wiki/GIT-start-guide
https://github.com/Nightinggale/Medieval_Tech/wiki/GIT-usage

What you do is you check out M:C, then you go to the branches window (or branches part of the main window), open origin and double click on the branch you want to use. It will ask if you want to make a local copy of it and you say yes (no saves time and HD space, but will be read only). You will then have whatever branch you want. You can even switch branch as often as you like, but that is likely a bad idea as we will (soon?) end up with different graphics files for each mod, which branch switching will not replace.
 
I gave up on the tech screen assistant. Instead I wrote a perl script to assist. This script is called techGraph.pl and is added to the master branch. Just like xmlTagAdd.pl, this script works on the XML files pointed to by YOURMOD.

What it does is read CIV4CivicInfos.xml and then make a dot file (to STDOUT, not a file). This file can then be converted to a graph using graphviz. The clever part here is that it only looks at requirements, not anything else. Graphviz then takes care of placement to make a neat looking overview. This allows setting up requirements and check them without even opening the game.

I planned on adding a graph for col2071 in this post, but it is horrible as setup is far from complete. Instead I added the one generated for M:C as an example. The bubbles in the box to the right are those techs without requirements and where nobody else requires them. The arrows are added to make it vertical as the default horizontal layout sucks. The png is wide enough as it is right now (3611x1541).

In semi related news: now that there are two scripts using code to detect YOURMOD XML location I consider making a library/module for easy access from all scripts. We can then move all scripts to master branch instead of spreading them across multiple branches.
 

Attachments

  • tech.png
    tech.png
    416.9 KB · Views: 87
Cool, thanks! I will check out graphviz; but don't put your already stressed workload into making a custom graph for 2071 though, it should work ok to sketch things in the design doc or view the techtree ingame for those where XML is complete.

I've been trying to get the Planets mapscript to generate the new terrains, so that the needed yields can be accessed ingame, but am kind of tearing my hair out over it :hammer::crazyeye: I posted in platyping's thread to try to get some python help with the script (http://forums.civfanatics.com/showthread.php?t=497337&page=63), but maybe you could take a look at it to see if you think this is on the right track?
 
Cool, thanks! I will check out graphviz; but don't put your already stressed workload into making a custom graph for 2071 though
Considering I already know graphviz and most of the script is copy paste of the other scripts, I would say it wasn't tricky or time consuming to make.

it should work ok to sketch things in the design doc or view the techtree ingame for those where XML is complete.
Using a script to get the data from XML mean the graph will display whatever the game will see. Copy paste errors and typos will show up, which isn't true for the design docs. This mean it is as much a proofread of the XML file as it is design of the techtree.

I've been trying to get the Planets mapscript to generate the new terrains, so that the needed yields can be accessed ingame, but am kind of tearing my hair out over it :hammer::crazyeye: I posted in platyping's thread to try to get some python help with the script (http://forums.civfanatics.com/showthread.php?t=497337&page=63), but maybe you could take a look at it to see if you think this is on the right track?
I'm not sure I'm a big help there. I can't see your local modifications and I haven't really worked with map generators before.

Check that the terrain types are similar to what is defined in XML TYPE
This shouldn't be tricky. Just do as in Medieval_FaireWeather.py:
Code:
europeNorth = gc.getInfoTypeForString("EUROPE_NORTH")
This will give you the index in the XML file you need and you can add/remove in XML and as such change indexes and python will still figure it out. If the string is missing in XML, then the game will assert when generating the map and tell which string it can't find. If you want to add terrain families like:
Each planet has:
1 type A
2 type B
2 type C

then we can talk about how to make that. We can also do something like that and state that type A and type C can't exist on the same planet, sort of like don't mix extremely hot with ice and stuff like that.
 
good-news-everyone.jpg


Thanks to the puissant python help of platyping, at long last progress on the Planets mapscript is enabling generation of multiple climate types. :king::goodjob: Only Aquatic and Temperate are implemented yet, but once they are all in this should allow in-game access to each of the balanced yields.:cool:

behold.. the swamp planet of Squelchia :p
attachment.php
 
Ok I'll put together a git commit soon for this weekend; I haven't rebuilt and loaded your new DLL to try with 2071 yet but am hoping it will go smoothly. I have to give platy all the credit for the new Planets mapscript solution, he basically came up with a system that checks what Area (continent/planet) the plot belongs to, then uses modular division to assign a set of terrain types based on the Area ID! I had been tearing my hair out trying approaches like making it generate terrain during plottype creation, there's no way I would've thought of that lol. :science::crazyeye:

Spoiler :

def initFractals(self):
self.deserts.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
self.iDesertTop = self.deserts.getHeightFromPercent(self.iDesertTopPercent)
self.iDesertBottom = self.deserts.getHeightFromPercent(self.iDesertBottomPercent)

self.plains.fracInit(self.iWidth, self.iHeight, self.grain_amount+1, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
self.iPlainsTop = self.plains.getHeightFromPercent(self.iPlainsTopPercent)
self.iPlainsBottom = self.plains.getHeightFromPercent(self.iPlainsBottomPercent)

self.marsh.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
self.iMarshTop = self.marsh.getHeightFromPercent(self.iMarshTopPercent)
self.iMarshBottom = self.marsh.getHeightFromPercent(self.iMarshBottomPercent)

self.tundra.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
self.iTundraTop = self.tundra.getHeightFromPercent(self.iMarshTopPercent)
self.iTundraBottom = self.tundra.getHeightFromPercent(self.iMarshBottomPercent)

self.variation.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)

self.terrainDesert = [self.gc.getInfoTypeForString("TERRAIN_DESERT"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_HOT")]
self.terrainPlains = [self.gc.getInfoTypeForString("TERRAIN_PLAINS"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_DRY")]
self.terrainIce = [self.gc.getInfoTypeForString("TERRAIN_SNOW"),
self.gc.getInfoTypeForString("TERRAIN_SNOW")]
self.terrainTundra = [self.gc.getInfoTypeForString("TERRAIN_TUNDRA"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_COLD")]
self.terrainGrass = [self.gc.getInfoTypeForString("TERRAIN_GRASS"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_FERTILE")]
self.terrainMarsh = [self.gc.getInfoTypeForString("TERRAIN_MARSH"),
self.gc.getInfoTypeForString("TERRAIN_AQUATIC_WET")]

def getLatitudeAtPlot(self, iX, iY):
return None

def generateTerrain(self):
terrainData = [0]*(self.iWidth*self.iHeight)
for x in range(self.iWidth):
for y in range(self.iHeight):
iI = y*self.iWidth + x
pPlot = CyMap().plot(x,y)
iArea = pPlot.getArea()
iType = iArea % 2
terrain = self.generateTerrainAtPlot(x, y, iType)
terrainData[iI] = terrain

#remove marsh next to desert
for x in range(self.iWidth):
for y in range(self.iHeight):
iIndex = y * self.iWidth + x
if terrainData[iIndex] in self.terrainMarsh:
for iDirection in range(CardinalDirectionTypes.NUM_CARDINALDIRECTION_TYPES):
pNewPlot = plotCardinalDirection(x, y, CardinalDirectionTypes(iDirection))
if pNewPlot.isNone(): continue
if pNewPlot.getTerrainType() in self.terrainDesert:
pPlot = CyMap().plot(x,y)
iArea = pPlot.getArea()
iType = iArea % 2
terrainData[iIndex] = self.terrainGrass[iType]
break

return terrainData

def generateTerrainAtPlot(self,iX,iY):
plot = self.map.plot(iX, iY)

if (plot.isWater()):
return self.map.plot(iX, iY).getTerrainType()

terrainVal = self.terrainGrass[iType]
desertVal = self.deserts.getHeight(iX, iY)
plainsVal = self.plains.getHeight(iX, iY)
marshVal = self.marsh.getHeight(iX, iY)
tundraVal = self.tundra.getHeight(iX, iY)
if ((desertVal >= self.iDesertBottom) and (desertVal <= self.iDesertTop)):
terrainVal = self.terrainDesert[iType]
elif ((marshVal >= self.iMarshBottom) and (marshVal <= self.iMarshTop) and plot.isFlatlands()):
terrainVal = self.terrainMarsh[iType]
elif ((plainsVal >= self.iPlainsBottom) and (plainsVal <= self.iPlainsTop)):
terrainVal = self.terrainPlains[iType]
elif ((tundraVal >= self.iTundraBottom) and (tundraVal <= self.iTundraTop)):
terrainVal = self.terrainTundra[iType]
if (terrainVal == TerrainTypes.NO_TERRAIN):
return self.map.plot(iX, iY).getTerrainType()

return terrainVal


edit: I see the Makefile is telling it to look in $(PROGRAMFILES)\Microsoft Visual C++ Toolkit 2003 , but it looks like that's where the files are in my system.

edit: I tried hardcoding the Makefile paths for my system like this:

#### Paths ####
#
# Note: $(PROGRAMFILES) converts to "C:\Program Files", "C:\Program Files (x86)" or whatever fits your system.
# run "nmake.exe /P" in cmd.exe to see what it is on your system
TOOLKIT="C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin"
PSDK="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A"
## Uncomment to have newly compiled dlls copied to your mod's Assets directory
YOURMOD=$(PROGRAMFILES)\Steam\steamapps\common\civilization iv colonization\Mods\2071

## Civ install path
## Path to the directory where boost and python is stored
## Overwritten by enviroment variable CIV4_LIB_INSTALL_PATH
CIV4_PATH=$(PROGRAMFILES)\Steam\steamapps\common\civilization iv colonization\CvGameCoreDLL

but am getting this result:
Spoiler :
1>------ Build started: Project: Medieval_Tech, Configuration: Colonization 2071 Win32 ------
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> The input line is too long.
1>NMAKE : fatal error U1077: '""C:\Program' : return code '0x1'
1> Stop.
1>
1> jom 1.0.13 - empower your cores
1>
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGame.obj] Error 1
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameAI.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameTextMgr.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGlobals.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvHallOfFameInfo.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInfos.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameCoreUtils.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInfoWater.obj] Error 1
1> '""C:\Program' is not recognized as an internal or external command,
1> operable program or batch file.
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameCoreDLL.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInitCore.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvMap.obj] Error 1
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvMapGenerator.obj] Error 1
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "set TARGET=Assert
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: nmake precompile
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: bin\jom build" exited with code 2.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
I pulled the master branch using Smartgit to compile a DLL, but am getting errors on compiling.

It appears like it's looking for a file cl.exe in the bin directory, but I don't see this in the DLL_Sources/bin on github. :confused:
Spoiler :
1>------ Build started: Project: Medieval_Tech, Configuration: Colonization 2071 Win32 ------
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> The system cannot find the path specified.
1> The system cannot find the path specified.
1> Error running fastdep.
1> Assert-fast causes this issue if Assert or Assert-fast has never been compiled before.
1> It is safe to ignore this error in that case, but only in that case!
1> _precompile.cpp
1>c1xx : fatal error C1083: Cannot open source file: '_precompile.cpp': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1> Stop.
1>
1> jom 1.0.13 - empower your cores
1>
1> CvGame.cpp
1>CvGame.cpp(3): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvGameTextMgr.cpp
1>CvGameTextMgr.cpp(13): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvGameCoreUtils.cpp
1>CvGameCoreUtils.cpp(1): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGame.obj] Error 2
1> CvGameAI.cpp
1>CvGameAI.cpp(3): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvGameCoreDLL.cpp
1>CvGameCoreDLL.cpp(1): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvGlobals.cpp
1>CvGlobals.cpp(5): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvHallOfFameInfo.cpp
1>CvHallOfFameInfo.cpp(1): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvInfos.cpp
1>CvInfos.cpp(10): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvInfoWater.cpp
1> CvInitCore.cpp
1> CvMap.cpp
1>CvMap.cpp(11): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1> CvMapGenerator.cpp
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameAI.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameCoreDLL.obj] Error 2
1>CvInitCore.cpp(3): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1>CvInfoWater.cpp(15): fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directoryCvMapGenerator.cpp(1) : fatal error C1083: Cannot open precompiled header file: 'temp_files\Assert\CvGameCoreDLL.pch': No such file or directory
1>
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInitCore.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGlobals.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvHallOfFameInfo.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInfoWater.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvMap.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvInfos.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvMapGenerator.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameTextMgr.obj] Error 2
1> jom: C:\Users\DR\Desktop\biz\civ4\dll\DLL_Sources\Makefile [temp_files\Assert\CvGameCoreUtils.obj] Error 2
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "set TARGET=Assert
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: nmake precompile
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: bin\jom build" exited with code 2.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
It looks simple enough now that I can read it. Figuring it out on my own on the other hand.... good thing I didn't have to do that :)
There is one thing I don't get. self.grain_amount+1 for plains and self.grain_amount for everything else. Is that to make extra plains or something?

Another thing. It would appear that it is the same code for all types of terrain. We could make an array of terrain types and then have the code just once. This would have the bonus that we could make python code to generate the array based on XML settings. As a result we would be able to add new terrain to XML, set settings accordingly and a then unmodified script would be able to use those new terrain types. Such a self configuring map generator could be beneficial for all mods.
 
Back
Top Bottom