GraffitiNoise Posted November 30, 2017 Share Posted November 30, 2017 (edited) Hi, I'm trying to make a mod that requires this condition on a perk: GetRandonPercent < Luck the problem is that I can only choose a real number (0-100) when performing the "getRandomPercent"and If I check the "global" box, I've pretty much search for every option there and couldn't find "luck" as a parameter. Is it possible?If so, how could I do it?thanks in advance Edited December 19, 2017 by TaliRedmint Link to comment Share on other sites More sharing options...
FlashyJoer Posted November 30, 2017 Share Posted November 30, 2017 (edited) Do it in script as follows (assuming you have a refAlias named PlayerREF - if not, use your ref name instead): Int Luck = PlayerREF.GetValue( Game.GetLuckAV() ) as intInt Random = Utility.RandomInt(1,100) If Random < Luck...Endif Have your targeted outcome fall between the if/endif. If this is dialogue conditions... Use GETVALUE with LUCK as the parameter, running on the PLAYER, comparing to a global value as a GREATER than. And then have a global variable declared in your script and do: Int Random = utility.randomint(1,100)GlobalVariableName.setvalueint(Random) And I say greater than because you cannot make a condition that says GLOBAL VARIABLE is less than LUCK. But you can say, LUCK is GREATER than the GLOBAL VARIABLE. Edited November 30, 2017 by joerqc Link to comment Share on other sites More sharing options...
GraffitiNoise Posted December 19, 2017 Author Share Posted December 19, 2017 (edited) Forgive my ignorance but you got me lost there. I think what I need is a step by step explanation on how to create a Global that resembles the player's luck. I'm not a programmer, so it would be very appreciated if someone could be didactic. I tried this: right click on the Global tab, and select "new" so I could create my Global (that resembles player's luck)It opens a window with only a space for a number. Don't laugh but I tried to write there "player.getav luck" surely it didn't accept words. It would solve my problem if it did. Edited December 19, 2017 by TaliRedmint Link to comment Share on other sites More sharing options...
TrickyVein Posted December 19, 2017 Share Posted December 19, 2017 Look at this site. https://www.creationkit.com/index.php?title=GetValue_-_GlobalVariable Link to comment Share on other sites More sharing options...
GraffitiNoise Posted December 19, 2017 Author Share Posted December 19, 2017 (edited) I'm not a programmer, so it would be very appreciated if someone could be didactic. GetValue - GlobalVariable Member of: GlobalVariable ScriptGets the current value of this global object.Contents1 Syntax2 Parameters3 Return Value4 Examples5 See AlsoSyntaxfloat Function GetValue() nativeParametersNone.Return ValueThe current value the global holds.Examples; Obtain the current time of dayfloat timeOfDay = TimeOfDayGlobalProperty.GetValue() Where can I even write this? Edited December 19, 2017 by TaliRedmint Link to comment Share on other sites More sharing options...
GraffitiNoise Posted December 19, 2017 Author Share Posted December 19, 2017 (edited) When trying to create a global that's what I see: https://www.creationkit.com/fallout4/index.php?title=Global A window with a ID and a Value. How can I say this value is "players luck" ? Edited December 19, 2017 by TaliRedmint Link to comment Share on other sites More sharing options...
Recommended Posts