Imrinfected Posted April 1, 2010 Share Posted April 1, 2010 I'm revamping the Block skill. Changed some settings to make it block more damage in earlier levels, which worked great. Shield took more damage. All is well. Then I saw that the Journeyman perk removes damage from blocking, which is totally not cool. I want to remove that, use a script to give a new "perk", and edit the description to describe said new perk. The plan is.. the player will be able to actually block attacks, but be penalized when they do it too much by their shield breaking. As the shield breaks, the player starts taking more damage from blocking, until the shield breaks entirely. In later levels of Block, the shield will take less damage from blocks. So in other words, I just need to know how to get rid of this silly perk that is getting in the way of my glorious plans. Link to comment Share on other sites More sharing options...
alonsomartinez Posted April 1, 2010 Share Posted April 1, 2010 I'm revamping the Block skill. Changed some settings to make it block more damage in earlier levels, which worked great. Shield took more damage. All is well. Then I saw that the Journeyman perk removes damage from blocking, which is totally not cool. I want to remove that, use a script to give a new "perk", and edit the description to describe said new perk. The plan is.. the player will be able to actually block attacks, but be penalized when they do it too much by their shield breaking. As the shield breaks, the player starts taking more damage from blocking, until the shield breaks entirely. In later levels of Block, the shield will take less damage from blocks. So in other words, I just need to know how to get rid of this silly perk that is getting in the way of my glorious plans. I think it might be hard coded so you cant change anything about it. Try looking at Deadly Reflex. They have a script that if you block for too long your block skill goes down to 0 until you release block. You would have to time your blocks Link to comment Share on other sites More sharing options...
Imrinfected Posted April 1, 2010 Author Share Posted April 1, 2010 I'm revamping the Block skill. Changed some settings to make it block more damage in earlier levels, which worked great. Shield took more damage. All is well. Then I saw that the Journeyman perk removes damage from blocking, which is totally not cool. I want to remove that, use a script to give a new "perk", and edit the description to describe said new perk. The plan is.. the player will be able to actually block attacks, but be penalized when they do it too much by their shield breaking. As the shield breaks, the player starts taking more damage from blocking, until the shield breaks entirely. In later levels of Block, the shield will take less damage from blocks. So in other words, I just need to know how to get rid of this silly perk that is getting in the way of my glorious plans. I think it might be hard coded so you cant change anything about it. Try looking at Deadly Reflex. They have a script that if you block for too long your block skill goes down to 0 until you release block. You would have to time your blocksThat doesn't help me at all. Link to comment Share on other sites More sharing options...
documn Posted April 2, 2010 Share Posted April 2, 2010 You could try scripting something that modifies your shield's health directly. Check out the command ModEquippedCurrentHealth. (Requires OBSE) Link to comment Share on other sites More sharing options...
Imrinfected Posted April 2, 2010 Author Share Posted April 2, 2010 You could try scripting something that modifies your shield's health directly. Check out the command ModEquippedCurrentHealth. (Requires OBSE)I thought about doing that, but I don't know if there's a way to check if an attack is blocked, or how much damage that attack did, to accurately degrade the shield. Link to comment Share on other sites More sharing options...
documn Posted April 2, 2010 Share Posted April 2, 2010 Here are a few ideas. I don't know how feasible they are for you. To detect a block, you can see if the player is playing a blockhit animation (isanimgroupplaying) and playing an appropriate block sound (getsoundplaying). To check if an enemy attacked you and you blocked, you can see if they are targeting you (getcombattarget), and they are recoiling (isanimgroupplaying). To estimate damage, you can use the formulas found here: http://www.uesp.net/wiki/Oblivion:The_Complete_Damage_Formula(getactorvalue, getgamesetting) Link to comment Share on other sites More sharing options...
Imrinfected Posted April 2, 2010 Author Share Posted April 2, 2010 Here are a few ideas. I don't know how feasible they are for you. To detect a block, you can see if the player is playing a blockhit animation (isanimgroupplaying) and playing an appropriate block sound (getsoundplaying). To check if an enemy attacked you and you blocked, you can see if they are targeting you (getcombattarget), and they are recoiling (isanimgroupplaying). To estimate damage, you can use the formulas found here: http://www.uesp.net/wiki/Oblivion:The_Complete_Damage_Formula(getactorvalue, getgamesetting)That's genius! I didn't think about using isanimgroupplaying. I guess it would be more efficient to check if the blockhit sound is playing instead of the animation, since I'm going to replace the animations in a few other mods I'm doing. The problem with that is if I use that function, I need a reference, and if I use the player then it won't work for npcs. I could just use a ref variable, but I don't know any reference variable functions that would work here. getcombattarget would I guess, but not when two npcs are fighting each other. Link to comment Share on other sites More sharing options...
documn Posted April 3, 2010 Share Posted April 3, 2010 You could add tokens to nearby NPCs which will let you track the references for each NPC. (I don't know if you're familiar with this tokens. I can explain it a bit if you need.) You add tokens you can use additem with getcrosshairref or getfirstref/getnextref. I guess the more correct way would be to use getfirstref and getnextref to make sure you get all the NPCs, but getcrosshairref would work ok too if the mod is mostly focused on player vs. NPC combat instead of NPC vs. NPC combat. Link to comment Share on other sites More sharing options...
Imrinfected Posted April 5, 2010 Author Share Posted April 5, 2010 You could add tokens to nearby NPCs which will let you track the references for each NPC. (I don't know if you're familiar with this tokens. I can explain it a bit if you need.) You add tokens you can use additem with getcrosshairref or getfirstref/getnextref. I guess the more correct way would be to use getfirstref and getnextref to make sure you get all the NPCs, but getcrosshairref would work ok too if the mod is mostly focused on player vs. NPC combat instead of NPC vs. NPC combat.I read up on getfirstref/getnextref. I think I'll use that. Thanks for your help. EDIT: Is there any way to hide a token from the player's inventory? Link to comment Share on other sites More sharing options...
Recommended Posts