PDA

View Full Version : Creative Assembly Proj stat custom discount and upgrade



Louis de la Ferte Ste Colombe
06-02-2003, 15:46
http://www.totalwar.org/forum/non-cgi/emoticons/wave.gif all,

[FF]Almicar is working on a very nice program to read unit stat, simulate cost and give an overview of critical stats. Very helpfull to design new setup when not familiar with all units (which, with VI, is somehow the case...).

In the debugging process we face an issue with missile upgrade.

We assume that;
The upgrade % additional cost apply to the discounted value of the missile unit.
The discounted value is the original cost of the unit - the value in the column 'custom battle discount' in projstat file.
The formula is; final cost=v0cost + (v0cost - discount in projstat)*cumulative upgrade%

Well, there must be something wrong in our assumption, because we don't find the cost given when actually purchasing an upgraded missile unit in VI...

Changing custom battle discount value in projstat file does change the cost of upgrade. But projstat seems not to be the whole story.

Anybody got an idea about that? What are we missing?

Louis the Simurgh,

CBR
06-02-2003, 17:36
Hmm I just looked at both VI and 1.1. Yes something is wrong. Arbs are fine but when buying upgrades for longbows and normal archers they are cheaper than they should be. Arqs and handguns looks fine too.

When I removed the cost reduction upgrading seemed fine.

CBR

Louis de la Ferte Ste Colombe
06-02-2003, 18:06
Sorry, shall have been more precise. Some units got odd value, not all of them.

Problematic units. (list not complete)
Archer
Longbow
Nizari
All Horse Archer
Kern and Slav / Spanish javelinmen and Almughavar
Naphta thrower
Hashishin
Mameluk handgun
...

Have I overlooked something in crusader file relative to a few units?

Non missile units are ok. Arb, arq and x bow are ok.

Louis the Simurgh,

PS; will edit if more odd units found.

Kanuni
06-02-2003, 22:43
I'm not sure, but I guess this is about balancing the game a bit. For example Muslim factions need to use some of its archer units as their main sword and if they weren't cheaper to upgrade they would cost a hell too much to even get close to MAA stats.

CBR
06-02-2003, 22:54
No its not balancing stuff. They could just reduce the default cost of muslim units if they wanted to improve balance. Its on normal archers and longbows too. Something is messed up here.

CBR

Louis de la Ferte Ste Colombe
06-03-2003, 00:06
Hey, CBR, the good news about the mess up thing is that,maybe you'll have a way to tweak missile discount without touching projstat... Will be helpfull for your mod...

That is... If we found out what is messed up...

Louis the simurgh,

CBR
06-03-2003, 00:23
Quote[/b] (Louis de la Ferte Ste Colombe @ June 03 2003,01:06)]Hey, CBR, the good news about the mess up thing is that,maybe you'll have a way to tweak missile discount without touching projstat... Will be helpfull for your mod...

That is... If we found out what is messed up...
Hm not sure what you mean? I am very much sure that its not something in the unit file(if thats what you mean) that causes this "bug" So I still have to change projectile file http://www.totalwar.org/forum/non-cgi/emoticons/frown.gif

CBR

Louis de la Ferte Ste Colombe
06-04-2003, 15:10
For those interested by this topic... Please find below the discount list as compiled by LadyAn;

Annie is attempting to sort it out and reconcile with the Proj.stat:

LONG 250 244 "Longbows"
LONG 250 228 "WelshBandits"
SBOW 200 200 "DesertArchers", "TrebizondArchers",
"GenoeseSailors", "BulgarianBrigands"
"Futuwwa", "Turcomanfoot"
"JanissaryBows", "OttomanInfantry"
"GoldenHordeWarriors"
SBOW 200 85 "Hashishins"
SBOW 200 175 "Archers"
SBOW 200 192 "Nizari"
SBOW 200 195 "JanissaryInfantry"
MTLG 170 198 "TurcomanHorse", "Turcopole", "BerberCamel"
MTLG 170 ??? "MamlukHorseArchers", "SipahiOfThePorte"
MTLG 170 150 "HorseArchers"
MTLG 170 192 "GoldenHordeHorseArchers", "Faris", "Szekely"
MTLG 170 190 "ByzantineCavalry"
MTLG 170 179 "Boyar"
MTLG 170 186 "SteppeHeavyCavalry"
JAV 80 93 "SpanishJinetes"
JAV 80 76 "Almughavars" , "MurabitinInfantry", "Kern"
JAV 80 80 "Jobbagy"
JAV 80 75 "SlavJavelinmen", "SpanishJavelinmen"
XBOW 135 ??? "MountedCrossbows",
XBOW 135 135 "PaviseCrossbows", "Crossbows", "PictishCrossbows"
XBOW 135 157 "PictishMountedCrossbows"
ARB 205 205 "PaviseArbalester", "Arbalester"
GREN 350 150 "NapthaThrowers"
ARQB 120 120 "Arquebusier"
HGUN 70 70 "HandGun"
HGUN 70 50 "MamlukHandgun"
HSP 80 122 "Bonnachts"
DART 80 80 "IrishDartmen"

On left the discount as per proj stat file, on right the calculated discount with unit real cost.

The same weapon (SBOW, MTLG...) provide different discounts on upgrade depending on unit. Odd.

Among my assumptions;
- cap on discount if discounted value get too low?
- cap on discount depending on unit size?
- bug?
- discripancy with other file (but which one?), cf top of projstat file explanation on custom battle discount?
- ???

Louis the Simurgh,

longjohn2
06-04-2003, 22:26
The size of the discount is adjusted for unit size in a moderately obscure way that I can't remember off hand.
The discounted price is capped at a min of 50 for foot and 100 for cavalry.

Magyar Khan
06-05-2003, 00:11
good, another bug to add to the bug-list.....






http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif

LadyAnn
06-05-2003, 00:16
It's no longer a bug, it is an undocumented feature :) We are trying to convert this to a documented feature.

[EDIT] Question to Longjohn:
The cap of 50 seems to work for the Archers and MamelukHandgunners, I can understand these. But the costs associated with unit size quite obscure to me and there is no detectable pattern. For instance, longbow has 60-men units and perhaps have no adjustment, but they do (instead of 250, it was 244). The 40 units has the missile costs increase, while to 12 men units has the missile costs decrease.

I guess it is a pain, but we already done the homework the long way: we went through all units and find out what is the missile cost, as you could see in the table above (except a few). (Actually [FF]Almircar did the hard work). It is perhaps relevant to the Modding community in the Dungeon to figure out what is the exact mechanism. We move on.

to Magyar OK, since it remains an undocumented feature, I guess it is a bug :)

Annie

longjohn2
06-05-2003, 21:03
There's a total cost modifier too. I forgot to mention that :-).
If you look in the crusader unit stats spreadsheet, you'll see that the cost of unit is made up from the cost for the h2h component plus the cost of the missile component, adjusted for the total unit size, plus a further discount for expensive units. The discounting code does an approximate undo of these effects to try to get an estimate of the h2h value of a unit which it uses to calculate the upgrade costs.
It's a bit rough and ready I'm afraid, but it does the job.

LadyAnn
06-05-2003, 21:07
Thanks longjohn for the clarification. That explains the mysterious +-1 or 2 florins of discrepency we got when applying the missile discount formula.

Annie