RE: AGElint first "official" 1.00 release (Full Version)

All Forums >> [Current Games From Matrix.] >> [World War I] >> Revolution Under Siege Gold >> Mods and Scenarios



Message


Chilperic -> RE: AGElint first "official" 1.00 release (12/31/2011 4:03:21 PM)

and 2 others:

ERROR: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/RUS All Scenarios.sct, at (or before) line 2287: syntax error: #|# (0x7c), #|#

in event evt_nam_Allied_involment_level:

2284 MaxDate = 1921/12/30
2285
2286 Actions
2287> PopUpText = str_nam_Allied_Involv_01|NULL|2|Allied_Involv_08|Event-img_Renforts_CMN_BlackSeaAllied|NULL
2288 EndEvent


This command accepts | rather than ; as the official tutorial files show it.

The second false positive is the lack of conditions in the evens in the scripts file (.ini): theses files serving for creating scenarios are made with events command without needing conditions).

Scripts/Script_T1.ini, Fri Oct 1 2010 11:26:12

WARNING: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Scripts/Script_T1.ini, at (or before) line 1130: no Conditions section

1127 Replacement = FIN;$famMilitia;3
1128 NULL = NULL
1129
1130> EndEvent





berto -> RE: AGElint first "official" 1.00 release (12/31/2011 4:04:05 PM)


quote:

ORIGINAL: Chliperic

Another possible false positive:

ChgUnitPoolInfos = $uni_DON_Amt1d;-999;75

The command accepts values from -999 to 999 for variation of force pool

Interesting. Indeed, the AGEWiki page

http://www.ageod.net/agewiki/ChgUnitPoolInfos

says:

quote:

<variation of Force Pool>

Integer (-999 to 999)

Changes the pool value by this amount

Currently, txt.y has:



chgunitpoolinfos: _CHGUNITPOOLINFOS eq val sc intpos
                | _CHGUNITPOOLINFOS eq val sc intpos sc intpos
                {
                /*                                                              
                http://www.ageod.net/agewiki/ChgUnitPoolInfos                   
                Syntax:  ChgUnitPoolInfos = <UnitDef>|<variation of Force Pool>|<AI Pool Ratio>       .                                                        
                */
                }
                ;


I must change that to



chgunitpoolinfos: _CHGUNITPOOLINFOS eq val sc int sc pct


(and possibly also add a CHKINT() to ensure that the second argument, the int, falls between -999 and 999). Note the removal of the first alternative



                  _CHGUNITPOOLINFOS eq val sc intpos


The AGEWiki page clearly requires three arguments for the ChgUnitPoolInfos command. Why do I list the two-argument case?

It's because in actual usage across all AGEOD games, I saw the following exceptions:



[root@telemann agelint]# ./kwddat ChgUnitPoolInfos | awk -F\; 'NF!=3'
1 ChgUnitPoolInfos = $uni_GBR_Inf_1850C_Bde;2
1 ChgUnitPoolInfos = $uni_GBR_Inf_1870_Ghurkas_Rgt1;1
1 ChgUnitPoolInfos = $uni_GBR_Med_Med1;2
1 ChgUnitPoolInfos = $uni_GBR_Mix_1850_Bde;1
1 ChgUnitPoolInfos = $uni_GBR_Sig_Sig1850;3
1 ChgUnitPoolInfos = $uni_IND_Cav_1850_Bde;1
1 ChgUnitPoolInfos = $uni_IND_Inf_1850C_Bde;2
1 ChgUnitPoolInfos = $uni_IND_Mix_1850_Bde;2
1 ChgUnitPoolInfos = $uni_IND_Sup_Sup1;5
1 ChgUnitPoolInfos = $uni_MUG_Art_1840;2
1 ChgUnitPoolInfos = $uni_MUG_Cav_1850_Bde;5
1 ChgUnitPoolInfos = $uni_MUG_FortArt_1840;5
1 ChgUnitPoolInfos = $uni_MUG_Inf_1840C_Bde;15
1 ChgUnitPoolInfos = $uni_MUG_Mix_1840_Bde;10
1 ChgUnitPoolInfos = $uni_MUG_Sup_Sup1;10
1 ChgUnitPoolInfos = $uni_WH3_Mil1;0



When first coding txt.y, whenever I saw many usage counterexamples (where "many" is loosely defined), I inferred that the counterexamples might be acceptable alternative usages. It could be that

  • The AGE code had been extended to allow different alternative usages (in the ChgUnitPoolInfos example, allowing two arguments instead of three), and the AGEWiki docs had not been updated to reflect the extension.
  • The AGEWiki doc is just flat out wrong; the actual usages are right.
  • The AGE code recovers from the syntax errors gracefully, and defaults to some sensible behavior (in the ChgUnitPoolInfos, defaulting say to an assumed value of 100 (percent) for the missing third argument).
  • The AGE 3.0 game, PON, might be extended to support alternative usages (but the AGEWiki was not yet edited to reflect that).
  • Most peculiarly, when I saw usage exceptions in RUS -- there were more discovered in RUS than in any other game -- at the time I thought that the agreement with SEPRUS was that Pocus had farmed out the AGE coding to a SEPRUS programmer, thus that the RUS AGE engine code had forked from the mainline, standard AGEOD AGE (2.0) code.

I had learned from experience that directing explicit questions to the devs, requesting for clarification of this or that technical point directly, seldom got answered. (We can assume that the insiders were (a) too busy (quite likely) and/or (b) for whatever reason didn't care to respond.) I was more or less on my own to deal with the ambiguities I found, in some cases just guess, in many cases code the parser "loosely" in order to reduce the "false positivess" -- not always really "false"!

In the above two-argument ChgUnitPoolInfos cases, if I had not coded the syntax rule exception, if I had gone strictly with the overwhelming usage consensus -- use three arguments (and had scrutinized the AGEWiki page; didn't always have time for that; or if I did, I didn't always trust its accuracy for reasons stated above) -- if I had omitted the two-argument parser case, then those lines would have been reported as "syntax error ...".

Then afterwards complained about as "false positives"?

Do you begin to understand how, if the people you are working with complain about false positives too much, I over-react by coding the parser too loosely, by sanctioning in-fact erroneous usage cases, cases of "true positives"?

What's worse? (a) a false positive, or (b) an unreported true positive (actual error)?

In the AGElint README file, I write:

quote:

When deciding the txt.y parser rules, I am guided primarily by the AGE Wiki documentation (where it exists, which is not always), and secondarily by actual usage as demonstrated by the game data files. They are not always in agreement! And there is much ambiguity and nuance. Bear that in mind when reviewing/critiquing the txt.y parser specification.

Going forward, and as I review and refine the txt.y parser, I will have to base "truth" on

  • The AGEWiki pages.
  • Actual usage (across all games).
  • Experienced dev/modder feedback (now possible, since I at least have your attention and active cooperation).
  • Actual experimentation (don't just speculate; "look in the horse's mouth!") (but I really don't have time for it).

in that order of authority.

Another long-winded response, I know. I would apologize for all the blah blah, but if we are to take AGElint further, we need to discuss where we are going with it. And the discussions need to consider nuance and complexities, hence a lot of blah blah.

Anyway, thanks for pointing out the error. I will revisit and revise the ChgUnitPoolInfos (and many other) parser rules in the next and all future AGElint releases.




berto -> RE: AGElint first "official" 1.00 release (12/31/2011 4:11:30 PM)


quote:

ORIGINAL: Chliperic

and 2 others:

ERROR: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Events/RUS All Scenarios.sct, at (or before) line 2287: syntax error: #|# (0x7c), #|#

in event evt_nam_Allied_involment_level:

2284 MaxDate = 1921/12/30
2285
2286 Actions
2287> PopUpText = str_nam_Allied_Involv_01|NULL|2|Allied_Involv_08|Event-img_Renforts_CMN_BlackSeaAllied|NULL
2288 EndEvent


This command accepts | rather than ; as the official tutorial files show it.

It should be easy to code in allowance for that alternative usage.

quote:


The second false positive is the lack of conditions in the evens in the scripts file (.ini): theses files serving for creating scenarios are made with events command without needing conditions).

Scripts/Script_T1.ini, Fri Oct 1 2010 11:26:12

WARNING: in /cygdrive/c/Revolution under Siege/Revolution Under Siege/RUS/Scripts/Script_T1.ini, at (or before) line 1130: no Conditions section

1127 Replacement = FIN;$famMilitia;3
1128 NULL = NULL
1129
1130> EndEvent


It should be easy to code an adjustment for that, too.

This is great! Keep 'em coming! [8D]




berto -> AGElint: still more bug types: SelectRegion/SelectFaction (12/31/2011 8:35:13 PM)


In an earlier post, I had written:

quote:

At present, AGElint is more than a beginning, but far from an ending. The dream is to code a vast set of utilities and capabilities to check all manner of AGEOD bugs/errors/glitches/anomalies. In agelint itself, beyond the syntax checking already in place, there are the beginnings of semantic and logic checking. Outside of agelint, there are many more QA checks we can apply to the AGE game data files.

On a hunch, I suspected that there are "bad" alias refs in SelectRegion (also SelectFaction) statements. Turns out my hunch was correct. [:)]

Here is a Perl script, chkSelectRegion.pl, for checking data file 'SelectRegion =' statements:


#!/usr/bin/perl                                                                 

$DEBUG = 0;

$RUSDIR = "/media/KINGSTON/Games/AGEOD/Revolution under Siege FY/RUS";

open(REGIONS, "$RUSDIR/Aliases/Regions.ini");
while(<REGIONS>) {
    chomp;
    $line = $_;
    next if ($line =~ /^\s*#/);
    next if ($line =~ /^\s*\/\//);
    if ($line =~ /^\s*(\$[^=]+[a-zA-Z0-9])\s*=/) {
        $reglc = lc($1);
        print "#$reglc#\n" if $DEBUG;
        $regions{$reglc}++;
    }
}
close(REGIONS);
open(FIND, "find \"$RUSDIR\" -exec egrep \"SelectRegion\" {} \\; \| awk -F= '{print \$2}' \| sort \| uniq |");
while(<FIND>) {
    chomp;
    print "line #$_#\n" if $DEBUG;
    next unless (/^\s*(\$[-\. a-zA-Z0-9]*[a-zA-Z0-9])/);
    $reg = $1;
    $reglc = lc($reg);
    print "reg  #$reglc#\n" if $DEBUG;
    next if ($reglc =~ /(playboard)/);
    if (! $regions{$reglc}) {
	print "$reg not found\n";
    }
}
close(FIND);

exit 0;


(As always, please excuse the extra blank lines. The Matrix Forum code tags are quite broken! [:@])

Here is a sample program run, on RUS/FY:



[root@telemann agelint]# ./chkSelectRegion.pl 2>&1 | sort | uniq
$Almetevsk not found
$Baltic Channel not found
$Bay of Samsun not found
$Black Sea not found
$Cape Civa not found
$Cape Ince not found
$Fergana not found
$FRA not found
$Gulf of Trapezus not found
$Hoburgen not found
$Huiliaipole not found
$Kalmar Sund not found
$Keuruu not found
$North Baltic Sea not found
$Osel not found
$Ost See not found
$Rustavi not found
$Savo not found
$Shchuche Ozero not found
$South Baltic Sea not found
$Southeastern Black Sea not found
$SouthWestern Black Sea not found
$Swedish Channel not found
$Verkhovie not found



Not consolidating duplicates, counting distinct separate error instances:



[root@telemann agelint]# ./chkSelectRegion.pl 2>&1 | wc -l
32



The chkSelectRegion.pl script is subject to further refinement, including especially generalizing across all AGEOD games, and importantly pinpointing the exact file and line number of each error. There might very well be some false positives here. (If so, pardon me, Chliperic!) But as is, in its not quite finished state, chkSelectRegion.pl demonstrates my point.

There are, more or less, 32 "bad" region alias refs in the RUS(/FY) game data files alone.

Remember: AGElint is being designed to function across all six (current) AGEOD AGE games. How many more bug instances of just this one type are there lurking about in the other AGEOD games?

Verifying a small sample of these bad alias refs:



[root@telemann agelint]# egrep -i "baltic channel|huiliaipole|shchuche|verkhovie" /media/KINGSTON/Games/AGEOD/Revolution\ under\ Siege\ FY/RUS/Aliases/Regions.ini
// $Verkhovie = $Verkhove
// $Shchuche Ozero = $Birsk



So, for those four samples, no (uncommented) matches in the Regions.ini file.

Some possible "good" alias refs, or added info:



[root@telemann agelint]# egrep -i "baltic|huilia|chuche|verkhov" /media/KINGSTON/Games/AGEOD/Revolution\ under\ Siege\ FY/RUS/Aliases/Regions.ini
// $Verkhove = $Shalimovo
// $Verkhovie = $Verkhove
// $Shchuche Ozero = $Birsk
// New names for Volga-Baltic Canals created
$Verkhove = 461
$Baltic Sea = 802



Verifying the SelectRegion instance mistakenly referencing a faction tag:



[root@telemann agelint]# find /media/KINGSTON/Games/AGEOD/Revolution\ under\ Siege\ FY/RUS -exec egrep "SelectRegion" {} \; | egrep "FRA"
SelectRegion = $FRA



In like manner, I can and eventually will write a script to investigate bad SelectFaction references.

chkSelectRegion.pl, and its soon-to-be cousin chkSelectFaction.pl, is not part of the current AGElint distribution, but it soon will be. The current AGElint distribution (version 1.00) doesn't yet detect these SelectRegion/SelectFaction bugs. (Remember my earlier comments about how I have "swept under the rug" the SelectRegion/SelectFaction complications.)

These are newly found bugs, and new bug types.

Quoting myself again:

quote:

There's still much more untapped potential, much more to be done...

Indeed, indeed ...




Chilperic -> RE: AGElint: still more bug types: SelectRegion/SelectFaction (12/31/2011 11:11:51 PM)

Historically, the first command was:

ChangeUnitPool = UnitDefUID; Value

Then has been added ChgUnitPoolInfos adding as third parameter the AI ratio for building an unit.

So

[root@telemann agelint]# ./kwddat ChgUnitPoolInfos | awk -F\; 'NF!=3'
1 ChgUnitPoolInfos = $uni_GBR_Inf_1850C_Bde;2
1 ChgUnitPoolInfos = $uni_GBR_Inf_1870_Ghurkas_Rgt1;1
1 ChgUnitPoolInfos = $uni_GBR_Med_Med1;2
1 ChgUnitPoolInfos = $uni_GBR_Mix_1850_Bde;1
1 ChgUnitPoolInfos = $uni_GBR_Sig_Sig1850;3
1 ChgUnitPoolInfos = $uni_IND_Cav_1850_Bde;1
1 ChgUnitPoolInfos = $uni_IND_Inf_1850C_Bde;2
1 ChgUnitPoolInfos = $uni_IND_Mix_1850_Bde;2
1 ChgUnitPoolInfos = $uni_IND_Sup_Sup1;5
1 ChgUnitPoolInfos = $uni_MUG_Art_1840;2
1 ChgUnitPoolInfos = $uni_MUG_Cav_1850_Bde;5
1 ChgUnitPoolInfos = $uni_MUG_FortArt_1840;5
1 ChgUnitPoolInfos = $uni_MUG_Inf_1840C_Bde;15
1 ChgUnitPoolInfos = $uni_MUG_Mix_1840_Bde;10
1 ChgUnitPoolInfos = $uni_MUG_Sup_Sup1;10
1 ChgUnitPoolInfos = $uni_WH3_Mil1;0


is just a serie of bugs by using the second command with the parameters of the first command ChangeUnitPool.




Chilperic -> RE: AGElint: still more bug types: SelectRegion/SelectFaction (12/31/2011 11:17:53 PM)

quote:

[root@telemann agelint]# ./chkSelectRegion.pl 2>&1 | sort | uniq
$Almetevsk not found
$Baltic Channel not found
$Bay of Samsun not found
$Black Sea not found
$Cape Civa not found
$Cape Ince not found
$Fergana not found
$FRA not found
$Gulf of Trapezus not found
$Hoburgen not found
$Huiliaipole not found
$Kalmar Sund not found
$Keuruu not found
$North Baltic Sea not found
$Osel not found
$Ost See not found
$Rustavi not found
$Savo not found
$Shchuche Ozero not found
$South Baltic Sea not found
$Southeastern Black Sea not found
$SouthWestern Black Sea not found
$Swedish Channel not found
$Verkhovie not found


Don't forget FY is for now only the modding of the Grand Campaign. This one doesn't use all the files of RUS;

For example, I've noticed Drang Nach Osten files have a lot of errors. However, as There aren't used in FY, I haven't fixed them. Yet. [:D] So these mispelled aliases in files may result of event files unused in the FY Grand Campaign, which by the contrary, is now 99.99% error free ( I'm yet inspecting 2 reports which may be false positive).





Chilperic -> RE: AGElint: still more bug types: SelectRegion/SelectFaction (1/1/2012 12:17:11 AM)

SelectRegion = $FRA is rather a wrong name for a region; There was a same type of error for Great Britain. Fixed BTW [:)]




berto -> RE: AGElint: still more bug types: SelectRegion/SelectFaction (1/2/2012 8:22:14 PM)


quote:

ORIGINAL: Chliperic

Don't forget FY is for now only the modding of the Grand Campaign. This one doesn't use all the files of RUS;

For example, I've noticed Drang Nach Osten files have a lot of errors. However, as There aren't used in FY, I haven't fixed them. Yet. [:D] So these mispelled aliases in files may result of event files unused in the FY Grand Campaign, which by the contrary, is now 99.99% error free ( I'm yet inspecting 2 reports which may be false positive).


I don't mean to suggest that everything I report is detected in FY. If I post results here, they might very well reflect data files and bugs in the "official" AGEOD distributions, not those in FY.

Soon, I will describe in detail the various AGElint exclude mechanisms, to filter out the non-pertinent stuff.

I discovered today that my RUS/FY USB installation, the one I use for my analysis and development work, dates back to 12/25! I've been diligently updating my actual, for-game-play installation on hard disk with each new FY release. I had just forgotten to update my USB install as well. [>:] I will have to be more careful going forward to keep both installations up-to-date, and in sync.

Still one more reason why I need to stay out of the reporting business, and just be a tool maker!

After the New Year revels, work on AGElint will resume tomorrow, Tuesday. In particular, it will be full steam ahead on refining and extending the txt.y parser.




berto -> RE: AGElint: still more bug types: SelectRegion/SelectFaction (1/4/2012 10:23:20 PM)


I have coded two new bug checking scripts -- chkselfac.pl & chkselreg.pl -- for detecting "bad" alias refs in 'SelectFaction =' & 'SelectRegion =' statements in the AGEOD game data files.

(Actually, there is a single new script -- chksel.pl -- and chkselfac.pl & chkselrel.pl are links to the chksel.pl script. chksel.pl adapts to the appropriate behavior depending on the program name you invoke.)

For a discussion of Select{Faction,Region} bugs, see post #94 above.

Here is some chkselreg.pl output, basing off the "official" RUS 1.04 data files:



[root@telemann agelint]# ./chkselreg.pl -g rus 2>&1 | ./rmgameroot.pl -g rus
Includes/NoCitiesTest.inc:3351: Verkhovie not found
Includes/NoCitiesTest.inc:5540: Rustavi not found
Includes/NoCitiesTest.inc:5788: South Baltic Sea not found
Includes/NoCitiesTest.inc:5791: Hoburgen not found
Includes/NoCitiesTest.inc:5794: Ost See not found
Includes/NoCitiesTest.inc:5800: North Baltic Sea not found
Includes/NoCitiesTest.inc:5842: Osel not found
Includes/NoCitiesTest.inc:5845: Baltic Channel not found
Includes/NoCitiesTest.inc:5848: Swedish Channel not found
Includes/NoCitiesTest.inc:5950: Gulf of Trapezus not found
Includes/NoCitiesTest.inc:5953: Cape Civa not found
Includes/NoCitiesTest.inc:5956: Bay of Samsun not found
Includes/NoCitiesTest.inc:5959: Cape Ince not found
Includes/NoCitiesTest.inc:5971: SouthWestern Black Sea not found
Includes/NoCitiesTest.inc:6007: Southeastern Black Sea not found
Includes/NoCitiesTest.inc:6290: Savo not found
Includes/NoCitiesTest.inc:7346: Almetevsk not found
Includes/NoCitiesTest.inc:7861: Shchuche Ozero not found
Includes/NoCitiesTest.inc:9464: Fergana not found
Includes/NoCitiesTest.inc:10996: Kalmar Sund not found
Includes/NoCitiesTest.inc:12076: Keuruu not found
Events/RUS F6 Options Various.sct:2981: Vladivostock not found



Yes, indeed, all but one of the errors are in a test file, so have no practical importance. (In "official" RUS. But what about other AGEOD games? It remains to be seen.)

(When basing off the Fatal Years data files, I am happy to report that the last bug, the bad 'Vladivostock' reference, has been fixed in FY.)

(Note the use of rmgameroot.pl, which replaces rmgameroot in all future AGElint distributions.)

Here is some chkselfac.pl output, basing off the "official" RUS 1.04 data files, and just reporting errors in Grand Campaign.sct:



[root@telemann agelint]# ./chkselfac.pl -g rus 2>&1 | ./rmgameroot.pl -g rus | egrep -i "grand campaign" | head
Events/Grand Campaign.sct:6: CMN not found
Events/Grand Campaign.sct:8: CMN not found
Events/Grand Campaign.sct:19: CMN not found
Events/Grand Campaign.sct:45: CMN not found
Events/Grand Campaign.sct:48: CMN not found
Events/Grand Campaign.sct:71: CMN not found
Events/Grand Campaign.sct:74: CMN not found
Events/Grand Campaign.sct:397: CMN not found
Events/Grand Campaign.sct:399: CMN not found
Events/Grand Campaign.sct:455: CMN not found
[many more like this follow ...]



There are so many "bad" 'SelectFaction = $CMN' statements that I have shown only the first ten of a very long list.

So many ... Is CMN ("common"?) some default pseudo faction that I don't know about and that applies to all factions? It might very well be that these are false positives also (and if so, are easily excluded) ...

edit> Indeed, I have been informed that CMN is new to RUS, and applies to all factions. So, exclude this from the chkselfac.pl script I will ... After excluding CMN false positives, I am also happy to report that there are no bad faction alias refs in 'SelectFaction =' statements in either "official" or FY RUS. (We'll see about the other AGEOD games.)

Work on refining the txt.y parser is going well. I foresee posting the next AGElint release (including these new chksel*.pl scripts) perhaps by January 15. Stay tuned.




berto -> AGElint: AGEWiki docs vs. actual usage (1/5/2012 7:47:16 AM)


quote:

ORIGINAL: berto

When first coding txt.y, whenever I saw many usage counterexamples (where "many" is loosely defined), I inferred that the counterexamples might be acceptable alternative usages. It could be that

  • The AGEWiki doc is just flat out wrong; the actual usages are right.

...

In the AGElint README file, I write:

quote:

When deciding the txt.y parser rules, I am guided primarily by the AGE Wiki documentation (where it exists, which is not always), and secondarily by actual usage as demonstrated by the game data files. They are not always in agreement! And there is much ambiguity and nuance. Bear that in mind when reviewing/critiquing the txt.y parser specification.

Going forward, and as I review and refine the txt.y parser, I will have to base "truth" on

  • The AGEWiki pages.
  • Actual usage (across all games).
  • Experienced dev/modder feedback (now possible, since I at least have your attention and active cooperation).
  • Actual experimentation (don't just speculate; "look in the horse's mouth!") (but I really don't have time for it).

in that order of authority.

Here are three good examples (there are others) of where the AGEWiki pages appear to be "flat out wrong":

ChgPopContent
ChgPopEducation
ChgPopMilitancy

In any case, the AGEWiki says nothing about using the ALL parameter. But the actual usage evidence suggests otherwise. Here for example is the actual usage of ChgPopEducation (used in PON only):



[root@berto agelint]# ./kwddat.pl ChgPopEducation pon
43 ChgPopEducation = 15
2 ChgPopEducation = 30
8 ChgPopEducationEx = 0;1;2;3;5;5;ALL
14 ChgPopEducationEx = 0;1;3;3;5;5;ALL
8 ChgPopEducationEx = 0;1;3;7;7;7;ALL
9 ChgPopEducationEx = 0;1;5;3;2;0;ALL
8 ChgPopEducationEx = 0;5;7;10;5;5;ALL



I encounter such disagreement between the AGEWiki docs and actual usage not infrequently. These here are unusual cases where actual usage trumps the AGEWiki docs.

So here is how I code ChgPopEducation[Ex] in the txt.y parser:



chgpopeducation: _CHGPOPEDUCATION eq intpos
                {
                /*                                                              
                http://www.ageod.net/agewiki/ChgPopEducation                    
                Syntax:  ChgPopEducation = Value  Or  ChgPopEducationEx = Servile|Peasant|Worker|Middle|Upper|Aristocrat                                       
                */
                }
                ;


and also:



chgpopeducationex: _CHGPOPEDUCATIONEX eq int sc int sc int sc int sc int sc int all
                { CHKINT( $3, -999, -999, 999, 999);
                  CHKINT( $5, -999, -999, 999, 999);
                  CHKINT( $7, -999, -999, 999, 999);
                  CHKINT( $9, -999, -999, 999, 999);
                  CHKINT($11, -999, -999, 999, 999);
                  CHKINT($13, -999, -999, 999, 999);
                /*                                                              
                http://www.ageod.net/agewiki/ChgPopEducation                    
                Syntax:  ChgPopEducation = Value  Or  ChgPopEducationEx = Servile|Peasant|Worker|Middle|Upper|Aristocrat                                       
                                                                                
                documented | but ; in actual usage                              
                the appended 'all' is undocumented but conforms to actual usage  
                */
                }
                ;


Note the inclusion of the 'all' in chgpopeducationex (ChgPopEducationEx), where 'all' is specified in the txt.y parser as



all:              /* empty, no problem */
                | sc _ALL
                ;


Note also the specification of 'sc' (semi-colon) in the chgpopeducationex specification, despite the AGEWiki docs suggesting 'vb' (vertical bar)!

Getting it all right is tricky. Please bear with me (and forgive false positives!) as I continue to code and debug AGElint.




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 9:47:55 AM)


Returning to the ChgUnitPoolInfos case (there are others) of where the AGEWiki pages appear to be, if not "flat out wrong", then questionable.

The AGEWiki page

ChgUnitPoolInfos

clearly indicates three parameters



ChgUnitPoolInfos = <UnitDef>|<variation of Force Pool>|<AI Pool Ratio>



with none of them optional. But there are more than a few cases of actual usage where the parameters are only two (see post #92 above).

So what do I do? Reject the usage evidence, and report those as errors (as Chliperic suggests I do in post #95 above)? And risk possible false positives?

I have instead decided to report such unusual -- maybe? probably? definitely? -- "wrong" usages as warnings:



chgunitpoolinfos: _CHGUNITPOOLINFOS eq unidefval sc int {
                    txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, apparent omission of <AI Pool Ratio> as third argument");
                  }
                | _CHGUNITPOOLINFOS eq unidefval sc int sc pct
                {
                /*
                http://www.ageod.net/agewiki/ChgUnitPoolInfos
                Syntax:  ChgUnitPoolInfos = <UnitDef>|<variation of Force Pool>|<AI Pool Ratio>

                contrary to the docs, uses ; instead of |
                */
                }
                ;


Here, too, note the: "contrary to the docs, uses ; instead of |".

Tricky, tricky business, this coding the txt.y parser. Also straddling the line between reporting too many "errors" (too many false positives) vs. reporting too few.

Reporting a "warning" instead of a definite "error" allows me to hedge my bets. In fact, I had added the "warning" category to cover gray areas such as these. (I also had added the "notice" category to cover the nitpicky stuff.)

Report questionable stuff in full. Then let the developer/modder decide the issues!




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 11:32:41 AM)


Recently, I've posted a lot of wordy blah blah about AGEWiki docs vs. actual usage, ambiguity and nuance, false positives, etc. Very long message posts, and for that I apologize. I will try to cut it short in future. (Although I may be verbose about other topics. [;)])

I just want to hammer the point: Coding this QA stuff, it ain't easy.

Some critics seem to think otherwise, that this is all simple and straightforward (and "why all the false positives?"). They are wrong. If AGElint is to be truly useful, if AGE QA is to be Done Right, we have to consider all ambiguities, nuances, and complexities. And comprehend the enormity of the game data sets (in the case of PON, >1 GB, 60,000+ data files!).

To think otherwise, to trivialize the problem, is to poison the discussion, and consign AGElint to failure. Then it's back to eyeballing the .xls DB files and/or reporting gameplay bugs in a haphazard, hit-or-miss, anecdotal fashion at the AGEOD (or Matrix) Forum -- a hopeless, never-ending effort to seek out bug after bug after bug ... one by one ... forever... [X(] ... [>:]

Good luck with that! [8|]

There's got to be a better way. AGElint is one way.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 12:00:13 PM)

You're listened, and fast:

http://www.ageod.net/agewiki/Special:RecentChanges

For these ones:

ChgPopContent
ChgPopEducation
ChgPopMilitancy

I can't say much. there are AGE 3.0 commands, for PON, and one of my biggest fortune of my modding life has been to not be involved in PON [:D]

Don't worry, at last for me/ i'm reading anything especially if it's difficult. Doing a game is business, not play. It doesn't suffice to get a joking title. What is needed is work, painful work. In the end, agelint suppresses a large part of the work, even with a few false positive. They would be hundred, I would yet consider agelint to be of immense value, because with I know what isn't yet working isn't a bug of the engine, but a bug introduced by me. It would just be foolish to discard such a tool, unless I would be arrogant or lazy.

Why so much work? just because the pleasure to play a real historical RCW against a Red AI able to send a second Army on my rear when I'm sieging Tzarystsin is so much rewarding in playing a real wargame it was worth the effort. I'm a modest craftman who just intends to get the tool he whishes for play. As many superfluous things, it requires, work, smartness and humility. [:)]That's because I'm a worker FY is rewarding. And because i know really the engine too [:D] as I've worked to learn it. Mainly the AI. For many working on the AI is a secondary task, devoted to stupid guys when the noble art is named design. They're worng: the only key for design in a computer strategy games is AI work.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 3:31:30 PM)

An example:

SelectFaction, selected: Southern Whites
Line 162805: Started processing event: evt_nam_Eval_WHI_eco
Line 162805: This event is not yet referenced, base number of allowed occurences 999
Line 162810: Min date evaluated: 1918/06/01 converted to turn 4043 current turn 4071 True
Line 162811: Max date evaluated: 1922/01/30 converted to turn 4131 current turn 4071 True
Line 162816: Entering triggered actions for event evt_nam_Eval_WHI_eco
Line 162818: => ChgUnitPoolInfos, need to have exactly 3 parameters: Alias of UnitDef, variation of Force Pool, AI Pool Ratios
Line 162819: Finished processing event: evt_nam_Eval_WHI_eco

http://www.ageod.net/agewiki/ChgUnitPoolInfos

This wiki page has been updated today to point out the third parameter was optional. That's wrong, obviously, as my test event is described wrong by the script report generated by the AGE engine. Or the AGE engine is reporting a wrong alarm, or the command needs the 3 parameters.The second hypothesis is possibly the right one, as the report doesn't mention any change for the AI setting for this unit...Rather strange, no? I will however let the official team to work on this point, as for myself I just use always the 3 parameters, even for the "default value": 100. AT least I'm sure it will work[8D].

That's my way: before saying something, I TEST first. Always. [:D] Serious work needs humility and methodology. Like the way Berto is applying. [:D]

So the wiki is yet wrong or AGE engine needs to fix the alert.[:)]

BTW, Berto, there is one better method for having access to the scripting language than the wiki, which will never replace a good old modding manual. Much less fancy but so much more convenient. I'm going to explain you in PM.[;)]







berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 7:20:13 PM)


quote:

ORIGINAL: Chliperic

An example:

[...]
Line 162818: => ChgUnitPoolInfos, need to have exactly 3 parameters: Alias of UnitDef, variation of Force Pool, AI Pool Ratios
[...]

Where I work, in our log files, error conditions are clearly marked as "ERROR" (i.e., each entry is explicitly tagged as "INFO", "DEBUG", "ERROR", etc.).

I have tried wading through the AGE log files. I must say it would be much more convenient finding bugs being able to, unfailingly, do a search for the string "ERROR" (and "WARNING", etc.). Instead, AFAIK, we have to eyeball through the log files top to bottom. Tedious! Inefficient. And conducive to stuff getting missed or ignored.

quote:

http://www.ageod.net/agewiki/ChgUnitPoolInfos

This wiki page has been updated today to point out the third parameter was optional. That's wrong, obviously, as my test event is described wrong by the scriptreport generated by the AGE engine. Or the AGE engine is reporting a wrong alarm, or the command needs the 3 parameters.The first hypothesis is possibly the right one, as the report doesn't mention any change for the AI setting for this unit...Rather strange, no? I will however let the official team to work on this point, as myself I just use always the 3 parameters, even for the "default value": 100. AT least I'm sure it will work[8D].

When I say "differences of opinion," this is an example of what I refer to. We can never know (short of having the AGE source code [;)]) with utmost certainty exactly how the AGE system operates, and how it deals with data file anomalies. Only the Master knows, but he is generally too busy to say.

So we deal with the uncertainties as best we can, for example by separating "certain" errors from "gray area" warnings (from "nitpicky" notices) in the AGElint reports. Also documenting our uncertainties, and how we deal with them, in the AGElint source code. And discussing them openly and honestly here at the forum, of course.

quote:

That's my way: before saying something, I TEST first.

I'd like to do that, too. But it's so tedious. Setting up and testing an answer to every little uncertainty and question would take forever (especially doing it the .xls DB -> CSV Splitter -> ... way). Life is too short! And AGElint would still be stuck at a rudimentary, version 0.10 level.

quote:

BTW, Berto, there is one better method for having access to the scripting language than the wiki, which will never replace a good old modding manual. Much less fancy but so much more convenient. I'm going to explain you in PM.[;)]

Replied via PM.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 7:30:00 PM)

quote:

I'd like to do that, too. But it's so tedious. Setting up and testing an answer to every little uncertainty and question would take forever (especially doing it the .xls DB -> CSV Splitter -> ... way). Life is too short! And AGElint would still be stuck at a rudimentary, version 0.10 level.


I know you're not doing all tests, and I'm not expecting you're doing so. Your job is to write a debugging tool based on the infos you get from offcial sources and others. That's why I test first.

In the current case, either something is wrong in the error report, either the wiki is wrong. My only solution: use always 3 parameters.




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 9:19:23 PM)


More ambiguity.

EvalIsAtPeaceWith

makes no mention of the NOT parameter.

But the usage database shows



1 EvalIsAtPeaceWith = AUS;NOT



It seems reasonable that NOT might be an optional parameter. So despite what the AGEWiki page says, I have coded EvalIsAtPeaceWith in this way:



evalisatpeacewith: _EVALISATPEACEWITH eq facnam
                | _EVALISATPEACEWITH eq facnam sc _NOT {
                    txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, undocumented usage of NOT parameter");
                  }
                {
                /*
                http://www.ageod.net/agewiki/EvalIsAtPeaceWith
                Syntax:  EvalIsAtPeaceWith = <Faction tag>
		*/
                }
                ;


I have coded EvalIsAtWarWith similarly (even though neither the AGEWiki page nor actual usage reveals the NOT use).

(I don't reveal every ambiguity here in a forum post. You would have to look at future txt.y files for more and comprehensive detail.)

Now up to command keyword 106 in my review/refinement list of 188 keywords observed to have AGEWiki documentation (and which are used by my current game of focus, RUS). Things are going quickly. I should remain on track to post a much cleaned up (especially for RUS) AGElint next release sometime around Jan 15 (and possibly well before).

And so it goes.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 11:35:53 PM)

NOT is certainly an optional parameter, like for EvalRgnOwned.




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/5/2012 11:52:09 PM)


Despite occasional lapses and inaccuracies like the one Chliperic and I have noted above, all in all, I have to say: AGEOD has done a decent job of documenting the AGE system, and the use of the scripting commands.

It could be better, of course. But next to other games and gaming companies, they compare quite favorably.

Like QA, maintaining docs and Wiki pages is a thankless task. But when you need it, you need it, and I am grateful to AGEOD for providing it.

So, take a bow, AGEOD. With the docs, you've done a pretty good job.

[sm=sign0031.gif]




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/6/2012 11:18:41 PM)


Still more ambiguity. (To say the least! [X(])

SetAdvRevolt

clearly documents ; (semi-colon) as the SetAdvRevolt parameter field separator.

But the actual game data files show abundant use of | (vertical bar, aka pipe) as a field separator!

Observe:



[root@telemann agelint]# ./kwddat SetAdvRevolt | egrep "SetAdvRevolt =" | less
1 SetAdvRevolt = ABO|40|20|20|10|100|$uni_TOC_Inf1850_Srev|$uni_TOC_Inf1850_Srev
1 SetAdvRevolt = ABU|60|20|40|0|100|$uni_TNF_Inf1850_Srev|$uni_TNF_Inf1850_Srev
1 SetAdvRevolt = ABY|600|100|300|0|100|$uni_ABY_Inf1850_Srev|$uni_ABY_Inf1850_Srev
[...]
2 SetAdvRevolt = BOB;120;40;60;0;100;$uni_TSF_Inf1850_Srev;$uni_TSF_Inf1850_Srev
2 SetAdvRevolt = BRU;80;20;40;0;100;$uni_TCH_Inf1850_Srev;$uni_TCH_Inf1850_Srev
2 SetAdvRevolt = BUA;160;40;80;0;100;$uni_TSF_Inf1850_Srev;$uni_TSF_Inf1850_Srev
[...]



Numerous examples of either:



[root@telemann agelint]# ./kwddat SetAdvRevolt | egrep "SetAdvRevolt =" | wc -l
344
[root@telemann agelint]# ./kwddat SetAdvRevolt | egrep "SetAdvRevolt =" | egrep "\|" | wc -l
221
[root@telemann agelint]# ./kwddat SetAdvRevolt | egrep "SetAdvRevolt =" | egrep ";" | wc -l
123



That is, 344 distinct SetAdvRevolt variations, with 221 of them using | and 123 using ;

The situation with SetAdvRevoltFP is similar: The AGEWiki docs say ; only, but actual usage shows both ; and |.

[&:]

Pending clarification, I guess the way I handle this is:



setadvrevolt:     _SETADVREVOLT eq facnam sc intpos sc intpos sc intpos sc pct sc pct sc unidefval sc unidefval
                | _SETADVREVOLT eq intpos sc intpos sc intpos sc pct sc pct sc unidefval sc unidefval
                | _SETADVREVOLT eq facnam vb intpos vb intpos vb intpos vb pct vb pct vb unidefval vb unidefval {
                    txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, undocumented usage of | as field separator");
                  }
                | _SETADVREVOLT eq intpos vb intpos vb intpos vb pct vb pct vb unidefval vb unidefval {
                    txterrmsg(_WARNING, TRUE, linenorhs, "suspicious, undocumented usage of | as field separator");
                  }
                {
                /*
                http://www.ageod.net/agewiki/SetAdvRevolt
                Syntax:  SetAdvRevolt = [FacTag]; RevoltStrength; RegenAmount; MaxRegenHits; LosePerc; WinPerc; CityUp; CountryUp
                */
                }
                ;


And similarly for SetAdvRevoltFP.

(The problem seems mainly confined to PON. The other games use these commands very little if at all.)

<sigh> [:(]




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/6/2012 11:38:57 PM)

I'm first delighted to have learnt today the third parameter iof ChgUnitPoolinfo is optional for the game versions published AFTER the 5th January, ie the date of this little exchange here yesterday:

http://www.ageod.net/agewiki/index.php?title=SetUnitPoolInfos&curid=323&diff=2530&oldid=2529

Always a pleasure to discover I'm working in the very same time on the same subject than the official team, which has just decided to fix the bug by rendering the third parameter optional in the future patches, yet to be published [8D]. It would have been better the change to have been made before yesterday, but the progress is coming full spead ahead [:)].

Now I will just to wait the first open release of a beta or official patch to TEST it , first.


SetAdvRevolts: first introduced in RUS , then PON. AGE 3.0 is maybe more advanced on this than AGE 2.0, used for RUS. Not sure of that, just an impression.

In the include folder of RUS, you have a file named Advrev containing this:

SetAdvRevolt = GRN|60|60|120|10|101|NULL|NULL
SetAdvRevoltFP = GRN|$uni_GRN_Inf3|100|$uni_GRN_Cav2|30|$uni_GRN_Art1|10|$uni_GRN_MG1|20|$uni_GRN_Mil|200|$uni_GRN_Sup|10|$uni_GRN_Par1|30|$uni_GRN_Bde0|5|$uni_GRN_Lit0|10|$uni_GRN_Inf1|30|$uni_GRN_Cav1|30|$uni_GRN_Inf2|20|$uni_GRN_Inf0|20|$uni_GRN_Cav0|20|

This file is used when you generates a new scenario file.

SetAdvRevolts may be used during games as event, but as I haven't created such events, I can't say if; is working.

Pipes are at least accepted in include files.





berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/7/2012 2:10:34 PM)


I have essentially finished my review of all AGEWiki documented scripting commands, refining their entries in the txt.y parser.

I have discovered many more discrepancies between the AGEWiki docs and actual usage along the way (with differences noted in the AGElint source code). [:(]

Now, I'm in the process of reinstalling and patching the other five (other than RUS) of the AGEOD AGE system games.

This is so I can rerun all AGElint reports against the latest (text file) data sets, then review and vet the results. Also ensure the accuracy and comprehensive of the CHK file sets and the all-important 'make check'.

As stated before, I am giving priority to RUS, ACW & ROP (and possibly also NCP) in this review process. The other games, especially PON, I don't much care about at this point. (Might change at a later date.)

An AGElint 1.1 release date of January 15 is too pessimistic. We might expect the next AGElint release within just a few days.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 11:41:42 AM)

Currently running agelint on the last beta version for AACW. I will need a few days for fixing bugs.




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 12:23:10 PM)


I'm adding several test files from each of the other five AGEOD games (not RUS) to the regression testing CHK data set later today and tomorrow. My aim is to vet as many reported "errors" as is practical.

Most genericalness has now been removed from the txt.y parser.

I expect to release AGElint 1.1 -- with improved AACW support -- no later than mid week.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 12:59:38 PM)

BTW, agelint is reporting a warning for "CityStyle = " in the include files. Agelint is right to report this as suspicious, but this lack of precision hasn't any consequence in AACW, as the CityStyle is unique, contrary to the graphical representation of cities in RUS and PON. I don't think I will fix that.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 1:23:01 PM)


quote:

ORIGINAL: berto


I expect to release AGElint 1.1 -- with improved AACW support -- no later than mid week.


Good [:D]

I will need BOA2 support mid 2012 maybe [8D]




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 1:50:19 PM)

another warning which is maybe a false positive:


WARNING: in /cygdrive/c/AGEod's American Civil War/AGEod's American Civil War/ACW/Events/USA Events.sct, at (or near) line 2429: suspicious, undocumented usage of a number (126) instead of sound ID

2426
2427 SelectFaction = $USA
2428 SelectRegion = $Prince George's, MD
2429> StartEvent = evt_nam_USA_PrisonersPolicy|1|2|evt_txt_USA_PrisonersPolicy|Event-img_USA_PrisonersPolicy|$Prince George's, MD|126
2430
2431 Conditions
2432 MinDate = 1862/01/01

Syntax: StartEvent = Name|Occurences|DisplayType|EventText|EventPic|Region|Sound


BTW, the large number of bugs for 1862 scenarios will remain, as I've no intention to mod them in the next weeks.

Now, there are several others which must be fixed. I haven't yet run the offcial game to check if the script errors prohibit events to fire normally, but it will be safer to fix them anyway.




berto -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 2:28:08 PM)


quote:

ORIGINAL: Chliperic

another warning which is maybe a false positive:


WARNING: in /cygdrive/c/AGEod's American Civil War/AGEod's American Civil War/ACW/Events/USA Events.sct, at (or near) line 2429: suspicious, undocumented usage of a number (126) instead of sound ID

2426
2427 SelectFaction = $USA
2428 SelectRegion = $Prince George's, MD
2429> StartEvent = evt_nam_USA_PrisonersPolicy|1|2|evt_txt_USA_PrisonersPolicy|Event-img_USA_PrisonersPolicy|$Prince George's, MD|126
2430
2431 Conditions
2432 MinDate = 1862/01/01

Syntax: StartEvent = Name|Occurences|DisplayType|EventText|EventPic|Region|Sound



The problem might relate to 'Event-img_USA_PrisonersPolicy' lacking, for example, a .png file extension; or possibly the ' and , in the '$Prince George's, MD' region alias.

But be aware that I have made significant and wide-ranging changes in the txt.l lexer and also txt.y parser since the AGElint 1.00 version you now have in your possession.

In any case, I'll check.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 3:38:00 PM)


quote:

ORIGINAL: berto


quote:

ORIGINAL: Chliperic

another warning which is maybe a false positive:


WARNING: in /cygdrive/c/AGEod's American Civil War/AGEod's American Civil War/ACW/Events/USA Events.sct, at (or near) line 2429: suspicious, undocumented usage of a number (126) instead of sound ID

2426
2427 SelectFaction = $USA
2428 SelectRegion = $Prince George's, MD
2429> StartEvent = evt_nam_USA_PrisonersPolicy|1|2|evt_txt_USA_PrisonersPolicy|Event-img_USA_PrisonersPolicy|$Prince George's, MD|126
2430
2431 Conditions
2432 MinDate = 1862/01/01

Syntax: StartEvent = Name|Occurences|DisplayType|EventText|EventPic|Region|Sound



The problem might relate to 'Event-img_USA_PrisonersPolicy' lacking, for example, a .png file extension; or possibly the ' and , in the '$Prince George's, MD' region alias.

But be aware that I have made significant and wide-ranging changes in the txt.l lexer and also txt.y parser since the AGElint 1.00 version you now have in your possession.

In any case, I'll check.


I've quoted one, but I've hundred of the same warning. Not a problem for me, as I've reduced my development time by 10 with your tool.




Chilperic -> RE: AGElint: AGEWiki docs vs. actual usage (1/8/2012 3:47:52 PM)

I will not fix too the events about Kentucky entry, with more troublesome bugs, as I will use a revamped version of my own Kentucky version, which was the model of the official, even if the copy has somewhat lacked some key features. Anyway, the SVF 2.0 version of Kentucky will be modelled on the AIL chain of events of FY, which is working like a charm.

I'm going next week to check that

WARNING: in /cygdrive/c/AGEod's American Civil War/AGEod's American Civil War/ACW/Events/USA Leaders.sct, at (or near) line 1978: suspicious, undocumented usage of CondSkip

1975 SelMostNumGroup = Area $TN;CPCount
1976 GenMsg
1977 SelectFaction = $USA
1978> SelMostNumGroup = Area $South_East;CPCount;CondSkip
1979 GenMsg
1980 SelectRegInArea = $TN;Squared;OwnedCities;CondSkip
1981 GenMsg

Syntax: SelMostNumGroup = [;NoSelGroup] [;Area AreaUID] [;CPCount] [;RestrictToThisTag FactionTag]


I think it's a false positive, but before any methodical testing, I can't be certain.




Page: <<   < prev  2 3 [4] 5 6   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.066406