Jump to content

How to add damage per level?


ghimel

Recommended Posts

I wanted to create a mod that added 2% base damage (.02) per level to unarmed, but have just gotten lost in the creation kit. Modifying weapons and very basic perk/mod values seems easy enough, but can't figure out how to make the game increase unarmed damage based on level. For example level 1 = base damage x 1, level 25 = base damage x 1.5, Level 50 = base damage x 2.

 

Does anyone know how to do something like this?

Link to comment
Share on other sites

You'd need a script to add a perk to trigger a magic effect when you only have fists out. The magic effect would run the papyrus script which would run and take the base damage work out how much damage to add and add it on top as bonus damage when you hit a target.

 

The problem is I cant find how to work out the unarmed base damage in fallout 4. Should be able to find out total unarmed damage with perks and weapons and do a percentage of that easily enough.

Link to comment
Share on other sites

Ok, create a new quest, give it id, choose Increase Level in Event dropdown menu and uncheck run once checkbox. Then click Ok, open that quest again, go to scripts. Add new script, paste following code there:

ActorValue property UnarmedDamageAV Auto

Event OnQuestInit()
    Game.getplayer().modvalue(UnarmedDamageAV, 0.02)
endevent

Then open script properties and fill UnarmedDamageAV property with UnarmedDamage actor value form. That's all.

Link to comment
Share on other sites

Ok, create a new quest, give it id, choose Increase Level in Event dropdown menu and uncheck run once checkbox. Then click Ok, open that quest again, go to scripts. Add new script, paste following code there:

ActorValue property UnarmedDamageAV Auto

Event OnQuestInit()
    Game.getplayer().modvalue(UnarmedDamageAV, 0.02)
endevent

Then open script properties and fill UnarmedDamageAV property with UnarmedDamage actor value form. That's all.

I don't know if I did anything wrong or what, but it doesn't work for me. I have everything just like your comment says, but it doesn't add any unarmed damage at level up. I enabled the mod, started up and ran to sanctuary, built about 400 wood floors to level up and still have 8 unarmed damage.

http://imgur.com/a/aVM7s

Link to comment
Share on other sites

Hmm, let's add debug command, replace script with this and see if you get notification in left upper corner when you level up.

ActorValue property UnarmedDamageAV Auto

Event OnQuestInit()
    debug.notification("level up happened")
    Game.getplayer().modvalue(UnarmedDamageAV, 0.02)
endevent

EDIT: Oops, my bad, I forgot. You need to add your quest inside SM Event Node. Go to Character/SM Event Node, then open Increase Level and add new Quest Node there, then right click on it and click - Add Quests. Then choose your quest and click OK, now it should work

Edited by shavkacagarikia
Link to comment
Share on other sites

You'd need a script to add a perk to trigger a magic effect when you only have fists out. The magic effect would run the papyrus script which would run and take the base damage work out how much damage to add and add it on top as bonus damage when you hit a target.

 

The problem is I cant find how to work out the unarmed base damage in fallout 4. Should be able to find out total unarmed damage with perks and weapons and do a percentage of that easily enough.

I believe it's found in UnarmedDefault. It is set to 8.

Link to comment
Share on other sites

Hmm, let's add debug command, replace script with this and see if you get notification in left upper corner when you level up.

ActorValue property UnarmedDamageAV Auto

Event OnQuestInit()
    debug.notification("level up happened")
    Game.getplayer().modvalue(UnarmedDamageAV, 0.02)
endevent

EDIT: Oops, my bad, I forgot. You need to add your quest inside SM Event Node. Go to Character/SM Event Node, then open Increase Level and add new Quest Node there, then right click on it and click - Add Quests. Then choose your quest and click OK, now it should work

Ok, so it works now, but only once. If I level from 1 to 2, I get the notification. From 2 to 3 an onwards, nothing happens. Also, it's adding .02 damage, not 2% base damage. I tried it with different numbers and that number gets added on to base damage directly. I.E. I changed 0.02 in script to 4.0 and unarmed damage went from 8 to 12. But like I said, it only works one time. Subsequent levels do nothing and no "level up happened" debug notification pops up.

Link to comment
Share on other sites

Ok, so I did some research with what I learned above and changed the script from Event to Function and added a stage that put in:

 

kmyQuest.UnarmedDamageAV()

Stop()

 

and all that together allows the script to run every time I level up instead of just the one time.

 

Still, I'm trying to figure out how to add 2% instead of a flat .02 damage to it. Is there a way to change the (UnarmedDamageAV, 0.02) to a multiplier instead of just adding it?

 

Also, to see the change, I have to equip a weapon and unequip it. I'm wondering if the effect takes place regardless of what the pipboy stats show or if I need to equip/unequip every level up...

Edited by ghimel
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...