Jump to content

Help with a script with a mod I currently want to do


Recommended Posts

First, you are creating a peak value modifier effect with no duration, which means it will expire instantly.   The effect archetype should be script.

The script you attach to effect axtends ObjectReference.  It should extend ActiveMagicEffect.   And event you should code for is OnEffectStart.

In the script, ModActorValue call, you are adjusting a value called AVtoAdjust, not CarryWeight.  Get rid of the quotes.

Link to comment
Share on other sites

The quotes were a carry-over from my example(s). They were inserted by error.  I was looking at how I did things on other mods and wasn't paying close enough attention.  I'll go back and fix them so no one else gets confused on that.

Link to comment
Share on other sites

1 hour ago, scorrp10 said:

First, you are creating a peak value modifier effect with no duration, which means it will expire instantly.   The effect archetype should be script.

The script you attach to effect axtends ObjectReference.  It should extend ActiveMagicEffect.   And event you should code for is OnEffectStart.

In the script, ModActorValue call, you are adjusting a value called AVtoAdjust, not CarryWeight.  Get rid of the quotes.

I feel like I know I'm getting closer to figuring things out, but I keep hitting a wall. Scripting ain't my thing. I wiped clear the script and have been reading the wiki, it seems the ActorValue may or may not be what I need to look into, to add some value to the CarryWeight stats via taking that item disguised as a potion, but I ain't got a clear how I should go about it lol.

I am learning it seems and slowly.

Image of the script. These codes can really mess with the head lol

Edited by AzureRye
Link to comment
Share on other sites

1 hour ago, scorrp10 said:

https://drive.google.com/file/d/1tv_Qs7y1G4sK4YRAobZaPUGsQ5bjWfVM/view?usp=sharing

This has both a potion version  (called MakeMeStronger) and MiscItem version (StrangeSatchel)

The Debug.Notification line in the scripts is just for confirmation and can be removed.

Holy crap! I followed what you did there and I actually got it working! Sure, the carrying capacity went up when I had to close the menu and open it back up again. But still, it actually worked! Thank you so much dude, you saved me so much of a headache. I'll be sure to give you and also IsharaMeradin credit for both of you willing to help me out when I release the mod.

Just a side note to ask; is it possible to add a description to the item? I noticed in the Misc Items property window there doesn't seem to be a description adding, I won't lose sleep over it but worth asking.

Thanks again, man! 👍

Link to comment
Share on other sites

11 hours ago, scorrp10 said:

https://drive.google.com/file/d/1tv_Qs7y1G4sK4YRAobZaPUGsQ5bjWfVM/view?usp=sharing

This has both a potion version  (called MakeMeStronger) and MiscItem version (StrangeSatchel)

The Debug.Notification line in the scripts is just for confirmation and can be removed.

The script still works great, but I had thoughts of adding a sound and message that plays when you interact with it, that is something I can do without but of course, as a modder you need to keep adding things to it lol. The sound actually plays, but the message doesn't seem to show up at the top of the screen. I'm obviously doing something wrong, but I'm slowly getting an understanding of it. The message could be via debug like you gave me, but so far this is where I am at.

CKscript.JPG.5a8206a59a81a16f6b8b8faebd7c18dc.JPG

 

Edited by AzureRye
Link to comment
Share on other sites

What does your Properties window for that script look like?      You added properties for sound and message but did you fill them?    Are you checking your Papyrus logs?  (Article is about Skyrim, but logging for SSE is handled same way)   I run a dual monitor setup and usually have SnakeTail showing my Papyrus.0.log  on the secondary screen, so I know if things work as expected.

About sound:
As long as MiscItem has a 'PickUp Sound'  property selected, it should play that sound when item is used, without any extra scripting.   It is the same sound as one that plays when item is added to inventory.   If you want some sound other than the pickup one:
Actual sound forms in CK that reference specific sound files are called 'Sound Descriptors', but you can't  play them via script .    If you want sound accessible in a script as playable property, you need a 'Sound Marker' form  pointing at the Sound Descriptor of your choice.
So you define a Sound property in your script, fill it with the Sound Marker form you want, and it should play when you call its play function.

Far as messages go,  the 'Message' forms are mainly used when you want to add a bunch of buttons to a popup (Yes, No, Maybe)  and get back which option was selected.    Personally, if I just want a message in upper left, I use Debug.Notification().   And if I want a message popup with just 'Ok' button,  I use Debug.MessageBox()

Link to comment
Share on other sites

4 hours ago, scorrp10 said:

What does your Properties window for that script look like?      You added properties for sound and message but did you fill them?    Are you checking your Papyrus logs?  (Article is about Skyrim, but logging for SSE is handled same way)   I run a dual monitor setup and usually have SnakeTail showing my Papyrus.0.log  on the secondary screen, so I know if things work as expected.

About sound:
As long as MiscItem has a 'PickUp Sound'  property selected, it should play that sound when item is used, without any extra scripting.   It is the same sound as one that plays when item is added to inventory.   If you want some sound other than the pickup one:
Actual sound forms in CK that reference specific sound files are called 'Sound Descriptors', but you can't  play them via script .    If you want sound accessible in a script as playable property, you need a 'Sound Marker' form  pointing at the Sound Descriptor of your choice.
So you define a Sound property in your script, fill it with the Sound Marker form you want, and it should play when you call its play function.

Far as messages go,  the 'Message' forms are mainly used when you want to add a bunch of buttons to a popup (Yes, No, Maybe)  and get back which option was selected.    Personally, if I just want a message in upper left, I use Debug.Notification().   And if I want a message popup with just 'Ok' button,  I use Debug.MessageBox()

Yeah, so the script is working fine. I managed to get the sound to play after the item disappears, everything works but the message that I want to have on the top left of the screen doesn't appear. And I did go and create a property for the message.

Everything is going perfectly, It's all down to that message. I could have the script for the message in the wrong place. I'm just assuming.

I'm getting this feeling that a message may not work for a Misc. item lol

CKProperties.JPG.7d50d556379dbe0d20ee904239039e97.JPGCKsamescript.JPG.22f2395034eb6c26975a0e1cbe865cfe.JPG

Edited by AzureRye
Link to comment
Share on other sites

  • Recently Browsing   0 members

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