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

Training officer and unit upgrade mod

Wed Aug 13, 2008 6:30 pm

Full kudos to Stwa, for uncovering the cause of the 'rampant unit upgrades' brought about by patch 1.13 :)

It struck me, however, that not everyone is willing to undertake the amount of editing required, nor to learn the process of edit/csv/compile needed to use the database.

So, to help, attached is an easy install file that will implement Stwa's excellent work.

[color="Red"]Install only after installing patch 1.13[/color]

To install:
  1. Download the attached file [Stwa's Fix.zip] and extract
  2. Make a backup of the BoA\GameData\Models folder
  3. Make a backup of the BoA\GameData\Units folder
  4. Run the installer [be sure it pints to your installed directory]


{Note, if you don't like to, (or forgot to :siffle: ) copy folders, you can uninstall this 'mini-patch' only by uninstallng BoA and reinstallng it}

Technical Note to modders who use the DB:
Unfortunately, I am unable to provide a 'HotFix' type fileset [JSGME compatible, or install via simple copy], as the method of editing the DB => csv => compile will create CTD due to creation of 'Duplicate UID' models and units. This issue is a result of upgrades to the csv splitter, so it no longer processes 'special characters' in filenames, which results in duplicates with slightly different filenames.

The DB files for these changes are also attached [Stwa's Fix DB.zip]


Have fun! :)
Attachments
Stwa's fix - DB.zip
(146.75 KiB) Downloaded 431 times
Stwa's Fix.zip
(529.86 KiB) Downloaded 567 times
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]

orca
Lieutenant
Posts: 149
Joined: Mon Nov 20, 2006 5:45 pm
Location: Massachusetts

Thu Aug 14, 2008 2:34 am

Thanks very much for doing this!

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Thu Aug 14, 2008 2:40 am

Lodi,

Thanks so much for going the extra mile on this. You don't need to really mention my name, its kinda embarrassing in a way.

I noticed, you had also made changes to the the Master Driller Ability too, so I checked everything out using Saratoga. And it works so far, we will see about the scenarios with auto-raise. My data is so different now days than stock BoA, I am probably not a good testing candidate.

I have to say though, it was my experience, that training from time to time would still occur in other locations, but so long as you are getting the stack trained (where the Training Officer resides), then the other stuff may be WAD after all, and should be no harm no foul.


Thanks again for you and Rafiki helping out with this...


Regards,

Stwa

P.S.

I tested my 1778 Hudson, which does use auto-raise and ran about 8 turns or so, and everything looked real good. (attached screenie). It did train the unit in Pittsburg one time, but I can live with that.

User avatar
Rafiki
Posts: 5811
Joined: Thu Aug 24, 2006 9:19 am
Location: Oslo, Norway

Thu Aug 14, 2008 5:31 am

Stwa wrote:Thanks so much for going the extra mile on this. You don't need to really mention my name, its kinda embarrassing in a way.

IMO, credit should be given where credit is due, and as far as I can see, this mod/patch is in very large parts based on the research you provided in the BoA legacy patch thread. Nice work, both of you :)
Stwa wrote:Thanks again for you and Rafiki helping out with this...
Continuing in the "credit where credit's due" vein, I have had absolutely nothing to do in providing this fix. But I'm pretty good at cheering on those who do:

Huzzah! Image
[CENTER]Latest patches: AACW :: NCP :: WIA :: ROP :: RUS :: PON :: AJE
Visit AGEWiki - your increasingly comprehensive source for information about AGE games
[SIGPIC][/SIGPIC]
[/CENTER]

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Thu Aug 14, 2008 7:48 am

Stwa wrote:I have to say though, it was my experience, that training from time to time would still occur in other locations, but so long as you are getting the stack trained (where the Training Officer resides), then the other stuff may be WAD after all, and should be no harm no foul.



Muhahahahaha I had fogotton to use my new uni_ami_gar1 unit. This is the unit Phil T. uses to setup all the garrison troops. Well most of em anyway.

This unit is not upgradeable, but its individual element components are. So this is a problem. So I just pointed it to non-upgradeble elements, regened the units, and Voila!!! No more upgading going on in the frontier forts.

Very cool, I am very happy now!!

Thanks to all.

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

Thu Aug 14, 2008 10:43 am

...that training from time to time would still occur in other locations,...


I've seen this too, but AFAIK, it's always a unit with at least one 'star' of experience.

Each turn, there is a 5% probability per 'star' that a unit will get an element upgrade....
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
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Thu Aug 14, 2008 1:14 pm

Can someone sumarize in no more than 37 words what was the problem? It does not seem to be from the code as you fixed it (that or you reverse engineered the EXE).
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Thu Aug 14, 2008 2:14 pm

Well its not completely fixed but it is a lot better than it was.

My guess, there is a problem with the code, but who knows.

1. Auto upgrade would not upgrade the unit. (data - fixed)

2. Training officer ability upgrades elements all over the map. (data - fixed for garrison and light inf.)

3. Training officer ability upgrades more elements than its supposed to. Like militia units with NO experience, that ARE NOT in the same stack with the Training officer, etc.. (perhaps WAD, code - not fixed, probably because its code related)


And I know you wouln't do this, but please dont tell us its working as designed. :bonk:

Its also football season, and the last great Stwa-child started school last monday, and first football practice yesterday. Just thought I would mention it, cause I am ready... :sourcil:

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

Thu Aug 14, 2008 9:18 pm

:)
I haven't been able to produce a bug like your #3 since the hot fix. Everything I'm seeing has experience.

Could you upload a save game [with prior turn] showing this?

Thanks
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
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Fri Aug 15, 2008 12:12 am

Sure I can probably do that. My data is a lot different though. :)

Just thought I would mention, it does upgarde stuff that HAS exeperience too.

You know the rules better than me, so that behavior is WAD, right?

Because, as a game progresses, and units start getting more experience from combat when all ____ breaks loose, then players should expect to see a lot of upgrading, that really does not have to do with the local training officer or his stack, right?

:)

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

Fri Aug 15, 2008 12:39 am

Yes. Each element has 5% per level of experience per turn to upgrade without needing a Training Officer. Test each element, every turn.

A unit will upgrade only when >50% of elements are upgraded [if tere is a Unit upgrade defined].

Note: >50%, not >=50%, so a 4 element unit needs 3 elements up before unit goes up......
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
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Fri Aug 15, 2008 1:33 am

Ok, here is a screenie with a unit with no experience being upgraded. Wayne is 1 region away. I can follow up with the saved games if you like.

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

Fri Aug 15, 2008 1:47 am

I can follow up with the saved games if you like.


yes, please
Please inclide the turn prior to the upgrade
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
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Everything is looking better and better

Fri Aug 15, 2008 3:05 pm

Ok, things are looking better and better and I am trying a few additional experiments. To recap, the changes to make all this work in my BoA data were as follows.

1. Change unit column UnitAutoUpg to TrainAutoUpg

2. Change model column PriUpg to TrainUpg

3. Delete model column SecUpg

4. Change Training Officer parms to ACW settings.

5. Optionally set Training Officer Param7 to 4 (to train 1 regiment per month).

6. Optionally set Training Officer Param3 to 0.

7. Added mdl_ame_gar (garrison) to model database, and cannot be upgraded.

8. Change all scenario setup files that use existing uni_ame_gar1 (which cannot be upgraded) to use mdl_ame_gar for its elements.

9. Optionally change AME light infantry models and units to not upgrade. (just my personal preference).

10. Remove Training Officer ability from George Washington (very important).

:)

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

Fri Aug 15, 2008 3:52 pm

:)


6. Optionally set Training Officer Param3 to 0.


What does this paameter change do?
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
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sat Aug 16, 2008 1:53 am

lodilefty wrote: :)
What does this paameter change do?


Hi Lodi,

Please don't think I am being flip or sarcastac,

BUT I have NO Idea. Just thought I would give it a whirl.

In fact I was going to ask you what that param 3 does. :)

I still get a no-experience training now and then, but apart from that, everything looks pretty good.

One thing that does occur though, if you have more than one training officer in a stack (I am meaning a 3 star general like Washington) then it will try to train twice the number of units, and it is at this time that it will attempt to train no-experienced units. So, just don't do that and maybe you will only see them in rare circumstances.

Also, I want to say, this upgrade method is a lot better than the one in 1.12a. The British AI is a lot more aggressive, and you will be glad those guys with 1 star experience are upgrading. You will find yourself hanging out in places like Pittsburg, Fort Western, Norwich, etc... just don't let your forces starve or get plowed, stay in rough terrain, and keep waiting for the auto-raises. :niark:

Regarding auto-raise, if you feel the disband rate is too high, then lower the values. So far I have left them alone.

I looked at the saves, and please remember my UID's are all different, so sending them up would be rather pointless without my alias files.

Whew!!!!

I think I will work on some graphics now, I have had ENOUGH DATA stuff.... :niark:

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sat Aug 16, 2008 8:07 am

Just a couple more comments.

1. I noticed when experienced units are upgraded its in addtion to the ones that are trained by the Training officer, so this is probably being handled by the auto-upgrade feature (function).

2. Which leads me to believe, when a non-experienced unit gets upgraded it is really the auto-upgrade function doing it, not the Training Officer ablity.

Anyway here is a cool screenie from my 1778 Pennslyvania scenario, where the training works perfectly. (Check out the Brits in Pennsy!)
Attachments
BoATrainingOfficerWorkingPennsylvania.JPG

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Aug 16, 2008 8:29 am

param0: XPGain

param1: TechUpgPerc (PrimUpg)

param2: TrainUpgPerc (SecUpg)

param3: RetainPerc (% of xp retained if upgraded)

param4: CanUpgLeader (default 0, you can't upg leaders

param5: CanUpgSubUnit (default 1, you can upg sub-units)

param6: LinExpForUpg (min nb of exp for the upg check)

param7: MaxNbSUUpg (max nb of successful upg that can be done)

(please paste in modding forum for Jasta5)
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sat Aug 16, 2008 8:41 am

Thank you,

Well see what we can do now. Hehe.... :niark:

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sat Aug 16, 2008 8:56 am

So if Param 7 is set to 2 .... and you see 4 upgrades take place, then an error has occurred? Or is some other process also doing some upgrading?

And I mean, besided a script, because I have removed the event file to make sure that it is not causeing any extra upgrading to occur.

So, I would say, when a unit with 0 experience gets trained, and he is not in the stack with a Training Officer, and more than the specified number of training events have occured for the turn, then is that a programming error, since events cannot be causeing the upgrading to occur?

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

So, I think my changes are on target, except ....

Sat Aug 16, 2008 10:35 am

So if Param 7 is set to 2 .... and you see 4 upgrades take place, then an error has occurred? Or is some other process also doing some upgrading?

And I mean, besided a script, because I have removed the event file to make sure that it is not causeing any extra upgrading to occur.

So, I would say, when a unit with 0 experience gets trained, and he is not in the stack with a Training Officer, and more than the specified number of training events have occured for the turn, then is that a programming error, since events cannot be causeing the upgrading to occur?

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sat Aug 16, 2008 5:19 pm

Also, I did some rechecking, now that the params are published, and its fairly clear to see how things went wrong in the 1.13d edition.

1. BoA 1.13d was only upgrading a single element (the default) using 30%, so basically 1 element every 3 to 4 months. This was working off the existing PrimUpg column in the models data.

2. However, BoA 1.13d could never upgrade a unit becuase the column TechAutoUpg (or perhaps TrainAutoUpg), was not in the unit database.

3. So unit elements upgrades were slow in coming, except (I think), there is a rogue instance of Training_officer firing when it should not (perhaps you never know for sure), and this at least added another element upgrade, except that is was not in the same stack as the training officer, and upgrading things in far away locations.

4. Since very few elements were being created, and at least half of them far away from Washington's army, and NO unit upgrades took place, this eventually led to mass disbandings when auto-raise removed units at the end of the year.

5. I think this is what people were trying to tell us in the Legacy Patch forum, but somehow we overlooked it all.


Regards,

Stwa

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sun Aug 17, 2008 12:02 am

Pocus wrote:param0: XPGain

param1: TechUpgPerc (PrimUpg)

param2: TrainUpgPerc (SecUpg)

param3: RetainPerc (% of xp retained if upgraded)

param4: CanUpgLeader (default 0, you can't upg leaders

param5: CanUpgSubUnit (default 1, you can upg sub-units)

param6: LinExpForUpg (min nb of exp for the upg check)

param7: MaxNbSUUpg (max nb of successful upg that can be done)

(please paste in modding forum for Jasta5)


FYI,

1. The Extra training events I am observing, occur no matter what Param3 is set to. I was setting it down in an effort to stop the EXCESSIVE upgrading.

2. Also, some of the events that seem extraneous seem to happen to the same units few units every game, and sometimes this makes me think its a data thing, but you never know.

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sun Aug 17, 2008 7:04 am

Pocus wrote:param0: XPGain

param1: TechUpgPerc (PrimUpg)

param2: TrainUpgPerc (SecUpg)

param3: RetainPerc (% of xp retained if upgraded)

param4: CanUpgLeader (default 0, you can't upg leaders

param5: CanUpgSubUnit (default 1, you can upg sub-units)

param6: LinExpForUpg (min nb of exp for the upg check)

param7: MaxNbSUUpg (max nb of successful upg that can be done)

(please paste in modding forum for Jasta5)


FYI,

1. The Extra training events I am observing, occur no matter what Param3 is set to.

2. Also, some of the events that seem extraneous seem to happen to the same units few units every game, and sometimes this makes me think its a data thing, but you never know.

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

Data request

Sun Aug 17, 2008 2:54 pm

Clearly, if we expect any fixes to the legacy patch by AGEOD, we must provide Saved games, logs, etc. from a non-modded [aka 'vanilla'] 1.13 game that demonstrates the problem.

AFAIK, any changes now to the BoA executable will have to be 'squeezed in' to current work, so it is up to the community to provide as much as possible solid data. Screenshots and logs only go so far. I'm sure the devs have "other ways" to 'look' at the problems, hence saved games.

IMHO, the more data we provide from 'vanilla' games, the less time the devs will need to spend, so the more likely the issue can be addressed....

Having said this, don't misunderstand me: the issue is real, and needs to be addressed.
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
PhilThib
Posts: 13705
Joined: Tue Oct 18, 2005 5:21 pm
Location: Meylan (France)

Sun Aug 17, 2008 3:30 pm

Yes, without saves we are almost blind :innocent: :siffle: :bonk:
Image

User avatar
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sun Aug 17, 2008 8:27 pm

lodilefty wrote:Clearly, if we expect any fixes to the legacy patch by AGEOD, we must provide Saved games, logs, etc. from a non-modded [aka 'vanilla'] 1.13 game that demonstrates the problem.

AFAIK, any changes now to the BoA executable will have to be 'squeezed in' to current work, so it is up to the community to provide as much as possible solid data. Screenshots and logs only go so far. I'm sure the devs have "other ways" to 'look' at the problems, hence saved games.

IMHO, the more data we provide from 'vanilla' games, the less time the devs will need to spend, so the more likely the issue can be addressed....

Having said this, don't misunderstand me: the issue is real, and needs to be addressed.


Hi Lodi,

I hear you, and I don't really expect Ageod to take a look at some of the more obscure things I am seeing, because my game has been modded.

Second, I may be the only person in the world that is actually using the 1.13d exe, so its not worth really burning resources on.

But, the guys in the Legacy patch forum were more than likeley using the vanilla game.

But one aspect is fairly easy to check. From the 78 Nothern setup, I have a militia unit in Wyoming and one in Pittsburg. They come with the initial setup. They do not have experience, and they are always upgraded in the first few turns of every game, without fail.

That at least makes me think (at least for these 2 units), that the problem is data related, especially if this doens't happen when you (Lodi), can't reproduce this in the vanilla game.

And when I change them from uni_ame_reb7 to uni_ame_gar1, the problem goes away.


Regards,

Stwa

P.S.

Thank you Lodi, for going the extra mile on all this. I am sure all this will be fereted out in WIA, and then maybe if there is any breathing space, we can do something with BoA 1.13e.

Personally, sometimes I just think that the Training Officer ability is training outside its stack, and it should NOT do that. But many thanks to all your hard work.

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

Sun Aug 17, 2008 8:31 pm

I'm still hunting bugs on this one. ;)

Curious: what model do you use in the new garrison unit?

If it's a new model, does it have an upgrade defined?

Thanks :)
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
Stwa
Colonel
Posts: 395
Joined: Thu Jul 26, 2007 7:01 am

Sun Aug 17, 2008 8:40 pm

Hi,

No, I am using the existing uni_AME_gar1 unit that Phil T references in every scenario setup file. (which does not upgrade). And it (from the vanilla unit database) pointed to mdl_AME_Reb1 or 4) for its elements. (which do upgrade).


So, that was a problem...

So I fixed it by creating an brand new garrison MODEL named mdl_AME_gar (that does not upgrade), and pointed the existing uni_ame_gar1 unit (from the unit database) to the newly created model. That fixed a lot of stuff.

All those units in Boonesboro, and beyond, stopped upgrading. :sourcil:

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

Sun Aug 17, 2008 8:54 pm

OK for garrisons, but do other units using that model still self upgrade?


If there's a trend toward just one model [vs. the other different Reb militia models], that narrows the search...
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]

Return to “BoA Mods”

Who is online

Users browsing this forum: No registered users and 1 guest