Page 1 of 1
Questions about NPC's
Posted: Tue Oct 30, 2012 4:42 pm
by Blue Dragon
Xuri, NPCs receive damages bent (or higher) of the weapons, or does it have a bug somewhere?
A weapon with damage 25-50, for example, equipped in a character with the skills to fight in 1000, against a NPC with defense in 20, take damage up to 80, 90. When placing defense in 40, damage start getting consistent with the damages of weapon, but sometimes even exceeds the maximum damage, reaching around 65.
And if not bother, I have a few more doubts below about the NPCs.
1- You once said that the NPC faster of game would be one that has 300 Stamina, and a value above this that does not affect anything. Other skills or status, have a limit too?? For example, Tactics, Anatomy, Evaluating Intelligence, Dexterity ...
2- In a server I played, Dexterity who commanded the speed attack of the character, since here is the stamina that promotes this, what is the function of Dexterity?
3- Intelligence NPC affects their magic damage? Or just Evaluating Intelligence that is responsible for this?
4- A NPC with parrying = 1000, block more attacks than an NPC without this, or nothing to do?
5- Wrestling serves to dodge most of the attacks? If not, what skills or status is control this?
6- NPCs are frozen with fatigue just like players? If yes, the weight of the item in your loot affects this aspect?
7- Based on the above question, if the answer is yes, if I want an NPC with a very strong blow, but attacks is quite slow, you'll have to put a very low stamina, he soon get bored easily? On the other hand, a living dead do not ever get tired, should have a very high stamina, so he must necessarily be very fast? (this question is only valid if the response of question 6 is yes).
8- If I want to make the loot Carved Items appear in the body of the creature rather than appear in the player's backpack, where I can to change this? If yes, where and how?
I apologize for the large amount of questions.
Re: Questions about NPC's
Posted: Tue Oct 30, 2012 5:46 pm
by Xuri
I'll reply in more depth later today, but here's what I have for now:
2) In 0.99 I added a new UOX.INI setting - ATTACKSPEEDFROMSTAMINA=1/0 - which lets you control this. If it's set to 0, Dexterity alone will determine the attackspeed. If set to 1, Stamina will determine attackspeed. Since Stamina by default is inherited from Dexterity (100 dex = 100 stamina), this means that a character with 100 dex would still attack faster than one with 50 dex, since the inherited stamina would be higher. And the speed of attack would go down as the characters' stamina goes down.
3) Intelligence should not affect spell-damage. It is affected by BASEDMG tag from spells.dfn, eval-int skill of caster, and magic-resist skill of target. Also, spells do double-damage against non-human NPCs (monsters, animals), similar to the pre-AoS magic system on OSI shards.
Re: Questions about NPC's
Posted: Tue Oct 30, 2012 7:51 pm
by Blue Dragon
2-So Xuri, this command of stamina I had seen at the time and tried to test it, but never noticed a difference, being at 0 or 1, the more stamina you have (300) more fast attacks, but dexterity is not affecting anything... 20, 300, 1000 of dexterity... continues at the same speed, only the stamina that controls it in two options.
3-Hmmm, okay! But exist a influence of intelligence only in mind blast magic?
Re: Questions about NPC's
Posted: Mon Nov 05, 2012 5:38 am
by Xuri
I'll try to answer some more of your questions in detail now, sorry for the delay, Blue:
1) From what I can see after a quick glance, there does not appear to be any limits to the how high the bonuses you get from stuff like strength (damage-bonus if attacker), intelligence (to determine target of mind blast), tactics (damage-bonus if attacker/damage-reduction if victim), anatomy (damage-bonus if attacker), etc. Dexterity/Stamina for speed was a special case (there might be more that I missed). Lumberjacking damage bonus seems to currently only have any effect at all (30% bonus dmg) if skills is 100.0 or above, and always the same bonus no matter how much higher the skill is than 100.0. This might not be how it's supposed to work, I'm not sure.
2) (followup) Bug! Found the issue - which affects not just the ATTACKSPEEDFROMSTAMINA setting, but also DISPLAYDAMAGENUMBERS. Basically code currently just overwrites the DISPLAYHITMSG with the values from these two settings. ;/ Will fix.
3) (followup) Mind blast works like this, currently:
* If target's int makes out a larger percentage of the total stats than the caster's, backfire spell onto caster
* If target successfully resists the spell, the base damage before bonuses/penalties is halved
* Damage is based on (but randomized somewhat) BASEDMG value of spell from spells.dfn, plus bonus/penalty based on eval int of caster vs magic resist of target
* Damage will not exceed 60% of target maxhp
* Damage will not exceed BASEDMG from spells.dfn + 20%
4) Chance to block an attack with Parrying is calculated by:
* A) Randomizing between target's Parrying skill divided by 2 - and target's total Parrying skill
* B) Randomizing between attacker's combat-skill divided by 2 - and attacker's total combat-skill
* C) Compare the two. If target's parrying number is higher than the attacker's combat-skill (Swordsmanship, Archery, Wrestling, etc) number, the attack is blocked.
Example 1: Target has 80.0 parrying. Random number generator does Rnd( 80/2, 80) and ends up at 56. Attacker has 80.0 Swordsmanship, and random number generator does Rnd( 80/2, 80) and ends up at 60. Attack is not blocked, since attacker had the random number generator on his side :P
Example 2: Target has 150.0 parrying --> Rnd( 150/2, 150) = 130. Attacker has 100.0 Swordsmanship --> Rnd( 100/2, 100) = 92. 130 beats 92, so Parrying was successful and attack is blocked.
Example 3: Target has 150.0 parrying --> Rnd( 150/2, 150) = 77. Attacker has 100.0 Swordsmanship --> Rnd( 100/2, 100) = 84. 84 beats 77, so attack is not blocked.
If an attack is officially blocked with Parrying, a random amount of damage between half the damage and max damage is absorbed
5) At this point Wrestling does not seem to affect dodge-chance, just the amount of unarmed damage you do + attack speed (combined with dex/stamina). Whether or not an attack hits is based on the following:
* hitChance = ((( Attacker's skill + 500 ) / (( Defender's skill + 500 ) * 2.0 )) * 100.0 )
* hitSuccess? = ( Rnd(0,100) <= hitChance )
In essence it comes down to attacker's combat skill vs defender's combat skill. The higher the attacker's combat skill is compared to the defender's, the more likely he is to hit.
Example: Attacker has 30.0 Swordsmanship. Target has 60.0 Macefighting. If we enter the numbers into the formula, we end up with:
* ((( 300 + 500 ) / (( 600 + 500) * 2.0 )) * 100.0 ) =
* ((( 800 ) / ((1100) * 2.0 )) * 100.0 ) =
* (( 800 / 2200 ) * 100.0 ) =
* ( 0.364 * 100.0 ) = 36.4% chance of hitting the target on every attack
6) Weight does not affect NPC movement. Stamina does, however. If their stamina is low enough, they will only be able to walk, not run. It will never stop them from being able to move, though.
7) Stamina can be set independently from dexterity through the STAMINAMAX dfn-tag (or the .maxstamina Character Object property in JS). Same with health through HPMAX/maxhp and mana through MANAMAX/maxmana. As such, you can create an NPC with high strength (high damage), low health, low dexterity (slow, if using dex for speed INI-setting), high stamina (can fight for a long time without running out of stamina), high int (mind blast defense) but low mana. Or any other combination :)
8) This is hard-coded at the moment to end up in your backpack. If this is something you really want, create a Feature-request/Suggestion-thread concerning being able to have the items end up on the corpse instead, and I'll see what I can do when I have time.
Re: Questions about NPC's
Posted: Mon Nov 05, 2012 6:00 pm
by Blue Dragon
Dammit, you took longer, but gave a holy response!
Thank you for your attention Xuri, removed all my doubts. Very grateful!
The last doubt consist in: The bug you cited about the "ATTACKSPEEDFROMSTAMINA " already been fixed in version 0.99b or the be next version? And weapons also has double-damage on monsters? It's just that!