Dermotallic Posted December 1, 2016 Share Posted December 1, 2016 So I've been attempting to create a mod that makes your reputation tied to your charisma if it's high or low enough (credit for this idea goes to /u/Sideism on reddit) but I can't seem to get the script running. -it's one single script, on a quest set to start at game start, with processing delay set to 1 second, i've set nothing else with this quest -the script is divided into about 12 different if statements with more nested inside each one because of the 10 limit on nested if's -i've set the scriptname at the top and the body of the script is within the begin gamemode block -i'm running geck through the powerup and no errors are showing up here's a sample showing what i'm doing If player.getbaseav charisma > 9 If GetReputation RepNVPrimm 1 > 4 && < 15 SetReputation RepNVPrimm 1 30 endif If GetReputation RepNVPrimm 0 > 14 SetReputation RepNVPrimm 0 14 endif If GetReputation RepNVTheStrip 1 > 5 && < 20 SetReputation RepNVTheStrip 1 40 endif If GetReputation RepNVTheStrip 0 > 19 SetReputation RepNVTheStrip 0 19 endif If GetReputation RepNVNovac 1 > 2 && < 10 SetReputation RepNVNovac 1 20 endif If GetReputation RepNVNovac 0 > 9 SetReputation RepNVNovac 0 9 endif If GetReputation RepNVFreeside 1 > 10 && < 35 SetReputation RepNVFreeside 1 70 endif If GetReputation RepNVFreeside 0 > 34 SetReputation RepNVFreeside 0 34 endif If GetReputation RepNVGoodsprings 1 > 2 && < 8 SetReputation RepNVGoodsprings 1 15 endif If GetReputation RepNVGoodsprings 0 > 7 SetReputation RepNVGoodSprings 0 7 endif endif i have the ESP activated and yet when my charisma is set at 10 i'm still able to go far beyond shunned into vilified even though it's supposedly set to limit infamy to shunned. Any help at all would be greatly appreciated. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2016 Share Posted December 2, 2016 I'm not too familiar with the Reputation functions, but your structure of the 'if' statements look problematic. For example, I think you mean to check for a range of reputation 5-14: If GetReputation RepNVPrimm 1 > 4 && GetReputation RepNVPrimm 1 < 15 Not sure what you have: 4 && < 15, will resolve to, but it's not checking a range on the function. Link to comment Share on other sites More sharing options...
Dermotallic Posted December 2, 2016 Author Share Posted December 2, 2016 (edited) I'm not too familiar with the Reputation functions, but your structure of the 'if' statements look problematic.For example, I think you mean to check for a range of reputation 5-14: If GetReputation RepNVPrimm 1 > 4 && GetReputation RepNVPrimm 1 < 15Not sure what you have: 4 && < 15, will resolve to, but it's not checking a range on the function. Should something like this work? If player.GetBaseActorValue charisma > 9 If GetReputation RepNVGoodsprings 1 > 2 && < 8 SetReputation RepNVGoodsprings 1 15 endif endif If player.GetBaseActorValue charisma > 9 If GetReputation RepNVGoodsprings 0 > 7 SetReputation RepNVGoodSprings 0 7 endif endif Edited December 2, 2016 by Dermotallic Link to comment Share on other sites More sharing options...
Mktavish Posted December 2, 2016 Share Posted December 2, 2016 I'm not sure ... but I think you need a variable. This line " If GetReputation RepNVGoodsprings 1 " v Doesnt seem right Link to comment Share on other sites More sharing options...
PushTheWinButton Posted December 2, 2016 Share Posted December 2, 2016 I'm not too familiar with the Reputation functions, but your structure of the 'if' statements look problematic.For example, I think you mean to check for a range of reputation 5-14: If GetReputation RepNVPrimm 1 > 4 && GetReputation RepNVPrimm 1 < 15Not sure what you have: 4 && < 15, will resolve to, but it's not checking a range on the function. Should something like this work? If player.GetBaseActorValue charisma > 9 If GetReputation RepNVGoodsprings 1 > 2 && < 8 SetReputation RepNVGoodsprings 1 15 endif endif If player.GetBaseActorValue charisma > 9 If GetReputation RepNVGoodsprings 0 > 7 SetReputation RepNVGoodSprings 0 7 endif endif Nope, that won't work. You need to call the function twice and use the logical operators to produce the range you want (like rickerhk said); there's no range checking in the GECK language. The GECK Wiki says you can't store the result of GetReputation in a variable, which I think is wrong because I've done it before and I'm pretty sure that's how disguises work, but I could be mistaken. Anyway, you are saving the player's true reputation before you change it, right? There's only a finite amount of fame available in the game for most factions, so changing it without having a way to revert the change can, in a way, screw up someone's game if they decide to uninstall your mod. Link to comment Share on other sites More sharing options...
dubiousintent Posted December 2, 2016 Share Posted December 2, 2016 (edited) In most languages, and so far in what I have seen of Bethesda editors, both sides of compound connectors such as AND/OR (&&/||) statements have to be complete conditionals that return true/false (1/0) results. In both your scripts, Dermotallic, you are lacking the function to compare the condition against on the right-side of the compound "&&". (This is what the others have been saying, but apparently not getting across.) "If GetReputation RepNVGoodsprings 1 > 2 && < 8" needs to become "If GetReputation RepNVGoodsprings 1 > 2 && GetReputation RepNVGoodsprings 1 < 8". If you think of it as requiring "()" around both sides of the compound to form each side as a complete condition, it should become obvious, i.e. "If (GetReputation RepNVGoodsprings 1 > 2) && (< 8)" is incomplete. It's an easy mistake to make. I couldn't put my finger on what was wrong initially, until rickherhk's reply. -Dubious- Edited December 2, 2016 by dubiousintent Link to comment Share on other sites More sharing options...
Dermotallic Posted December 4, 2016 Author Share Posted December 4, 2016 (edited) In most languages, and so far in what I have seen of Bethesda editors, both sides of compound connectors such as AND/OR (&&/||) statements have to be complete conditionals that return true/false (1/0) results. In both your scripts, Dermotallic, you are lacking the function to compare the condition against on the right-side of the compound "&&". (This is what the others have been saying, but apparently not getting across.) "If GetReputation RepNVGoodsprings 1 > 2 && < 8" needs to become "If GetReputation RepNVGoodsprings 1 > 2 && GetReputation RepNVGoodsprings 1 < 8". If you think of it as requiring "()" around both sides of the compound to form each side as a complete condition, it should become obvious, i.e. "If (GetReputation RepNVGoodsprings 1 > 2) && (< 8)" is incomplete. It's an easy mistake to make. I couldn't put my finger on what was wrong initially, until rickherhk's reply. -Dubious- Yes I somehow missed what rickherhk was really pointing out, huge lapse on my part. I've fixed the range checking and I seem to have gotten it to where I can get the rest of the script working properly. Though I'm thinking about other ways to implement this. The person who originally came up with this idea (and made his own mod that did it for his own personal use) did it by going through all of the reputation changing scripts in the game and edited them to take charisma into account. I thought that would be a huge pain and the single script method i'm trying right now would (i think) make the mod a lot more compatible than changing all those reputation-affecting quests. But then again a script like this that constantly checks is probably a much much less efficient use of processing resources. I'm also a bit worried that keeping charisma so riggedly within these bounds might breaks certain quests (i've noticed ones that set your infamy with a faction to 9999) So I probably will look through all those scripts just to see how big of a pain it would be to do it that way. The GECK Wiki says you can't store the result of GetReputation in a variable, which I think is wrong because I've done it before and I'm pretty sure that's how disguises work, but I could be mistaken. Anyway, you are saving the player's true reputation before you change it, right? There's only a finite amount of fame available in the game for most factions, so changing it without having a way to revert the change can, in a way, screw up someone's game if they decide to uninstall your mod. This is a really good point and if I will definitely do that if I decide to release this publicly (I'm not sure I will since it's based on someone else's idea and I'm worried about taking undue credit) I think I could set the script to only work if a variable is set to 1, and set it to one at the beginning of the script. Then I could make a variable for each faction to track the vanilla reputation you have with each faction, for example, if I do something that pushes my infamy in goodsprings to 15 and the mod pulls that back down to 7, then the variable storing the vanilla goodsprings infamy gets set to 7, and more is added to that every time the mod adjusts your reputation. The I just have to make a separate esp. containing a one-time-run script that sets all your reps back to what they would be without the mod, though that would involve getting variables from the mod's script. I'm sure thats possible though right? As long as the mod is loaded before that esp I'd think. Edited December 4, 2016 by Dermotallic Link to comment Share on other sites More sharing options...
Recommended Posts