Page 1 of 1

[Eventual bug report on LATEST] Npcs shield success

Posted: Fri Dec 21, 2012 11:09 am
by Tryskell
Well I'm doing a massive NPCs rework on my pack, and as you perhaps saw in L2J timeline, I already reported and fixed SS activation for NPCs. I need now infos about shield rate use.

It looks pretty obvious it is also broken on latest sources (and so if that thread got positive comments, it should be moved in Bugs Reports section), but I want to ask if some ppl could test NPCs with shields, hitting them, and tell me if you see any change of damage (except the basic random damage range).

Consider logging that on your test server if it's positive, and tell me if the first is definitively always 0.0 :

calcShldUse( Formulas.java

Code: Select all

            return 0;+       _log.info("target.calcStat(Stats.SHIELD_RATE, 0, attacker, null):" + target.calcStat(Stats.SHIELD_RATE, 0, attacker, null));+       _log.info("DEXbonus[target.getDEX()]:" + DEXbonus[target.getDEX()]);        double shldRate = target.calcStat(Stats.SHIELD_RATE, 0, attacker, null) * DEXbonus[target.getDEX()];
Ty in advance,

Tk.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Fri Dec 21, 2012 12:25 pm
by UnAfraid
I doubt in L2J npc's are using shields for anything else except displaying it to the client..

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Fri Dec 21, 2012 7:33 pm
by MELERIX
other missing feature then :/

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Fri Dec 21, 2012 11:24 pm
by Tryskell
Well could you test what I said and report if I'm right ?

If my thoughts are right, items bonuses aren't registered on NPCs. As you can see reading L2Character constructor, only passive/active skills got an addStatFunc.

The solution would be to copy the equip/unequip system for players and to do it for NPCs.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Sun Dec 23, 2012 2:20 pm
by UnAfraid
So we may implement Inventory for NPCs as well :P

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Mon Dec 24, 2012 11:04 am
by Tryskell
So far, I see only 2 possibilities :
- drop the possibility to change lHand (no more custom), and add shield rate and pdef of shield in templates, as retail did.
- add and drop stats for right/left hands stats during spawn and setL/RHand (probably heavy cost, as every single instance must be calculated but allow custom weapons bonuses without problem, and changing weapons during runtime won't be an issue aswell)

Inventories for NPCs are useless, until you want to add as custom or it's a feature of latest chronicles than I don't know about. Which means AI should also consider inventory content (mobs bsoeing ? lol).

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Mon Dec 24, 2012 12:23 pm
by UnAfraid
There are some npcs that switch items in real time for example Zaken changes since Epilogue the Zaken Candle have to switch item to change the color of the candle

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Mon Dec 24, 2012 8:56 pm
by djmouse
Hi all. I agree with UnAfraid, inventory for NPC's is good idea because with it monsters also can be disarmed.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Tue Dec 25, 2012 2:46 pm
by Tryskell
UnAfraid wrote:There are some npcs that switch items in real time for example Zaken changes since Epilogue the Zaken Candle have to switch item to change the color of the candle
If we speak of the same candles, aka the ones you use in order to find Zaken (and I played on GoD :P), how is it related to NPCs inventories in any of the 4th dimension :P ?

Monsters disarmed probably lead to big visual issues, cf archer animation and range still affected by static values (for info that range isn't calculated from weapon but from template).

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Tue Dec 25, 2012 2:56 pm
by UnAfraid
Tryskell wrote:
UnAfraid wrote:There are some npcs that switch items in real time for example Zaken changes since Epilogue the Zaken Candle have to switch item to change the color of the candle
If we speak of the same candles, aka the ones you use in order to find Zaken (and I played on GoD :P), how is it related to NPCs inventories in any of the 4th dimension :P ?

Monsters disarmed probably lead to big visual issues, cf archer animation and range still affected by static values (for info that range isn't calculated from weapon but from template).
The idea is not to create different equipment system for npcs when we can use the same as we use for players.
Monsters on retail can be disarmed and there is no visual issues.

Also npc inventory gives you lots of possibilities.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Wed Dec 26, 2012 12:40 pm
by Tryskell
UnAfraid wrote: The idea is not to create different equipment system for npcs when we can use the same as we use for players.
I never stated anything related to that, anyway it will probably extends ItemContainer.
UnAfraid wrote: Monsters on retail can be disarmed and there is no visual issues.
As I stated on L2J you currently use a static range, leading to visual issue. Simply drop a bow from archers guards to understand. I must add the idea behing monsters disarm can be simply made (threadpoolmanager set 0 on rHand, store the value and reset weapon id at the end) once the l/rHand stats are taken in consideration.
UnAfraid wrote: Also npc inventory gives you lots of possibilities.
While I got no doubt about the utility (cf my statement about bsoe mobs, but could be potions or even ss uses), I clearly doubt you want to add one inventory per NPC. A inventory by template wouldn't be enough (and that will be already... 10k inventories ?). I don't want to imagine a NPC inventory management, where 50k+ (dunno how fat is your spawnlist atm, 39k for IL) inventories are created, and when you edit them, where goes the info ? In the database ofc lol. Bim, 50k inventories to load.

Without counting the fact you must recreate a blank inventory at every NPC death, either reloading the template infos or loading from DB.

Just a bs idea imo, on paper it's cool but that's all.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Wed Dec 26, 2012 6:14 pm
by MELERIX
NPC inventory for this is not needed I think, we just need to make shield formulas to affect NPCs, thats all imho.

Re: [Eventual bug report on LATEST] Npcs shield success

Posted: Thu Dec 27, 2012 2:33 am
by UnAfraid
Tryskell wrote: I never stated anything related to that, anyway it will probably extends ItemContainer.
Exactly!
Tryskell wrote: While I got no doubt about the utility (cf my statement about bsoe mobs, but could be potions or even ss uses), I clearly doubt you want to add one inventory per NPC. A inventory by template wouldn't be enough (and that will be already... 10k inventories ?). I don't want to imagine a NPC inventory management, where 50k+ (dunno how fat is your spawnlist atm, 39k for IL) inventories are created, and when you edit them, where goes the info ? In the database ofc lol. Bim, 50k inventories to load.
Lol i won't implement inventories for npcs which doesn't need it only for those which have items in thier npc template and null for the rest.