Page 1 of 1

Starting Positions XML Update

PostPosted: Thu Mar 31, 2011 7:41 pm
by MrBenn
For those that missed it....

Subject: Random Map Medal
lackattack wrote:Map XML Improvement
Map designers can now specify the maximum number of starting positions to be issued to each player. Details to appear in the Map Foundry...


XML Tutorial
XML Tutorial wrote:Start Positions

Lets say we found that whenever someone starts with Asia they win. This isn't true and nearly impossible but just go with it. We want to make that impossible to do. One way we could do this is using the new start position tool. Start positions are contained in a tag called <positions> which contains multiple <position> tags. These position tags can contain one or more <territory> tags, like so:

Code: Select all
<positions>
   <position>
      <territory>Ural</territory>
   </position>
   <position>
      <territory>Afghanistan</territory>
   </position>
   <position>
      <territory>Middle East</territory>
   </position>
   <position>
      <territory>Siberia</territory>
   </position>
   <position>
      <territory>Irkutsk</territory>
   </position>
   <position>
      <territory>Yakutsk</territory>
   </position>
   <position>
      <territory>Kamchatka</territory>
   </position>
   <position>
      <territory>Mongolia</territory>
   </position>
   <position>
      <territory>Japan</territory>
   </position>
   <position>
      <territory>China</territory>
   </position>
   <position>
      <territory>India</territory>
   </position>
   <position>
      <territory>Siam</territory>
   </position>
</positions>

So in the above example we have 12 start positions. When the game begins these start positions will be split up randomly amongst the players. If there is a remainder, the territories of those start positions are dealt out in the same way as other territories (unless of course they are coded as neutral).

We can restrict the game engine to allocate a maximum of 2 postions per player as follows - any additional/leftover positions will be ignored and divided in the usual way:
Code: Select all
<positions max="2">
...
</positions>


Lets say now that we discovered that Middle East isn't a viable start position unless they have 5 armies and that Kamchatka is overpowered and needs to have 2. We can change the number of armies that start on a given territory as follows:

Code: Select all
   ...
   <position>
      <territory start="5">Middle East</territory>
   </position>
   ...
   <position>
      <territory start="2">Kamchatka</territory>
   </position>
   ...

If the nunber of starting positions is not evenly divisible by the number of players, the leftover territories will be dealt out in the usual way with 3 starting armies, rather than the number specified in the start position code.

Re: Starting Positions XML Update

PostPosted: Fri Apr 01, 2011 2:57 pm
by Victor Sullivan
Sweet.

More of a functional thing than a new toy, but Sully like.

Re: Starting Positions XML Update

PostPosted: Fri Apr 01, 2011 4:09 pm
by natty dread
Good, good. When do we get conditional autodeploys? ;)

Re: Starting Positions XML Update

PostPosted: Fri Apr 01, 2011 7:13 pm
by Victor Sullivan
XML Tutorial wrote:If the nunber of starting positions is not evenly divisible by the number of players...

*chuckles*

Re: Starting Positions XML Update

PostPosted: Thu Jun 30, 2011 2:43 pm
by cairnswk
Mr Benn, hi

I have a map which requires two sided play.
I want to know if this is possible below?

Code: Select all
  <positions>
       <position player="1">
          <territory>x1</territory>
       </position>
       <position player="2">
          <territory>y1</territory>
       </position>
       <position player="3">
          <territory>x2</territory>
       </position>
       <position player="4">
          <territory>y2</territory>
       </position>
       <position player="5">
          <territory>x3</territory>
       </position>
       <position player="6">
          <territory>y3</territory>
       </position>
       <position player="7">
          <territory>x4</territory>
       </position>
       <position player="8">
          <territory>y4</territory>
       </position>
    </positions>

Re: Starting Positions XML Update

PostPosted: Thu Jun 30, 2011 3:05 pm
by natty dread
Sadly, no.

Re: Starting Positions XML Update

PostPosted: Thu Jun 30, 2011 3:07 pm
by MrBenn
"Team" or "grouped" starting positions is one of the things on my xml wish list...

Re: Starting Positions XML Update

PostPosted: Thu Jun 30, 2011 6:28 pm
by cairnswk
natty_dread wrote:Sadly, no.

Thanks Natty.

MrBenn wrote:"Team" or "grouped" starting positions is one of the things on my xml wish list...

Thanks BrBenn.
Yes, i see that's it would possible be a difficult one to implement, you need the flexibility in the code to cover all situations.

Re: Starting Positions XML Update

PostPosted: Wed Jul 06, 2011 4:51 pm
by theBastard
natty_dread wrote:Good, good. When do we get conditional autodeploys? ;)


this...