Altering the Squad File
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
-
- Corporal - Strongpoint
- Posts: 60
- Joined: Fri Apr 24, 2015 1:30 am
Altering the Squad File
I have successfully added two units to a back up (!) of the Squad file for a campaign I am working on involving the various Highland clans. I added several more units to the file and went to open the editor and I managed to crash everything - boom! right to the ground. I wanted to get a screen shot of the squad file but could not. Running an eye over the additions I could not immediately see the problem. Here are the symptoms I saw that might help. First, when the game crashed I got an error message that said:
Duplicate name in Master Squads file: CLAN (0).
Then there was a complete fail followed by the following Dear John lines...
Unhandled Exception ExpCode OX80000003
ExpFlags:0 ExpAddress: 0x0048FFDD
Please Report.
Okey Dokey...I have now reported it.
I did triple check to see that I hadn't done something like give them all the same ID number, or something of that nature.
Any thoughts?
Duplicate name in Master Squads file: CLAN (0).
Then there was a complete fail followed by the following Dear John lines...
Unhandled Exception ExpCode OX80000003
ExpFlags:0 ExpAddress: 0x0048FFDD
Please Report.
Okey Dokey...I have now reported it.
I did triple check to see that I hadn't done something like give them all the same ID number, or something of that nature.
Any thoughts?
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
You have probably given two units the same name in the Name column, (Column A). (Or given a unit the same name as one of the existing units).
All the names in that column have to be unique.
You should not edit even a backup of the Squads file in the main installation, because there will be issues if we change the Squads file in a future update.
What you are really supposed to do is put a clone of the Squads file in your campaign and make the changes there. The program will automatically use the local squads file instead of the core Squads file, provided that you have #REPLACE in cell A1.
This will have the advantage that your scenario will continue to work correctly even if we make changes to the core Squads file in future updates.
All the names in that column have to be unique.
You may have already done it as I suggest below, but I will mention it just in case:I have successfully added two units to a back up (!) of the Squad file for a campaign I am working on
You should not edit even a backup of the Squads file in the main installation, because there will be issues if we change the Squads file in a future update.
What you are really supposed to do is put a clone of the Squads file in your campaign and make the changes there. The program will automatically use the local squads file instead of the core Squads file, provided that you have #REPLACE in cell A1.
This will have the advantage that your scenario will continue to work correctly even if we make changes to the core Squads file in future updates.
Richard Bodley Scott
Re: Altering the Squad File
Only two blue allies dragoons in the squads file. I cloned them, placed them at bottom of file and then edited them to nos 2 and 3, and ids to 126 and 127. Editor crashes "duplicate Blue Bayonet RG" ??? . Worse still, removed clones resaved to original version. Editor still crashes with same message?? Replaced squad file with copy of original. Now OK. But if I try cloning again get same crash. Help!
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
Every unit has to have a unique name in the squads file. So when you clone units you need to give the clones new names in the Name column, as well as unique IDs.edward77 wrote:Only two blue allies dragoons in the squads file. I cloned them, placed them at bottom of file and then edited them to nos 2 and 3, and ids to 126 and 127. Editor crashes "duplicate Blue Bayonet RG" ??? . Worse still, removed clones resaved to original version. Editor still crashes with same message?? Replaced squad file with copy of original. Now OK. But if I try cloning again get same crash. Help!
I am not sure what you mean by "edited them to nos 2 and 3"
Richard Bodley Scott
Re: Altering the Squad File
Well, there are originally only two Blue dragoons in the squads file, BlueDragoon and BlueDragoon1. I cloned them to BlueDragoon2 and BlueDragoon3 with id nos 126 and 127 at the bottom of the list.
Further question:- Do all Blue units have to be Allies and Red units have to be Axis?
Further question:- Do all Blue units have to be Allies and Red units have to be Axis?
Re: Altering the Squad File
Surely this means that you have two units named Blue_Bayonet_RG in the Squads.csv file. It should have nothing to do with the Dragoons.edward77 wrote:Only two blue allies dragoons in the squads file. I cloned them, placed them at bottom of file and then edited them to nos 2 and 3, and ids to 126 and 127. Editor crashes "duplicate Blue Bayonet RG" ??? . Worse still, removed clones resaved to original version. Editor still crashes with same message?? Replaced squad file with copy of original. Now OK. But if I try cloning again get same crash. Help!
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
No, it is just a naming convention to keep things logical.edward77 wrote:Well, there are originally only two Blue dragoons in the squads file, BlueDragoon and BlueDragoon1. I cloned them to BlueDragoon2 and BlueDragoon3 with id nos 126 and 127 at the bottom of the list.
Further question:- Do all Blue units have to be Allies and Red units have to be Axis?
Richard Bodley Scott
Re: Altering the Squad File
The mystery thickens! I went back to the original file which we know works, edited both elan and experience of one existing medium artillery from 100 to 200 then saved it. Tried editor -- crash same message. The scenario works fine with the original file is so don`t spend much of your valuable time on this.
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
if you did not put #REPLACE in the A1 cell of your custom version of the squads file, the engine would try to concatenate all the units from both the local and core squads files. It would therefore find duplicate units.edward77 wrote:The mystery thickens! I went back to the original file which we know works, edited both elan and experience of one existing medium artillery from 100 to 200 then saved it. Tried editor -- crash same message. The scenario works fine with the original file is so don`t spend much of your valuable time on this.
Richard Bodley Scott
Re: Altering the Squad File
No that`s not it. #REPLACE is there
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
Best if you put the whole custom campaign on DropBox for me so I can take a look and see if I can see what it wrong.edward77 wrote:No that`s not it. #REPLACE is there
Richard Bodley Scott
Re: Altering the Squad File
Richard, Here is another example using a very simple, small squad file from Alma. Here nearly all units are blue and there is very little variety so it`s easier to check. There are 90 rows in total of which there are 75 Blue_Rifle_Veteran units. I took the first 7, copied them to rows 91-97 and changed Blue to Red . So we now have seven Red_Rifle_Veteran, id nos 90-96. I saved this then back to editor...... Crash! " Duplicate unit name in custom campaign squads file. RED_VET_DETERMINED_HORSE (0)"
There are only two of these is on rows 24-25 correctly numbered so how can there be a duplicate? Could P&S have corrupted?
There are only two of these is on rows 24-25 correctly numbered so how can there be a duplicate? Could P&S have corrupted?
Re: Altering the Squad File
I have just done exactly what you have described to the Alma Squads.csv file, and I had no problem when opening the Editor. Best if you send your amended Squads file to Richard and he can try to find out what is going wrong.edward77 wrote:Richard, Here is another example using a very simple, small squad file from Alma. Here nearly all units are blue and there is very little variety so it`s easier to check. There are 90 rows in total of which there are 75 Blue_Rifle_Veteran units. I took the first 7, copied them to rows 91-97 and changed Blue to Red . So we now have seven Red_Rifle_Veteran, id nos 90-96. I saved this then back to editor...... Crash! " Duplicate unit name in custom campaign squads file. RED_VET_DETERMINED_HORSE (0)"
There are only two of these is on rows 24-25 correctly numbered so how can there be a duplicate? Could P&S have corrupted?
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Altering the Squad File
Ok, thanks Paul. That`s very helpful and hopefully it at least eliminates some possible simple mistake on my part. I have already sent it to Richard. I think it is something to do with my saving procedure because if you remove the changes and restore the file back to the initial state and then save it, the editor subsequently still rejects it. So the saved version must be different in some way from the original version which we know works.
I directly edited the .csv file. Is it a lot easier to do the changes with the proper spreadsheet (.xls) ? But then how do you go about doing that and then get back to the .csv file
I directly edited the .csv file. Is it a lot easier to do the changes with the proper spreadsheet (.xls) ? But then how do you go about doing that and then get back to the .csv file
Re: Altering the Squad File
Yes, it seems likely that your problems are due to the way that the .csv file is being saved. Either you are doing something wrong, or the program that you are using to edit it is producing a file that is incompatible with the game.edward77 wrote:Ok, thanks Paul. That`s very helpful and hopefully it at least eliminates some possible simple mistake on my part. I have already sent it to Richard. I think it is something to do with my saving procedure because if you remove the changes and restore the file back to the initial state and then save it, the editor subsequently still rejects it. So the saved version must be different in some way from the original version which we know works.
I directly edited the .csv file. Is it a lot easier to do the changes with the proper spreadsheet (.xls) ? But then how do you go about doing that and then get back to the .csv file
Personally I edit the Squads.csv file directly with Microsoft Excel. You might be able to edit the Squads.xls spread sheet instead, and then convert it to a .csv by just rewriting the file extension, but I am not sure about that as I have never tried it.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Altering the Squad File
I should warn you that using my scenarios as a basis may not always be prudent as it took me ages to figure out the unit names, their relation in the Squads and Text files, and how to treat duplicate units. I'm getting better but, in the past, I'd go with whatever the engine would let me get away with. So, while Red_Veteran_Rifle2 might be obvious enough for a second unit of similar musketeers, it might equally say Blue_Light_Guns99 if that worked in the finished scenario. Just a thought.
-
- Field of Glory 2
- Posts: 28007
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Altering the Squad File
You can edit the .xlsx and then also save the file as a .csv from Excel - that is what I do. Be careful to use the vanilla .csv format, there are several other .csv formats that may not work.
Richard Bodley Scott