User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

The Friendly Skies of Delaware etc. -- A Major WIA Weathers Bug

Mon Jun 27, 2011 10:29 pm

In the course of my work on the Berto's WIA Weathers Mod

(see http://www.ageod-forum.com/showthread.php?t=21844)

I was preparing a series of images showing the various weather areas in WIA.

For some strange reason, I couldn't get the coastal areas to display (highlighted as snow, everywhere else being fair).

Digging deeper, this is what I discovered:

In the WIA/GameData/Weathers folder, the coastal areas are named as:

WeatherPatterns_CoastalWaters_Carribean.ini
WeatherPatterns_CoastalWaters_Middle_States.ini
WeatherPatterns_CoastalWaters_Southeast.ini

Inside the WIA/GameData/Weathers/WeatherPatterns_CoastalWaters_Middle_States.ini file, we see the following:

CoastalWaters_Middle_States|January|Other|Fair|0
CoastalWaters_Middle_States|January|Other|Mud|90
CoastalWaters_Middle_States|January|Other|Snow|10
CoastalWaters_Middle_States|January|Other|Frozen|0
CoastalWaters_Middle_States|January|Other|Blizzard|0
CoastalWaters_Middle_States|January|Swamp|Fair|0
CoastalWaters_Middle_States|January|Swamp|Mud|100
CoastalWaters_Middle_States|January|Swamp|Snow|0
CoastalWaters_Middle_States|January|Swamp|Frozen|0
CoastalWaters_Middle_States|January|Swamp|Blizzard|0
CoastalWaters_Middle_States|January|Wilderness|Fair|0
CoastalWaters_Middle_States|January|Wilderness|Mud|40
CoastalWaters_Middle_States|January|Wilderness|Snow|60
CoastalWaters_Middle_States|January|Wilderness|Frozen|0
CoastalWaters_Middle_States|January|Wilderness|Blizzard|0
CoastalWaters_Middle_States|January|Mountain|Fair|0
CoastalWaters_Middle_States|January|Mountain|Mud|30
CoastalWaters_Middle_States|January|Mountain|Snow|60
CoastalWaters_Middle_States|January|Mountain|Frozen|5
CoastalWaters_Middle_States|January|Mountain|Blizzard|5
CoastalWaters_Middle_States|January|FreezeShallow|Fair|0
CoastalWaters_Middle_States|January|FreezeShallow|Mud|0
CoastalWaters_Middle_States|January|FreezeShallow|Snow|20
CoastalWaters_Middle_States|January|FreezeShallow|Frozen|70
CoastalWaters_Middle_States|January|FreezeShallow|Blizzard|10
CoastalWaters_Middle_States|January|NoFreezeShallow|Fair|50
CoastalWaters_Middle_States|January|NoFreezeShallow|Mud|0
CoastalWaters_Middle_States|January|NoFreezeShallow|Snow|30
CoastalWaters_Middle_States|January|NoFreezeShallow|Frozen|0
CoastalWaters_Middle_States|January|NoFreezeShallow|Blizzard|20
CoastalWaters_Middle_States|January|CoastalWaters|Fair|10
CoastalWaters_Middle_States|January|CoastalWaters|Mud|30
CoastalWaters_Middle_States|January|CoastalWaters|Snow|30
CoastalWaters_Middle_States|January|CoastalWaters|Frozen|0
CoastalWaters_Middle_States|January|CoastalWaters|Blizzard|30
CoastalWaters_Middle_States|January|FreezeOcean|Fair|0
CoastalWaters_Middle_States|January|FreezeOcean|Mud|0
CoastalWaters_Middle_States|January|FreezeOcean|Snow|10
CoastalWaters_Middle_States|January|FreezeOcean|Frozen|60
CoastalWaters_Middle_States|January|FreezeOcean|Blizzard|30
CoastalWaters_Middle_States|January|NoFreezeOcean|Fair|20
CoastalWaters_Middle_States|January|NoFreezeOcean|Mud|30
CoastalWaters_Middle_States|January|NoFreezeOcean|Snow|40
CoastalWaters_Middle_States|January|NoFreezeOcean|Frozen|0
CoastalWaters_Middle_States|January|NoFreezeOcean|Blizzard|10

However, in the WIA/GameData/Weathers/WeatherAreas.ini file, rather than "CoastalWaters", we have instead "Coastal":

$area_Weather_Canadian_Maritimes
$area_Weather_Eastern_Canada
$area_Weather_Western_Canada
$area_Weather_Western_Great_Lakes
$area_Weather_Eastern_Great_Lakes
$area_Weather_Upper_New_England
$area_Weather_Lower_New_England
$area_Weather_Upland_Middle_States
$area_Weather_Coastal_Middle_States
$area_Weather_Coastal_Southeast
$area_Weather_Coastal_Carribean
$area_Weather_Upper_West
$area_Weather_Northern_Plains
$area_Weather_Southern_Plains
$area_Weather_Lower_Louisianne
$area_Weather_Upland_South
$area_Weather_Kentuckee_Uplands
$area_Weather_Upland_Southeast
$area_Weather_WxAtlantic
$area_Weather_WxEurope

Furthermore, in the WIA/GameData/Areas.ini file, we also have just "Coastal":

// Area #86, Coastal_Middle_States
UID = $area_Weather_Coastal_Middle_States
Name = Coastal_Middle_States
// Area #87, Coastal_Southeast
UID = $area_Weather_Coastal_Southeast
Name = Coastal_Southeast
// Area #88, Coastal_Carribean
UID = $area_Weather_Coastal_Carribean
Name = Coastal_Carribean

Because of the "Coastal" in the WeatherAreas.ini & Areas.ini files not matching the "CoastalWaters" in the area weather .ini files (in both their name and contents), for all coastal regions in WIA, the weather is always fair! :bonk:

You can see this for yourself. As I just did, load up your favorite WIA scenario, and cycle through an entire year of turns (hitting the Next Turn button). Check regions within Delaware, or any region in any of the Coastal_Middle_States, Coastal_Southeast, or Coastal_Carribean areas. The weather is never rain/mud, snow, etc., rather always fair! :(

I think that the fix for this bug is to designate "Coastal" (never "CoastalWaters") everywhere. That entails renaming all the WIA/GameData/Weathers files for example:

WeatherPatterns_CoastalWaters_Middle_States.ini -> WeatherPatterns_Coastal_Middle_States.ini

Also, changing the contents of the coastal area .ini files like so:

CoastalWaters_Middle_States|January|CoastalWaters|Fair|10
CoastalWaters_Middle_States|January|CoastalWaters|Mud|30
CoastalWaters_Middle_States|January|CoastalWaters|Snow|30
CoastalWaters_Middle_States|January|CoastalWaters|Frozen|0
CoastalWaters_Middle_States|January|CoastalWaters|Blizzard|30

should instead be:

Coastal_Middle_States|January|Coastal|Fair|10
Coastal_Middle_States|January|Coastal|Mud|30
Coastal_Middle_States|January|Coastal|Snow|30
Coastal_Middle_States|January|Coastal|Frozen|0
Coastal_Middle_States|January|Coastal|Blizzard|30

(Make those substitutions globally, throughout the coastal .ini files.)

I tested these changes, and -- voila! -- suddenly Delaware (and other coastal regions) started having real, variable weather (rain, snow, etc., in addition to fair). :w00t:

In all the time that WIA was under development and testing, in all the time since WIA was released, over all the WIA games ever played -- nobody noticed that the weather in Delaware and other coastal areas to the south and southwest is always the same, always fair? :confused:
What this town needs is a good Renaissance band!
Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org
PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org
AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333
Your Mileage May Vary -- Always!

User avatar
lodilefty
Posts: 7578
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Mon Jun 27, 2011 11:27 pm

berto wrote:<snip>
In all the time that WIA was under development and testing, in all the time since WIA was released, over all the WIA games ever played -- nobody noticed that the weather in Delaware and other coastal areas to the south and southwest is always the same, always fair? :confused:


Guess not.... :bonk:

Thanks. Will add to next patch. :thumbsup:
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

Mon Jun 27, 2011 11:29 pm

For thoroughness' sake, here are all WIA files containing the string "CoastalWaters". In addition to the WeatherPatterns_CoastalWaters_*.ini files, in all likelihood the

"CoastalWaters" -> "Coastal"

substitution should be done in all other WeatherPatterns_*.ini files as well. I can't offer an opinion/conjecture about the first and last two listed files, however. But the need for a change should be investigated in those other places, too.

Berto@robert /cygdrive/c/Games/AGEOD/Wars in America $ find . -exec egrep -l CoastalWaters {} \;

./WIA/GameData/Terrains/13CoastalWaters.ter
./WIA/GameData/Weathers/WeatherPatterns_Canadian_Maritimes.ini
./WIA/GameData/Weathers/WeatherPatterns_CoastalWaters_Carribean.ini
./WIA/GameData/Weathers/WeatherPatterns_CoastalWaters_Southeast.ini
./WIA/GameData/Weathers/WeatherPatterns_Eastern_Canada.ini
./WIA/GameData/Weathers/WeatherPatterns_Eastern_Great_Lakes.ini
./WIA/GameData/Weathers/WeatherPatterns_Kentuckee_Uplands.ini
./WIA/GameData/Weathers/WeatherPatterns_Lower_Louisianne.ini
./WIA/GameData/Weathers/WeatherPatterns_Lower_New_England.ini
./WIA/GameData/Weathers/WeatherPatterns_Northern_Plains.ini
./WIA/GameData/Weathers/WeatherPatterns_Southern_Plains.ini
./WIA/GameData/Weathers/WeatherPatterns_Upland_Middle_States.ini
./WIA/GameData/Weathers/WeatherPatterns_Upland_South.ini
./WIA/GameData/Weathers/WeatherPatterns_Upland_Southeast.ini
./WIA/GameData/Weathers/WeatherPatterns_Upper_New_England.ini
./WIA/GameData/Weathers/WeatherPatterns_Upper_West.ini
./WIA/GameData/Weathers/WeatherPatterns_Western_Canada.ini
./WIA/GameData/Weathers/WeatherPatterns_Western_Great_Lakes.ini
./WIA/GameData/Weathers/WeatherPatterns_WxAtlantic.ini
./WIA/GameData/Weathers/WeatherPatterns_WxEurope.ini
./WIA/Settings/LocalStrings__AGE.csv
./WIA.exe

One other thing (if it matters): My investigations and tests were performed on a WIA installation fully patched to the latest official release, 1.08.
What this town needs is a good Renaissance band!

Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org

PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org

AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333

Your Mileage May Vary -- Always!

User avatar
lodilefty
Posts: 7578
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Mon Jun 27, 2011 11:34 pm

Much easier to search and fix using the DB file, as all are in one multitab spreadsheet....

WIA_DB_WeatherZones_ver104.xls
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

Wed Jun 29, 2011 10:45 am

Investigating further the

WIA/GameData/Terrains/13CoastalWaters.ter

file, I see:

UID = 13
FileName = CoastalWaters
Kind = $WaterTerrain
Name = $ter_nam_CoastalWaters
Text = $ter_txt_CoastalWaters

This makes me question the appropriateness of the

"CoastalWaters" -> "Coastal"

substitution as a suggested fix. I can verify, with that suggested substitution fix, that variable weather begins showing in the coastal regions. But the substitution likely breaks some interactions with the Terrains/13CoastalWaters.ter file.

Unless maybe do these also:

Terrains/13CoastalWaters.ter -> Terrains/13Coastal.ter

UID = 13
FileName = Coastal
Kind = $WaterTerrain
Name = $ter_nam_Coastal
Text = $ter_txt_Coastal

Between the CoastalWaters vs. Coastal designations, there is some ambiguity. The former suggests waters only, while the latter suggests land only. But in the weathers regions, as in

http://www.ageod-forum.com/showthread.php?t=21844&page=2 [#37]

I believe that the Carribean, Middle_States & Southeast weather areas encompass both land and water.

So, what should it (universally) be? "CoastalWaters"? Or "Coastal"?

What do the

WIA/Settings/LocalStrings__AGE.csv
WIA.exe

files prefer?

Unless we are careful, we might fix something only to break something else.

Clear? :confused: As mud? :D

Thoughts?
What this town needs is a good Renaissance band!

Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org

PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org

AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333

Your Mileage May Vary -- Always!

User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

AACW seems not to have this bug

Wed Jun 29, 2011 8:20 pm

FWIW, I cycled through nearly a year of turns in AGEOD's ACW game. Although AACW has similar "CoastalWaters" vs. "Coastal" naming inconsistency, it doesn't seem to be afflicted by the always-fair-weather bug in coastal regions.

In fixing this bug in WIA, maybe Weathers in AACW deserves our study.

(Not to say that weather in AACW is perfect; see

http://www.ageod-forum.com/showthread.php?p=211182#post211182 [#38]

But at least southern coastal regions in AACW do randomly see rain/mud -- and sometimes even random patches of snow -- in addition to fair weather.)
What this town needs is a good Renaissance band!

Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org

PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org

AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333

Your Mileage May Vary -- Always!

User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

The Friendly Skies of Delaware (etc.) -- A Major WIA Weathers Bug -- FIXED!

Wed Jul 06, 2011 9:24 pm

A Major WIA Weathers Bug -- FIXED!

In Wars in America, because of the "Coastal" in the WeatherAreas.ini & Areas.ini files not matching the "CoastalWaters" in the area weather .ini files (in both their name, and contents), for all coastal regions in WIA, the weather is always fair!

By contrast, AGEOD's American Civil War (where Weathers are somewhat similar to Wars in America) does not have this bug.

After comparing the Weathers setups in both Wars in America and AGEOD's American Civil War, I am confident that the fix for this bug is to designate "Coastal" instead of "CoastalWaters" in both the name, and the first field of, the Wars in America coastal WIA/GameData/Weathers/WeatherPatterns*.ini files.

For example:

WeatherPatterns_CoastalWaters_Middle_States.ini

should be renamed as

WeatherPatterns_Coastal_Middle_States.ini

Also, change the contents of the coastal area .ini files like so:

CoastalWaters_Middle_States|January|CoastalWaters|Fair|10
CoastalWaters_Middle_States|January|CoastalWaters|Mud|30
CoastalWaters_Middle_States|January|CoastalWaters|Snow|30
CoastalWaters_Middle_States|January|CoastalWaters|Frozen|0
CoastalWaters_Middle_States|January|CoastalWaters|Blizzard|30

should instead be:

Coastal_Middle_States|January|CoastalWaters|Fair|10
Coastal_Middle_States|January|CoastalWaters|Mud|30
Coastal_Middle_States|January|CoastalWaters|Snow|30
Coastal_Middle_States|January|CoastalWaters|Frozen|0
Coastal_Middle_States|January|CoastalWaters|Blizzard|30

(Note: Make the change in just the first field (highlighted above), not the third field (not highlighted above). "CoastalWaters" in the third field is correct.)

Make the suggested changes in all of these files (listed here with their incorrect file names; be sure also to correct their names as shown above):

WeatherPatterns_CoastalWaters_Carribean.ini
WeatherPatterns_CoastalWaters_Middle_States.ini
WeatherPatterns_CoastalWaters_Southeast.ini

I have run through at least an entire year of a WIA test game, and I can verify that the above changes fix the coastal regions always-fair-weather bug.

These fixes are incorporated in v0.4 (and later versions) of Berto's WIA Weathers Mod, just released here:

http://www.ageod-forum.com/showthread.php?t=21844

Another bug squashed!
What this town needs is a good Renaissance band!

Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org

PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org

AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333

Your Mileage May Vary -- Always!

User avatar
Hobbes
Posts: 4378
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Wed Jul 06, 2011 10:14 pm

Good spot berto! :thumbsup:

Hope this can be added to the next patch.
Cheers, Chris

User avatar
lodilefty
Posts: 7578
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Wed Aug 31, 2011 3:07 pm

Starting patch prep.

I'd rather not try to recreate these fixes in my DB.
Can you please forward the DB files for these Weather changes?
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]

[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]



[CENTER]Rules for new members[/CENTER]

[CENTER]Forum Rules[/CENTER]



[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
berto
AGEod Guard of Honor
Posts: 1386
Joined: Mon Sep 24, 2007 7:13 pm
Location: Oak Park, IL, USA

Wed Aug 31, 2011 6:24 pm

Sure, but not until the third week of September. We're going away on vacation 9/4 thru 9/11. We can coordinate where and how I might download the then very latest DB files on my return. (I'll have other stuff to send also, BTW. ;) )
What this town needs is a good Renaissance band!

Early MusiChicago - Early Music in Chicago and Beyond - http://earlymusichicago.org

PIKT - Global-View, Site-at-a-Time System and Network Administration - http://pikt.org

AGElint - an AGE debugging toolkit - http://www.matrixgames.com/forums/tm.asp?m=2978333

Your Mileage May Vary -- Always!

Return to “Help to improve WIA”

Who is online

Users browsing this forum: No registered users and 1 guest