PDA

View Full Version : Academy Modification



KukriKhan
06-04-2003, 00:40
Post from new patron CharlesMarkley :

"...I've been discussing this question with WesW of the WesMod fame, and he suggested I post in the Dungeon. Alas, as the newest Junior member, I cannot.

Here's the problem: Has anyone been able to get the Academy to give a valour bonus? I think there may be some kind of code restriction.

I first got the idea with Wes's mod version 1.84; there should be no valour upgrades other than the regular provincial bonus (i.e. +1 valour for Kataphraktoi in Constantinople). Here's the text snippet from Wes's latest 2.01 build_prod.txt file. He has added +1 valour to the discipline bonus:

0 MILITARY_ACADEMY Military Academy NON_PRODUCER 1000 8 "{{CATHEDRAL},{ROYAL_PALACE,CASTLE7,RIBAT}}" Palace "POVERTY_STRICKEN(5), DESPERATE_DEFENCE(20), CATHOLIC_EXPANSIONIST(250), CATHOLIC_NAVAL_EXPANSIONIST(250), CATHOLIC_TRADER(250), CATHOLIC_CRUSADER_TRADER(250), CATHOLIC_EXPANSIONIST_CRUSADER(250), CATHOLIC_DEFENSIVE_CRUSADER(250), POPE(130), CATHOLIC_DEFENSIVE(250), CATHOLIC_ISOLATIONIST(250), ORTHODOX_DEFENSIVE(250), ORTHODOX_EXPANSIONIST(250), ORTHODOX_STAGNANT(250), MUSLIM_PEACEFUL(250), MUSLIM_EXPANSIONIST(500), MUSLIM_DEVOUT(250), BARBARIAN_RAIDER(0), REBELS(0), CLOSE_TO_SUPPORT_LIMIT(0), " NO "CATHOLIC,ORTHODOX,MUSLIM" "{UPGRADE_DISCIPLINE(1),UPGRADE_VALOUR(1)}" 3

I cleared out my OS temporary directory (*.tmp), cleared all saved games and began a new campaign Late/Expert/Byzantines. Not one unit other than the Kataphraktoi had a +1 valour bonus in Constantinople. I built an academy and still no valour bonus for any units other than the provincial bonus for the Kats.

I then modified the late.txt file and inserted academies into Rum and Constantinople. The academies appeared without a problem in a new test new game (Late/Expert, first as the Turks, then the Byz), but there were no valour bonuses.

So, then I cleared everything out and began work on a fresh VI installation build_prod.txt file, but changed the academy discipline bonus to valour, and cleared out all the other valour bonuses from buildings. Here's my example:

0 MILITARY_ACADEMY Military Academy NON_PRODUCER 1000 10 "{{CASTLE13,UNIVERSITY},{CASTLE13,GRAND_MOSQUE}}" Palace "POVERTY_STRICKEN(5), DESPERATE_DEFENCE(20), CATHOLIC_EXPANSIONIST(50), CATHOLIC_NAVAL_EXPANSIONIST(50), CATHOLIC_TRADER(80), CATHOLIC_CRUSADER_TRADER(50), CATHOLIC_EXPANSIONIST_CRUSADER(50), CATHOLIC_DEFENSIVE_CRUSADER(50), POPE(30), CATHOLIC_DEFENSIVE(50), CATHOLIC_ISOLATIONIST(50), ORTHODOX_DEFENSIVE(80), ORTHODOX_EXPANSIONIST(100), ORTHODOX_STAGNANT(80), MUSLIM_PEACEFUL(50), MUSLIM_EXPANSIONIST(200), MUSLIM_DEVOUT(100), BARBARIAN_RAIDER(0), REBELS(0), CLOSE_TO_SUPPORT_LIMIT(0), " NO "CATHOLIC,ORTHODOX,MUSLIM" UPGRADE_VALOUR(1) 5

I tested this with the same settings: Late/Expert/Byz. No valour bonus appears for any non-Kat units with an academy in Constantinople. The building description does not say +1 valour in it's description.

I was successfully able to change the UPGRADE_DISCIPLINE(1) to UPGRADE_DISCIPLE(3) and it even showed on the building description in-game, but the Academy never recognized the valour change.

I apologize beforehand if I haven't been able to state this problem clear enough. Feel free to ask for further clarification.
--------------------------------------------------------
Kukri here: you can visit Charles Markley here:
http://www.totalwar.org/cgi-bin....;t=7803 (http://www.totalwar.org/cgi-bin/forum/ikonboard.cgi?act=ST;f=15;t=7803)

dunno
06-04-2003, 00:50
I'm pretty sure that building valor bonuses will only work for units that require that building.

Swordsman
06-04-2003, 01:54
I think Dunno is right, based on discussions here a couple of months ago and my own modding attempts. For a building to give a VALOR bonus to a unit, the unit must require that building (and thus the building must be a "troop_producer"). For the Mil Acad, that seems problematic as it's a pretty high-level building.

I haven't performed this experiment-- but would be curious to see if it's even possible for a single building to give multiple types of bonuses.

Lord Krazy
06-04-2003, 03:06
Sounds right to me guys.
But I'm not sure about multiple types of bonuses,
that would be nice.I don't have the time to try that
right now so let me know if you do. http://www.totalwar.org/forum/non-cgi/emoticons/smile.gif
Thanks
Regards
LK http://www.totalwar.org/forum/non-cgi/emoticons/smokin.gif

pdoan8
06-04-2003, 04:42
There is one more thing:

The upgrade only take 1 value. I try to have a certain level of building to give 2 upgrades at the same time, but that didn't work. For example, for Swordsmith I try:

"{}, {UPGRADE_WEAPON(1)}, {UPGRADE_WEAPON(2)}, {UPGRADE_WEAPON(3), UPGRADE_VALOUR(1)}"

From Master level (last level), I got weapon upgrades to silver but no valour bonus.

Also, the upgrade given by the higher level will overwrite the upgrade given by the lower level. So, one building can't gives 2 types of upgrades. Such as the following:

"UPGRADE_WEAPON(1), UPGRADE_WEAPON(2), UPGRADE_WEAPON(3), UPGRADE_VALOUR(1)"

I only got the valour upgrade for Master level building (the last level), lost all weapon upgrades which were given correctly by the first 3 levels.

I haven't found a way to combine the bonuses, or there isn't any way.

Edit: if you want the valour bonus to be given starting from a lower building, you will have to try this (if you don't want any higher than 1 valour bonus):

"{}, {}, {UPGRADE_VALOUR(1)}, {UPGRADE_VALOUR(1)}"

So, the third level of the swordsmith will start to give +1 valour. The bonus is repeated for level 4 so you won't lose the bonus after upgrading the building.

WesW
06-05-2003, 01:47
Thanks, guys. I think this knowledge will turn out to be useful for a lot of us. I know that I have looked at the code dozens of times, and never realized that new bonuses would eliminate older ones, even though it was staring me in the face.

This also explains why the Academy effects were so lame for Christian units, since no units required the building.

In fact, after looking at the original file, would the Academy give *any* benefit to Christian units? I guess it was simply a preq for the Surgeon's building.