How do I get months in a game?

wolfman101

Chieftain
Joined
Sep 28, 2006
Messages
6
I have been looking at Python, XML, and the SDK files all day and I cant for the life of me figure out how to get month increments like in the Omens scenario.

Basically, what I am planning on doing is taking the normal game speed and dividing the YearIncrement by 3 and multiplying the TurnsPerIncrement by 3. So, the ancient era will have turns of 13 years and 4 months for example. And the turns at the end of the game will be 4 months each.

I have looked through practically every file in the Omens directory and the assets files for warlords and CIV4 and I cant figure out how they did it, so if I could just be pointed in the right direction I would appreciate it alot.
 
I believe I found the necessary code in CvGame.ccp. Now all I need is for someone to tell me how to get the changes I make to affect the game.

Do I need to add every single file in the SDK to a project and compile the whole thing?
 
I cant for the life of me figure out how to get month increments like in the Omens scenario.

You can find the file 'Omens.CivWarlordsWBSave' in ..\Mods\Omens\PublicMaps. Open it up with a Text Editor and you find:

Code:
BeginGame
	Era=ERA_ANCIENT
	Speed=GAMESPEED_NORMAL
	[b]Calendar=CALENDAR_MONTHS[/b]
	ForceControl=FORCECONTROL_SPEED
	ForceControl=FORCECONTROL_OPTIONS
	ForceControl=FORCECONTROL_VICTORIES
	ForceControl=FORCECONTROL_MAX_TURNS
	ForceControl=FORCECONTROL_MAX_CITY_ELIMINATION
	Victory=VICTORY_DOMINATION
	Victory=VICTORY_CONQUEST
	GameTurn=0
	MaxTurns=300
	StartYear=1754
	Description=TXT_KEY_CONVERSION_INTRO
	ModPath=Mods\Omens
EndGame

That's how the game recognizes that the calendar is set to months. I've never tried it but, presumably, you can do this in the WorldBuilder.

Do I need to add every single file in the SDK to a project and compile the whole thing?

Yes, if you want to put in your own calendar system, you'll have to build your own CvGameCoreDLL.dll.
 
Thanks for the help. But, I am really doing this for the modding experience. So, I need to figure out how to get the game to always start in CALENDAR_MONTHS.

I tried building my own CvGameCoreDLL.dll and I didnt get very far. I am going to try again later

I also just tried putting in a new element in the XML files. While I suceeded in making an element that didnt crash the game, it didnt actually affect the game. Basically, I have an element in the gamespeedinfo.xml that I was hoping would set eCalendar to CALENDAR_MONTHS, but I guess you cant do that without something in the .dll

edit: I am so dumb, I just noticed there is a project file in the SDK folder. Hopefully, I will be able to work on this more tommorow and get something compiled and working.
 
GlobalDefines.xml, find calendar_default and change to calendar_months.
 
You are my hero Depx.

I think I was about 3/4 of the way to modifying the SDK to add a new XML variable in GameSpeedInfo.xml that would do that.

Edit: Now, I have months, but the turn increments dont work. Anyone have some ideas?
 
Back
Top Bottom