Jump to content

Recommended Posts

Posted (edited)

as a start,

if i opened the topic in the wrong topic, i am deeply sorry,

 

but i wrecked my brain, and i couldn't find a solution without the need of some coding (which i am not very good at, i might add).

 

my question is:

 

how can i create an enchantment/magic affect that will cap my one hand skill to a certain level?

(of course, the limitation should be removed, once the worn item is removed)

 

 

thank you very much

 

 

P.S

i am playing a character similar to kenpachi from bleach,

i created an enchantment that will absorb the character's magika (since i play with a mod that will increase my destruction spells when my magika pool is high) and each time the character removes the eyepatch, the magika returns and my spells are insanely strong, lol.

so i want to see if i can do that with my one hand skill

Edited by ZshlomiA4
Posted (edited)

So, essentially, if the skill is below certain fixed level do nothing and if it's above that level reduce it to match the level?

I don't think you can do that without coding, this might work:

(I'm assuming you now how to set up properties, if not: http://www.cipscis.com/skyrim/tutorials/beginners.aspx

Scriptname CapSkillEffect extends ActiveMagicEffect

Float Property SkillCap Auto ; to be set in ck with the cap level
String Property Skill Auto ; to be set in ck with the skill: http://www.creationkit.com/index.php?title=Actor_Value_List , for example: "OneHanded"
Float SkillMod

Event OnEffectStart(Actor akTarget, Actor akCaster)
Float CurrentSkill = akTarget.GetActorValue(Skill)
If CurrentSkill > SkillCap ; if above cap
SkillMod = CurrentSkill - SkillCap ; difference
akTarget.ModActorValue(Skill, -SkillMod) ;set it to the cap
Endif
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
akTarget.ModActorValue(Skill, SkillMod) ; restore value
endEvent
Edited by FrankFamily
Posted

thank you very much for the code,

would you mind helping me (in private of course) with assigning the script? :)

Posted (edited)

Quick tutorial:

 

Make a new magic effect, script archetype, constant, self (just like the enchantment, since it's for armor/clothes i guess).

 

On the bottom right corner, add script, new script, name it something you will remember, like XXSkillcapperScript XX being a prefix of your choice for convenience in finding it later, paste de code (except the scriptname line which will be already there), save (if it throws a compile error do tell, i didn't test it).

 

Once back in the effect window you should be able to click on properties by the side of the script you just added, edit value and set them to what you wish, SkillCap would be a float number, for example 75.0, skill would be a string, you can check the skill actor values in the link provided within the code, the string must be exactly like the ones there, no spaces.

 

Lastly just assign the magic effect to a enchantment and test it.

Edited by FrankFamily
Posted

it shows a compilation error:

Starting 1 compile threads for 1 files...
Compiling "_zarakilimiterOHscript"...
<unknown>(0,0): unable to locate script _zarakilimiterOHscript
No output generated for _zarakilimiterOHscript, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on _zarakilimiterOHscript

 

i should point out that i am running CK with Mod Organizer, if it helps or not.... since it throws the psc to "overwrite" folder within the mod organizer

Posted (edited)

how exactly are you going to create a mod when skyrim doesn't detect any mods anymore

making a mod seems pointless

Edited by skannerz22
Posted

ok, so i opened the CK outside the MO, i added the script, and when i hit "properties", the "Edit Value" is greyed out, so i only have "Add Property", now what?

 

P.S

thank you for your help, everyone :)

Posted

Don't know about the interaction between MO and Ck, i don't use MO. But maybe this helps: http://forum.step-project.com/topic/6214-howto-use-creationkit-from-mo/

I'd suggest if you can open ck normally.

 

Now, edit value will be greyed out if you haven't selected any of the properties on the right. You select a property, edit value, write. Of course, after copying and compiling the code.

 

That compiler error doesn't seem to be a mistake in the script, instead the compiler failing to well... compile. Maybe because of the MO thing. So open ck normally, delete the script from the effect, add again one, and choose a different name, basically do the whole process running ck normally, maybe that way it works.

Posted (edited)

so, i copied the code, placed it in the proper place, there were no error, pressed "Properties", but there are no properties to edit

(doing everything out of MO)

Edited by ZshlomiA4
Posted (edited)

The code above has 2 properties:

 

Float Property SkillCap Auto ; to be set in ck with the cap level
String Property Skill Auto ; to be set in ck with the skill: http://www.creationkit.com/index.php?title=Actor_Value_List , for example: "OneHanded"

 

If everything has been done properly there's no reason for them to not appear. So the steps should have been:

 

- Add script

- Name it

- Paste/write code

- click file > save, you should see below compiler output, if no errors continue, previously you mentioned a compiler error, was it solved by not opening ck from MO?

- close script window

- click properties, properties must appear with their name, type (float and string here) and <<default>> as value.

- click on each of them and edit value

 

I'm also going to recomend a couple tutorials of papyrus:

http://www.cipscis.com/skyrim/tutorials/beginners.aspx

http://www.creationkit.com/index.php?title=Category:Bethesda_Scripting_Tutorial_Series

 

Specially the one covering properties: http://www.creationkit.com/index.php?title=Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions

go through it to make sure you've done everything properly.

Edited by FrankFamily
  • Recently Browsing   0 members

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