xml-stuff
Moderator: Ronald Wendt
xml-stuff
Ronald, thanks for the detailed reply in the Petsamo-thread.
A few xml-questions.
1) The scenario xml-file is a great place to rename units using search/replace. Any danger in adding long unit names that may exceed the unit name field?
What is the max number of character displayed?
2) You can also edit the unit strength, is it possible to override the maximum default for a particular unit? I have a couple of Engineer Brigades that are currently measly 5-strength units.
3) Can you add/change the transport for a unit (using the range and vehicle fields).
6) I assume the index no is the hex identification you see in the minimap in the editor?
7) Is a save-game roughly the same as a scenario-file, ie it contains all the scenario data?
A few xml-questions.
1) The scenario xml-file is a great place to rename units using search/replace. Any danger in adding long unit names that may exceed the unit name field?
What is the max number of character displayed?
2) You can also edit the unit strength, is it possible to override the maximum default for a particular unit? I have a couple of Engineer Brigades that are currently measly 5-strength units.
3) Can you add/change the transport for a unit (using the range and vehicle fields).
6) I assume the index no is the hex identification you see in the minimap in the editor?
7) Is a save-game roughly the same as a scenario-file, ie it contains all the scenario data?
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: xml-stuff
Hello Erik,
you are welcome. Any questions on the game will be answered - sometimes it takes a while, but we try our best to do it in a timely fashion.
There is a limited space and the game does not hinder you from creating longer names than it can display in certain areas. There is no exact lenght though as the lenght of names differs depending on the letters. You have to do a certain amount of trial and error here.
The game should level all values to the maximum possible. There ae four unit sizes in the game that can be set in xml regardless of the default.
If you want the engineers to be a brigade instead of a battalion you need to add formation="brigade" and you can set a strength up to 11
Same goes for the other formations: battalion (max.5), regiment(max.7) and division(max.15)
You can change the vehicles (wagon,truck,tracked) in the XML, but you cannot change their basic values.
You can set a state at the beginning of a scenario e.g. you can say range="4" for a tank unit so it has only 4 movement points in turn 1.
Exactly.
Yes, it contains the whole map + extra infos needed for statistics etc. The good thing is you can look through the scenarios and see which one has nice victory conditions. Then you copy & paste and adjust them to your map.
Regards,
ORIGINAL: Erik Nygaard
Ronald, thanks for the detailed reply in the Petsamo-thread.
you are welcome. Any questions on the game will be answered - sometimes it takes a while, but we try our best to do it in a timely fashion.
ORIGINAL: Erik Nygaard
1) The scenario xml-file is a great place to rename units using search/replace. Any danger in adding long unit names that may exceed the unit name field?
What is the max number of character displayed?
There is a limited space and the game does not hinder you from creating longer names than it can display in certain areas. There is no exact lenght though as the lenght of names differs depending on the letters. You have to do a certain amount of trial and error here.
ORIGINAL: Erik Nygaard
2) You can also edit the unit strength, is it possible to override the maximum default for a particular unit? I have a couple of Engineer Brigades that are currently measly 5-strength units.
The game should level all values to the maximum possible. There ae four unit sizes in the game that can be set in xml regardless of the default.
If you want the engineers to be a brigade instead of a battalion you need to add formation="brigade" and you can set a strength up to 11
Same goes for the other formations: battalion (max.5), regiment(max.7) and division(max.15)
ORIGINAL: Erik Nygaard
3) Can you add/change the transport for a unit (using the range and vehicle fields).
You can change the vehicles (wagon,truck,tracked) in the XML, but you cannot change their basic values.
You can set a state at the beginning of a scenario e.g. you can say range="4" for a tank unit so it has only 4 movement points in turn 1.
ORIGINAL: Erik Nygaard
6) I assume the index no is the hex identification you see in the minimap in the editor?
Exactly.
ORIGINAL: Erik Nygaard
7) Is a save-game roughly the same as a scenario-file, ie it contains all the scenario data?
Yes, it contains the whole map + extra infos needed for statistics etc. The good thing is you can look through the scenarios and see which one has nice victory conditions. Then you copy & paste and adjust them to your map.
Regards,
RE: xml-stuff
ORIGINAL: Ronald Wendt
.....ORIGINAL: Erik Nygaard
2) You can also edit the unit strength, is it possible to override the maximum default for a particular unit? I have a couple of Engineer Brigades that are currently measly 5-strength units.
The game should level all values to the maximum possible. There ae four unit sizes in the game that can be set in xml regardless of the default.
If you want the engineers to be a brigade instead of a battalion you need to add formation="brigade" and you can set a strength up to 11
Same goes for the other formations: battalion (max.5), regiment(max.7) and division(max.15)
...
A really nice feature of forcing a different formation in the xml-file is that the NATO unit size symbols change accordingly.
Note the infantry battalion/regiment/brigade, artillery battalion, tank battalion/regiment, engineer brigade in the screenshot.
Excellent side-effect [:D]
- Attachments
-
- unitsizes.jpg (324.82 KiB) Viewed 280 times
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: xml-stuff
Hello,
nice map [:)]
When do we get a chance to play it ?
Regards,
nice map [:)]
When do we get a chance to play it ?
Regards,
RE: xml-stuff
ORIGINAL: Ronald Wendt
Hello,
nice map [:)]
When do we get a chance to play it ?
Regards,
Working as a programmer you know better than to ask for a specific launch date [;)].
Soon if I do not hit any more snags.
Reinforcements
I am not able to get this working.
I copied the events from the Smolensk scenario.
The event id is puzzling, the Smolensk use something like AGCReinforcementJuly25 with different dates corresponding to the turn numbers.
Mine looks similar to this example.
<Event id="GermanReinforcementOctober8" marks="victory">
<Condition type="turns" compare="==" value="2"/>
<Action type="camera" player="0" duration="3" index="7936" distance="5"/>
<Action type="place-unit" player="0">
<Unit type-id="fi_Jager" name-en="I/Finnish Ski Bde" index="7936" map-direction="0.866025;0.5;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="II/Finnish Ski Bde" index="7681" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="III/Finnish Ski Bde" index="7682" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
</Action>
<Action type="text" player="0" sound="event-text-historical" text-en="[font='Courierbold-10']The Finns lend you the crack Finnish Ski Brigade to support your defense." title-en="[font='Courierbold-10']+++ Reinforcements have arrived! +++"/>
<Action type="camera" player="0" duration="3" index="3841" distance="3"/>
</Event>
Thanks
Erik
I copied the events from the Smolensk scenario.
The event id is puzzling, the Smolensk use something like AGCReinforcementJuly25 with different dates corresponding to the turn numbers.
Mine looks similar to this example.
<Event id="GermanReinforcementOctober8" marks="victory">
<Condition type="turns" compare="==" value="2"/>
<Action type="camera" player="0" duration="3" index="7936" distance="5"/>
<Action type="place-unit" player="0">
<Unit type-id="fi_Jager" name-en="I/Finnish Ski Bde" index="7936" map-direction="0.866025;0.5;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="II/Finnish Ski Bde" index="7681" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="III/Finnish Ski Bde" index="7682" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
</Action>
<Action type="text" player="0" sound="event-text-historical" text-en="[font='Courierbold-10']The Finns lend you the crack Finnish Ski Brigade to support your defense." title-en="[font='Courierbold-10']+++ Reinforcements have arrived! +++"/>
<Action type="camera" player="0" duration="3" index="3841" distance="3"/>
</Event>
Thanks
Erik
Victory conditions
I get the Russian 'brilliant victory' to appear in the game, but the next victory level does not display in the briefing.
The events:
<Event id="AAAAA" winner="1" marks="victory" text-player-1-en="Occupy northern Finland and northern Norway.">
<Condition type="turns" text-player-1-en="You have {dest} days for your mission, there are {remaining} left." compare="<=" value="30"/>
<Condition type="occupy-objects" text-player-1-en="Capture {obj0},{obj1},{obj2},{obj3},{obj4},{obj5},{obj6} and {obj7} to occupy all important strategic positions." occupy-minimum="8" player="1" object-positions="3080,3343,3874,5152,6154,6429,6667,7936"/>
</Event>
<Event id="ABAAA" winner="1" marks="victory" text-player-1-en="Occupy northern Finland (6 objectives)">
<Condition type="event" event-id="FirstNormal"/>
<Condition type="turns" text-player-1-en="You have {dest} days for your mission, there are {remaining} left." compare="<=" value="34"/>
<Condition type="occupy-objects" text-player-1-en="Capture {obj0},{obj1},{obj2},{obj3},{obj4},{obj5},{obj6} and {obj7} to occupy all important strategic positions." occupy-minimum="6" player="1" object-positions="3080,3343,3874,5152,6154,6429,6667,7936"/>
</Event>
Thanks
Erik
The events:
<Event id="AAAAA" winner="1" marks="victory" text-player-1-en="Occupy northern Finland and northern Norway.">
<Condition type="turns" text-player-1-en="You have {dest} days for your mission, there are {remaining} left." compare="<=" value="30"/>
<Condition type="occupy-objects" text-player-1-en="Capture {obj0},{obj1},{obj2},{obj3},{obj4},{obj5},{obj6} and {obj7} to occupy all important strategic positions." occupy-minimum="8" player="1" object-positions="3080,3343,3874,5152,6154,6429,6667,7936"/>
</Event>
<Event id="ABAAA" winner="1" marks="victory" text-player-1-en="Occupy northern Finland (6 objectives)">
<Condition type="event" event-id="FirstNormal"/>
<Condition type="turns" text-player-1-en="You have {dest} days for your mission, there are {remaining} left." compare="<=" value="34"/>
<Condition type="occupy-objects" text-player-1-en="Capture {obj0},{obj1},{obj2},{obj3},{obj4},{obj5},{obj6} and {obj7} to occupy all important strategic positions." occupy-minimum="6" player="1" object-positions="3080,3343,3874,5152,6154,6429,6667,7936"/>
</Event>
Thanks
Erik
- Attachments
-
- russianvictory.jpg (136.36 KiB) Viewed 280 times
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Reinforcements
Hello Erik,
the id is just a designation. It only becomes relevant of you want to link an event to another one. Mine are usually kind of reminders what it does if something unusual was done but that not always the case.
The command "marks" is needs "none" as attribute and this means that a victory site is not marked on the map. This is nice for side quests or bonus events.
If you place new units or don't care about the markings you can leave this out.
The error is that you cannot place groups with <Action type="place-unit" player="0">, only single units (it should be there for every unit at Smolensk, too).
So every unit has to be embraced by <Action type="place-unit" player="0"> and </Action>.
Regrads,
ORIGINAL: Erik Nygaard
<Event id="GermanReinforcementOctober8" marks="victory">
the id is just a designation. It only becomes relevant of you want to link an event to another one. Mine are usually kind of reminders what it does if something unusual was done but that not always the case.
The command "marks" is needs "none" as attribute and this means that a victory site is not marked on the map. This is nice for side quests or bonus events.
If you place new units or don't care about the markings you can leave this out.
ORIGINAL: Erik Nygaard
<Action type="place-unit" player="0">
<Unit type-id="fi_Jager" name-en="I/Finnish Ski Bde" index="7936" map-direction="0.866025;0.5;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="II/Finnish Ski Bde" index="7681" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
<Unit type-id="fi_Jager" name-en="III/Finnish Ski Bde" index="7682" map-direction="0;1;0" strength="5" experience="80" core-unit="0"/>
</Action>
The error is that you cannot place groups with <Action type="place-unit" player="0">, only single units (it should be there for every unit at Smolensk, too).
So every unit has to be embraced by <Action type="place-unit" player="0"> and </Action>.
Regrads,
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Victory conditions
Hello Erik,
First this can be left out:
<Condition type="event" event-id="FirstNormal"/>
if there is no such event.
Then your conditions lack an action that defines the value of the victory, too:
<Action type="end" winner="0" scenario-end="0" victory-type="brilliant" >
This means the conditions lead to the end of the scenario (type="end"), winner is the player number, so you designate the winner in the action.
scenario-end="X" can contain anything in a single map - it only matters in a campaign.
victory-type="brilliant,normal,tactical" -> chose one. With this you get different levels into the objectives. Just remember a loss will be created by a victory of the enemy.
And don't forget to end the action with </Action>.
You could also add some debriefing text:
<Action type="end" winner="0" scenario-end="0" victory-type="brilliant" >
<Player id="0" text-en="
-- Brilliant victory --

You wiped out the enemy completely ! This is a total defeat for the enemy." sound="event-end-brilliant"/>
</Action>
Regards,
ORIGINAL: Erik Nygaard
I get the Russian 'brilliant victory' to appear in the game, but the next victory level does not display in the briefing.
First this can be left out:
<Condition type="event" event-id="FirstNormal"/>
if there is no such event.
Then your conditions lack an action that defines the value of the victory, too:
<Action type="end" winner="0" scenario-end="0" victory-type="brilliant" >
This means the conditions lead to the end of the scenario (type="end"), winner is the player number, so you designate the winner in the action.
scenario-end="X" can contain anything in a single map - it only matters in a campaign.
victory-type="brilliant,normal,tactical" -> chose one. With this you get different levels into the objectives. Just remember a loss will be created by a victory of the enemy.
And don't forget to end the action with </Action>.
You could also add some debriefing text:
<Action type="end" winner="0" scenario-end="0" victory-type="brilliant" >
<Player id="0" text-en="
-- Brilliant victory --

You wiped out the enemy completely ! This is a total defeat for the enemy." sound="event-end-brilliant"/>
</Action>
Regards,
RE: Reinforcements
Got the reinforcements working.
Note to other designers; you need to subtract 1 for the turns.
This line will actually place the unit on turn-2 in the game:
<Condition type="turns" compare="==" value="1"/>
Erik
Note to other designers; you need to subtract 1 for the turns.
This line will actually place the unit on turn-2 in the game:
<Condition type="turns" compare="==" value="1"/>
Erik
RE: Victory conditions
Hi Ronald
Is there any way to test the victory conditions/debriefing without actually playing all 30+ turns...?
If you could play both sides in hot-seat it should be fairly easy to let one side win [:)]
Erik
Is there any way to test the victory conditions/debriefing without actually playing all 30+ turns...?
If you could play both sides in hot-seat it should be fairly easy to let one side win [:)]
Erik
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Victory conditions
Hello Erik,
if you only want to test the mere function of the conditions and not the balance of the map, you could simply make a copy of it and erase the army of the enemy to move into the victory locations without resistance.
For a good balance i fear you or a tester would have to play the map several times to adjust things.
Regards,
ORIGINAL: Erik Nygaard
Hi Ronald
Is there any way to test the victory conditions/debriefing without actually playing all 30+ turns...?
If you could play both sides in hot-seat it should be fairly easy to let one side win [:)]
Erik
if you only want to test the mere function of the conditions and not the balance of the map, you could simply make a copy of it and erase the army of the enemy to move into the victory locations without resistance.
For a good balance i fear you or a tester would have to play the map several times to adjust things.
Regards,
RE: Reinforcements
It appears that several units may arrive using the same index (map loc), for instance the map edge .
When you move the unit currently occupying the hex, the next unit in line is displayed in the same hex.
Correct?
Thanks
Erik
When you move the unit currently occupying the hex, the next unit in line is displayed in the same hex.
Correct?
Thanks
Erik
RE: Reinforcements
In my Petsamo scenario the Russian is the attacker.
Is there a way to force the Russians to start the scenario/turns?
The defending Germans AI have a habit of blooding the German units in rather futile attacks...
Thanks
Erik
Is there a way to force the Russians to start the scenario/turns?
The defending Germans AI have a habit of blooding the German units in rather futile attacks...
Thanks
Erik
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Reinforcements
Hello,
Yes, but only during very turn.
in the game Player 0 always starts and Player 1 has the second move.
So you have to make the Soviets Player 0.
Regards,
ORIGINAL: Erik Nygaard
It appears that several units may arrive using the same index (map loc), for instance the map edge .
When you move the unit currently occupying the hex, the next unit in line is displayed in the same hex.
Correct?
Thanks
Erik
Yes, but only during very turn.
ORIGINAL: Erik Nygaard
In my Petsamo scenario the Russian is the attacker.
Is there a way to force the Russians to start the scenario/turns?
The defending Germans AI have a habit of blooding the German units in rather futile attacks...
Thanks
Erik
in the game Player 0 always starts and Player 1 has the second move.
So you have to make the Soviets Player 0.
Regards,
RE: Reinforcements
ORIGINAL: Ronald Wendt
...ORIGINAL: Erik Nygaard
In my Petsamo scenario the Russian is the attacker.
Is there a way to force the Russians to start the scenario/turns?
The defending Germans AI have a habit of blooding the German units in rather futile attacks...
Thanks
Erik
in the game Player 0 always starts and Player 1 has the second move.
So you have to make the Soviets Player 0.
Regards,
Guess this is where I do the change:
<Player id="0" nation="de" block="Axis"
And then all other German player fields with 0 will have to changed to 1 also. Hope I do not miss any...
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Reinforcements
Hello,
indeed all objects have to change owner. I use find & replace functions for things like this with an additional Player 2 for swapping.
Regards,
indeed all objects have to change owner. I use find & replace functions for things like this with an additional Player 2 for swapping.
Regards,
RE: Reinforcements
Me too [:D]
- Ronald Wendt
- Posts: 1880
- Joined: Mon Jun 08, 2009 6:09 am
- Contact:
RE: Reinforcements
Hello,
i guess its an obvious choice, i just thought it won't hurt to mention it. [;)]
Regards,
i guess its an obvious choice, i just thought it won't hurt to mention it. [;)]
Regards,