darkfox85 Posted October 23, 2012 Share Posted October 23, 2012 Hi everyone! I have this theory that I can introduce reputation to Fallout 3 (New Vegas style) and I think I can do it, but I’m not sure if I can articulate my problem because I’m bad with scripting jargon. I’ll use the small script from FFOutcasts [Outcast Collection Agent unmarked quest] as an example. This script activates when you’ve handed in a laser rifle to Protector Casdin at Fort Independence and is located in “topics” in the quest itself. set FFOutcasts.TechValue to 4set FFOutcasts.OutcastTrust to FFOutcasts.OutcastTrust + FFOutcasts.TechValue Now I’m thinking if “OutcastTrust” could be replaced, the value it returns could trigger quest stages which active various effects (of the modders choosing) associated with reputation increases or decreases. But when attempting this in a script, I get an error message saying “Unknown variable or function.” So I think *things* like this need to be declared in some way in order to be valid, but I don’t know how to do it. I thought at the beginning of the script you declare it with “short” or “float” but I’m missing something. I had envisioned something like this (maybe) set NewReputationQuest.Donating10Caps to 10set NewReputationQuest.ExampleFactionReputation to NewReputationQuest.ExampleFactionReputation + NewReputationQuest.Donating10Caps set NewReputationQuest.ShotAManInReno to -100set NewReputationQuest.ExampleFactionReputation to NewReputationQuest.ExampleFactionReputation + NewReputationQuest.ShotAManInReno Here’s my current script edited a little to focus on my error scn zzEoLGoodKarmaSCRIPT Short zzSTUreputation BEGIN GameMode If (zzEoLGoodKarma.zzSTUreputation > 150) && (zzEoLGoodKarma.zzSTUreputation < 499)Setstage zzEoLGoodKarma 7 ; respected by STU faction and setstage triggers effectsEndif If (zzEoLGoodKarma.zzSTUreputation < 149) && (zzEoLGoodKarma.zzSTUreputation > -149)Setstage zzEoLGoodKarma 8 ; neutral to STU faction and setstage triggers effectsEndif If (zzEoLGoodKarma.zzSTUreputation < -150) && (zzEoLGoodKarma.zzSTUreputation > -499)Setstage zzEoLGoodKarma 9 ; shunned by STU faction and setstage triggers effects Endif End I intuitively know I’m committing a stupid, even elementary mistake, but if I can get this bad boy working, my mod can take on a whole new life. But I’m stumped. Oh Nexus community, lend me some of your forbidden Enclave knowledge! Link to comment Share on other sites More sharing options...
darkfox85 Posted October 25, 2012 Author Share Posted October 25, 2012 UPDATE:Okay. So I’ve found that once a quest variable is declared, it either - A: - needs to be used somewhere else (a stage or whatever) - B: - needs to have the script that declares it saved, closed, and opened again -- before the quest variable can be meaningfully used in the script that declares it. What a headache. But now I’m having agony actually changing the variable. The idea is, when it goes above 150 a quest stage is triggered where a message is triggered saying you’re now respected by the relevant faction. (-150 to 150 is neutral, 150 to 500 is respected, -150 to -500 is shunned.) This stage also changes the displayed objectives so the player can keep track of their reputation with any one of the factions. The script that does this is in the quest data tab and it largely the same to the one above. For testing I use Confessor Cromwell at the centre of Megaton. When I give him 100 caps there are some new script lines in the result script at the end. There are three different possibilities so the script has been put into all three: set zzEoLGoodKarma.zzSTUreputation to + 200 ShowMessage zzEoLSTURepGainedmsgBut it doesn’t affect the variable (zzSTUreputation) to trigger the appropriate quest stage (the quest is “zzEoLGoodKarma”.) It also doesn’t show that message. If I take out the first line, the “zzEoLSTURepGainedmsg” message shows in-game so I know it’s working, but the variable doesn’t change. If it did, the new stage would be triggered and thus the new, different message. Okay. So instead I have the resulting script of Confessor Cromwell SetStage for the same thing: set zzEoLGoodKarma.zzSTUreputation to + 200 ShowMessage zzEoLSTURepGainedmsgIt still doesn’t change the quest variable (but weirdly it does show the zzEoLSTURepGainedmsg message.) I’ve tried this with or without the “+” on the value modifier but with no effect. So I update the script: set zzEoLGoodKarma.zzSTUex to 200 set zzEoLGoodKarma.zzSTUreputation to zzEoLGoodKarma.zzSTUreputation + zzEoLGoodKarma.zzSTUexzzSTUex is a temporary “holder” (sort of) just like the one used in the FFOutcasts (Collection Agent) unmarked quest. I either in Cromwell or a stage that’s triggered by Cromwell and it still doesn’t affect the quest value. I updated the script again. set zzEoLGoodKarma.zzSTUex to 200 set zzEoLGoodKarma.zzSTUreputation to zzEoLGoodKarma.zzSTUreputation + zzEoLGoodKarma.zzSTUex set zzEoLGoodKarma.zzSTUex to 0And this method doesn’t raise that quest variable either. My problem is (sort of) setting quest variable values. I get the impression this isn’t too much of a thing with intermediate modders. I’m sure the quest script is fine because it does detect the value when it’s -150 to 150 (the default starting number when a variable is declared) and sends me to the appropriate stage which shows me the appropriate message. But it’s mot impossible something is going wrong. If I can get this f***er to work, it’ll be a huge leap for my dream mod. I’ll be bale to edit all my quests and give them real depth with reputations also being on the line. But first, this problem must be solved. I’m on ma kneez. Help a brother. Link to comment Share on other sites More sharing options...
viennacalling Posted October 25, 2012 Share Posted October 25, 2012 Please put your scripts inside code snippet blocks, they are difficult to read unformatted. If I take out the first line, the “zzEoLSTURepGainedmsg” message shows in-game so I know it’s working, but the variable doesn’t change. If it did, the new stage would be triggered and thus the new, different message. No. Changing a variable and triggering a new stage are two different steps. First find out for certain whether or not the variable changed. Try it again without the "+", and after the variable "should" be changed check in the console with sqv <your quest's form ID>. That'll display all the variables for your quest, and you can see if changed or not. If it did change, then that means it's actually the scripting to trigger the new stage that is not working. Link to comment Share on other sites More sharing options...
darkfox85 Posted October 26, 2012 Author Share Posted October 26, 2012 No. Changing a variable and triggering a new stage are two different steps. First find out for certain whether or not the variable changed. Try it again without the "+", and after the variable "should" be changed check in the console with sqv <your quest's form ID>. That'll display all the variables for your quest, and you can see if changed or not. If it did change, then that means it's actually the scripting to trigger the new stage that is not working. I tried using the console to check sqv but for some reason the game doesn’t let me check sqv: [i took four screenshots to prove I wasn't crazy or mind-blowingly incompetent, but I can't upload them] In-game it says "Item not found". But it’s right there (in pic 4)! The script is definitely in that quest! I feel like I’m loosing my mind! But maybe there’s a problem in this? Still, when things like this happen it makes you question both your intellect and your sanity to painful degrees. But I’m sure the script works because I’ve tried variations and different combinations script/stages where; upon value detection the script brings up a message box. That value is always “0,” (message always neutral) which suggests to me that the problem I’m having is that the quest variable isn’t changing. [the bellow is the most recent variation I’ve tried using] QUEST “zzEoLGoodKarma” SCRIPT scn zzEoLGoodKarmaSCRIPT int zzSTUreputation int zzNTUreputation int zzCDFreputation int zzINDreputation Short zzSTUex BEGIN GameMode END STAGE 10 SCRIPT OF QUEST “zzEoLGoodKarma” ShowMessage zzEoLWelcomeMessage ;*1 SetObjectiveDisplayed zzEoLGoodKarma 10 1 ; *2 *1 welcome message is triggered by setstage in another quest. The reason is this quest (zzEoLGoodKarma) needs repeat stages and can’t be start-game-enabled. It needs repeat stages so repeated actions of reputation change won’t go unnoticed by the script and the reputation values thus change accordingly. zzEoLGoodKarma mustn’t be start-game-enabled because if it is, the introductory “neutral reputation” message box for all the factions in the game show at once, making the information confusing. It’ll also show reputation change messages boxes virtually every time the value is changed which will be a major pain The “welcome quest” is start game enabled so can trigger the real quest the second the player leaves the vault. It also but doesn’t have repeat stages so can only show the message boxes when prompted (when a value is set for reputation – introductory, shunned, respected etc. *2 The objective displays fine. This is the starting stage to get the zzEoLGoodKarma quest to appear in the game the moment the player leaves the vault. zzEoLGoodKarma isn’t start-game-enabled IN CONFESSOR CROMWELL TOPIC RESULT SCRIPT [three times for three possible responses he give to donating 100 caps] set DialogueMegaton.CurrentAmountDonated to FreeformChurchKarmaRewardMult * 100 RewardKarma DialogueMegaton.CurrentAmountDonated player.removeItem Caps001 100 set DialogueMegaton.PlayerMadeDonation to 1 SetStage zzEoLGoodKarma 49 ;this I’ve added. The rest is there already STAGE 49 SCRIPT OF QUEST “zzEoLGoodKarma”[Where Cromwell sends you]set zzEoLGoodKarma.zzSTUex to 200 set zzEoLGoodKarma.zzSTUreputation to zzEoLGoodKarma.zzSTUreputation + zzEoLGoodKarma.zzSTUex set zzEoLGoodKarma.zzSTUex to 0 ShowMessage zzEoLSTURepGainedmsg ; top left small message does how If zzEoLGoodKarma.zzSTUreputation < 1000 SetStage zzEoLGoodKarma 1 ; cherished message and effects (max rep. glass ceiling not needed) Endif If ( zzEoLGoodKarma.zzSTUreputation < 500 ) && ( zzEoLGoodKarma.zzSTUreputation > 999 ) SetStage zzEoLGoodKarma 2 ; admired message and effects Endif If ( zzEoLGoodKarma.zzSTUreputation < 150 ) && ( zzEoLGoodKarma.zzSTUreputation > 499 ) SetStage zzEoLGoodKarma 3 ; respected message and effects Endif If ( zzEoLGoodKarma.zzSTUreputation < 149 ) && ( zzEoLGoodKarma.zzSTUreputation > -149 ) SetStage zzEoLGoodKarma 4 ; neutral message and effects Endif If ( zzEoLGoodKarma.zzSTUreputation < -150 ) && ( zzEoLGoodKarma.zzSTUreputation > -499 ) SetStage zzEoLGoodKarma 5 ; shunned message and effects Endif If ( zzEoLGoodKarma.zzSTUreputation < -500 ) && ( zzEoLGoodKarma.zzSTUreputation > -999 ) SetStage zzEoLGoodKarma 6 ; hated message and effects Endif If ( zzEoLGoodKarma.zzSTUreputation < -1000 ) && ( zzEoLGoodKarma.zzSTUreputation > -1999 ) SetStage zzEoLGoodKarma 7 ; vilified message and effects Endif If zzEoLGoodKarma.zzSTUreputation < -2000 SetStage zzEoLGoodKarma 8 ; D.N.P. message and effects (totally irredeemable to faction) Endif I’ve done every possible variation; using a more basic quest value calculator, placing the value checkers in the main script, GAH! I wonder how other modders put in reputation? Link to comment Share on other sites More sharing options...
darkfox85 Posted October 30, 2012 Author Share Posted October 30, 2012 UPDATE: okay so I’m doing it a much simpler way now but still getting nothing. This is the script I’m using in the quest. All it does is declare the quest values scn zzEoLGoodKarmaSCRIPT int zzSTUreputation int zzNTUreputation int zzCDFreputation int zzINDreputation Short zzSTUex BEGIN GameMode END This is the single set stage line in all three of confessor Cromwell’s responses when you donate 100 caps SetStage zzEoLGoodKarma 49 This what stage 49 contains. This is where Confessor Cromwell sends you. The message on this stage is show, demonstrating that I am being sent here, but the values aren’t changing. set zzEoLGoodKarma.zzSTUreputation to 200 ShowMessage zzEoLSTURepGainedmsg If zzEoLGoodKarma.zzSTUreputation < 1000 SetStage zzEoLGoodKarma 1 Endif If ( zzEoLGoodKarma.zzSTUreputation < 500 ) && ( zzEoLGoodKarma.zzSTUreputation > 999 ) SetStage zzEoLGoodKarma 2 Endif If ( zzEoLGoodKarma.zzSTUreputation < 150 ) && ( zzEoLGoodKarma.zzSTUreputation > 499 ) SetStage zzEoLGoodKarma 3 Endif If ( zzEoLGoodKarma.zzSTUreputation < 149 ) && ( zzEoLGoodKarma.zzSTUreputation > -149 ) SetStage zzEoLGoodKarma 4 Endif If ( zzEoLGoodKarma.zzSTUreputation < -150 ) && ( zzEoLGoodKarma.zzSTUreputation > -499 ) SetStage zzEoLGoodKarma 5 Endif If ( zzEoLGoodKarma.zzSTUreputation < -500 ) && ( zzEoLGoodKarma.zzSTUreputation > -999 ) SetStage zzEoLGoodKarma 6 Endif If ( zzEoLGoodKarma.zzSTUreputation < -1000 ) && ( zzEoLGoodKarma.zzSTUreputation > -1999 ) SetStage zzEoLGoodKarma 7 Endif If zzEoLGoodKarma.zzSTUreputation < -2000 SetStage zzEoLGoodKarma 8 Endif This is what stage 3 looks like. Stage 49 should send the player to stage 3 (+200 sets it to that) but for some reason it doesn’t. This stage just changes your current reputation status in the quest and shows the change reputation message in a different quest that doesn’t have repeat stages (to prevent it being shown over and over.) SetStage zzEoLGoodKarma01STUrep 30 SetObjectiveCompleted zzEoLGoodKarma 1 1 SetObjectiveCompleted zzEoLGoodKarma 2 1 SetObjectiveDisplayed zzEoLGoodKarma 3 1 SetObjectiveCompleted zzEoLGoodKarma 4 1 SetObjectiveCompleted zzEoLGoodKarma 5 1 SetObjectiveCompleted zzEoLGoodKarma 6 1 SetObjectiveCompleted zzEoLGoodKarma 7 1 Again, the damn thing doesn’t work. If anyone can tell me what I’m doing wrong I’ll be so damn grateful. I’m thinking it’s just something going wrong with determining quest variables. So it should be something easy I’m missing. And sqv just won't work for me! I must be some kind of imbecile! http://static.rateyourmusic.com/lk/l/u/5ed727fd38be85f1a4526e391d4ee703/4434274.jpg http://static.rateyourmusic.com/lk/l/u/388978db90f3f83522d2924d78be2192/4434278.jpg http://static.rateyourmusic.com/lk/l/u/78121c7e367c4ab5067078efe2682297/4434279.jpg So close.So far. :-( Link to comment Share on other sites More sharing options...
viennacalling Posted October 31, 2012 Share Posted October 31, 2012 I said your quest's form ID, not the editor ID. So it would be sqv xx999999 where xx is the load order of your mod and the 999999 is replaced with the actual form ID of your quest. This will probably not completely solve your problem, but your greater-than and less-than symbols are all backwards. The only if block that will currently work is the first one, because it is checking if your reputation is less than 1000 and will set stage to 1. Link to comment Share on other sites More sharing options...
darkfox85 Posted October 31, 2012 Author Share Posted October 31, 2012 I said your quest's form ID, not the editor ID. *slaps head* I’m an idiot. A five star imbecile. I’ve even got that distinction confused before, so this time there’s no excuse. It works fine now. Gawd that’s embarrassing! This will probably not completely solve your problem, but your greater-than and less-than symbols are all backwards. The only if block that will currently work is the first one, because it is checking if your reputation is less than 1000 and will set stage to 1. And it appears year 8 maths is also a blind spot for me! I can’t believe I f***ed that up. Still, stages 4 to 8 are all correct. I just missed the positive ones and with so much experimental emphasis being on them, it’s no wonder I thought the value itself was the problem! Dumkoff! I can’t believe I was agonizing over this like freaking Dr Frankenstein. But you got one thing wrong, that error alone has nearly totally solved my problem! Hotdang dude! I know a “thank you” from someone over the net is always underwhelming, but, thank you. Seriously thank you. There’s just one last question: If I set a value for 200 using a script (e.g. “set zzEoLGoodKarma.zzSTUreputation to 200”) will that add the number 200, or simply *set it* to 200? E.g., if the value was 1000 prior to triggering that script, will the new value be 1200 or 200? If the latter, I’ll have to use the “outcast” style script which will be much longer to program, and the script doesn’t seem to recognise “+200” so I can’t do it that way. But once I get this sorted I can go into mass (MASS) editing. Again... god damn. You don’t know what this means to me. :D I’d like to show my thanks in a more sincere manner. I want to name something after you in my mod. Tell me, do you have a favourite faction/group in Fallout 3? Or maybe something else? Link to comment Share on other sites More sharing options...
viennacalling Posted October 31, 2012 Share Posted October 31, 2012 There’s just one last question: If I set a value for 200 using a script (e.g. “set zzEoLGoodKarma.zzSTUreputation to 200”) will that add the number 200, or simply *set it* to 200? E.g., if the value was 1000 prior to triggering that script, will the new value be 1200 or 200? If the latter, I’ll have to use the “outcast” style script which will be much longer to program, and the script doesn’t seem to recognise “+200” so I can’t do it that way. Best explained by way of example: set zzEoLGoodKarma.zzSTUreputation to 200 ; zzSTUreputation is now 200 set zzEoLGoodKarma.zzSTUreputation to zzEoLGoodKarma.zzSTUreputation + 200 ; zzSTUreputation is now increased by 200 I’d like to show my thanks in a more sincere manner. I want to name something after you in my mod. Tell me, do you have a favourite faction/group in Fallout 3? Or maybe something else? No need for anything like that. Just help out another modder when you can. Link to comment Share on other sites More sharing options...
Recommended Posts