Editor stuff

Germany At War: Operation Barbarossa 1941 is an elegant turn-based design, inspired by classics such as Panzer General, but with more of a historical focus. You command the German forces through a branching historical campaign covering the entire 1941 campaign as well as part of the 1942 campaign. Dozens of scenarios stretch from the Soviet border all the way to Archangel and towards Astrakhan, the original military goals of Operation Barbarossa. Step into a wargame where your performance will rewrite history, through an addictive combination of compelling gameplay, realistic events and challenging battles.

Moderator: Ronald Wendt

Erik2
Posts: 785
Joined: Thu Nov 02, 2000 10:00 am
Location: Oslo, Norway

Bonus for occupying object

Post by Erik2 »

Instead of giving the players a fixed amount of resources each turn, I would rather have them earn it by occupying objects.

Something like this when player 1 occupies 'index=6773'?. I want the occupying unit to gain 1 fuel/1 ammo and the player to gain 50 resources.
Can I set 'marks' to a suitable value that will give the players some visual indication that the object contains goodies?

Event id="_object_event_6713_" marks="none">
<Condition type="occupy-objects" occupy-minimum="1" player="1" object-positions="6713"/>
<Action type="refill" ammo="1" fuel="1" strength="1" resources="50" actions="0" range="0" shots="0" experience="0" ground-unit-positions="6713"/>
</Event>

Thanks
Erik
Erik2
Posts: 785
Joined: Thu Nov 02, 2000 10:00 am
Location: Oslo, Norway

Scenario map

Post by Erik2 »

I have managed to place the scenario location (top right of screenshot) by a bit of trial & error using this :
positions="A,0.30,0.10"

But how do I display the scenario's minimap (bottom right of screenshot)?

Thanks
Erik

Image
Attachments
location.jpg
location.jpg (116.52 KiB) Viewed 150 times
Erik2
Posts: 785
Joined: Thu Nov 02, 2000 10:00 am
Location: Oslo, Norway

RE: Bonus for occupying object

Post by Erik2 »

I think I have got the correct event to give the players resources for occupying certain locations.

<Event id="7222" marks="none">
<Condition type="occupy-objects" occupy-minimum="1" player="0" object-positions="7222"/>
<Action type="resources" player="0" resources="100"/>
<Action type="text" player="0" text-en="Your occupation of Zapadnia Litsa earned you 100 resources."/>
</Event>

The events work in the game.
Problem is that if I load the scenario into the editor and immediate save (no changes), these events are stripped from the xml-file.
User avatar
Ronald Wendt
Posts: 1880
Joined: Mon Jun 08, 2009 6:09 am
Contact:

RE: Bonus for occupying object

Post by Ronald Wendt »

Hello Erik,

sorry for the late reply.
ORIGINAL: Erik Nygaard

Instead of giving the players a fixed amount of resources each turn, I would rather have them earn it by occupying objects.

Something like this when player 1 occupies 'index=6773'?. I want the occupying unit to gain 1 fuel/1 ammo and the player to gain 50 resources.
Can I set 'marks' to a suitable value that will give the players some visual indication that the object contains goodies?

Event id="_object_event_6713_" marks="none">
<Condition type="occupy-objects" occupy-minimum="1" player="1" object-positions="6713"/>
<Action type="refill" ammo="1" fuel="1" strength="1" resources="50" actions="0" range="0" shots="0" experience="0" ground-unit-positions="6713"/>
</Event>

Thanks
Erik

Yes, there is an attribute marks="victory" that shows the player there is something special on a hex. Currently there only two markers, the red and the blue ones. Red being for targets to occupy/destroy, blue usually for indicating that protection is needed. There is a chance we will add more different ones for better designations on the map.

ORIGINAL: Erik Nygaard

I have managed to place the scenario location (top right of screenshot) by a bit of trial & error using this :
positions="A,0.30,0.10"

But how do I display the scenario's minimap (bottom right of screenshot)?

Thanks
Erik



To get the map into the preview of the scenario list, you simply have to add a .png file with the same name as your scenario in the same folder.

The dimension should be 256x256 or higher and always square for a good result, though you can add any resolution. You can also add any graphics, like the one terminator added to his variation of Stalingrad.

Just rememeber if your scenario is XXX.scn.xml the picture has to be called XXX.png .

If you want a preview of your map at the beginning, deactivate FoW, load it with the starting side and simply save. The game then generates the needed file and you only have to pass it along with the scenario.


ORIGINAL: Erik Nygaard

I think I have got the correct event to give the players resources for occupying certain locations.

<Event id="7222" marks="none">
<Condition type="occupy-objects" occupy-minimum="1" player="0" object-positions="7222"/>
<Action type="resources" player="0" resources="100"/>
<Action type="text" player="0" text-en="Your occupation of Zapadnia Litsa earned you 100 resources."/>
</Event>

The events work in the game.
Problem is that if I load the scenario into the editor and immediate save (no changes), these events are stripped from the xml-file.


I can only guess on this one - maybe you can use another id as it might be used by the editor ? Simply try "Erik7222" and test if it disappears again. It never happened hear as far as i know, but i usually name the events so i have a clue what they are there for.

Regards,
Erik2
Posts: 785
Joined: Thu Nov 02, 2000 10:00 am
Location: Oslo, Norway

RE: Bonus for occupying object

Post by Erik2 »

Once again, thank you.

Erik
User avatar
Ronald Wendt
Posts: 1880
Joined: Mon Jun 08, 2009 6:09 am
Contact:

RE: Bonus for occupying object

Post by Ronald Wendt »

Hello Erik,

as always you are welcome.

Regards,
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: Bonus for occupying object

Post by 76mm »

Ronald, it looks like the editor still doesn't allow the addition of roads to hill terrain; is a fix for that in the works?

User avatar
Ronald Wendt
Posts: 1880
Joined: Mon Jun 08, 2009 6:09 am
Contact:

RE: Bonus for occupying object

Post by Ronald Wendt »

Hello 76mm,
ORIGINAL: 76mm

Ronald, it looks like the editor still doesn't allow the addition of roads to hill terrain; is a fix for that in the works?


sorry not at the moment. Its on the list, but also a tricky one with the current system.

Regards,
Post Reply

Return to “Germany at War: Barbarossa 1941”