Conquer Club

xml question

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

Re: xml question

Postby Oneyed on Mon Jan 28, 2013 8:38 am

this is crashing answer :)
thank you.

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 1:36 am

I have another question:
is possible to have different ways for attack and for reinfoce? so from region A is not possible to attack region B, but it is possible to reinforce? for example use blocker...?

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Wed Jan 30, 2013 1:59 am

I doubt it but not 100% sure. As far as I am aware, a border is a border, without or without conditions.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 2:37 am

koontz1973 wrote:I doubt it but not 100% sure. As far as I am aware, a border is a border, without or without conditions.


you meant with or without. :)

hm, and what about this:
to attack region A player must holds A, B, C. is possible to code this? this allows only reinforce, becaue player can not attack his regions...

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Wed Jan 30, 2013 3:18 am

You can only reinforce if a border exists. If a border exists, you can also attack. Does not matter how you code it.

The only limit is with bombards. You can bombard but not reinforce.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 3:37 am

I understan this. but what about possibility which I wrote:

to attack A you need hold A, B, C?

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Wed Jan 30, 2013 3:38 am

Thats fine. It is a conditional border.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 3:41 am

koontz1973 wrote:Thats fine. It is a conditional border.


but it is possible to code in xml? because it sounds a little alogical - who wants to attack region which he holds?

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Wed Jan 30, 2013 4:11 am

You cannot attack a region you hold. :?

You asked, can you attack if you hold ABC. If you do not hold them, you cannot attack. That is a conditional border.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 4:49 am

koontz1973 wrote:You cannot attack a region you hold. :?


I know. but is possible to code this? does xml allowed this?
koontz1973 wrote:You asked, can you attack if you hold ABC. If you do not hold them, you cannot attack. That is a conditional border.


not exactly. I asked if I can attack A when I hold A B C.

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Wed Jan 30, 2013 5:33 am

Now I understand. No is the answer. You cannot attack a region you hold in any form.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby thenobodies80 on Wed Jan 30, 2013 8:01 am

Technically is possible, but as koontz said it makes no sense. That region would be impossible to take.
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: xml question

Postby Oneyed on Wed Jan 30, 2013 8:16 am

thenobodies80 wrote:Technically is possible,


so it is possible!
thenobodies80 wrote:but as koontz said it makes no sense.


for what I need it makes sense.
thenobodies80 wrote:That region would be impossible to take.


but it would be possible to reinforce this region, right? this is my idea - these units in region A are not for attack but for reinforce.
so when I good understand it is possible to code and use this?

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby ender516 on Wed Jan 30, 2013 10:50 pm

If you hold A, there is NO WAY to attack A, regardless of any other territories you might hold. However, you might be able to close the borders of A by holding A, B, and C such that once you have taken it, you cannot reinforce in or out of A. Exactly how the game engine would respond in this case is probably untested. I wonder if you might even have trouble advancing troops upon conquest in such a situation.
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario

Re: xml question

Postby Oneyed on Thu Jan 31, 2013 3:42 am

ender516 wrote:If you hold A, there is NO WAY to attack A, regardless of any other territories you might hold.


this is fine (for me). I do not want to attack A from B anyway.
ender516 wrote:However, you might be able to close the borders of A by holding A, B, and C such that once you have taken it, you cannot reinforce in or out of A.


this is not what is my idea...
ender516 wrote:Exactly how the game engine would respond in this case is probably untested. I wonder if you might even have trouble advancing troops upon conquest in such a situation.


...but when I good understood thenobodies the game works step by step:

so here it could looks like:
1, which regions player holds
2, from where and which regions he can attacks/bombards
3, from where and which region he can reinforce.

so if I hold A and B at the start (and there is one way attack from A to B, but B is possible to attack from another region)) I can not attack A from B.
but at the end of my turn I can reinforce from A to B because there is executed condition for open border (hold A and B to one way attack/reinforce A to B).

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby koontz1973 on Thu Jan 31, 2013 4:52 am

so if I hold A and B at the start (and there is one way attack from A to B, but B is possible to attack from another region)) I can not attack A from B.

If you hold A and B at the start of a turn, you cannot attack at all. You hold the regions, you cannot attack yourself.
but at the end of my turn I can reinforce from A to B because there is executed condition for open border (hold A and B to one way attack/reinforce A to B).

If you want to be able to reinforce either way, you can, that is a normal border. If you want it A to reinforce B, use a normal border for that. You can then use a conditional border the other way.

  • A to B = normal border.
  • B to A = conditional border.

As above. A can attack B, B cannot attack A. This only applies if you hold A of the two regions as you cannot attack yourself on B
As soon as A and B is held, you have a conditional border that would allow you to reinforce back to A but not to attack A as you already have it.

<territory>
<name>A</name>
<borders>
<border>1</border>
<border>B</border>
</borders>
<territory>
<name>B</name>
<borders>
<border condition="A">A</border>
</borders>
With this, as soon as B is taken, they cannot attack A as they do not hold the border condition.
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: xml question

Postby Oneyed on Thu Jan 31, 2013 5:10 am

this sounds as exactly what I need.

thanks koontz for great explantation :)

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby thenobodies80 on Thu Jan 31, 2013 8:01 am

That is not what you said before.... :?

You starting question was about a group of territories and not a single territory.
If you want an explanation about that starting question, please let me know. ;)

Oh, btw.... In that case...so you can attack A only if you hold A,B,C.... From which region you want to attack ( or reinforce ) A? It's B,C or another D region?

Nobodies
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Re: xml question

Postby Oneyed on Thu Jan 31, 2013 8:57 am

thenobodies80 wrote:That is not what you said before.... :?


hm, but it looks as the closest possibility.
thenobodies80 wrote:You starting question was about a group of territories and not a single territory.


it is not matter if it will be group territories or single one. not in the core....
thenobodies80 wrote:If you want an explanation about that starting question, please let me know. ;)


this would be nice. :)
thenobodies80 wrote:Oh, btw.... In that case...so you can attack A only if you hold A,B,C.... From which region you want to attack ( or reinforce ) A? It's B,C or another D region?

Nobodies


I will try to explain what is my idea:

region A gives +3 autodeploy. and these units I want to bring to region B, but only as reinforce.
so what I want to do is that from region A will be one way reinforce only to region B. becasue this is not possible my idea is:
1, when player holds A and B he can one way attacks B from A. this conditional border valids only for one way attack A to B. I think this is possible.
2, but it is still possible to attack B from another regions (C, D, E) by "normal" two ways attack. I think this is still possible even if there is conditional border from A to B.

so the turn could looks:
- start of turn
- +3 autodeploy in A
- game check if player can attacks one way from A to B. when he holds B it is not needed to attack. when he does not holds B he can not attack because conditional borders for one way A to B.
- attacks, (if player does not holds B at the start of turn he can attacks it from another regions (C, D, E))
- reinforce, (game check if player holds A and B, so the one way attack (reinforce) is open).

Oneyed
User avatar
Private 1st Class Oneyed
 
Posts: 1058
Joined: Sat Dec 10, 2011 12:29 pm

Re: xml question

Postby thenobodies80 on Thu Jan 31, 2013 5:03 pm

Oneyed wrote:it is not matter if it will be group territories or single one. not in the core....


It's important instead. This because you can use continents for conditional borders as well.
So if you group A,B,C as continent, let me say D, you can technically write that A can attack B only if you hold D. ;)
In that case if you already hold C, you can take A first, but not be able to use it to take B (nor reinforce). Then take B from C, so in that moment you hold D (A+B+C) so you can reinforce B from A.
This doesn't mean you can attack B from A next turn because you already hold it, but it can be helpful for reinforcements.

A quick visual example where D (the continent is an island on a map)
Image

Note: the above is just an example and you can move your troops around anyway :P

Oneyed wrote:1, when player holds A and B he can one way attacks B from A. this conditional border valids only for one way attack A to B. I think this is possible.


This is not possible. If you hold a territory you can't attack it. But yes, you can reinforce B from A at the end of your turn.

A side note, when you use conditional borders you need to pay attention to your conditions, infact (using my previous example) write:
Code: Select all
<territory>
<name>A</name>
<borders>
<border condition="A">B</border>
<border condition="B">B</border>
<border condition="C">B</border>
</borders>
</territory>


is not the same as write:

Code: Select all
<territory>
<name>A</name>
<borders>
<border condition="D">B</border>
</borders>
</territory>


where D is a previous defined continent (A+B+C).
The first should be a "or" option, but as ender516 said we have to test it properly (I will do soon ;) ), the second is not.

Let me know if you need further explanations. :)
Nobodies
User avatar
Sergeant 1st Class thenobodies80
 
Posts: 5400
Joined: Wed Sep 05, 2007 4:30 am
Location: Milan

Previous

Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users