Page 1 of 1

Problems in creating new units

Posted: Thu Aug 22, 2024 5:23 pm
by Lysimachos
Hy guys,
while trying to create a new unit in a modded campaign folder I incurred in some problem.
In detail, I firstly copied in the SQUADS.CSV file a "Bavarian_Bayonet_Veteran,404,Allies,..." unit at the bottom of the file renaming it "Grenadier,491,Axis,..." and letting unalterd all the other parameters.
Then I added at the bottom of the TEXT.1 file the following indication:
IDS_UNITNAME491, "Grenadiers",
IDS_UNITINFO491, "Grenadiers",
When tried to launch the mod in the game, however, it crashed and two messages appeared of this content:

Duplicate unit name in custom campaign squads file:
BLUE_PIKE_AND_SHOT
(0)

*** Unhandled Exception! ExpCode: 0x80000003
ExpFlags:
ExpAddress: 0x00490240 Please report!

Of course, I didn't duplicate the Pike and Shot unit so I'm stucked having no idea where the problem is.
Has anyone of you any hint to solve the problem?
Thank's for all your help!

Re: Problems in creating new units

Posted: Thu Aug 22, 2024 5:53 pm
by Lysimachos
Or maybe should I insert the aforementioned information (IDS_UNITNAME491, "Grenadiers" and IDS_UNITINFO491,"Grenadiers",) also in the TEXT4.TXT, TEXT5.TXT AND TEXT10.TXT files?

Re: Problems in creating new units

Posted: Thu Aug 22, 2024 7:03 pm
by Cronos09
Lysimachos wrote: Thu Aug 22, 2024 5:23 pm ...
When tried to launch the mod in the game, however, it crashed and two messages appeared of this content:

Duplicate unit name in custom campaign squads file:
BLUE_PIKE_AND_SHOT
(0)

*** Unhandled Exception! ExpCode: 0x80000003
ExpFlags:
ExpAddress: 0x00490240 Please report!
...
It seems very much that the SQUADS.CSV file duplicates - it is possible because of your changes in the file. The 1st cell of it (A1) should containes #REPLACE - check it.

Re: Problems in creating new units

Posted: Thu Aug 22, 2024 9:15 pm
by Lysimachos
In effect, the SQUADS.CSV files contain in the first cell te locution "#REPLACE".
Is it right or wrong?

Re: Problems in creating new units

Posted: Fri Aug 23, 2024 3:47 am
by Cronos09
Lysimachos wrote: Thu Aug 22, 2024 9:15 pm In effect, the SQUADS.CSV files contain in the first cell te locution "#REPLACE".
Is it right or wrong?
It is right. But why do you mention the SQUADS.CSV file in plural? There should only be one file with that name in your mod folder.

Re: Problems in creating new units

Posted: Fri Aug 23, 2024 8:49 am
by Lysimachos
Sorry, it was just a writing mistake ...

Re: Problems in creating new units

Posted: Fri Aug 23, 2024 9:58 pm
by Lysimachos
Cronos09 wrote: Thu Aug 22, 2024 7:03 pm It seems very much that the SQUADS.CSV file duplicates - it is possible because of your changes in the file. The 1st cell of it (A1) should containes #REPLACE - check it.
Given the fact that in the SQUADS.CSV file the "#REPLACE" mention is correctly inserted, why the file should duplicate the units?
That remain a mistery to me ...
And there's something that I could do in order to avoid the problem?
If you haveany hint I would be really grateful!!

Re: Problems in creating new units

Posted: Sat Aug 24, 2024 3:13 am
by Cronos09
Lysimachos wrote: Fri Aug 23, 2024 9:58 pm
The changes you described in your first post should not cause any problems when running the mod (if they are done correctly).
If you want me to figure out why this error occurs, send me a link to the mod with your changes.

Re: Problems in creating new units

Posted: Sat Aug 24, 2024 11:24 am
by Lysimachos
Hi Cronos09,
I've just sent you a PM wth all the required stuff!