Page 1 of 4

XML Starting Positions

PostPosted: Tue Oct 28, 2008 6:30 pm
by MrBenn
There has been a fair bit of discussion (mostly in my map thread) about the inner workings of the Starting Position XML tags, which has for the most part left me a little bit bewildered...

In my head I have an idea for a map that makes use of starting positions and an objective.
I wanted to have 8 start positions, but have them so that only 2 of them would be handed out in a 2-player game, and so on.
Additionally, I wanted to see if a particular start position could be used in every game (assigned to a player at random), with as many of the other seven given to the other players as necessary?

I have a feeling this isn't currently possible...

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 7:11 pm
by oaktown
MrBenn wrote:There has been a fair bit of discussion (mostly in my map thread) about the inner workings of the Starting Position XML tags, which has for the most part left me a little bit bewildered...

I'm still sorting out the tag myself, but here's what I guess... yeti can set me straight if I'm off...

MrBenn wrote:I wanted to have 8 start positions, but have them so that only 2 of them would be handed out in a 2-player game, and so on.

I think that this isn't possible... with 8 start positions each player in 1v1 will receive four. You could code it to have only two start positions, in which case the start positions will be ignored in 3+ player games.

MrBenn wrote:Additionally, I wanted to see if a particular start position could be used in every game (assigned to a player at random), with as many of the other seven given to the other players as necessary?

Giving preference to one start position? Also not possible (I think). They're handed out randomly - in a five player game (for example) with eight start positions there is no way to control which positions are or are not assigned.

But I can see where you're going with this. If you had a Mars Attacks! map for example it would be the case that you want one player to start as the aliens and everybody else is on earth fighting each other as well as fighting off the alien invaders - this would far less fun if the aliens were split up or started neutral.

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 7:20 pm
by gimil
Oaktown you are spot on.

Basically, each starting position is treated like a single territory and is randomly asigned to a player. So you can have as many starting position as you like but they will be randomly (and evenly) divided with remainder being ignored and those territorties that were in the starting position tags will be randomly asigned to players by default.

So lets take an example...

12 starting positions, each starting position has 3 terrs.

In a 6 player game each player is randomly asigned 2 starting postions, fine.

In an 8 player game each player is randomly asigned 1 starting position with 4 left over. Those 4 positions add up to 12 territories. Because the 4 leftover positions cant be evenly handed out to 8 players (you can't get half a starting position) those 12 territories are randomly asigned to players like a dafault game on classic.

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 8:52 pm
by InkL0sed
Could you make two territories starting territories, and have the rest just be the only territories that aren't neutrals?

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 8:54 pm
by gimil
InkL0sed wrote:Could you make two territories starting territories, and have the rest just be the only territories that aren't neutrals?


Yes, after the starting positions are evenly handed out, the non starting positions are handed out in the default manner.

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 8:55 pm
by InkL0sed
gimil wrote:
InkL0sed wrote:Could you make two territories starting territories, and have the rest just be the only territories that aren't neutrals?


Yes, after the starting positions are evenly handed out, the non starting positions are handed out in the default manner.


So that would solve MrBenn's problem?

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 8:55 pm
by gimil
InkL0sed wrote:
gimil wrote:
InkL0sed wrote:Could you make two territories starting territories, and have the rest just be the only territories that aren't neutrals?


Yes, after the starting positions are evenly handed out, the non starting positions are handed out in the default manner.


So that would solve MrBenn's problem?


Me, oak and benn spent about 2 hours on skype trying to solve his problem, he has much bigger problems than you guys see :P

Re: Starting Positions

PostPosted: Tue Oct 28, 2008 8:56 pm
by InkL0sed
Damn it. Well, I tried...

Re: Starting Positions

PostPosted: Wed Oct 29, 2008 4:15 am
by yeti_c
InkL0sed wrote:Could you make two territories starting territories, and have the rest just be the only territories that aren't neutrals?


No - because the "normal" starting territories are divided by 3 in a 2 player game (1 for neutral)... So minimum starting territories is 3. (Unless the positions tag is used)

C.

Re: Starting Positions

PostPosted: Wed Oct 29, 2008 4:32 am
by MrBenn
My understanding of how the start positions work is as follows:
  • Each <position> can contain single or multiple territories.
  • The <position> groups are divided equally amongst the players, with each player getting all of the territories in the <position(s)> they have been allocated. Any remaining territories in left-over <position> tags are divided equally (with 1/3 neutral in 2-player games).
  • Territories in <position> tags can be dealt to players even when the underlying territory has a <neutral> tag
  • Any territories not in <position> tags, and that do not have <neutral> starts, are divided equally amongst players (with 1/3 neutral in 2-player games)
  • If there are more players than starting positions, the <position> tags are ignored
  • It is not possible to specify which player will get which <position>
  • It is not possible to specify a <position> that will be dealt out in every game
  • It is not possible to limit the number of positions to the number of players (ie. the game engine will distribute 8 positions evenly amongst 4 players, rather than allocate 1 each and have 4 positions starting neutral)

Re: Starting Positions

PostPosted: Wed Oct 29, 2008 4:35 am
by yeti_c
MrBenn wrote:My understanding of how the start positions work is as follows:
  • Each <position> can contain single or multiple territories.
  • The <position> groups are divided equally amongst the players, with each player getting all of the territories in the <position(s)> they have been allocated. Any remaining territories in left-over <position> tags are divided equally (with 1/3 neutral in 2-player games).
  • Territories in <position> tags can be dealt to players even when the underlying territory has a <neutral> tag
  • Any territories not in <position> tags, and that do not have <neutral> starts, are divided equally amongst players (with 1/3 neutral in 2-player games)
  • If there are more players than starting positions, the <position> tags are ignored
  • It is not possible to specify which player will get which <position>
  • It is not possible to specify a <position> that will be dealt out in every game
  • It is not possible to limit the number of positions to the number of players (ie. the game engine will distribute 8 positions evenly amongst 4 players, rather than allocate 1 each and have 4 positions starting neutral)


Correct - also note that with the positions tags - you can set the amount of armies those territories start with too.

C.

Re: Starting Positions

PostPosted: Sun Nov 02, 2008 11:33 am
by Pedronicus
I'd like to see an option on D-Day omaha beach, where the starting positions (in dubs, trips and quads) where team 1 are the Germans (in the bunkers and fields) and team 2 are the Americans (boats and beach) to try and recreate a more accurate battle.

the same application would be nice for all WW2 themed maps. It would help people understand what side started where in the beginning of a war.

Re: Starting Positions

PostPosted: Mon Nov 03, 2008 6:40 am
by gimil
Pedronicus wrote:I'd like to see an option on D-Day omaha beach, where the starting positions (in dubs, trips and quads) where team 1 are the Germans (in the bunkers and fields) and team 2 are the Americans (boats and beach) to try and recreate a more accurate battle.

the same application would be nice for all WW2 themed maps. It would help people understand what side started where in the beginning of a war.


Unfortunatly we can't really specify team starting positions with the current abilities of the tag.

XML Start Positions

PostPosted: Sun Nov 09, 2008 12:18 pm
by hecter
How exactly do they work? Like, when you have them in a map, are they the ONLY positions you can start on?

Re: Starting Positions

PostPosted: Sun Nov 09, 2008 1:33 pm
by MrBenn
Merged 'XML Start positions' into 'Starting Positions' thread

Re: XML Starting Positions

PostPosted: Sun Nov 09, 2008 1:45 pm
by hecter
Coolio. Thanks Mr. Benn!

Re: Starting Positions

PostPosted: Tue Mar 31, 2009 3:42 am
by MrBenn
yeti_c wrote:
MrBenn wrote:My understanding of how the start positions work is as follows:
  • Each <position> can contain single or multiple territories.
  • The <position> groups are divided equally amongst the players, with each player getting all of the territories in the <position(s)> they have been allocated. Any remaining territories in left-over <position> tags are divided equally (with 1/3 neutral in 2-player games).
  • Territories in <position> tags can be dealt to players even when the underlying territory has a <neutral> tag
  • Any territories not in <position> tags, and that do not have <neutral> starts, are divided equally amongst players (with 1/3 neutral in 2-player games)
  • If there are more players than starting positions, the <position> tags are ignored
  • It is not possible to specify which player will get which <position>
  • It is not possible to specify a <position> that will be dealt out in every game
  • It is not possible to limit the number of positions to the number of players (ie. the game engine will distribute 8 positions evenly amongst 4 players, rather than allocate 1 each and have 4 positions starting neutral)


Correct - also note that with the positions tags - you can set the amount of armies those territories start with too.

C.

The thing I'm wondering now, is what would happen if a map had 5 starting positions, with no starting neutrals?
In 1v1, the starts are divided into 3 - 1 for each player and 1 for neutral... With 5 starts in a 1v1, each player gets given 1, 1 turns neutral; what happens to the other 2? Are they allocated neutral, or do they get lumped together with the non-designated starts?

Re: Starting Positions

PostPosted: Tue Mar 31, 2009 5:18 am
by yeti_c
MrBenn wrote:The thing I'm wondering now, is what would happen if a map had 5 starting positions, with no starting neutrals?
In 1v1, the starts are divided into 3 - 1 for each player and 1 for neutral... With 5 starts in a 1v1, each player gets given 1, 1 turns neutral; what happens to the other 2? Are they allocated neutral, or do they get lumped together with the non-designated starts?


They get put in the Non designated starts...

This happened in Das Schloss the first cut - and led to some people getting starts when they shouldn't've...

To combat this then you have to designate the starting positions as neutral X...

Note - Starting positions are equally distributed in 1v1 (no neutral player).

C.

Re: XML Starting Positions

PostPosted: Tue Mar 31, 2009 10:53 am
by MrBenn
yeti_c wrote:Note - Starting positions are equally distributed in 1v1 (no neutral player).

So with 5 starting positions in a 1v1, 2 each would be allocated to players, with the third being added to the pot for distribution unless it was a designated neutral.

I think I've got it now ;-)

Re: XML Starting Positions

PostPosted: Tue Mar 31, 2009 3:08 pm
by yeti_c
MrBenn wrote:
yeti_c wrote:Note - Starting positions are equally distributed in 1v1 (no neutral player).

So with 5 starting positions in a 1v1, 2 each would be allocated to players, with the third being added to the pot for distribution unless it was a designated neutral.

I think I've got it now ;-)


Correct.

C.

Re: XML Starting Positions

PostPosted: Mon Jun 08, 2009 11:24 am
by dolomite13
MrBenn wrote:
yeti_c wrote:Note - Starting positions are equally distributed in 1v1 (no neutral player).

So with 5 starting positions in a 1v1, 2 each would be allocated to players, with the third being added to the pot for distribution unless it was a designated neutral. I think I've got it now ;-)


So here is my dilema, I think what you are saying here solves my problem. I would like the drop to start out by assigning my <positions> tag territories. and then do the standard random drop of the remaining 16 territories. I do not want the extra territories from the first 8 to be added to the pool of 16 additional drops.

Image

I have 8 wizards (color circles on the above map) I have assigned start positions to and set them to neutral 1.
I have 16 monsters (black circles on the above map) that I have not assigned neutrals to.

In a 2 player game
- both players would have 4 wizards each.
- both players would have 8 monsters each.

In a 3 player game
- all players would have 3 wizards each with 2 remainder set to neutral.
- all players would have 6 monsters each with 2 remainder set to neutral.

In a 4 player game
- all players would have 2 wizards each.
- all players would have 4 monsters each.

In a 5 player game
- all players would have 1 wizard each with 3 remainder set to neutral.
- all players would have 3 monsters each with 1 remainder set to neutral.

In a 6 player game
- all players would have 1 wizard each with 2 remainder set to neutral.
- all players would have 2 monsters each with 4 remainder set to neutral.

In a 7 player game
- all players would have 1 wizard each with 1 remainder set to neutral.
- all players would have 2 monsters each with 2 remainder set to neutral.

In a 8 player game
- all players would have 1 wizards each.
- all players would have 2 monsters each.

Here is the starting positions for the 8 wizards.

Code: Select all
<!-- Starting positions -->

<positions>
   <position>
      <territory start=1>Rayden</territory>
   </position>
   <position>
      <territory start=1>Brago</territory>
   </position>
   <position>
      <territory start=1>Yesha</territory>
   </position>
   <position>
      <territory start=1>Sythe</territory>
   </position>
   <position>
      <territory start=1>Grath</territory>
   </position>
   <position>
      <territory start=1>Olan</territory>
   </position>
   <position>
      <territory start=1>Purlin</territory>
   </position>
   <position>
      <territory start=1>Cryma</territory>
   </position>
</positions>


Here is a sample from the XML of the starting territories (wizards).

Code: Select all
<territory>
   <name>Olan</name>
   <borders>
      <border>Ora</border>
   </borders>
   <coordinates>
      <smallx>286</smallx>
      <smally>405</smally>
      <largex>383</largex>
      <largey>532</largey>
   </coordinates>
   <neutral>1</neutral>
   <bonus>3</bonus>
</territory>


Also I have 16 additional territories that I don't care how they get dropped. They are coded like this.

Code: Select all
<territory>
   <name>Jeo</name>
   <borders>
      <border>Heb</border>
      <border>Koz</border>
   </borders>
   <coordinates>
      <smallx>458</smallx>
      <smally>354</smally>
      <largex>612</largex>
      <largey>464</largey>
   </coordinates>
</territory>


I was under the impression that the code worked this way.

- Game engine "counts" the players (A) and the starting positions (B).
- B/A = C (and D) ... 8/7 = 7 (and 1)
- Where C is the number of starting positions for each player and D is a eventually remainder.
- The game engine will sum the remainder with the other territories (E), then the total number will divided among players again.
- D+E / A = F (and G) ... (1+16)/7 = 2 (and 3)
- F will be the number of territories assigned to a player (with 3 default troops) and G an eventually remainder (3 neutral troops)

It sounds like the <neutral>1</neutral> in my starting territory would change that. And the leftover starting territories would become neutrals and not be added to the general pool for distribution. Is this correct?

Thanx

--D

Re: XML Starting Positions

PostPosted: Tue Jun 09, 2009 3:37 am
by yeti_c
I think you're missing something here...

Territories - and Starting positions aren't mutually exclusive entities - there fore D cannot be added to E - as D may already part of E.

Say you have a map with 40 territories - 20 of them are neutral territories.

10 of these are starting positions.

Without further info - you cannot work out the starting territory count...

C.

Re: XML Starting Positions

PostPosted: Tue Jun 09, 2009 4:42 am
by thenobodies80
yeti_c wrote:I think you're missing something here...

Territories - and Starting positions aren't mutually exclusive entities - there fore D cannot be added to E - as D may already part of E.

Say you have a map with 40 territories - 20 of them are neutral territories.

10 of these are starting positions.

Without further info - you cannot work out the starting territory count...

C.


The example he did was use by me to explain him how the starting will work....E is the group of territories to split among players without neutrals and without starting position. ( so is not exactly a part of D). I know, i used a large way to explain him :)
He was just saying that the eventually reminder will be splitted among players with other territories ;)

His problem is about the reminder....he want to know if a starting position could be coded as a neutral if it will be a part of reminder....

example: 8 starting position

8 players --> 1 starting position for each player, no reminder
6 players --> 1 starting position for each player, a reminder of 2 territories.

His question:
Is possible to set this 2 territories to have them ever neutral if not used as starting positions?

Virtually <neutral> tag is the last one of a single territory so it would be possible doing what dolomite was saying, but i'm not sure at 100%....
yeti it's my thought correct?

Re: XML Starting Positions

PostPosted: Tue Jun 09, 2009 5:42 am
by yeti_c
Yes - If a Starting position isn't used - and it is set to Neutral - then it will be neutral...

Obviously that same "neutral" territory - could be used as a Starting territory depending on the draw...

So - the only way to guarantee similar starts is either making ALL of your starts neutral - or ALL of your starts "normal"...

Or if you have multi territory starts - that the same mix applies...

i.e. 2 territories per start - one is neutral and one is normal.

C.

Starting positions

PostPosted: Tue Aug 18, 2009 6:33 am
by Industrial Helix
Ok, if I have 8 starting positions on a map, the rest is random deployment... in a 1v1 game will each player get 4 of the starting positions?

I'm really stumped on this and need to know for the gameplay aspect of my map, here's a link to the discussion we've had over there:

viewtopic.php?f=10&t=78339&start=165