BL Coding How to modify javelin damage without also modifying spears?

正在查看此主题的用户

Timbough

Recruit
I increased all my spear's damage in crafting_pieces.xml, which had the affect of also increasing thrown spear damages by a larger amount because the game seems to autocalculate thrown damage based on the cutting factor listed in crafting_pieces.xml.

Anyone know where to edit that calculation for thrown damage?

Whatabout any of those variables that play a role in determining weapon speed, etc, based on individual crafting pieces?
 
解决方案
It depends on how you want to go about it. What I feel is the easiest way to do it is using OnAgentHit, OnScoreHit or OnRegisterBlow. Looks at the attacking agent's wielded weapon type and scale or modify damage for weapons of a particular class. This way is hacky and could be broken or cheated, tho.

You could also add to the AgentApplyDamageModel for the relevant gamemode and add addition perk damage, not that I can quickly skim how those work at a glance.

And crafted weapon stats are determined in Taleworlds.Core.Crafting. It's a very involved formula that I would recommend digging through on your own to get a better feel for how weapon parts work. There is a direct value in here you could modify to change missile damage scaling...
It depends on how you want to go about it. What I feel is the easiest way to do it is using OnAgentHit, OnScoreHit or OnRegisterBlow. Looks at the attacking agent's wielded weapon type and scale or modify damage for weapons of a particular class. This way is hacky and could be broken or cheated, tho.

You could also add to the AgentApplyDamageModel for the relevant gamemode and add addition perk damage, not that I can quickly skim how those work at a glance.

And crafted weapon stats are determined in Taleworlds.Core.Crafting. It's a very involved formula that I would recommend digging through on your own to get a better feel for how weapon parts work. There is a direct value in here you could modify to change missile damage scaling based on weapon typing.

This is sort of meandering, sorry.
 
点赞 0
解决方案
Thanks. That's what I needed to know.

I eventually found it in Crafting/CalculateMissileDamage. They are simple multipliers, not tied to velocity as I was expecting. Editing them allows me to fix them however I like.
 
最后编辑:
点赞 0
后退
顶部 底部