223 Open Daily games
1 Open Realtime game
    Pages:   1   (1 in total)
  1. #1 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Hello dev community,

     

    I began designing my first board. Started with designing it here on the website but since it's such a tedious process and to do proper territory alignment I need to be glued to the screen which hurts my eyes.

    So, obviously the next step is to export to XML, understand the coding scheme and copy paste swathes of terrs and other items like borders and then edit their values which is much faster to do.

    I got one question though. It seems that territories that were added to the design, through the normal designer on this website, at different moments did not get contiguous IDs.

    To be clear, so in day 1, I've added some territories and borders and what not. In day 2, I add more territories and borders and I export to XML.

    While the 8 digit border IDs are all in sequence, in the 7 digit territory IDs there is a jump between the terrs added in day 1 and the terrs added in day 2.

    I'm guessing this ID scheme is shared among all boards (correct me if I'm wrong). If that is the case, how do I know of a free range of IDs when I add territories? Should I simply shoot for a much bigger number where supposedly the ID hasn't reached yet? Or am I getting this wrong and I can enter whatever ID I want as long as it is unique in my board.

     

    Yeah, basically the main question is:  must these IDs be unique globally or just unique to the board?


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

    Just unique to your board.

    If you're not sure if something will work, you can always just try it and see what happens. I don't think you can break anything.

    Also, this can be helpful: http://www.wargear.net/forum/showthread/2658p1/Wargear_Advanced_Map_Editor


  3. #3 / 14
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3449

    Korrun's got it.  

    And  if you happen to be familiar with Python, I'd gladly share the python libraries I've written for manipulating the WarGear XML.


  4. #4 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Ok, thanks for the answers. So I guess I only need to maintain the 7 digit format.

     

    I know C/C++ and a bit of Java and Fortran. Should be enough to learn a new language more or less quickly, no?

    Yeah, I'd appreciate it if you send me the libs.


  5. #5 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Just a quick question. Why do territories need 2 IDs, then? (the "id" and the "tid")


  6. #6 / 14
    Enginerd weathertop
    Rank
    Brigadier General
    Rank Posn
    #64
    Join Date
    Nov 09
    Location
    Posts
    3020

    that's a good question. i thought one was the 7-digit # and the other is what you wanted them called; but that's actually "name"

    i don't know if "TID" is just a counter (starts at 0) or what happens if you renumber them...

    I'm a man.
    But I can change,
    if I have to,
    I guess...

  7. #7 / 14
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    I seem to recall that if you import an xml without the 7-digit numbers, the designer will add them for you. Not so with the TID numbers.


  8. #8 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Ok, might try that.

     

    TID is definitely not just a counter, it is the TID that is used in the code to point to the territory objects. For example, borders use the TID to specify which territories to connect. I guess the same is true for continents, factories, modifiers, etc.

     

    I guess only Tom or someone else who has dealt with the game engine can tell why the 7 digit ID is needed.


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

    Now that I'm looking at it, I think that maybe the 7 digit ID (along with the continentID and border ID) are unique across all boards. Whereas the TID is just for the current board.

    I also seem to recall the same as Kjeld that incorrect/missing/duplicate IDs (but not TID) will be fixed be the designer when you upload the xml.


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

    If you have programming experience, python should be pretty easy for you to pick up. Especially once you get past the indentation.


  11. #11 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Ok, might try that.

     

    TID is definitely not just a counter, it is the TID that is used in the code to point to the territory objects. For example, borders use the TID to specify which territories to connect. I guess the same is true for continents, factories, modifiers, etc.

     

    I guess only Tom or someone else who has dealt with the game engine can tell why the 7 digit ID is needed.


  12. #12 / 14
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3449

    weird double post.

    ------------------------

    I'm trying to figure out git for windows so that I can more regularly upload my python libraries to github.  In the meantime an old version is available:

    https://github.com/Ozyman/WarGearLib

    General.py is where you probably want to start - the rest is more specific to individual maps.

    Let me warn you that the code is kind of a mess.  It all works (I think), but it could stand to be refactored, but I haven't bothered.

    I also have some old documentation online, from when I was trying to use sphynx (python documenter):

    http://prestopnik.com/wargear/python/docs/

    It's old, but the main parts of the library haven't changed much since then, so it will at least give you a good idea of how it all works.


  13. #13 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Korrun wrote: Now that I'm looking at it, I think that maybe the 7 digit ID (along with the continentID and border ID) are unique across all boards. Whereas the TID is just for the current board.

    I also seem to recall the same as Kjeld that incorrect/missing/duplicate IDs (but not TID) will be fixed be the designer when you upload the xml.

    I'm thinking the same. I have now imported XMLs where most factories did not have continentIDs and it works fine. If I export later, they all come with IDs and ordered and there's an upward jump in IDs compared to the previous export.


  14. #14 / 14
    Standard Member redshift
    Rank
    Major
    Rank Posn
    #134
    Join Date
    Dec 16
    Location
    Posts
    287

    Ozyman wrote:

    weird double post.

    ------------------------

    I'm trying to figure out git for windows so that I can more regularly upload my python libraries to github.  In the meantime an old version is available:

    https://github.com/Ozyman/WarGearLib

    General.py is where you probably want to start - the rest is more specific to individual maps.

    Let me warn you that the code is kind of a mess.  It all works (I think), but it could stand to be refactored, but I haven't bothered.

    I also have some old documentation online, from when I was trying to use sphynx (python documenter):

    http://prestopnik.com/wargear/python/docs/

    It's old, but the main parts of the library haven't changed much since then, so it will at least give you a good idea of how it all works.

     

    Thanks, will take a look.


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