180 Open Daily games
0 Open Realtime games
    Pages:   1234   (4 in total)
  1. #21 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    I can help, as I'm also the one who asked for the one-way border converter. If you're looking for next steps, a view-only border making script would be useful as well :)


  2. #22 / 71
    Moderator...ish. Cramchakle
    Rank
    Private
    Rank Posn
    #3020
    Join Date
    Nov 09
    Location
    Posts
    1182

    {#emotions_dlg.suspicious}

    In your Face!

    Edited Sun 4th Aug 10:29 [history]

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

    You're freaking me out man!

     

    If I zoom in a bit with firefox, I get the same thing.  Chrome always shows them connected. 

    I haven't tried to valid the webpages, so maybe I'm missing a closing tag or something.


  4. #24 / 71
    Standard Member ratsy
    Rank
    Brigadier General
    Rank Posn
    #66
    Join Date
    Jul 10
    Location
    Posts
    1274

    looks like a cell border. {#emotions_dlg.confused}

    "I shall pass this but once, any good I can do, or kindness I can show; let me do it now. Let me not difer nor neglect it, for I shall not pass this way again." -Stephen Grellet

  5. #25 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    Ozy, I ran a test of the border mods function on that map I PMed you about a few weeks ago. I ran into some problems (see below), so I thought I'd share. In the future, I'm not sure the forum thread is the best place, maybe you would prefer PMs?

    Here's the commands as I entered them:

     

    modifyBorders;[G];;;[G];;;0;0;Default;One-way;
    modifyBorders;[G];;;[S];;;-15;0;Default;One-way;
    modifyBorders;[G];;;[F];;;0;0;Default;One-way;
    modifyBorders;[G];;;[FH];;;5;10;Default;One-way;
    modifyBorders;[G];;;[H];;;5;10;Default;One-way;
    modifyBorders;[G];;;[M];;;-30;-15;Default;One-way;
    modifyBorders;[G];;;[D];;;-10;0;Default;One-way;
    modifyBorders;[G];;;[P];;;0;10;Default;One-way;
    modifyBorders;[G];;;[W];;;10;0;Default;One-way;
    modifyBorders;[S];;;[G];;;-15;0;Default;One-way;
    modifyBorders;[S];;;[S];;;-30;0;Default;One-way;
    modifyBorders;[S];;;[F];;;-15;0;Default;One-way;
    modifyBorders;[S];;;[FH];;;-10;10;Default;One-way;
    modifyBorders;[S];;;[H];;;-10;10;Default;One-way;
    modifyBorders;[S];;;[M];;;-45;-15;Default;One-way;
    modifyBorders;[S];;;[D];;;-25;0;Default;One-way;
    modifyBorders;[S];;;[P];;;-15;10;Default;One-way;
    modifyBorders;[S];;;[W];;;-5;0;Default;One-way;
    modifyBorders;[F];;;[G];;;-10;0;Default;One-way;
    modifyBorders;[F];;;[S];;;-25;0;Default;One-way;
    modifyBorders;[F];;;[F];;;-10;0;Default;One-way;
    modifyBorders;[F];;;[FH];;;-5;10;Default;One-way;
    modifyBorders;[F];;;[H];;;-5;10;Default;One-way;
    modifyBorders;[F];;;[M];;;-40;-15;Default;One-way;
    modifyBorders;[F];;;[D];;;-20;0;Default;One-way;
    modifyBorders;[F];;;[P];;;-10;10;Default;One-way;
    modifyBorders;[F];;;[W];;;0;0;Default;One-way;
    modifyBorders;[FH];;;[G];;;-10;0;Default;One-way;
    modifyBorders;[FH];;;[S];;;-25;0;Default;One-way;
    modifyBorders;[FH];;;[F];;;-10;0;Default;One-way;
    modifyBorders;[FH];;;[FH];;;-5;10;Default;One-way;
    modifyBorders;[FH];;;[H];;;-5;10;Default;One-way;
    modifyBorders;[FH];;;[M];;;-40;-15;Default;One-way;
    modifyBorders;[FH];;;[D];;;-20;0;Default;One-way;
    modifyBorders;[FH];;;[P];;;-10;10;Default;One-way;
    modifyBorders;[FH];;;[W];;;0;0;Default;One-way;
    modifyBorders;[H];;;[G];;;0;0;Default;One-way;
    modifyBorders;[H];;;[S];;;-15;0;Default;One-way;
    modifyBorders;[H];;;[F];;;0;0;Default;One-way;
    modifyBorders;[H];;;[FH];;;5;10;Default;One-way;
    modifyBorders;[H];;;[H];;;5;10;Default;One-way;
    modifyBorders;[H];;;[M];;;-30;-15;Default;One-way;
    modifyBorders;[H];;;[D];;;-10;0;Default;One-way;
    modifyBorders;[H];;;[P];;;0;10;Default;One-way;
    modifyBorders;[H];;;[W];;;10;0;Default;One-way;
    modifyBorders;[M];;;[G];;;-30;0;Default;One-way;
    modifyBorders;[M];;;[S];;;-45;0;Default;One-way;
    modifyBorders;[M];;;[F];;;-30;0;Default;One-way;
    modifyBorders;[M];;;[FH];;;-25;10;Default;One-way;
    modifyBorders;[M];;;[H];;;-25;10;Default;One-way;
    modifyBorders;[M];;;[M];;;-60;-15;Default;One-way;
    modifyBorders;[M];;;[D];;;-40;0;Default;One-way;
    modifyBorders;[M];;;[P];;;-30;10;Default;One-way;
    modifyBorders;[M];;;[W];;;-20;0;Default;One-way;
    modifyBorders;[D];;;[G];;;-10;0;Default;One-way;
    modifyBorders;[D];;;[S];;;-25;0;Default;One-way;
    modifyBorders;[D];;;[F];;;-10;0;Default;One-way;
    modifyBorders;[D];;;[FH];;;-5;10;Default;One-way;
    modifyBorders;[D];;;[H];;;-5;10;Default;One-way;
    modifyBorders;[D];;;[M];;;-40;-15;Default;One-way;
    modifyBorders;[D];;;[D];;;-20;0;Default;One-way;
    modifyBorders;[D];;;[P];;;-10;10;Default;One-way;
    modifyBorders;[D];;;[W];;;0;0;Default;One-way;
    modifyBorders;[P];;;[G];;;0;0;Default;One-way;
    modifyBorders;[P];;;[S];;;-15;0;Default;One-way;
    modifyBorders;[P];;;[F];;;0;0;Default;One-way;
    modifyBorders;[P];;;[FH];;;5;10;Default;One-way;
    modifyBorders;[P];;;[H];;;5;10;Default;One-way;
    modifyBorders;[P];;;[M];;;-30;-15;Default;One-way;
    modifyBorders;[P];;;[D];;;-10;0;Default;One-way;
    modifyBorders;[P];;;[P];;;0;0;Default;One-way;
    modifyBorders;[P];;;[W];;;10;0;Default;One-way;
    modifyBorders;[W];;;[G];;;10;0;Default;One-way;
    modifyBorders;[W];;;[S];;;-5;0;Default;One-way;
    modifyBorders;[W];;;[F];;;10;0;Default;One-way;
    modifyBorders;[W];;;[FH];;;15;10;Default;One-way;
    modifyBorders;[W];;;[H];;;15;10;Default;One-way;
    modifyBorders;[W];;;[M];;;-20;-15;Default;One-way;
    modifyBorders;[W];;;[D];;;0;0;Default;One-way;
    modifyBorders;[W];;;[P];;;10;10;Default;One-way;
    modifyBorders;[W];;;[W];;;20;0;Default;One-way;

     

    And here is the lengthy error message I got:

     

     
     
    AttributeError
    Python 2.4.3: /usr/bin/python
    Thu Aug 8 18:17:51 2013

    A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

     /hsphere/local/home/prestopn/prestopnik.com/cgi-bin/process_WG_XML_file.py
      306   fileContents = fileitem.file.read()
      307   #handleFile(fileContents,form)
      308   handleXMLFile(fileContents,form)
      309   #message = 'The file "' + fn + '" was uploaded successfully'
      310 
    handleXMLFile = <function handleXMLFile>, fileContents = '<?xml version=\'1.0\' encoding=\'utf-8\'?><WarGearXM...onus="Default" seat="10" /></colors></WarGearXML>', form = FieldStorage(None, None, [FieldStorage('cmdsToEx...="Default" seat="10" /></colors></WarGearXML>')])
     /hsphere/local/home/prestopn/prestopnik.com/cgi-bin/process_WG_XML_file.py in handleXMLFile(fileContents='<?xml version=\'1.0\' encoding=\'utf-8\'?><WarGearXM...onus="Default" seat="10" /></colors></WarGearXML>', form=FieldStorage(None, None, [FieldStorage('cmdsToEx...="Default" seat="10" /></colors></WarGearXML>')]))
      250       
      251       if functionName == "modifyBorders":
      252         handleModifyBordersForm(wgmap,args)
      253         
      254       if functionName == "ContinentsByNeighbors":
    global handleModifyBordersForm = <function handleModifyBordersForm>, wgmap = <WarGearLib.General.WGMap object>, args = ['[G]', '', '', '[G]', '', '', '0', '0', 'Default', 'One-way', '']
     /hsphere/local/home/prestopn/prestopnik.com/cgi-bin/process_WG_XML_file.py in handleModifyBordersForm(wgmap=<WarGearLib.General.WGMap object>, args=['[G]', '', '', '[G]', '', '', '0', '0', 'Default', 'One-way', ''])
      169 
      170   fromIDSet = getTerritorySet(wgmap,args[0],args[1],args[2])
      171   toIDSet = getTerritorySet(wgmap,args[4],args[5],args[6])
      172     
      173     
    toIDSet undefinedglobal getTerritorySet = <function getTerritorySet>, wgmap = <WarGearLib.General.WGMap object>, args = ['[G]', '', '', '[G]', '', '', '0', '0', 'Default', 'One-way', '']
     /hsphere/local/home/prestopn/prestopnik.com/cgi-bin/process_WG_XML_file.py in getTerritorySet(wgmap=<WarGearLib.General.WGMap object>, regex='', csvList='', continent='0')
       97   if (continent != ""):
       98     memberString = wgmap.getContinentMembersFromName(continent)
       99     for memberID in memberString.split(","):
      100       IDSet.add(memberID)
      101     
    memberID undefinedmemberString = None, memberString.split undefined

    AttributeError: 'NoneType' object has no attribute 'split' 
          args = ("'NoneType' object has no attribute 'split'",)

     


  6. #26 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    The forum thread is fine for reporting problems.  PM is also ok. 

    I'm in the middle of redoing all the WGAME stuff.  Did you use the MapEditor2 link?  I should have time to test the modify borders function tonight, and I'll post here once I have it debugged, so that you can try your stuff again.


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

    I used the MapEditor 2 link.


  8. #28 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    Found a bug that I think will fix this for you.  Try running your cmd queue again and let me know.


  9. #29 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    No error message that time! The output file seems to have worked, though I can't quite do what I was trying to do with it, yet, without conversion of two-way border to two one-way borders.


  10. #30 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    Coming soon.  I've tested all but the factory maker with the new setup.  As soon as I get that tested, I'll enable the new WGAME and then do the two-way -> one-way.   Then I'm taking a break from WGAME for a bit.


  11. #31 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    Ok, the transition is complete.  Don't use MapEditor2, just go to

    http://prestopnik.com/wargear/MapEditor/

     

    Change List

    • Introduced consistency between forms.  All forms that define a territory set do it the same way now.
    • Change from spaces to semicolons to separate arguments. 
    • Added 'How To' on each form, and short description on main page.
    • Improved csv handling.  Now uses standard csv format (i.e. your territory names can have a comma in them, just enclose in quotes.) 
    • Many graphical updates to improve usability.
    • Output XML is now 'pretty'  (i.e. increased use of whitespace to promote readibiilty)
    • Fixed annoying 'None' bug.
    • Infrastructure refactoring/cleanup should make future development quicker and less error prone.

     

    I still need to cleanup the documentation and add the two-way to two one-way functionality.

    Edited Sat 10th Aug 00:49 [history]

  12. #32 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    This looks really great, definitely more user friendly now -  awesome job!


  13. #33 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    Thanks!  It's been a learning experience and a lot of work, but kinda fun at the same time. 

     

    Not required, but I would appreciate it - If anyone uses the WGAME for a map that goes live, please email the cmd line you used and/or put it on your wiki page for the map. 


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

    I added the 'split borders' function.  Some quick testing shows it working ok, but please let me know if you notice bugs or unexpected behavior.  I still need to add some documentation for it.


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

    Awesome. I'll give it a try later today or tonight.


  16. #36 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    Ozy, the split borders feature seems to work perfectly. However, I'm having some trouble with the border mods tool. Here's the board I'm working on: http://www.wargear.net/boards/designer/5044. This is afer I've imported the output xml from running a series of commands that all look like this: modifyBorders;[M];;;[M];;;-60;-15;Default;One-way;  (The full script is pretty much the same as the long set of code I mentioned earlier in this thread).

    What I think that line should have done is for each territory with a designation of [M] (for mountain, in this case) that has a border (all one-way after I ran the split function on every border) to another territory with a designation of [M], the attack modifier should be set to -60 and the defend modifier to -15. This seems to have worked for some of the [M] -> [M] borders, for example see Breakline 30 [M] -> Breakline 13 [M] in the upper right. The borders in both directions between those two mountain territories are correctly modified at -60/-15. However, another set of mountains near the center of the map, Dragon's Teeth 4 [M] -> Dragon's Teeth 5 [M] are for some reason set to -20/0.

    This is the case for all of my different terrain types -- some pairs of [X] -> [Y] are correct, while others are completely off even though X and Y remained the same. I cannot figure out why this should be the case, unless somehow my regex is not matching properly? But that's why I was using the '[' notations, to make sure the regexes would be unique and mutually exclusive. The list of regexes is [G], [S], [F], [FH], [H], [M], [D], [P], [W], and the full script codes for a different modifier for each unique, direction-dependent pair from this set.  Any ideas?

     

     


  17. #37 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    Funny you should mention this.  I based the split borders functionality on modify borders, and accidentally deleted modify borders when I was working on it.  I copied an old version back in, but it must have had a bug in it.  :(    I have an idea of what is happening.  I'll post more once I get a chance to look at it tonight.

    If you have a chance email me the xml & cmd queue, so that I can find the problem more easily.

    Edited Tue 13th Aug 16:38 [history]

  18. #38 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    I think the problem is that for regexs, you have to 'escape' brackets.  That means you need to precede them with a slash.   So for example instead of:

    modifyBorders;[M];;;[M];;;-60;-15;Default;One-way;

    you should have:

    modifyBorders;\[M\];;;\[M\];;;-60;-15;Default;One-way;


    Otherwise the brackets are ignored (more specifically, they define a set of possible matches, in this case your set was just a single character).

    In your case the cmd:

    modifyBorders;[D];;;[D];;;-20;0;Default;One-way

    was the last to match the Dragon's Teeth territories, so that was the modifier that got applied in the end.

     

    You should be able to run a find/replace on your cmd queue to update it pretty easily. 

     

    I also made some updates to the modifyborders code, because it looked wrong/inefficient to me, but I'm not sure if that had anything to do with your problem.  In fact, hopefully I have not introduced a new bug with my recent mod. 

    Let me know how it goes.


  19. #39 / 71
    Premium Member Kjeld
    Rank
    Major General
    Rank Posn
    #15
    Join Date
    Nov 09
    Location
    Posts
    1339

    Ok, gotcha. Is there a list of the special characters that require a back-slash?


  20. #40 / 71
    Shelley, not Moore Ozyman
    Rank
    Brigadier General
    Rank Posn
    #40
    Join Date
    Nov 09
    Location
    Posts
    3448

    I put one on the regex's page of documentation:

    https://sites.google.com/a/prestopnik.com/wgame/documentation/regexs

    Maybe I should add a link to the forms.


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