Change no of turns per day and night turns

Post new mods and scenarios here.
Post Reply
Hargrem
Posts: 16
Joined: Fri Dec 23, 2011 7:38 pm

Change no of turns per day and night turns

Post by Hargrem »

Dear All

I've been enjoying the excellent ground tactics 3.1 mod.
I'd now like to play it by reinstating the night turns & increasing the no of stategic turns back to the original 4.
I know the Campaign.txt file is involved...

The original game entries are:
Campaign Length 4
Strategic Turns per day 4
Night turns 1,1,1,1

The 3.1 mod reads:
Campaign Length 5
Strategic Turns per day 3
Night turns 1,0,0,0,0

So, isn't it just a case of changing the entries to:
Campaign Length 5
Strategic Turns per day 4
Night turns 1,1,1,1,1

However, I get the error message:
Invalid Number of 0 days in C:/etc, etc, Campaign.txt.

What am I missing?

Thanks
Matthew
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Change no of turns per day and night turns

Post by SteveMcClaire »

The numbers for each entry should appear by themselves, without accompanying text. Possibly you're already doing this, but I wasn't sure from your description. For example, you'd want the the campaign length to appear like this:

5


You can use the "#" character at the start of the line to put a comment in the file, which will be ingored by the game, so by default the file usually looks like this:

# Campaign length ...
5


The position of the entries in the file determine their meaning, so you have to make sure what you change is the same line in the file as the game expects. For example, campaign lenght is the first non-comment line, and strategic turns per day is the second non-comment line, etc.

Hope that helps.

Steve
Hargrem
Posts: 16
Joined: Fri Dec 23, 2011 7:38 pm

RE: Change no of turns per day and night turns

Post by Hargrem »

Steve
Thanks for your prompt reply. I think I understand what you're saying and I think I'm doing that - I've tried again, breating a new file, but same error message...
I've attached the file - perhaps you would be kind enough to have a look?
Regards
Matthew
Attachments
Campaign.txt
(7.24 KiB) Downloaded 11 times
berndn
Posts: 206
Joined: Fri Jan 05, 2007 9:29 am

RE: Change no of turns per day and night turns

Post by berndn »

I'm not sure but if you check the file there are several comments (#) enclosed with " like in this from the beginning:

Code: Select all

 #########################################################################
 "# Campaign.txt for ""The Longest Day"""
 ##########################################################################
 "# Campaign length, in days, max is 25"
 

I believe it should be

Code: Select all

 #########################################################################
 # Campaign.txt for ""The Longest Day""
 ##########################################################################
 # Campaign length, in days, max is 25
 

How is this generated?
User avatar
SteveMcClaire
Posts: 4305
Joined: Mon Nov 19, 2007 9:31 pm

RE: Change no of turns per day and night turns

Post by SteveMcClaire »

Yes, the quotation marks are going to cause the game to parse the file incorrectly. Those will need to be removed or the file re-saved with a different option so they're not present.

Merry Christmas,

Steve
berndn
Posts: 206
Joined: Fri Jan 05, 2007 9:29 am

RE: Change no of turns per day and night turns

Post by berndn »

Merry Christmas Steve!
Hargrem
Posts: 16
Joined: Fri Dec 23, 2011 7:38 pm

RE: Change no of turns per day and night turns

Post by Hargrem »

Thanks guys - I've cracked it and it seems obvious now, but I'll explain what I did, so that it might help other modders not make the same mistake as me!!!
I'd made some changes to some of the other data files (soldiers, teams & weapons). All these files I modded through Excel, using the conversion via delimited text files, etc, as you do when working from the downloadable workbook.
I automatically did the same for the Campaign.txt file, so when I took on board yours and Steve's comments, I checked what I was saving into my modded file and then reopened it and there were no additonal " " marks...
This puzzled me - how were you seeing " " marks that I wasn't???
Then it occurred to me to open my modded Campaign.txt file in text (rather then excel) and there were all the additional " " marks plainly visible!
So, simple! I just went back to the original txt file, opened it in text, modded and saved it in text and it worked first time!
The only thing this doesn't answer is why excel puts the additional " " marks in the campaign file, but not in, say, a modded AlsTeams.txt file. But doesn't really matter if you know which to use...
Thanks again - easy when you know how...

Is there any guide that covers do's and don'ts like that?
Also, is there any Q & A guide for beginner modders for doing certain things, eg, if you want to make hedges impassable, open this file and change these columns (something I'm not sure on) or if you want to change the armour thickness of a vehicle, open this and do this (which I can do), etc, etc.

Kind regards
Matthew
Post Reply

Return to “Mods and Scenarios”