scorrp10 Posted February 7 Share Posted February 7 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 More sharing options...
IsharaMeradin Posted February 7 Share Posted February 7 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 More sharing options...
AzureRye Posted February 7 Author Share Posted February 7 (edited) 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 February 7 by AzureRye Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 7 Share Posted February 7 Carryweight is an actor value. Thus ModActorValue should do the job. That said, if your "potion" is used from within the inventory, the UI will not update until re-opening the inventory. Link to comment Share on other sites More sharing options...
scorrp10 Posted February 8 Share Posted February 8 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. Link to comment Share on other sites More sharing options...
AzureRye Posted February 8 Author Share Posted February 8 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 More sharing options...
AzureRye Posted February 8 Author Share Posted February 8 (edited) 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. Edited February 8 by AzureRye Link to comment Share on other sites More sharing options...
scorrp10 Posted February 8 Share Posted February 8 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 More sharing options...
AzureRye Posted February 8 Author Share Posted February 8 (edited) 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 Edited February 8 by AzureRye Link to comment Share on other sites More sharing options...
AzureRye Posted February 8 Author Share Posted February 8 Update: I got the message to appear by putting it below the Sound.Play script. It seems I got everything sorted now. Thanks again for the help to the people here lol. Link to comment Share on other sites More sharing options...
Recommended Posts