Pellape Posted March 2, 2021 Share Posted March 2, 2021 (edited) Cool. Grats You do not need to ask permissions if it is clearly a resource though and some stuff are not clearly a resource really. What I consider as a pure resource is something made in Blender or a complete new texture, not how you put functions one by one after each others in a script as that is not something anyone can claim - Thats mine!!!! I put those fancy functions in that textfile. I do ask for permissions anyway as the order of the functions makes them do something but I use them no matter what anyway as no one can claim a script to be MINE!!!! ;) If anyone owns that bloody script, might be the creators of OBSE if any at all... Edited March 2, 2021 by Pellape Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted March 2, 2021 Author Share Posted March 2, 2021 What I consider as a pure resource is something made in Blender or a complete new texture, not how you put functions one by one after each others in a script as that is not something anyone can claim - Thats mine!!!! I put those fancy functions in that textfile. I do ask for permissions anyway as the order of the functions makes them do something but I use them no matter what anyway as no one can claim a script to be MINE!!!! ;) If anyone owns that bloody script, might be the creators of OBSE if any at all... Ah, okay. I see what you mean. :) Right now I'm sniffing through the CS to find out how scripts label factions so I can do the "evil shrine" bit. I also have a "good guy"/Divine shrine in the main house. Link to comment Share on other sites More sharing options...
Pellape Posted March 3, 2021 Share Posted March 3, 2021 It is not the membership in different factions that makes your char to become evil or good as it is what they do in each faction, which result in fame and infamy. To check this balance, you have to: Set Variable to GetPCFame Which type of variable is not set in this wiki but I guess it is a short. And then you need to: Set Variable2 to GetPCInfamy And after that: Set FameVariable to Variable - Variable2 So if FameVariable is positive, only the good shrine will worj and if it is negative, only the evil shrine will work. Simple as that. :) Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted March 4, 2021 Author Share Posted March 4, 2021 @Pellape: Oh man, sorry for the slow response. Freaking Oblivion, this whole thing has my timing shot to all H.I'm delightfully fooling around with the chest riddle, thinking about making it a Stephen King reference to his Dark Tower book series. So I could tweak my question script and replace the question with the fame/infamy thing? Or where would I put that in the block? Link to comment Share on other sites More sharing options...
Pellape Posted March 4, 2021 Share Posted March 4, 2021 (edited) Well to begin with, not in the end for sure.... :wink: First you need to add 3 more variables, 3 shorts. Lets call them something like this: Short IsEvil Short PCFame Short PCInfamy Then you need to start the Begin InActivate block with Set PCFame to GetPCFame Set PCInFamy to GetPCInfamy Set IsEvil to Fame - InFamy If ( IsEvil < 0 && controlvar == 0 ) Messagebox "Bla bla bla", "bla", "moreblah" Set controlvar to 1 Else MessageBox "You need to do more evil deeds to get my blessing" EndIf When I used NotePad++ I did noticed that Fame and InFamy got colored in a different color like this so those 2 are part of the game and I will try to figure out exact how they work so I needed to add PC in front of them for now. PC = Player Character. I found it here. They are Global variables and could maybe be used immediately without GetPCFame or GetPCInfamy and the best way to check that might be to add this in the beginning to your script: PrintC "Current Fame = %.0f and current Infamy = %.0f", fame, infamyand then you just open the console and see or if you just want a message up at the left corner, type this instead: Message "Current Fame = %.0f and current Infamy = %.0f", fame, infamy But when debugging and testing, i prefer printc, which is = PrintToConsole which is best to use when debugging or testing stuff If it is so that they are already set, then the only thing you need to do is: Set IsEvil to Fame - InFamy If ( IsEvil < 0 && controlvar == 0 ) Messagebox "Bla bla bla", "bla", "moreblah" Set controlvar to 1 Else MessageBox "You need to do more evil deeds to get my blessing" EndIf And of course you need to declare the IsEvil as a short. Edited March 4, 2021 by Pellape Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted March 4, 2021 Author Share Posted March 4, 2021 @Pellape: All right, so let me see if I have this right. (Again, I'm absolutely a total baby on this, I know, so you can laugh. :) ) If I were to take this step-by-step and say, use my chest script as a base: ScriptName RiddleChestScriptShort controlvarShort buttonBegin OnActivate If controlvar == 0 MessageBox "Out of the eater came forth meat, and out of the strong came forth sweetness.", "Mead", "Death's scent on a battlefield", "Lion, rider and honey from a corpse", "A field of flowers" Set controlvar to 1 ElseIf controlvar > 1 Activate EndIfEndBegin GameMode If ( controlvar == 1 ) Set button to GetButtonPressed If ( button == -1 ) Return ElseIf ( button == 2) MessageBox "Your words are true. Welcome home!" Set controlvar to 2 Else MessageBox "You speak lies! Live now as the beggars do." Cast Mg05FingerSpell15 Player Set controlvar to -1 EndIf ElseIf ( controlvar == 2 ) Activate Set controlvar to 3 EndIfEnd (Now that I have my reader recognise bolding/italicising)... I'd tweak the bold bits, replacing them with the GetInfamy, etc., yes? Link to comment Share on other sites More sharing options...
Pellape Posted March 4, 2021 Share Posted March 4, 2021 (edited) No need to fiddle in the GameMode block as you must pass the If ( IsEvil < 0 && controlvar == 0 ) ...first that you put at line 5. You do know what && is? It is a 180 year old invention by a girl named Ada Byron. So both sentences must be true to pass, otherwise not. As ControlVar is 0 at that state, the IsEvil must be true to let the player pass. True and false, logical math and AND -> && or OR || - Logic Math which made the first official diagram for computer programs 1842 - Bolean Expressions Exchange the whole OnActivate block with this: Set IsEvil to Fame - InFamy If ( IsEvil < 0 && controlvar == 0 ) MessageBox "Out of the eater came forth meat, and out of the strong came forth sweetness.", "Mead", "Death's scent on a battlefield", "Lion, rider and honey from a corpse", "A field of flowers" Set controlvar to 1 Else MessageBox "You need to do more evil deeds to get my blessing" Set controlvar to 3 EndIf And remove that Activate line as that is not needed. The GameMode block runs every frame anyway, so you actually do not need to activate anything except changing the controlvar to 1, well you cant use activate there as it makes no sense at all and as you did use an elseif if controlvar > 0, you need to activate it twice. First time to change controlvar to 1 and second time to ... Well remove that activate... :wink: Also explain why you set controlvar to -1 at one point and to 3 at another? Edited March 4, 2021 by Pellape Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted March 4, 2021 Share Posted March 4, 2021 I think "controlvar = 3" was so "controlvar > 1" previously allowed for the chest to always be opened without answering the question "again" every time. That's what the "Activate" call in "OnActivate" was for after all. Having to do the riddle only "once". Link to comment Share on other sites More sharing options...
BlueSteelRanger Posted March 4, 2021 Author Share Posted March 4, 2021 @Pellape, @DraketheDragon Also explain why you set controlvar to -1 at one point and to 3 at another? I think "controlvar = 3" was so "controlvar > 1" previously allowed for the chest to always be opened without answering the question "again" every time. That's what the "Activate" call in "OnActivate" was for after all. Having to do the riddle only "once". Yeah, it came directly out of this tutorial here: https://cs.elderscrolls.com/index.php?title=Scripting_Tutorial:_My_Second_Script And, @Pellape: Ahh, okay. I'll be trying/testing that this evening. Sorry for the slowish and/or short-ish replies of late. But good news, all other bits of the house are officially done and ready to go! :) Link to comment Share on other sites More sharing options...
Pellape Posted March 4, 2021 Share Posted March 4, 2021 Do not say sorry for being late as you are always on time... On the second... ;) Well do try it and if it doesn't work out, I will help you fix it for sure. What I do not understand is what will activate what? Will the shrine activate the player or?? It casts the spell at the player so there will be no need for anyone to activate anything or did I miss something? If we only type activate, then it is the player that activates something but what? To me it looks like this activating in this script is unnecessary and pointless. Link to comment Share on other sites More sharing options...
Recommended Posts