Ashrose93 Posted March 23, 2017 Share Posted March 23, 2017 (edited) Edited to reflect the current situation: Hi guys, So I've built a scrapping mod which fills a niche on consoles and the scrapping part works fine. I've numerous requests to build some sort of toggle to disable scrap outputs and disable the mod mid game. I've found out that global variables are probably the best way to do this so here's what I've done: So I've made a global variable with a default value of 1 as follows...http://prntscr.com/enkf4y Then I've modified the terminal to change the global value depending on what you select, after defining the SATConfG as a global variable of course...http://prntscr.com/enkfjxhttp://prntscr.com/enkfpv(and so on) Then modified my scrap forms with the following conditions...http://prntscr.com/enkgq0http://prntscr.com/enkgvohttp://prntscr.com/enkgiqhttp://prntscr.com/enkh20 I can confirm that the global variable is being changed by the terminal but something isn't working in the conditioning as regardless of what the global variable is, the same form is used - the one that has the ID that is alphabetically last Can anyone provide input? Edited March 24, 2017 by Ashrose93 Link to comment Share on other sites More sharing options...
VIitS Posted March 23, 2017 Share Posted March 23, 2017 It would help if you made it clear what is happening. I problem I see (as someone who has never done a quest mod, so could be wrong about this) is that I would imagine GetStageDone for stage 10 would return a "true" (1) value for stage 20, 30, 40, and 50 as well. I would think GetStage would be better. I also can't tell if you have it set right (so that the holotape can be used to set the quest stage), so if changing the conditional doesn't help you'll need some assistance from someone with more quest experience than me. Link to comment Share on other sites More sharing options...
vkz89q Posted March 23, 2017 Share Posted March 23, 2017 Hmmh, I believe GetStageDone will return 0 if you go, let's say from stage 10 to 30 and skip 20 between, and then do GetStageDone 20. But yeah, you should propably use GetStage on conditions and if you need more control, you can always use global variables too. Link to comment Share on other sites More sharing options...
Ashrose93 Posted March 23, 2017 Author Share Posted March 23, 2017 Hmmh, I believe GetStageDone will return 0 if you go, let's say from stage 10 to 30 and skip 20 between, and then do GetStageDone 20. But yeah, you should propably use GetStage on conditions and if you need more control, you can always use global variables too.Hmm maybe global variables would be a better approach but I still can't get it working.. So I've made a global variable with a default value of 1 as follows...http://prntscr.com/enkf4y Then I've modified the terminal to change the global value depending on what you select, after defining the SATConfG as a global variable of course...http://prntscr.com/enkfjxhttp://prntscr.com/enkfpv(and so on) Then modified my scrap forms with the following conditions...http://prntscr.com/enkgq0http://prntscr.com/enkgvohttp://prntscr.com/enkgiqhttp://prntscr.com/enkh20 And... for some reason it defaults to this scrap form:http://prntscr.com/enkgvo and the terminal doesn't seem to do anything.. I'm fairly new to this kind of thing so can you tell me what I'm doing wrong here? Link to comment Share on other sites More sharing options...
vkz89q Posted March 23, 2017 Share Posted March 23, 2017 It's really hard for me to say what are you trying to do by your pictures.. I'm not familiar with scrap/constructible object, so I'm not sure what is supposed to happen. Have you tried debugging with console by using setvalue, getstage, setstage, sqv console commands? Does everything work if you manually change your global or quest stage via console? Then, if it does, something wrong with the holotape. I have holotape that configures lot of globals and quest stages by selecting different options, and it's simple as xxx.SetValue(value) and xxx.SetStage(stage) in fragment. Then, using conditions in the terminal form to filter what to show and what to hide, depending on current quest stages and globals. Link to comment Share on other sites More sharing options...
vkz89q Posted March 23, 2017 Share Posted March 23, 2017 Also, is your quest starting? You don't need alias for holotape for it to work. Currenly your alias is trying to create Satconf at Satconfholo, it might be failing. For example, when I have quest that makes enemy when quest starts, it looks like: Create Ref to object (temp) MyEnemyActor at LocationAlias1. Link to comment Share on other sites More sharing options...
Ashrose93 Posted March 23, 2017 Author Share Posted March 23, 2017 @vkz89q Sorry let me clarify I've removed all references to the quest now and instead I am trying to do it purely through global variables. The idea being that I have a number of different scrap outputs such as caps, some scrap, no scrap or an overpowered amount of scrap. This can be changed using a crafted holotape which has options with scripts attached which change a global variable depending on which button you press. When the global variable is changed, the conditions for one of the scrap outputs will be met which will change the scrap output. This isn't actually happening though and I don't know what's wrong. My scripts compile just fine. Link to comment Share on other sites More sharing options...
vkz89q Posted March 23, 2017 Share Posted March 23, 2017 Okay, now I get what you are trying to do. Thanks. Have you simply tried go to game, open console, type "help sat 3" and it should show you value of the globals with "sat" in them. Does it change if you use the holotape? Link to comment Share on other sites More sharing options...
Ashrose93 Posted March 23, 2017 Author Share Posted March 23, 2017 Okay, now I get what you are trying to do. Thanks. Have you simply tried go to game, open console, type "help sat 3" and it should show you value of the globals with "sat" in them. Does it change if you use the holotape?Ok so I've tested this and the variable are being set correctly by the holotape so that is working The problem must therefore be in the match conditions bit. Regardless of what the global value is set as, the same scrap output is chosen - the one corresponding to the form with the form ID which is last alphabetically. It's as if the match conditions aren't actually being checked Link to comment Share on other sites More sharing options...
Recommended Posts