Jump to content

Total Realism Overhaul


Mansh00ter

Recommended Posts

Believe it or not, I did understand that script gibberish :ermm:

 

Won't it make NPC with 500 hp as durable as dragons? Did you check what are the HP ranges of NPCs in Skyrim?

 

If you base "damage resistance" part of the formula on HP of the defender will you still base the "damage dealt" part of this formula on HP of the attacker?

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Believe it or not, I did understand that script gibberish :ermm:

 

Won't it make NPC with 500 hp as durable as dragons? Did you check what are the HP ranges of NPCs in Skyrim?

 

If you base "damage resistance" part of the formula on HP of the defender will you still base the "damage dealt" part of this formula on HP of the attacker?

He's right!!

 

Mansh00ter, you should remove those static HP checks for either a dynamic base HP ratio or a base HP difference with the player!

 

Something like this for ratio...

 

               baseHPVictimRatio = baseHPVictim / baseHPSuspect;
;get victim race modifiers //
               ;Debug.MessageBox(baseHPVictim);
               if (baseHPVictimRatio>1.0)
                       ;critters / DR:1.0 AR:0.5 HPSoak:1.5 (0-20)
                       raceHPSoakMult = 1.5;
                       raceDRMult = 1.0;
                       ;raceARMult = 0.5;
               elseIf (baseHPVictimRatio<1.0 && baseHPVictimRatio>=.9)
                       ;normal / DR:1.0 AR:1.0 HPSoak:1.0
                       raceHPSoakMult = 1.0;
                       raceDRMult = 1.0;
                       ;raceARMult = 1.0;
               elseIf (baseHPVictimRatio<.9 && baseHPVictimRatio>=.6)
                       ;beasts / DR:0.8 AR:1.2 HPSoak:0.7
                       raceHPSoakMult = 0.7;
                       raceDRMult = 0.8;
                       ;raceARMult = 1.2;
               elseIf (baseHPVictimRatio<.6 && baseHPVictimRatio>=.3)
                       ;giant beasts / DR:0.5 AR:1.6 HPSoak:0.5
                       raceHPSoakMult = 0.5;
                       raceDRMult = 0.5;
                       ;raceARMult = 1.6;
               elseIf (baseHPVictimRatio<.3 && baseHPVictimRatio>=.1)
                       ;monsters / DR:0.3 AR:1.8 HPSoak:0.3
                       raceHPSoakMult = 0.3;
                       raceDRMult = 0.3;
                       ;raceARMult = 1.8;
               elseIf (baseHPVictimRatio<.1)
                       ;dragons / DR:0.2 AR:3 HPSoak:0.1
                       raceHPSoakMult = 0.1;
                       raceDRMult = 0.2;
                       ;raceARMult = 3.0;
               endIf

 

I love using ratios... No possibilities of OP anything unless it's designed to be OP.

 

For example, the armor system, if on ratios, could have ANY number for armor rating (1000+ anyone?) and you will have only a 90% absorb or have 5billion armor rating and have 99% damage absorb.

The armor rating using ratios mod was choice #2 right after TDL when I was deciding on what mod to make back when Skyrim first came out.

Edited by Budz42
Link to comment
Share on other sites

Well, I am loading base HP stats... all actors have base HP, plus HP offsets. Most vanilla OP-ness comes from massive HP offsets.

 

The problem is that if you go purely by race, you will end up with situations where bosses get killed by a couple of arrows, which is not fun. This way, I can reasonable estimate the "base strength" of a character based on their static base HP, which never changes, regardless of level. If I took their total HP, then levels would again play a factor in calculations, which I want to avoid.

 

So, being that most humanoids have a base HP of 50, chances of encountering a dragon-like human are slim. Of course, I haven't checked every NPC in the game, so it is still possible - if you encounter such a situation, report it here after I release the mod.

On the other hand, you do encounter "stronger" humanoids from time to time, which are comparable to beasts in strength and endurance. This is not a perfect solution, but it is much better than the previous one.

 

An alternative solution would be to try and detect the actor race and set up all values accordingly. But there are many races, and even if I only add modifiers for special ones, it means a lot more code, and thus more chance of causing script lag. The current algorithm has zero lag.

 

The above code suggestion would also work, but you would need to reverse the ratio (BaseHPSuspect/BaseHpVictim). So if a 500HP dragon is attacking a 100HP player, with the ratio of 5.0, the player gets a critter damage soak multiplier of 1.5, meaning he takes 50% more damage than usual. A dragon vs. dragon would produce the 1.0 ratio, and get all modifiers set to 1.0 (no special bonuses).

 

Hmm. Not bad, that. I might even get rid of damage multipliers for attackers that way. I think I'll recode that bit. :) I could even make it a bit more programatic, and thus eliminate the if-then statements altogether, keep it purely formula based.

Link to comment
Share on other sites

 

I love using ratios... No possibilities of OP anything unless it's designed to be OP.

 

For example, the armor system, if on ratios, could have ANY number for armor rating (1000+ anyone?) and you will have only a 90% absorb or have 5billion armor rating and have 99% damage absorb.

The armor rating using ratios mod was choice #2 right after TDL when I was deciding on what mod to make back when Skyrim first came out.

 

Then you will like Combat Overhaul, since it does exactly that. It takes into account the armor rating of an actor, and creates a ratio against a roof value plus a static cap (80% damage reduction).

Link to comment
Share on other sites

I have an even better idea!

 

BaseHPSuspect/BaseHPVictim = RaceDamageModifier

 

CurrentHPSuspect/CurrentHPVictim = HealthDamageModifier

 

TotalHPSuspect/TotalHPVictim = StrengthDamageModifier

 

Outcome of a battle is decided by the weapon you are using (base of the formula?), your size and natural traits (BaseHP), your strength and conditioning (TotalHP) and your current health state (CurrentHP).

 

Still not sure how damage is calculated in matter of weapon-armor mechanic. Please explain that.

Edited by tomislawus
Link to comment
Share on other sites

It uses a lot of actor values to determine damage and defense, especially in case of a block.

 

So, base weapon damage is:

 

...
baseDamage = 0.6 * (1 + 0.15*(attackSkill/100)) * raceDRMult
...

 

Base Armor is calculated thus:

 

baseArmor = victim.getAV("damageResist")/800;
	if baseArmor>0.8
		baseArmor = 0.8
	endIf

 

Then Base Defense is calculated if the hit is blocked:

 

if (defendWeapon == 1 || defendWeapon ==3 || defendWeapon == 4) ;one handed weapons
			baseDefense = 0.5 * (1 + 0.15*(defendSkill/100))
		elseIf (defendWeapon == 2) ;daggers

...

 

Then attacker/defender skill ratios are taken into account, as well as relative HP ratios:

 

if baseDefense > 0
			skillRatio = defendSkill/attackSkill
			if skillRatio > 1
				skillRatio = 1
			endif
			strengthRatio = baseHPVictim/baseHPAttacker
			if strengthRatio > 1
				strengthRatio = 1
			endIf
			weaponRatio = baseDefense/(baseDamage*powerAttackMult)
			blockPerc = skillRatio*strengthRatio*weaponRatio
		endIf

 

And finally the damage is calculated:

 

dmgMultMaster = 0.8 + (dmgRand / 100); random damage multiplier simulating chaotic combat
	
	;calculate final damage
	calcDamage = ((baseDamage*powerAttackMult*raceARMult*(1-blockPerc))*(1) - baseArmor) * raceHPSoakMult * dmgMultMaster;

 

So as you can see, the system is indeed based on dynamic ratios between an attacker and defender.

 

As far as weapon types and armor types go, they're not in. Live trials showed that for all the extra code, the actual gameplay experience was the same as without those factors. Instead, armor is abstracted as well as weapons - right now they are only classed by type. Which means a supermagical sword does pretty much the same damage as an ordinary iron one. Unfortunately, accessing keywords for items, which is the only way to detect a material type, causes a lot of script lag. So I chose gameplay over that.

Edited by Mansh00ter
Link to comment
Share on other sites

Note that I plan on having a separate script with special weapon effects based on type of monster and type of weapon, so you will need magical/silver swords to kill certain monsters or even just be able to hurt them. But that's not yet in. Edited by Mansh00ter
Link to comment
Share on other sites

"his does create situations where you drop a common bandit with two or three arrows and his boss needs five (and hits a bit harder), but on the other hand, it removes the weird situations where you can kill obvious bosses with a couple of hits."

 

Awww, c'mon. Why would a boss could take more arrows if his protection is not good enough? Its just illogical to give him more resistance against these things, just because "he's the boss". Equip him with higher grade armour and better skills/perks, and that would be fair. And why could a common bandit take 2-3 arrows?

Link to comment
Share on other sites

 

I love using ratios... No possibilities of OP anything unless it's designed to be OP.

 

For example, the armor system, if on ratios, could have ANY number for armor rating (1000+ anyone?) and you will have only a 90% absorb or have 5billion armor rating and have 99% damage absorb.

The armor rating using ratios mod was choice #2 right after TDL when I was deciding on what mod to make back when Skyrim first came out.

 

Then you will like Combat Overhaul, since it does exactly that. It takes into account the armor rating of an actor, and creates a ratio against a roof value plus a static cap (80% damage reduction).

 

A roof value doesn't sound good. Neither does a static cap.

 

Here's an awesome algorithm.

 

damageAbsorbPercent = sin(sqrt(armorRating,e)) * 100;

Edited by Budz42
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...