Anyone use WGAME lately? I can't seem to get it to add new borders with the modify border tool (it is supposed to do that, right?).
I have tried several permutations of border types and regex matching vs exact name. Here is one example:
modifyBorders;;S 01 01;;;I 01 01;;0;0;View Only;Two-way;
This is using the territory names S 01 01 and I 01 01 under the exact match part of the form. Then 0 for both of the dice mods. I have tried both one-way and two-way borders and including the 0s for the dice mods or leaving them blank.
Under the debug screen I get:
Debug String: processing: modifyBorders;;S 01 01;;;I 01 01;;0;0;View Only;Two-way; functionName: modifyBorders arg: arg: S 01 01 arg: arg: arg: I 01 01 arg: arg: 0 arg: 0 arg: View Only arg: Two-way arg:
IDSet: "125"
IDSet: "0"
Modifying Borders from (IDs): 125 to (IDs):0 WGLib Stdout: modifyBorders called fromList set([125]) toList set([0]) kwargs: defenseModifier 0 attackModifier 0 borderType View Only borderDirection Two-way Original Contents New Contents
125 and 0 are the correct IDs. However, when I export the xml, there are no new borders. The only modification to the xml file appears to be an increase in the number of spaces between each line.
Any ideas what I am doing wrong? I have used this tool before without issues.
Thanks.
With some more experimentation, it will modify existing borders properly. I thought I remembered it being able to create new borders if they didn't exist though. Anybody know a way to do that?
Korrun wrote:With some more experimentation, it will modify existing borders properly. I thought I remembered it being able to create new borders if they didn't exist though. Anybody know a way to do that?
I don't think that was ever available, but I couldn't say for sure. I don't know when I'll have time to add new features to WGAME, but I could create a one-off script by hand for you more easily, so if you want to tell me the details, I can let you know how much work it would be.
I don't think it would be very easy for a one-off script. I have territories in groups of 8. 1 of them is a 'regular' territory. 6 of them are for artillery, and 1 is for vision. The regular territory needs to attack the other 7 with a one-way border. The vision territory needs to see the other 7 as well as the 8 in each of the adjacent groups and the artillery needs to artillery attack the groups (or maybe I'll just have the artillery attack the 'regular' territories and not the other artillery/vision territories) in a straight line from it.
If you ever wanted to add an option for the modify territories function to add new borders, I could see it being useful in other situations.
Korrun wrote:I don't think it would be very easy for a one-off script. I have territories in groups of 8. 1 of them is a 'regular' territory. 6 of them are for artillery, and 1 is for vision. The regular territory needs to attack the other 7 with a one-way border. The vision territory needs to see the other 7 as well as the 8 in each of the adjacent groups and the artillery needs to artillery attack the groups (or maybe I'll just have the artillery attack the 'regular' territories and not the other artillery/vision territories) in a straight line from it.
Send me the XML and I'll do it for you if you want. Shouldn't take too long - I'll probably have time this weekend.
Sent you an email with the xml.
I can't get split borders or collector's bonus to work. Both give me python errors no matter what I try. Anyone else having problems or am I just having a brain fart?
I've got family in town right now, but will take a look in a few days. It would not surprise me if these are broken, as I overhauled the way it processed things recently and might have missed some bugs.
Ozyman wrote:I've got family in town right now, but will take a look in a few days. It would not surprise me if these are broken, as I overhauled the way it processed things recently and might have missed some bugs.
Thanks! If you have time to add an "Add Borders" feature when you do that, I would appreciate it.
Features that I have thought of that I would use:
I'm feeling a bit more like putting some time into the WGAME. Once I get the current bugs fixed, I'll tackle the features you want. If I haven't posted some progress on this by Jan 7th, please poke me.
I uploaded a fix for the split borders. It should fix the issue you had, but I did not test it, so it could still have other problems. If you still have other problems, I'll need to do more extensive testing, so if it still doesn't work, please email the XML you are trying to modify and the split command you are using.
Can you paste in or PM me the python error you are getting from the collector's bonus?
Just, wow, this stuff has come a LONG way since my time.
Korrun.
How would you want the add borders to work. i.e. how would you tell the WGAME which two territories to add a border between?
This is for your Battle of Bladensburg map, right? Seems like WGAME would have to know about how hex maps are laid out. I can do that, but I might add some specific gridded map functions to WGAME.
Does that seem like a good direction to go? I have some of this written already for when I did my maze map (square grid), and could easily expand to a hex grid.
Grid coordinates sound complicated. I was just thinking regex (exactly the same as the Modify Border), but distance might be nice also.
Regex example:
1. Creates one-way artillery borders from the Nuclear Bomb territory to all territories on the map with +2 attack modifier.
2. Creates one-way vision borders from the North American Satellite territory to all territories in north america.
3. Creates default borders between all tunnel territories with +1 defense.
I could also see distance being helpful.
Creates artillery borders from every city territory to every territory on the map that is 3 hops away or less. This function should probably also not overwrite existing borders (that is the default borders that connect the city to it's neighbouring territories.
Can't remember if I got back to you about the recent fixes on WGAME. The collector's bonus and split borders appear to be working correctly now except that the collector's bonus creates a bunch of single member continents with 0 bonus units for the individual bonus=0 setting.
Korrun wrote:Grid coordinates sound complicated. I was just thinking regex (exactly the same as the Modify Border), but distance might be nice also.
Regex example:
- Create Borders; from Nuclear Bomb; to .*; +2 attack; one-way; artillery;
- Create Borders; from North American Satellite; to [NA]; one-way; vision;
- Create Borders; from [tunnel]; to [tunnel]; +1 defense; two-way; default;
1. Creates one-way artillery borders from the Nuclear Bomb territory to all territories on the map with +2 attack modifier.
2. Creates one-way vision borders from the North American Satellite territory to all territories in north america.
3. Creates default borders between all tunnel territories with +1 defense.
I could also see distance being helpful.
- Create Borders; from [city]; to .*; maximum distance 3; one-way; artillery;
Creates artillery borders from every city territory to every territory on the map that is 3 hops away or less. This function should probably also not overwrite existing borders (that is the default borders that connect the city to it's neighbouring territories.
Didn't you want to be able to use this to add the borders for infantry, artillery, etc. for Battle of Bladensburg?
Korrun wrote:the collector's bonus creates a bunch of single member continents with 0 bonus units for the individual bonus=0 setting.
I think I fixed this and updated it. Didn't test it, but it was a simple change so I don't expect any problems.
Ozyman wrote:Korrun wrote:Grid coordinates sound complicated. I was just thinking regex (exactly the same as the Modify Border), but distance might be nice also.
Regex example:
- Create Borders; from Nuclear Bomb; to .*; +2 attack; one-way; artillery;
- Create Borders; from North American Satellite; to [NA]; one-way; vision;
- Create Borders; from [tunnel]; to [tunnel]; +1 defense; two-way; default;
1. Creates one-way artillery borders from the Nuclear Bomb territory to all territories on the map with +2 attack modifier.
2. Creates one-way vision borders from the North American Satellite territory to all territories in north america.
3. Creates default borders between all tunnel territories with +1 defense.
I could also see distance being helpful.
- Create Borders; from [city]; to .*; maximum distance 3; one-way; artillery;
Creates artillery borders from every city territory to every territory on the map that is 3 hops away or less. This function should probably also not overwrite existing borders (that is the default borders that connect the city to it's neighbouring territories.
Didn't you want to be able to use this to add the borders for infantry, artillery, etc. for Battle of Bladensburg?
The infantry borders were easy enough to do by hand and the artillery borders I ended up doing by hand, but didn't have artillery attack artillery because that would give me 7 times as many border to make.
I would have done:
and then cut and paste it about 1,000 times and go through and switch the numbers by hand. Those 1,000 commands would create 7,000 borders much faster than making those borders by hand in the designer.
The vision borders I could do the same way, or use the distance thing (which should function the same as your hordes tool I assume):
Then cut and paste about 100 times switching the numbers and voila!
I wouldn't have any idea how a grid based mechanism would understand how to create borders for my directional artillery territories.