bead-v 251 Posted July 17, 2017 (edited) This is a guide I started a few years back. I remember there were other things I wanted to add to it, but I don't remember what those things were anymore. It also doesn't seem like I'll be delving into this again any time soon, so I thought I'd just post it the way it is. The stats are determined from four sources:1) Base stats2) Class3) Attributes4) Levelup The character’s base stats [1] define the value of the stats without the application of the other sources. They do not change through levels; they remain static. They are defined in GFF files. The character's class [2] determines how some of the character’s stats progress through levels without the player doing anything. They are defined in 2DA files. The attributes [3] affect the character’s stats through levels and are affected by the player. Thus, the player can affect his character’s stats through attributes. The attributes are also defined in the GFF files, but they can be modified on level up. Levelup [4] is the only way to affect some of the stats. The actual level does not matter. What are characters for the game? Characters are defined in so called .utc files. Each character has their own .utc file, which contains all information about this character: their name, appearance, base stats, class, equipment, powers, feats, skills ... However, the stats of the character are also modified by other files, namely the .2da files. These files are basically spreadsheets that define at what rate the stats of the characters change. The stats change at different rates for different characters, depending on their CLASS. These rates do not change during the course of the game, so the character class defines at what rates the character’s stats will change. The possible classes in TSL are: Non-Jedi- soldier – SLD- scout – SCT- scoundrel – SND- tech specialist – TEC- minion – MIN, not available for players Droid- expert droid – XPD- combat droid – CBD Jedi- jedi guardian – JGD- jedi sentinel – JSN- jedi consular – JCS- jedi weapon master – JWM- jedi watchman – JWA- jedi master – JMA Sith- sith marauder – SMA- sith assassin – SAS- sith lord – SLD However, there are still way to affect your stats during the course of the game. The way of doing this is via the attributes [3]. I will list them here just for reference, and only at the end of this tutorial will I describe fully what each of the attributes does specifically for the character. Strength – STRDexterity – DEXConstitution – CONIntelligence – INTWisdom – WISCharisma – CHA The attributes themselves are also a kind of stat. They have a base value [1], to which the player adds points every four levels during level up. One thing to keep in mind is that the actual value of the attribute never matters. It’s always the modifier that you get out of it that matters. The conversion formula is the same for all attributes: a value of 8 translates to a modifier of -1, and for every 2 attribute points the modifier increases by 1. That is:Modifier = (Attribute – 10) / 2 Thus, 12 points equal a modifier of +1. Auto Balance The game uses a system to automatically adjust the stats of enemies when they are spawned according to the player character. Exactly to what extent they are modified is defined in autobalance.2da. All values depend on the player level, which is determined from experience. This means that if you have enough experience for level 33, the game will consider that level even if you haven't levelled up yet. List of stats Vitality pointsForce pointsFortitude saving throwReflex saving throwWill saving throwAttackDefenseDamageAttributesSkill points Level The character's level is also a stat, though it is used mainly to calculate other stat's. Here is the formula. Level = Level(Class I) + Level(Class II) + (PlayerLevel * levelmult(autobalance.2da) - 1) (only if mult > 0) Vitality Points - VP This is your health bar. The number is based on the “Base Hit Points” field in the .utc. This value is modified by autobalance. At levelup, you gain: 6-12 points depending on your class + CON. VP = BaseHitPoints * (PlayerLevel * vpmult(autobalance.2da) - 1)(only if mult > 0) + HitDie(classes.2da)/Levelup + CON * Level Mira’s max VP is 54. She is at level 6 when you meet her. When you level up, she is going to have 63 HP. She got +8 because she is a scout [2] and +1 because her CON is 12 [3]. Force Points - FP This is the force bar. This stat works just like the health stat. “Max Force Points” is defined with the character [1]. On level up, you gain: 4-10 points depending on your class [2] + WIS [3]. FP = Max Force Points + ForceDie(classes.2da)/Levelup + WIS * Level Defense - DEF This characterizes how hard the character is to hit. This is basically evasion. The calculation of this stat is a bit more complicated. Like with the previous stats, there is one part of it that is defined with the character (in the .utc). This is called the Natural AC [1]. Most characters have the natural AC at 0. (G0-T0 has 2, for example.) DEF = 10 + Natural AC [1] + Class AC (acbonus.2da) [2] + DEX [3] + (PlayerLevel * armormult(autobalance.2da) +2) (only if mult > 0) Class AC depends on the class AND on level. The party members actually have feats that describe the class AC (Jedi: Jedi Sense, Prestige Sense, Greater Prestige Sense; Droids: Droid Upgrade; Soldiers: Mandalorian Courage), but it is not actually provided by these feats but by acbonus.2da. Originally, the plan was to make these class AC bonuses as actual feats, meaning that a level 1 feat would mean DEF+2, level 2 DEF+4 and level 3 DEF+6. This can be seen in that there exist two further levels of Atton’s feat and the droids’ feat. Their descriptions are still intact, but the effects are obsolete. The level 2 droid feat has actually been left with HK-47 even though it has no effect. This might be a leftover from K1. The Handmaiden and the Disciple are currently the only ones who lack a feat describing their defense bonuses. Attack - ATT Attack is the opposite of DEF. When someone performs an attack, first the ATT of the attacker is compared to the DEF of the attackee, to see whether the attack HIT. Only after it has been established that the attack hit is the damage calculated. The ATT is not constant however. It does have a constant part that is added to the roll of a 20-sided die (D20). If the total ATT is greater than the DEF of the attackee, then the attack succeeds, otherwise it misses. ATT = D20 + Level(Class I) + Level(Class II) + (PlayerLevel * tohitmult(autobalance.2da)) (only if mult > 0) + STR/DEX [3] There are a few special cases though. If the roll of D20 is 1, then this is an AUTOMATIC MISS. This means that it misses even if the total ATT of the character is greater than the DEF of the attackee. Similarly, if the roll is 20, this is an AUTOMATIC HIT. You may have noticed that ALL weapons have critical hit numbers in their descriptions, something like 20-20/x2. If the roll of D20 is in the critical hit scope of the weapon, and if the attack would hit (ATT > DEF), then the ATT is calculated again. This is the THREAT ROLL. If the ATT with the threat roll is greater than the opposing creature’s DEF, then the damage is doubled or even tripled in some cases, according to the weapon. Otherwise the damage is dealt normally. The STR modifier is added if the attacker is using a melee weapon, the DEX modifier is added if the attacker is using a ranged weapon. With Finesse feats, the attacker can add the DEX modifier instead of the STR modifier if their DEX is higher than STR. With two-handed weapons or two weapons one in each hand the situation is the following: each hand performs its own attack. The attacks are calculated in much the same way, except for the penalties: ATT -6 in the main hand, ATT -10 in the off hand. In the case of a balanced second weapon or a two-handed weapon, the main hand attack penalty is reduced by 2. The Two-Weapon Fighting feats further reduce the penalties. Damage - DAM Damage calculation. DAM = WeaponDie * (PlayerLevel * damagemult(autobalance.2da) + 1) (only if mult > 0) + (1.5(if single weapon) * STR)(if melee) The Saves Saves characterize how good a character is at shrugging off effects. All hostile force powers can be “saved”, as well as effects such as poison, and possibly others, by the three saving throws: Fortitude, Reflex, Will. Fortitude - FOR With a high fortitude you are physically able to endure attacks. FOR = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + CON Saves against:- Stun, Stasis, Stasis Field- Stun Droid, Disable Droid, Destroy Droid- Wound, Choke, Kill- Affliction- Drain Life, Death Field- Crush- Critical Strike/Sniper Shot Stun Effect- Power Attack/Power Blast Knockback Effect Reflex - REF With a high reflex you are quick enough to evade attacks. REF = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + DEX Saves against:- Push, Whirlwind, Wave Will - WIL With a high will your mind is powerful enough to shrug off attacks. WIL = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + WIS Saves against:- Slow- Fear, Horror, Insanity- Shock, Lightning, Storm- Drain Force, Improved Drain Force, Master Drain Force- Scream, Improved Scream, Master Scream- Mind Trick, Confusion- Beast Trick, Beast Confusion- Droid Trick, Droid Confusion- Crush Opposition Skill points The amount of skill points you get to spend on your skills when you level up. The amount is: skillpointbase(classes.2da) + INT (Any bonuses to Intelligence from items are not taken into account.) Skills Computer use = base(*.utc)+ INT + LEVELUPDemolitions = base(*.utc) + INT + LEVELUPStealth = base(*.utc) + DEX + LEVELUPAwareness = base(*.utc) + WIS + LEVELUPPersuade = base(*.utc) + CHA + LEVELUPRepair = base(*.utc) + INT + LEVELUPSecurity = base(*.utc) + INT + LEVELUPTreat Injury = base(*.utc) + WIS + LEVELUP Attributes Attributes can be modified on every fourth level (check!), no matter what the character's class is. They affect a lot of the stats described above. I will show a list below, which shows what each attribute is good for. Strength Adds to ATT of characters with melee weapons. Improves POWER ATTACK's KICKBACK and CRITICAL STRIKE's STUN.Adds to DAMAGE of characters with melee weapons. (When wielding a single one-handed weapon, a character's Strength bonus to damage is 50% greater!) Dexterity Adds to DEF.Adds to ATT of characters with ranged weapons. Improves POWER BLAST's KICKBACK and SNIPER SHOT's STUN.Adds to STEALTH.Adds to REF. Constitution Adds to FOR.Adds to VP.Determines IMPLANT. Intelligence Adds to COMPUTER USE, DEMOLITIONS, REPAIR and SECURITY.Adds to number of skill points to be distributed on each level-up. Wisdom Adds to AWARENESS and TREAT INJURY.Adds to WIL.Adds to FP. Charisma Adds to the PERSUADE skill.Reduces ALIGNMENT PENALTY for force powers.Determines POTENCY of force powers. Lighsaber Forms Form I - Shii Cho - Determination Attack Modifier: +1Defense: +3Defense vs. Current Target: -3 Form II - Makashi - Contention Attack Modifier: +3 (vs Lighstaber)Damage: +3Blaster Bolt Deflection: -5Saves vs. Force Powers: +2 Form III - Soresu - Resilience Defense vs. Current Target: +2Blaster Bolt Deflection: +4Weapon Threat Range: -1 Form IV - Ataru - Aggression Defense: -2Defense vs. Current Target: +5Blaster Bolt Deflection: -4Weapon Threat Range: +1 Form V - Shien - Perseverance Attack Modifier: +2Defense vs. Current Target: -5Blaster Bolt Deflection: +2Critical Multiplier: +1 Form VI - Niman - Moderation Attack Modifier: +1Defense: +1Blaster Bolt Deflection: +1Saves vs. Force Powers: +1 Form VII - Juyo - Ferocity Defense: -4Defense vs. Current Target: +2Saves vs. Force Powers: -4Attacks per Round: +1Critical Hit Attack Modifier: +4 Force Forms Force Channel FP Regeneration: +50% (non-combat)Force Power Damage: +3Saves vs. Force Powers: +2 Force Affinity FP regenerate during combat Force Potency Force Power Damage: + 30%FP Cost: + 20% Force Mastery Force Power Duration: +50%Opponents' Saves vs Force Powers: -2Saves vs Force Powers: -4FP Cost: +20% Edited July 17, 2017 by bead-v 5 Quote Share this post Link to post Share on other sites
AmanoJyaku 184 Posted October 25, 2019 (edited) Thank you so much! I've been looking for this information for weeks! I'm confused about the following formulas: VP = BaseHitPoints * (PlayerLevel * vpmult(autobalance.2da) - 1)(only if mult > 0) + HitDie(classes.2da)/Levelup + CON * Level FP = Max Force Points + ForceDie(classes.2da)/Levelup + WIS * Level Skill = base(*.utc)+ INT + LEVELUP What is "Levelup/LEVELUP"? Hopefully, it's not 0! Edited October 26, 2019 by AmanoJyaku Added label for skill formula Quote Share this post Link to post Share on other sites
bead-v 251 Posted December 1, 2019 On 10/25/2019 at 2:26 PM, AmanoJyaku said: I'm confused about the following formulas: Sorry, I didn't see your post before... It's true, it's not immediately obvious the way I wrote it, I had to think a bit to remember what I wanted to say. So: VP = BaseHitPoints * (PlayerLevel * vpmult(autobalance.2da) - 1)(only if mult > 0) + HitDie(classes.2da)/Levelup + CON * Level Here you have several references to levels: 1. PlayerLevel: "All values depend on the player level, which is determined from experience. This means that if you have enough experience for level 33, the game will consider that level even if you haven't levelled up yet." 2. Level: "Level = Level(Class I) + Level(Class II) + (PlayerLevel * levelmult(autobalance.2da) - 1) (only if mult > 0)" 3. Levelup: "At levelup, you gain: 6-12 points depending on your class" So, the base is BaseHitPoints (which is multiplied by (PlayerLevel * vpmult(autobalance.2da) - 1) if the vpmult is > 0). To that value, you add some amount for every level up (ie. it's not retroactive, if you get a character at lvl 6, they will not get the bonus for the levels up to 6, they will only get it added once you level them up [I haven't checked this recently, but I think that's what is meant, and if I wrote it down I must have checked it back then]), the exact amount that's added depends on the HitDie column in classes.2da. Then at the end, you add the CON modifier * Level (as it is defined above). Force points work the same way, the only difference is that there is no autobalance scaling of the base value (there is scaling of the attribute modifier however, because of Level). As for the LEVELUP for Skill, that's the points you assign to skills when you level up your characters. As you probably know, the amount of points you can assign depends on your class as well as your INT modifier. Again, only player controlled characters get this part, since non-playable characters don't level up. [I just realized, I haven't checked or at least don't remember having checked what happens if you change the PC to another party member. Is the PC's level still used as PlayerLevel for autobalance (which is more likely I think) or is it the party member's? But if it's the PC's, then the party members that you get at higher levels have quite a disadvantage against the enemies compared to the PC and the party members you get at lower levels.] Hope this helped clear things up! 1 Quote Share this post Link to post Share on other sites
onderduiker 15 Posted December 12, 2019 Belated thanks for posting this, as it really helped me work out how the autobalance system works for enemy stats. I've collected data for enemies in each of the five sets for levels 1-50 when compiling information for the recently created Autobalance page of StrategyWiki's Star Wars Knights of the Old Republic II: The Sith Lords guide. While the calculations on that page match all values I found empirically, I doubt they're the actual functions used since it seems more likely they'd always round down or truncate values, and that they would use the same function for all five sets: if you, or someone else reading this who's more knowledgeable or mathematically inclined than I am, can see a common function or calculation where mine currently differ, please let me know. I gathered data from the following enemies, viewing values logged in the Combat section of the Journal's Messages Log, and character templates using KotOR Tool (which set they belonged to was determined by the value displayed in the Multiplier Set field of the Advanced tab): Set 1: Sith Commando (n_sithcmndo001.utc) in Trayus Crescent (905MAL_s.rim) Set 2: Sith Assassin (g_sithass002.utc) in Trayus Crescent (905MAL_s.rim) Set 3: Sith Marauder (g_darkjedi007.utc) in Trayus Crescent (905MAL_s.rim) Set 4: Lightsaber Floating (n_lightsaber001-003.utc) in Trayus Core (904MAL_s.rim) Set 4: Darth Sion (n_darthsion002.utc) in Trayus Academy (903MAL_s.rim), only for levels 16-50 Set 5: Greater Storm Beast (c_stormbeast004.utc) in Malachor Depths (902MAL_s.rim) Set 5: Darth Traya (n_darthtraya001.utc) in Trayus Core (904MAL_s.rim), only for levels 30-50 Level For all sets, level = class level(s) + rounddown(main level * 0.75) - 1: since enemies normally only have class level 1, this normally simplifies to rounddown(main level * 0.75). The easiest way to determine enemy level is to edit the savegame of a level 1 character to add Force Resistance or Immunity beforehand, then warp to the location of a Force user and activate it before engaging, and view the level logged when enemy Force powers roll against it afterward. Level can also be derived from feat or Force power DC, if you know everything else that contributes to it (like attribute bonuses, which can be found in the character template). Vitality Base Vitality multiplier can be calculated as follows: Sets 1-3: max(rounddown((main lvl + 1) * 0.65) - 1; 1) Set 4: max(round(main level * 0.7) – 1; 1) Set 5: max(round(main level * 0.8) – 1; 1) I doubt these are all the actual functions used, but their output corresponds to all the empirical data collected. Maximum Vitality was normally determined using Kill: if two failed saves killed, then this equaled damage inflicted every 2 seconds times 6 (since 1/6 * 3 * 2 = 1). Otherwise, Force powers or grenades with set damage can be used, and a character will normally inflict 1 damage with unarmed attacks after editing to set Strength to 3 and remove Unarmed Specialist feats, or anything else that would increase damage. For enemies, the maximum Vitality calculation can be simplified to (base * multiplier) + (level * (CON + Toughness)): HitDie(classes.2da)/Levelup only seems to be added for your character and party members. All my normal test subjects only had class level 1 (so no level ups), but I'd found a Cannok (c_cannok01.utc) in the Restoration Zone (231TEL_s.rim) that was a level 4 Minion in set 3 with 190 Vitality at level 10: Base Vitality: 30 Multiplier: 6 = max(rounddown((10 + 1) * 0.65) - 1; 1) Level: 10 = 4 + rounddown(10 * 0.75) - 1 CON: +1 = (12 Constitution - 10) / 2 Maximum Vitality: 190 = (30 * 6) + (10 * 1) Hitdie for Minion in classes.2da is 10, but even though the Cannok was level 4 this didn't affect its maximum Vitality (unless I've calculated incorrectly). Defense Set 1: rounddown(main * 0.6) Set 2: roundup(main * 0.7) - 1 Set 3: rounddown(main * 0.8) Set 4: roundup(main * 0.9) - 1 Set 5: main level Again, I doubt these are all the actual functions used, but their output corresponds to all the empirical data collected. This bonus is added to class bonus in the Defense Breakdown logged, so for classes that receive a bonus at level 1 (Scoundrel and Droid classes, Jedi and Prestige classes), 2 should be subtracted from the displayed value to determine the autobalance bonus. Attack Sets 1-2: roundup(main level * 0.9) - 1 Set 3: roundup(main level * 0.95) - 1 Set 4: main level Set 5: rounddown(main level * 1.1) Yet again, I doubt these are all the actual functions used, but their output corresponds to all the empirical data collected. This bonus is added to base in the Attack Breakdown logged, so class level(s) should be subtracted from the displayed value to determine the autobalance bonus. The previously mentioned Cannok in the Restoration Zone that was a level 4 Minion in set 3 had base 13 at level 10, and 4 + roundup(10 * 0.95) - 1 = 13. Damage Base damage multiplier can be calculated as follows: Sets 1-5: max(roundup((main level - 1) * damagemult); 1) The output from this function corresponded to all the empirical data collected, while rounddown((main level - 1) * damagemult) + 1 did likewise in all but one case, at level 41 for set 5 (base damage multiplier was still 7, not 8, for both the Greater Storm Beast (base 10-60) and Darth Traya (base 2-20): obviously, as the only exception I checked this multiple times): interestingly, this is the only level at which the output is a whole number since (41 - 1) * 0.175 = 7. For both Damage and Vitality, I'd expect the actual function used to be more like multiplier = 1 + (level * mult), where (level * mult) can be 0 at lower levels. Saves Set 1: rounddown(main level * 0.8) Set 2: roundup(main level * 0.9) - 1 Sets 3-4: main level Set 5: roundup(main level * 1.05) - 1 And yet again, I doubt these are all the actual functions used, but their output corresponds to all the empirical data collected. This bonus is added to base in the saving throws logged, which is the sum of attribute, character, class and Conditioning bonuses, so those needed to be subtracted to determine the autobalance bonus. 1 Quote Share this post Link to post Share on other sites
AmanoJyaku 184 Posted December 17, 2019 On 12/1/2019 at 1:29 AM, bead-v said: Sorry, I didn't see your post before... It's true, it's not immediately obvious the way I wrote it, I had to think a bit to remember what I wanted to say. No problem! This cleared things up, thanks! On 12/1/2019 at 1:29 AM, bead-v said: [I just realized, I haven't checked or at least don't remember having checked what happens if you change the PC to another party member. Is the PC's level still used as PlayerLevel for autobalance (which is more likely I think) or is it the party member's? But if it's the PC's, then the party members that you get at higher levels have quite a disadvantage against the enemies compared to the PC and the party members you get at lower levels.] Fairly certain it's based on the PC XP-level (e.g. 45,000XP is XP-level 10, even if you haven't leveled past 1), even when the PC isn't in the party. For example, when you take control of T3 on Peragus, there's no point in killing anything since the XP isn't added to the PC's XP in the global variable table. However, I just set my PC to level 10 in the Administration Level and continued on to T3 in the Hangar Bay. The enemies are level 9. This is consistent with my other game results that show a level 10 character spawns level 9 enemies. T3 is level 9, so the enemies should be level 8 max if they were based on him. 1 Quote Share this post Link to post Share on other sites