45AARP Posted August 31, 2017 Share Posted August 31, 2017 (edited) I've made a mod that allows Gemstones to be used for various buff/defensive magic to give them a real use, but want to find a way to stop the effects from stacking when using the same gem type. The way I have it setup is that each gem (ruby, diamond, etc) has an increasing effect based on the quality (flawed, flawless, etc), but when I use a flawed diamond and a flawless diamond it stacks both at the same time, which I want to avoid for balance reasons. I'm debating on if it should allow different types of gems to stack or only allow maybe 2-3 effects from different gems at a time, but I'm not sure how. This is the script I have running if anyone knows what would need to be done to have it do such a thing, and I have multiple scrips for each gem and gem quality. ScriptName aaaDiamondScript1 begin OnEquip if ( GetStage aaaGemQuest > 80 )playSound aaaGemSoundplayer.addspell aaaDiamondSpell1player.removeitem Gem6DiamondFlawed 1endif end EDIT: I'm also looking for a way to add a small particle or smoke effect for a second around the player when used, as well as an option menu to pop up asking "Do you want to use x" or something similar so that accidental clicks won't waste a valuable gemstone. Edited August 31, 2017 by slapahotribe23 Link to comment Share on other sites More sharing options...
WalkerInShadows Posted September 22, 2017 Share Posted September 22, 2017 You should take a look at the Geomancy & Gem Dust mod - it does the same thing, except that it adds spells instead of requiring you to equip a gem. It might work better for you that way. :) Link to comment Share on other sites More sharing options...
PkSanTi Posted November 2, 2017 Share Posted November 2, 2017 (edited) I am sorry, but I didn't really get what the problem was. Maybe it is my poor english. What I understood is that you do not want the effect of different types of gems to be cumulative. I don't know how each gem script is, but the first thing I'd say you have to do is to creat If statements all around the place, so that, when used an x type of gem, you have an If statement saying If ( get (other type of gem effect is active), consecuence: erase the other-type of gem effect. You could do this in half an hour, I think, and with no issues. Hope this is helpfull. EDIT: About the menu asking the player if he wants to use the item, you'll need to make a Message box and a button variable. Display the message box when the item is used, saying whatever you want it to say, and then create the options. I'd look something like this (I assume you've created two short variables: one named Button and another one called whatever you want (nShort in my example)): Begin OnEquip If ( nShort == 0 ) MessageBox "Do you want to use x gem?", "Yes", "No". Set nShort to 1 EndIfEnd Begin GameMode If (nShort == 1 ) Set Button to GetButtonPressed EndIf If ( Button == 0 ); this means, if the player pressed "Yes", wich, being the first option, has the value "0" THE EFFECTOFYOURGEM Else Set nShort to 0; this would activate if he chooses "No", wich, turning the nShort variable to 0, would put all back to the start EndIf End Edited November 2, 2017 by PkSanTi Link to comment Share on other sites More sharing options...
Recommended Posts