236 Open Daily games
1 Open Realtime game
    Pages:   1   (1 in total)
  1. #1 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    I am trying to duplicate some board functions using xml instead of the designer.  For instance, I have this bit of xml:

    <continent continentid="9456883" boardid="6027" name="P1 AN TS" bonus="0" members="633" factory="103" factory_type="AutoNeutralReset" factory_cap="0" />
    <continent continentid="9456882" boardid="6027" name="P1 AN TGL" bonus="0" members="633" factory="131" factory_type="AutoNeutralReset" factory_cap="0" />


    etc, etc, etc, through to...


    <continent continentid="9456848" boardid="6027" name="P1 AN ArabS" bonus="0" members="633" factory="94" factory_type="AutoNeutralReset" factory_cap="0" />
    <continent continentid="9456847" boardid="6027" name="P1 AN AS" bonus="0" members="633" factory="82" factory_type="AutoNeutralReset" factory_cap="0" />

    so, we can see that since it goes from 83 through to 47 it is 37 autoneutralreset factories related to the territory 633 and neutralize 37 territories at the beginning of P1's (player 1's) turn.

    If I was to duplicate this list for the other 15 players by changing the continent id's to 9456884-9456920, 9456921-9456957, etc

    The name's from P1's to P2's, P3's, etc

    and the member="633" to the associated territory id that is held to trigger this

    factory="??" is a bit confusing to me because their is no pattern and the factory numbers jump all over the place.

    Also, where is it in all that code that is determining the target territories that I had assigned to be neutralized?

    I'm assuming that somehow the factory number is relating to the target territory, but, when I search for "factory="??"" in the xml I'm not seeing another reference nor relationship to it.  Maybe I just need to know the other name for it, or, just to leave the factory number the same and all will be well?

    Thanks!

    Erick

    Edited Sat 24th Jan 09:38 [history]

  2. #2 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    Another question, for ease of conversion could I just find and replace 94568 for 94569, then 94569 for 94570, then 94570 for 94571, etc, and start each set at increments of 100 thus leaving gaps of 63 between each set, or, would it be sensitive to gaps in the continent id's?


  3. #3 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    I searched for "103" instead of factory"103" and do realize that that is the target territory in that the 103 is the territory id number.  I think I might be figuring this out...

    Still need to know about gap sensitivity though from anyone who has done this before.


  4. #4 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    So, if gaps are ok, I'm thinking the next set could look like this:

    <continent continentid="9456983" boardid="6027" name="P2 AN TS" bonus="0" members="634" factory="103" factory_type="AutoNeutralReset" factory_cap="0" />
    <continent continentid="9456982" boardid="6027" name="P2 AN TGL" bonus="0" members="634" factory="131" factory_type="AutoNeutralReset" factory_cap="0" />


    etc, etc, etc, through to...


    <continent continentid="9456948" boardid="6027" name="P2 AN ArabS" bonus="0" members="634" factory="94" factory_type="AutoNeutralReset" factory_cap="0" />
    <continent continentid="9456947" boardid="6027" name="P2 AN AS" bonus="0" members="634" factory="82" factory_type="AutoNeutralReset" factory_cap="0" />

     

    And then I could paste it into the xml immediately following the chunk I copied???

    Edited Sat 24th Jan 09:58 [history]

  5. #5 / 10
    Standard Member Korrun
    Rank
    Brigadier General
    Rank Posn
    #74
    Join Date
    Nov 12
    Location
    Posts
    842

    That should work fine. I don't think there is gap sensitivity. factory="??" does refer to the territory id that the factory applies to (in this case the territory that will be AutoNeutralReset to 0)

    You should be able to paste it into the xml anyplace in the continent section. Order doesn't matter.


  6. #6 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    Thanks for the reply!  I'll try it out now... I have saved a copy of the original xml just in case I royally mess everything up!


  7. #7 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    It seemed to work.

    I went to the wiki for this first but that section was blank.  Maybe a veteran xml editor might want to fill that section out a bit?


  8. #8 / 10
    Standard Member Korrun
    Rank
    Brigadier General
    Rank Posn
    #74
    Join Date
    Nov 12
    Location
    Posts
    842

    berickf wrote:

    Thanks for the reply!  I'll try it out now... I have saved a copy of the original xml just in case I royally mess everything up!

    Yes. Always save xml backups! I usually save it under a new version number everytime I make a group of changes. Just in case.

    One time I accidentally imported my xml to the wrong board. Oops!

    Edited Sat 24th Jan 12:35 [history]

  9. #9 / 10
    Standard Member Korrun
    Rank
    Brigadier General
    Rank Posn
    #74
    Join Date
    Nov 12
    Location
    Posts
    842

    berickf wrote:

    It seemed to work.

    I went to the wiki for this first but that section was blank.  Maybe a veteran xml editor might want to fill that section out a bit?

    Sounds like we have a volunteer! ;)


  10. #10 / 10
    Premium Member berickf
    Rank
    Brigadier General
    Rank Posn
    #68
    Join Date
    Jan 12
    Location
    Posts
    822

    Korrun wrote:
    berickf wrote:

    It seemed to work.

    I went to the wiki for this first but that section was blank.  Maybe a veteran xml editor might want to fill that section out a bit?

    Sounds like we have a volunteer! ;)

    Emphasis on veteran!  If you were talking about me, that'd be like the blind leading the blind!


You need to log in to reply to this thread   Login | Join
 
Pages:   1   (1 in total)