[Module] Flat XP

Riot_Starter

Warlord
Joined
May 8, 2009
Messages
169
If you've been keeping up in the ideas thread, then you probably already know what this is. For those slackers among us, this is a module which eliminates the diminishing returns formula for training/arcane XP and replaces it with a constant per turn gain of XP. I have gone through and changed all the relevant promos and buildings.

Put the FlatXP folder into your Assets\Modules\NormalModules folder.

Let me explain a little on how this works now. The old training rate system is gone from all sources (training yard, channeling, etc.) and is replaced by a per turn system which uses the Hero promotion mechanics. This makes everything consistent, easily predictable, and easier to balance different sources of XP. Figure 1 (below) shows the turns needed for a 0 XP adept to become a mage and an archmage. It also shows the turns required under the new system under the same circumstances.

fig1b.png


So you can see the turns are similar between the two, with the notable difference being the much shorter archmage times. I think this is fine since who is going to wait 200 turns for an archmage anyway?

So the system works and creates times we are already used to seeing. The differences? Well, a significant difference is how it interacts with free XP on creation (like apprenticeship, for example). Before, gaining 2 XP for an adept would save you about 4 turns of waiting to become a mage. Now, that same adept would wait 20 turns less for a plain adept and around 13 turns less for one with potency. Same idea applies to military and disciple units. Second difference: It is very easy to balance and predict different sources of XP. Say an adept just has channeling 1, so he gets 0.1 XP a turn, he will have to wait 100 turns to become a mage. If you can get him a mages guild and alchemy lab (each give 0.05 XP for a total of 0.1 XP) then you double his XP per turn. This means he only waits 50 turns (exactly half). Combining sources is intuitive unlike the previous system.

So, try it out and let me know what you think. I like feedback since I'm a big balance guy and all experience helps since I can't try everything.

--------------------

A couple of known bugs:

- The maximum cap for XP is bugged. I'll just give an example: If a warrior has Hero promotion (1 XP per turn till 100) and a dummy promo which gives 3 XP per turn till 20, then he'll gain 4 XP per turn till 120. This isn't what we want. We want 4 XP till 20 and 1 XP till 100. This isn't my bug to fix, but it shouldn't come up too often. Just a heads up since currently I have most promos each going to 100, so someone with 2 of these can gain XP till 200. The only ones which I changed to work correctly in this bugged state are the training yard-type buildings, command post, and dwarven vaults.

--------------

1.03 Changelog: -Fully Compatible with RifE 1.2
1) Updated temple of the hand to its new version and the white hand's citadel updated.
2) Fixed the help text on buildings that already had help text and gave xp. They now correctly show that they give a training promo.


Old Changelogs:
Spoiler :
1.02 Changelog:
1. Tweaks to rates to make them play nicely with different gamespeeds and for balance.
Stand out changes:
-Channeling 1 raised from 0.1 to 0.15
-Channeling 2 lowered to 0.09 from 0.1
-Channeling 3 raised from 0.1 to 0.18
2. Fixed promos that were missed (most notably, Divine)

1.01 Changelog:
-Fix bugs
 

Attachments

The standard module installing drill. Put the FlatXP folder into your Assets/Modules/NormalModules folder.

This module overwrites a lot of buildings and promotions. It would probably be better to place it in "Assets\Modules\LoadOrderVitalModules\SecondLoad".

That way any modules in "Assets\Modules\NormalModules" that modify those same buildings and promotions will continue to work.
 
Actually, I don't think that will work. I had to use bForceOverwrite since I needed to remove a stat from the buildings and promos. So even if you loaded it after, it would overwrite them.

On another note. Update!!! Well not really, more of a "I left a terrible bug in and didn't notice" update. It's what I get for uploading at 3 am. So get 1.01 while its hot.
 
Honestly, I don't its too big of a deal. I dealt with it in the most common situations by making the caps low on the training yard/hunting lodge/etc., so military units won't be an issue. And unless you plan on getting your arcane or disciple units to more than 100 XP, the you're fine.

The only situation I can see being a problem is with an arcane hero, since with channeling alone he'll have 200-400 XP cap, but that will take a long time turns wise to become a problem.
 
Actually... I'm okay with the arcane hero. They take MUCH more xp to get to the point normal heroes get to, and a high cap like that would be useful for getting them up the Arcane Mastery promotions.

So really, as long as standard military units are compensated for, this should work out just fine IMO. :lol:
 
Wow thanks, Riot Starter! From 'please fix this' to solution on the same day, excellent work.

Just to be clear, by "Old System" you mean the method in RifE/FF, rather than the random method in FfH (which I think was a 1 in 6? chance for 1xp per channeling, which is a little faster than the rates you have here-but not enough to argue over). In the Old System, their were also minor boosts just from having various spell promotions, did you change all of those too or shut off the effect?

Edit:Okay, I see you just shut that effect off. Under the old system, you got faster growing adepts if you had doubled up mana sources-which I guess models them being smarter puppies. Would you consider something like .01 xp per turn per spell promotion with a cap of 1 (just because I don't know what effect a cap of 0 would have). If Xienwolf fixes the caps, shouldn't they be removed entirely for arcane units?

Edit2:Hmmm. Do you have a correction for game speed in here? If so, I was wondering how it would deal with rounding? Or put another way, the decimal xp displays to .01, but does it record any more digits? And does it add all these contributions before adjusting for game speed or adjust, then add?
 
Actually, I don't think that will work. I had to use bForceOverwrite since I needed to remove a stat from the buildings and promos. So even if you loaded it after, it would overwrite them.

The way I understand it is first the regular xml is loaded, then each module is loaded in order. Any non-default values found in a module replaces those values that have already been loaded. If a bForceOverwrite is encountered, all values of that entry are reset to default values and then the values are loaded from the module.

Any module entry using bForceOverwrite would overwrite any changes made before that module is loaded, but later modules will change the new entry.

So if the Flat XP module is loaded before, for instance, the Tweaked Buildings module from Wildmana; Tweaked Buildings should modify your changed buildings with no problems. (Caveat, I haven't looked at the Tweaked Buildings xml, but I doubt it uses many forced overwrites.)


Probably not very important as it is easy enough to move the module when it becomes necessary.
 
Wow thanks, Riot Starter! From 'please fix this' to solution on the same day, excellent work.

Just to be clear, by "Old System" you mean the method in RifE/FF, rather than the random method in FfH (which I think was a 1 in 6? chance for 1xp per channeling, which is a little faster than the rates you have here-but not enough to argue over). In the Old System, their were also minor boosts just from having various spell promotions, did you change all of those too or shut off the effect?

Edit:Okay, I see you just shut that effect off. Under the old system, you got faster growing adepts if you had doubled up mana sources-which I guess models them being smarter puppies. Would you consider something like .01 xp per turn per spell promotion with a cap of 1 (just because I don't know what effect a cap of 0 would have). If Xienwolf fixes the caps, shouldn't they be removed entirely for arcane units?

Edit2:Hmmm. Do you have a correction for game speed in here? If so, I was wondering how it would deal with rounding? Or put another way, the decimal xp displays to .01, but does it record any more digits? And does it add all these contributions before adjusting for game speed or adjust, then add?

By "Old system", I mean the FF one. I'm hesitant to give a boost the lvl 1 spells since it would throw off the current timings and I'm not sure if its justified either.

The XP per turn supposedly has correction for gamespeed (at least that's what I remember Xienwolf saying a while back), but I didn't test it. It is a float, so I assume it holds more than 2 decimal points, but I didn't test that either. I'll check those 2 things and post what I get.
 
Ok, just tested gamespeed and decimals.

Decimals: The game only tracks 2 digits on both total XP and XP per turn. A per turn gain of 0.009 will give 0 per turn and the unit won't gain any XP no matter how many turns go by. This is relevant to gamespeed because...

Gamespeed: The XP gain per turn DOES scale with gamespeed. Faster speeds give more XP and slower give a fraction of what you get per turn. Marathon seems to only give 1/3 of the XP per turn. So any XP per turn less than 0.03 will give 0 per turn on marathon. It only keeps the first 2 digits of the XP per turn (0.05 will give only 0.01 per turn on marathon). Also, each source is adjusted for gamespeed and added individually to the unit. Test I used: Test promo gives 0.11 and one gives 0.1. If added then adjusted (0.21/3 = 0.07), instead I got (0.11/3 = 0.03 and 0.1/3 = 0.03) 0.06.
 
By "Old system", I mean the FF one. I'm hesitant to give a boost the lvl 1 spells since it would throw off the current timings and I'm not sure if its justified either.

Did you account for the rate boost those spells give under the old system when you calculated the timings? Because the difference between the free xp rates for an adept that went all combat promos and one that went all spell promos was pretty pronounced where the rate was concerned (and significant, if not as much so, in the time it took to get each level).

As for justification, under the old system, arcane units that diversified their knowledge were rewarded in xp for not taking the shortcut to power through combat promotions. And adepts created later in the game were (I think intentionally) better than your first adepts because they started with free spell promos (if you got copies of mana sources) that older adepts may have 'wasted' promotions on and got a boost in their xp gain rate to catch up with their older soon-to-be-inferior brothers.

Gamespeed: The XP gain per turn DOES scale with gamespeed. Faster speeds give more XP and slower give a fraction of what you get per turn. Marathon seems to only give 1/3 of the XP per turn. So any XP per turn less than 0.03 will give 0 per turn on marathon. It only keeps the first 2 digits of the XP per turn (0.05 will give only 0.01 per turn on marathon). Also, each source is adjusted for gamespeed and added individually to the unit. Test I used: Test promo gives 0.11 and one gives 0.1. If added then adjusted (0.21/3 = 0.07), instead I got (0.11/3 = 0.03 and 0.1/3 = 0.03) 0.06.

So .01 per turn wouldn't matter anyway, at least on epic or marathon. Would it be possible to check how many spell promotions a unit has and give a free series of promotions based on that count to give enough .01s of xp per turn not to get wiped out by rounding? 60 promotions to just count them directly is probably a waste of effort. Maybe a promotion "Potential" given for free at 4 spell promos (How many spell promos could an adept with no free promos from mana sources have when he's of level to become a mage? I'm thinking two less than that, one so he qualifies before becoming a mage and another one for Combat 1) that grants +.04 (.01 times whatever that required spell promo count turns out to be) xp per turn, with whatever cap works for you. Later would be "Great Potential" given for free at 9 spell promos (similarly what he could have without free promos from mana sources less one so he gets it before qualifying as an archmage and less two more for Combat 1 and 2) granting +.05 (.01 per required promo, less the .04 he's already getting for Potential) xp per turn. Even later would be "Gifted", the same deal but for 15 spell promos, and finally "Master of Magic" (just...can't...help...myself) for 30 promos. Please note that I didn't make "Mage" a prerequisite for any of these.

Alternatively, you could just give .03xp per turn to the level 3 spell promos. Or not do any of this if it really doesn't appeal to you.

Separate thought...

If the gamespeed adjustment is 1/3 for marathon, and I think either epic is 1/2 or quick is 3/2, it might be useful in avoiding rounding errors to weight those xp per turn values by .06s. So: Mage Guild, Potency, and Channeling 1 (.06); Channeling 2 (.12); Channeling 3 (.18). That slows down the low end where you guys are worried about balance and speeds up the high end where I'm worried about loading up spells.
 
Just posted an updated version with tweaks to the rates to make them work better with different gamespeeds. I increased Channeling 1's rate, instead of giving spell promos their own rate. If it's needed I might lower Channel 1's rate and give Lvl 1 spheres a small rate of their own.

I don't want to add some crazy system that keeps track of promos. I want to keep things simple. It makes it easier to understand and balance.
 
I have installed Version 1.00 and have a running game with this Version. Can I update or will I get problems with my running game?
 
You shouldn't have any problems since I'm just changing a number or 2 in the promos. Nothing I think would cause saved games to go bad. It might though, so you might want to keep the old one on hand to revert back if it does.
 
Just posted an updated version with tweaks to the rates to make them work better with different gamespeeds. I increased Channeling 1's rate, instead of giving spell promos their own rate. If it's needed I might lower Channel 1's rate and give Lvl 1 spheres a small rate of their own.

I don't want to add some crazy system that keeps track of promos. I want to keep things simple. It makes it easier to understand and balance.

If you don't think there should be any differentiation between adepts that get combat promos and those that focus on spells, that's a reasonable choice to make. I just think we should be conscious of the fact that it's a change in paradigm. My reasoning for the 'crazy system' was that it does what the old system did in a way that keeps the rate increases from vanishing due to truncation. If you were going to give the level 1 promos any rate, it would have to be at least .03 per turn to matter on marathon and I think that's too much, unless you lower the Channeling 1 rate.

Or, rather, it's too much to give .03 to each spell promo of any level. I guess doing it for the level 1s instead of the level 3s makes it relevant for all arcane units and encourages diversification, which could be good.
 
Cosmetic-Amurites Wixard Hall training functions properly, but its pedia entry doesn't mention it.
 
odalrick, you are correct about how Modules load. I ought to have made an "Overwriters" folder which loads before all other modules, that would be the ideal solution here.

But you did, didn't you? It's called LoadOrderVitalModules.

I don't understand what more you'd want.
 
Back
Top Bottom