1492: Global Colonization. Mod development


Works but way too slow! Like 30 min for 168Mb...

I've been told weplayciv.com is the best for file hosting, but there's always filefront or mediafire...

I think your mod sounds promissing so maybe you should think about adding a link to the "Download Center" here and a thread in the "Civ4Col - Mods and Files" sub-forum so that people know it is downloadable...
 
Oh and could you also release the source code?

Thanks,

Aymerick
Now I'm working on patch/fix of "1492: Global Colonization. Resource Pack". I already found and fixed some my errors, plus made a number of changes. I will follow your advice and will use one of filehosts you mentioned, when next version will be ready.

Here the source code:
 

Attachments

Hi KJ,

Can you tell me how the hell did you manage to add new yield types without using modules?!? :crazyeye: I've never been able to do that!

I've tried your mod a little and there's 2 things:
First, some of the icons, text links and symbols in the civilopedia look weird. This might be because you change the font somewhere in python?

Also, you have alot of new yields and the Europe ressource table (and city) gets too small... The prices in Europe are really hard to understand... I once tought about making the ressource table on 2 rows maybe you should try that! It shouldn't be too hard...

Aymerick
 
Hi KJ,

Can you tell me how the hell did you manage to add new yield types without using modules?!? :crazyeye: I've never been able to do that!
Hi, Aymerick!

I can see no problems to manage new yield types without modules at all. Maybe I'm wrong, but to my opinion mainly this part of CvPlayerAI.cpp is responsible for correct yield distribution.

Spoiler :
Code:
bool CvPlayerAI::AI_isYieldFinalProduct(YieldTypes eYield) const
{
	if (!GC.getYieldInfo(eYield).isCargo())
	{
		return false;
	}
	
	bool bFinal = true;
	
	switch (eYield)
	{
		case YIELD_FOOD:
		case YIELD_LUMBER:
			bFinal = false;
			break;

		case YIELD_STONE:										//	KJ RESOURCES
			bFinal = true;
			break;
			
		case YIELD_ORE:			
		{
				int iLoop;
				CvCity* pLoopCity = NULL;
				for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
				{
					if (pLoopCity->AI_getNeededYield(eYield) > 0)
					{
						bFinal = false;
						break;
					}					
				}
			}
			break;
		case YIELD_SILVER:
		case YIELD_GOLD:										//MORE_YIELD_TYPES		05/05/09		Aymerick
		case YIELD_GEMS:										//	KJ RESOURCES		
			bFinal = true;
			break;

		case YIELD_COTTON:
		case YIELD_FUR:
		case YIELD_SUGAR:
		case YIELD_TOBACCO:
		{
				int iLoop;
				CvCity* pLoopCity = NULL;
				for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
				{
					if (pLoopCity->AI_getNeededYield(eYield) > 0)
					{
						bFinal = false;
						break;
					}					
				}
			}
			break;

		case YIELD_DRUGS:										//	KJ RESOURCES
		case YIELD_INDIGO:										//MORE_YIELD_TYPES		05/05/09		Aymerick
		case YIELD_INCENSE:										//	KJ RESOURCES
		case YIELD_COFFEE:										//MORE_YIELD_TYPES		05/05/09		Aymerick
		case YIELD_COCOA:										//	KJ RESOURCES
		case YIELD_TEA:											//	KJ RESOURCES
		case YIELD_SPICES:										//	KJ RESOURCES
		case YIELD_IVORY:										//	KJ RESOURCES		
		case YIELD_EBONY:										//	KJ RESOURCES
			bFinal = true;
			break;
			
		case YIELD_CLOTH:
		case YIELD_COATS:
		case YIELD_RUM:
		case YIELD_CIGARS:
			bFinal = true;
			break;
			
		case YIELD_TOOLS:
		case YIELD_MUSKETS:
		case YIELD_HORSES:
			bFinal = false;
			break;
			
		case YIELD_TRADE_GOODS:
		case YIELD_ARTISANS_PRODUCTS:							//	KJ RESOURCES
		case YIELD_SLAVES:										//	KJ RESOURCES		
			bFinal = true;
			break;
			
		case YIELD_HAMMERS:
		case YIELD_BELLS:
		case YIELD_CROSSES:
			bFinal = false;
			FAssertMsg(false, "Selling intangibles?");
			break;
		default:
			FAssert(false);
	}
	
	return bFinal;	
}
The order of "YIELD_" here should be the same as in CIV4YieldInfos.xml. All other parts are very simple. It's mainly graphic works (icons, etc.).

Some months ago I tried to convert one of my mods from "Model" serie from a "normal" system to modular one, however I had a lot of serious problems. Some of my units stopped to work correctly, etc.etc. As result I decided to develop "1492: Global Colonization" as a normal mod (without modules).

However, now I have to move all "Professions" and new "Custom Civilization" in two modules. As you can see in CivPedia of current version of "1492: Global Colonization", some of units (Walrus Hunter or Gemstones Miner) look correctly as units, however they have wrong graphics in "Professions" section of CivPedia. I tried to fix this error without modular loading, however I couldn't. With modular loading this problem even doesn't appear at all. All units and professions look absolutely correctly.

Also, you have alot of new yields and the Europe ressource table (and city) gets too small... The prices in Europe are really hard to understand... I once tought about making the ressource table on 2 rows maybe you should try that! It shouldn't be too hard...
"too small"... Strange, on my monitor it looks OK.

Anyway "making the resource table on 2 rows" is already done. I used one of version of brand-new VET Screen Mod and Europe screen now could look like on this screen:



I especially made serious distortion in VET Screen Mod codes to make my changes more visible. Here

Code:
BOX_HEIGHT = self.YResolution * 2 / 33

was changed on
Code:
BOX_HEIGHT = self.YResolution * 2 / 27

VET Screen Mod 1.1.1 opens great possibilities to add many new resources in the game. Some of them like salt, coal, leather, boots, etc, probably sulfur if we decide to produce gunpowder for our military units, I already proposed here.

.... some of the icons, text links and symbols in the civilopedia look weird. This might be because you change the font somewhere in python?
You are absolutely right. They are graphic errors. I tried to fix them, however I could not find the source of distortion. Text and icons in some places really look weird.

If somebody know the reason or has some ideas how to fix such graphic distortions, please, propose your variant. I will remove these graphical errors in the forthcoming patch. Thank you very much in advance.

Any critical remarks and your proposals how to improve mod are welcome.
 
I love your mod. However, I'm having problems when I try to load a game after playing for a couple of hundred turns. I can start the game, load the mod, and when I click on a saved game it says Colonization has stopped working. However, if I start a new game I have no problems at all. The changes you've made are great and I'm looking forward to further updates. I haven't had any of these problems playing with the regular verson of Col nor with any of the other mods. Unfortunately, I'm using Vista which is probably my problem.
Thanks,
Dwayne
 
I love your mod. However, I'm having problems when I try to load a game after playing for a couple of hundred turns. I can start the game, load the mod, and when I click on a saved game it says Colonization has stopped working. However, if I start a new game I have no problems at all. The changes you've made are great and I'm looking forward to further updates. I haven't had any of these problems playing with the regular verson of Col nor with any of the other mods. Unfortunately, I'm using Vista which is probably my problem.
Thanks,
Dwayne
Hi, Dwayne!

I develop "1492: Global Colonization" on Windows XP. I have no Vista or Windows 7 systems available for testing.

However, I think the problem you have could be the problem of the mod itself, but not your operation system. Unfortunately, sometimes the mod really have CTD error. I already found a number of reasons and fixed them. But fortunately all these crashes to desktop are not critical. I can restart my playing from one of previous save files or from one of auto-saves. Sometimes not from the last one, but from one of previous saves.

Please, upload here your last save file recorded before crash, if you couldn't continue your game from no one of your previous game save files.
 
Hi KJ,

I uploaded my latest failed game save file. I've gotten used to saving every other turn and then immediately try loading it to see if it works. If not, then I roll back to the last saved file that worked and re-conqueor.

Thanks for looking at this.
Dwayne
 

Attachments

KJ,

It appears that my scout, the one without any promotions, is causing my problem on my latest game. In the saved game, if I move him to the left into unexplored territory, my game stops.

Dwayne
 
Hi KJ,

I uploaded my latest failed game save file. I've gotten used to saving every other turn and then immediately try loading it to see if it works. If not, then I roll back to the last saved file that worked and re-conqueor.

Thanks for looking at this.
Dwayne
Hi, Dwayne!

I renamed "1492 Global Colonization" to "Global Conquest 1492" to read your file.
Then I tried to start your latest failed game save file with debug CvGameCoreDLL.dll.
I got immediate CTD without any alarm messages before. As far as I know, such behaviour is usually related with a graphic error.

My analysis of Colonization.exe.dmp with WinDbg gave me such answer:

Spoiler :
AppName: colonization.exe AppVer: 1.0.0.1 ModName: colonization.exe
ModVer: 1.0.0.1 Offset: 0054a857

or more detailed:

FAULTING_IP:
Colonization!initCvPythonExtensions+27b077
0094a857 8b572c mov edx,dword ptr [edi+2Ch]

EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0094a857 (Colonization!initCvPythonExtensions+0x0027b077)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 0000002c
Attempt to read from address 0000002c

PROCESS_NAME: Colonization.exe

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".

EXCEPTION_PARAMETER1: 00000000

EXCEPTION_PARAMETER2: 0000002c

READ_ADDRESS: 0000002c

FOLLOWUP_IP:
Colonization!initCvPythonExtensions+27b077
0094a857 8b572c mov edx,dword ptr [edi+2Ch]

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

FAULTING_THREAD: 00000ee4

BUGCHECK_STR: APPLICATION_FAULT_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ

PRIMARY_PROBLEM_CLASS: NULL_CLASS_PTR_DEREFERENCE

DEFAULT_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE

LAST_CONTROL_TRANSFER: from 00940361 to 0094a857

STACK_TEXT:
WARNING: Stack unwind information not available. Following frames may be wrong.
0012fbe0 00940361 12fe03b8 00000000 00000001 Colonization!initCvPythonExtensions+0x27b077
0012fc00 006a1fb1 00000001 12fe03b8 12fe7800 Colonization!initCvPythonExtensions+0x270b81
0012fc24 006a2044 0012fc01 12fe7800 0e0550f8 Colonization+0x2a1fb1
00000000 00000000 00000000 00000000 00000000 Colonization+0x2a2044


STACK_COMMAND: ~0s; .ecxr ; kb

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: Colonization!initCvPythonExtensions+27b077

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: Colonization

IMAGE_NAME: Colonization.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 49a88196

FAILURE_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE_c0000005_Colonization.exe!initCvPythonExtensions

BUCKET_ID: APPLICATION_FAULT_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_Colonization!initCvPythonExtensions+27b077

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOn...0_1/49a88196/c0000005/0054a857.htm?Retriage=1

Followup: MachineOwner
---------

I know "initCvPythonExtensions" message and I already discussed this error here. EmperorFool recommended to check the game graphics and he was absolutely right. I found an error in the ART_DEF_IMPROVEMENT_TEA_PLANTATION description in the CIV4ArtDefines_Improvement.xml file. My experiments in WordlBuilder confirmed that the game has CTD each time when I tried to insert Tea Plantatation on the map.

I included the corrected CIV4ArtDefines_Improvement.xml file in archive.
Unrar this file in any directory and exchange the CIV4ArtDefines_Improvement.xml in your .....\Assets\XML\Art\ directory.
At least one of found error will be fixed. I'm not sure that you could continue your game, however this error with Tea plantation in your new game will absent.
 

Attachments

i get the following error heaps of times on start up:

Tag: MEMORY_MISSIONARY_FAIL in info class was incorrect
Current XML file is: xml\Civilizations/CIV4LeaserdHeadInfos.xml

EDIT: i cant start any games, even with Earth31 and Huge map settings selected :(
 
I tried it a few days ago. VERY good work.
Though a couple things you should know:
-The Portugal Colony leaderhead froze in mid-animation.
-Most (not all) of the new civs lack music. It feels empty :sad:
-I mad a map and put a slave recource on top of a native village. I came back and the city held no slaves.
-The Plant New Valueble Forest and a slew of other worker improvements are blacked out.
-You can't buy specialists (Is it part of the mod itself?0
 
I tried it a few days ago. VERY good work.
Though a couple things you should know:
-The Portugal Colony leaderhead froze in mid-animation.
-Most (not all) of the new civs lack music. It feels empty :sad:
-I mad a map and put a slave recource on top of a native village. I came back and the city held no slaves.
-The Plant New Valueble Forest and a slew of other worker improvements are blacked out.
-You can't buy specialists (Is it part of the mod itself?0
Thank you, LastLegionare, for your comments.

-The Portugal Colony leaderhead froze in mid-animation.
-Most (not all) of the new civs lack music. It feels empty :sad:
You are right. I just collected all "European-type" civilizations in "1492: GC. Resource pack". I do not plan to introduce new Europian civilizations. However, a quite large number of native civilizations and new leaders will be added for Africa, Middle East, Asia and Australia-Polynesia. Music and audio files will be added at this moment.

-I mad a map and put a slave recource on top of a native village. I came back and the city held no slaves.
Both "SLAVES" and "ARTISANS_PRODUCTS" are not activated in the current version.

The idea of "SLAVES" is clear. They should be present in the game if we want to conform to historical truth. How exactly? This is a question. Maybe only as "goods" similar to "spices" for instance, or as "units" that could be used on your plantations as workers or even to be educated? I don't know yet.

The idea of "ARTISANS_PRODUCTS" is different. At the moment, the natives have European money since turn 0. Where? The first Europeans exchanged their goods ("TRADE_GOODS", wine, weapons) to the products of labor of the Indians. In other words, was a natural exchange of goods from Europe to "ARTISANS_PRODUCTS". The idea of the market for such exchange has already proposed here on forum and I hope it will be realized.

-The Plant New Valueble Forest and a slew of other worker improvements are blacked out.
Could you, please, publish a screen of this defect.

-You can't buy specialists (Is it part of the mod itself?0
No, you can buy many specialists in Europe except Tabaconist because as far as I remember, tabac was unknown in Europe in 1492.

However, much more effective way is available in this mod. You concentrate your effors on the city population growth and " produce" Free Colonist. Such unit could be very easily educated to any speciality directly inside your city: Farmer, Fisherman, Cowboy, Carpenter, etc. Educated by working as Farmer, Fisherman, Cowboy, Carpenter, etc. on the corresponding tile or in the building without school/college/university.
 
Ah. You should consider sub-foruming this.

As for adding new empires, if you make a world map, some of the civilized world (Japan,India) would be bare. I thought of making such empires "static" (They can make any goods or build any building the colonists can, but only stay as one empire.)

And, if it's possible, making civilizations have ethnically different buildings and units might add a lot to the mod.

And the graphic issue didn't appear when I tested it again. ???

All in all, you're doing an excellent job and far better then I could even dream of. There are few mods for colonization, as we all know.
 
I just downloaded this (very nice and can't wait for a "final" version!) and I'm wondering where in the Europe screen you can buy professionals and/or boats. Is this something you can't do in this mod or am I just missing something?

Thanks!
 
Back
Top Bottom