Page 1 of 1

Request> custom campaign and battlegroup

Posted: Wed May 18, 2011 6:54 am
by vils
I was wondering how i can create a random campaign with custom core units, preferrable i want to buy it from scratch ingame

1. Get X points and buy my battlegroup from start, core and aux. I dont want the game to pre/buy it for me.

2. Beef up my existing random campaign units, for example how do i replace a weak recon unit with an pzr.

This is intent to work in a campaign, not random battles.

I tried the editor but strangely i cannot alter units there..


RE: Request> custom campaign and battlegroup

Posted: Wed May 18, 2011 10:40 am
by junk2drive
Have you looked at the Random B and C document?

Edit: I don't have a lot of experience with campaigns and wondered if the document gave you any ideas.

RE: Request> custom campaign and battlegroup

Posted: Wed May 18, 2011 11:06 am
by Erik Rutins
Hi Vils,

You have to modify the existing random campaign files in /Data/Battles or create your own.

Regards,

- Erik

RE: Request> custom campaign and battlegroup

Posted: Wed May 18, 2011 11:24 am
by dazoline II
ORIGINAL: vils

I was wondering how i can create a random campaign with custom core units, preferrable i want to buy it from scratch ingame

1. Get X points and buy my battlegroup from start, core and aux. I dont want the game to pre/buy it for me.

2. Beef up my existing random campaign units, for example how do i replace a weak recon unit with an pzr.

This is intent to work in a campaign, not random battles.

I tried the editor but strangely i cannot alter units there..



1. I haven't tried this with a campaign battle but if your comfortable about editing XML then you can try this. If not I don't believe its currently possible.
Random battles for campaigns are stored in /Data/Scenarios these files are named such as ®1305723908140.xml. The random campaign is stored in /Data/Campaigns and named such as ®1st Panzer Div 1941 Short.xml. Open the campaign file and you will see a list of scenarios such as <scenario id="R1305723908140" player="German" mediaFile="20a.png" textFileDesc="SS0" />. The id in this case R1305723908140 refers to the afore mentioned file in the Scenarios folder. This is the first battle, in this file in the <scenario> tag place an attribute pointsmulti="4.0" so lokking something like this: <scenario pointsmulti="4.0" id="..." ... /> The pointsmulti attribute is responsible for you getting to purchase units rather than having them assigned. Like I said I haven't tried this for random campaign battles, only for random battles but it worth it to try it. Do this after generating a random campaign, tell us if it works.

2. Replacing a unit in a random campaign involves editing XML once again.
This time open the file /Data/Random Campaigns/1st Panzer Div 1941 Short.xml each scenario is detailed there and its ID is the name of a file in /Data/Battles. You must edit all the battles with your change in unit. In the file German Summer 41 (First) - 1st Pzr Div.xml you will see tags named unit in the coreunits tag. These are your units you see. So for example changing the Scout unit of KFZ 222's would start with this:
<unit unitid="Sd Kfz 222" unitname="1st 1/1-1 Aufkl" exp="Veteran" number="2" max="2"></unit>
and end with this:
<unit unitid="Sd Kfz 231" unitname="1st 1/1-1 Aufkl" exp="Veteran" number="3" max="3"></unit>
You must make this change in every battle file listed in the campaign file. Do this before you generate the random campaign.


Easy as cake eh!
I'm hoping to make a mod to ease the pain this causes.


RE: Request> custom campaign and battlegroup

Posted: Thu May 19, 2011 4:06 pm
by vils
Thanks alot for the guide!

However, it doesnt work (for me).. It appears that my core force is already specified in the file though:

<attacker side="&#71;&#101;&#114;&#109;&#97;&#110;">
<coreunits pointsavailable="592">
<unit unitid="&#80;&#122;&#32;&#71;&#114;&#101;&#110;&#97;&#100;&#105;&#101;&#114;&#32;&#52;&#49;" unitname="&#49;....etc

As for changing existing units and editing 36+ files i say it is not worth the effort really hehe, for now. [:)]