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 :)
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.
looks like a cell border.
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 undefined, global 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 undefined, memberString = None, memberString.split undefined |
AttributeError: 'NoneType' object has no attribute 'split'
args = ("'NoneType' object has no attribute 'split'",)
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.
I used the MapEditor 2 link.
Found a bug that I think will fix this for you. Try running your cmd queue again and let me know.
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.
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.
Ok, the transition is complete. Don't use MapEditor2, just go to
http://prestopnik.com/wargear/MapEditor/
Change List
I still need to cleanup the documentation and add the two-way to two one-way functionality.
This looks really great, definitely more user friendly now - awesome job!
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.
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.
Awesome. I'll give it a try later today or tonight.
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?
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.
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.
Ok, gotcha. Is there a list of the special characters that require a back-slash?
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.