xml question

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

Moderators: Cartographers, Global Moderators

Forum rules
Please read the Community Guidelines before posting.

Re: xml question

Postby koontz1973 on Sun Dec 09, 2012 4:59 am

oneyed, from what I am reading, is this:
Hold British bonus you get a +2
Hold British and 2 other types of territs you get +6. This is easy to code. All it is is a simple over ride.
To hold german empire (3) and france (3) is 6. That is a simple normal bonus structure.

But if you hold france(3), germany(3) and occupied regions (3) again this is possible. You code this as an over ride.

France (3)
Germany (3)
Germany with occupied land (6)
France with Germany (6) over rides normal Germany and France bonuses
France with Germany and occupied lands (6) over ride all bonuses that come before in this series.

Go and look at the xml for Rorke's Drift or Kingdom of Korea. Both use over rides a lot so you can see how they work. You only need to over ride the last over ride bonus so it is easy to code.

Over rides are easy to code in as it is only one extra line for the bonuses. Just remember to write them in sequence so you do not get a conflict.

Write all normal continent bonuses first.
Then the ones with a continent and occupied lands (These over ride the first lot)
Then do the ones that have more land. Again these over ride the second lot.
So on and so on.

Hope that helps.
Sergeant 1st Class koontz1973
Cartography Assistant
Cartography Assistant
 
Posts: 7538
Joined: Thu Jan 01, 2009 10:57 am
Medals: 116
Standard Achievement (4) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (4)
Trench Warfare Achievement (1) Teammate Achievement (1) Random Map Achievement (2) Cross-Map Achievement (3) Beta Map Achievement (2)
Ratings Achievement (4) Tournament Achievement (10) General Achievement (13) Clan Achievement (5) Map Contribution (12)
Tournament Contribution (31) General Contribution (9)

Re: xml question

Postby thenobodies80 on Sun Dec 09, 2012 8:10 am

Oneyed wrote:"Hold entire states of different Powers, bonus for occupied regions valids only for the first one held."


What I'm saying is that the above is not possible....or at least bad written on the map.
It can't be "only for the first held". It could be "only once".

As I said earlier it doesn't matter what region you hold first, overrides don't work in that way.

EDIT: a solution could be to set overrides so you give away only one bonus (not the first) and it is always the biggest the player holds. It can be done with overrides, like koontz said.

Give every man your ear, but few thy voice. Take each man's censure, but reserve thy judgment.
show
User avatar
Corporal 1st Class thenobodies80
Foundry Foreman
Foundry Foreman
 
Posts: 5640
Joined: Wed Sep 05, 2007 4:30 am
Medals: 70
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (1) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (2) Nuclear Spoils Achievement (2) Fog of War Achievement (3)
Speed Achievement (2) Teammate Achievement (1) Cross-Map Achievement (3) Bot Achievement (1) Ratings Achievement (4)
General Achievement (8) Map Contribution (7) Tournament Contribution (6) General Contribution (17)

Re: xml question

Postby Oneyed on Sun Dec 09, 2012 2:33 pm

thenobodies80 wrote:It could be "only once".


this is also fine and the right thing which I needs for "holding more entire states of the same Power".
thenobodies80 wrote:EDIT: a solution could be to set overrides so you give away only one bonus (not the first) and it is always the biggest the player holds. It can be done with overrides, like koontz said.


this sounds also fine. just how "the biggest" bonus works? is it depends on current situation or is it which bonus is still higher?
example:
England +2, +1 for every 2 colonies
Germany +3, +1 for every 2 colonies

1, I hold Germany (+3) and England with 2 colonies (+2+1), so how will xml solve this?

2, I hold Germany (+3). then England (+2) then 4 english colonies (+2+2) - will be valid English bonus? and then when I take 4 German colonies (+3+2) - will the bonus change because German bonus is higher?

Oneyed
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

Re: xml question

Postby thenobodies80 on Sun Dec 09, 2012 4:36 pm

for 1 you can decide as you want, if they have the same value it's up to you decide which one overrides the other.
for 2 i think it's possible. Just make the german bonus overrides the english one.

Give every man your ear, but few thy voice. Take each man's censure, but reserve thy judgment.
show
User avatar
Corporal 1st Class thenobodies80
Foundry Foreman
Foundry Foreman
 
Posts: 5640
Joined: Wed Sep 05, 2007 4:30 am
Medals: 70
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (1) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (2) Nuclear Spoils Achievement (2) Fog of War Achievement (3)
Speed Achievement (2) Teammate Achievement (1) Cross-Map Achievement (3) Bot Achievement (1) Ratings Achievement (4)
General Achievement (8) Map Contribution (7) Tournament Contribution (6) General Contribution (17)

Re: xml question

Postby Oneyed on Sun Jan 20, 2013 4:29 am

I have another XML quetsion:

is possible to code that player A receive bonus if player B holds XYZ?

Oneyed
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

Re: xml question

Postby koontz1973 on Sun Jan 20, 2013 5:26 am

Oneyed wrote:I have another XML quetsion:

is possible to code that player A receive bonus if player B holds XYZ?

Oneyed

No.
Sergeant 1st Class koontz1973
Cartography Assistant
Cartography Assistant
 
Posts: 7538
Joined: Thu Jan 01, 2009 10:57 am
Medals: 116
Standard Achievement (4) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (4)
Trench Warfare Achievement (1) Teammate Achievement (1) Random Map Achievement (2) Cross-Map Achievement (3) Beta Map Achievement (2)
Ratings Achievement (4) Tournament Achievement (10) General Achievement (13) Clan Achievement (5) Map Contribution (12)
Tournament Contribution (31) General Contribution (9)

Re: xml question

Postby Oneyed on Fri Jan 25, 2013 6:50 pm

is possible to:
if player holds A, B he can bombards X. when he holds A, B, C, D he can bombards Y but not X?

Oneyed
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

Re: xml question

Postby ender516 on Sun Jan 27, 2013 10:37 pm

Make a continent, "Can Bombard X", with components A and B and blocker components C and D. Use that as the condition for bombarding X. Make another continent, "Can Bombard Y" with components C and D, and use it as the condition for bombarding Y.
User avatar
Sergeant 1st Class ender516
Tech Contributor
Tech Contributor
 
Posts: 4451
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario
Medals: 37
Standard Achievement (2) Doubles Achievement (1) Triples Achievement (1) Quadruples Achievement (1) Freestyle Achievement (1)
Fog of War Achievement (1) Teammate Achievement (1) Cross-Map Achievement (1) Ratings Achievement (3) General Achievement (9)
Map Contribution (5) General Contribution (11)

Re: xml question

Postby Oneyed on Mon Jan 28, 2013 4:24 am

ender516 wrote:Make a continent, "Can Bombard X", with components A and B and blocker components C and D. Use that as the condition for bombarding X. Make another continent, "Can Bombard Y" with components C and D, and use it as the condition for bombarding Y.


what are blocker? it is something what can be codded in xml?
thanks.

Oneyed
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

Re: xml question

Postby koontz1973 on Mon Jan 28, 2013 5:45 am

Oneyed wrote:
ender516 wrote:Make a continent, "Can Bombard X", with components A and B and blocker components C and D. Use that as the condition for bombarding X. Make another continent, "Can Bombard Y" with components C and D, and use it as the condition for bombarding Y.


what are blocker? it is something what can be codded in xml?
thanks.

Oneyed

Yes. XML Guide
Oneyed, here is the guide from the xml guide, but it is worth reading it all. Most of it is old but their is a lot of new things now that can be played with.

4.3.3 - <mandatory>, <blocker> and <multiplier>

Blocker

Syntax
<continent>
__<name>ConName</name>
__<bonuses>
____<bonus required="#">BonusVal</bonus>
____...
__</bonuses>
__<components>
____<territory type="blocker">TerrName</territory>
____...
__</components>
</continent>


The blocker type identify a particular type of component. If you hold a blocker component you do NOT hold the continent.
To specify the blocker type for a territory you need to add type="blocker" into the opening territory tag: <territory type="blocker">

For example
Code: Select all
<continent>
    <bonuses>
    <bonus required="1">1</bonus>
    <bonus required="2">3</bonus>
    <bonus required="3">5</bonus>
    </bonuses>
    <components>
    <territory type="blocker">country 1</territory>
    <territory>country 2</territory>
    <territory>country 3</territory>
    <territory>country 4</territory>
    </components>
    </continent>


With the above code, if the player holds country 1 (it doesn't matter how many other territories he has) he doesn't hold the continent at all and that means if it was a subcontinent he doesn't hold that either, like in the example into the following spoiler:
show


IMPORTANT
The blocker type can be used ONLY with <territory> components. Do NOT use it with <continent>
Sergeant 1st Class koontz1973
Cartography Assistant
Cartography Assistant
 
Posts: 7538
Joined: Thu Jan 01, 2009 10:57 am
Medals: 116
Standard Achievement (4) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (4)
Trench Warfare Achievement (1) Teammate Achievement (1) Random Map Achievement (2) Cross-Map Achievement (3) Beta Map Achievement (2)
Ratings Achievement (4) Tournament Achievement (10) General Achievement (13) Clan Achievement (5) Map Contribution (12)
Tournament Contribution (31) General Contribution (9)

Re: xml question

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

this is crashing answer :)
thank you.

Oneyed
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

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
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

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.
Sergeant 1st Class koontz1973
Cartography Assistant
Cartography Assistant
 
Posts: 7538
Joined: Thu Jan 01, 2009 10:57 am
Medals: 116
Standard Achievement (4) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (4)
Trench Warfare Achievement (1) Teammate Achievement (1) Random Map Achievement (2) Cross-Map Achievement (3) Beta Map Achievement (2)
Ratings Achievement (4) Tournament Achievement (10) General Achievement (13) Clan Achievement (5) Map Contribution (12)
Tournament Contribution (31) General Contribution (9)

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
Sergeant 1st Class Oneyed
 
Posts: 857
Joined: Sat Dec 10, 2011 12:29 pm
Medals: 11
Standard Achievement (2) Doubles Achievement (1) Terminator Achievement (1) Manual Troops Achievement (1) Fog of War Achievement (2)
Trench Warfare Achievement (2) Teammate Achievement (1) Cross-Map Achievement (1)

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.
Sergeant 1st Class koontz1973
Cartography Assistant
Cartography Assistant
 
Posts: 7538
Joined: Thu Jan 01, 2009 10:57 am
Medals: 116
Standard Achievement (4) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (4)
Trench Warfare Achievement (1) Teammate Achievement (1) Random Map Achievement (2) Cross-Map Achievement (3) Beta Map Achievement (2)
Ratings Achievement (4) Tournament Achievement (10) General Achievement (13) Clan Achievement (5) Map Contribution (12)
Tournament Contribution (31) General Contribution (9)

PreviousNext

Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

Login