senterpat Posted June 18, 2012 Share Posted June 18, 2012 (edited) I'm having problems writing this script, I'm trying to change the iskillpointstagskillmult to 2 after choosing a perk, the script i have is begin menumode 1027 if player.hasperk <perk>setgs iskillpointstagskillmult 2 endif end I know the problem is the setgs command, but i dont know command to use here. also, I tried adding "-editor" to the target field, but i get a message saying that the name specified in the targetbox is invalid, any idea for this? Edited June 26, 2012 by senterpat Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 22, 2012 Share Posted June 22, 2012 Game settings can't be set normally via script. Only via console commands. NVSE adds functions for setting them, using the con_ prefix. To set a game setting you use con_SetGameSetting and then the setting name and value to set it to. That should do what you want. All NVSE commands can be found at http://nvse.silverlock.org/ Link to comment Share on other sites More sharing options...
reznorms Posted June 22, 2012 Share Posted June 22, 2012 (edited) I'm having problems writing this script, I'm trying to change the iskillpointstagskillmult to 2 after choosing a perk, the script i have is begin menumode 1027 if player.hasperk <perk>setgs iskillpointstagskillmult 2 endif end I know the problem is the setgs command, but i dont know command to use here. For some reason NV Geck just dont save the script without telling nothing, but I randomly tried that in F3 Geck and it spits out the error "setgs is a console only command", that may be the problem. EDIT: YaY Gribbleshnibit8 beated me by some seconds xD EDIT 2: Oh, thanks for the con_ trick from NVSE, didnt know that! Edited June 22, 2012 by reznorms Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 24, 2012 Share Posted June 24, 2012 EDIT 2: Oh, thanks for the con_ trick from NVSE, didnt know that!Well, the con_ thing only works for a few commands the SE team converted to work. There are quite a few more I wish they'd done. Also coming back to this, you don't want to do this in MenuMode, because the game might not load the changed game setting value for the level up once it's in level up screen (don't know for sure). You're safer doing what they did for many perks with the Generic quest. Take a look at that, and you'll see that many of the stages handle perk stuff, like the choosing a second TAG skill, etc. Your perk could use the Quest Stage option on the Perk Entry, and then that stage runs this script.con_SetGameSetting iSkillPointsTagSkillMult 2And that's all it'd have to be in the stage script. You don't need names or modes or anything. This would also ensure it only runs when the player takes the perk. You could go so far as to add a line to stop your quest, if it doesn't do anything else. This is general polite practice, to save resources on your users.StopQuest CustomPerkQuestThat should pretty much do it. Link to comment Share on other sites More sharing options...
senterpat Posted June 25, 2012 Author Share Posted June 25, 2012 Aw dang, well I don't want my mod to be nvse dependent, as I seem to crash more with more nvse stuff loaded.But I still use nvse :P, thanks for that link as well, it looks like I can do a lot of stuff now that I couldn't figure out how to do, but it was because they needed nvse... Is think I saw something in a thread about needing a plugin for the geck to use nvse, does anyone have the link to that? (if it's needed) Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 25, 2012 Share Posted June 25, 2012 (edited) You don't need the plugin, but it's a good idea. Though it's also not just for NVSE. The GECK PowerUp fixes many of the things that are broken that the devs never bothered to go back and fix. Like script error reports. As for using GECK with NVSE, you just need to make a shortcut to the nvse_loader.exe file, and in the shortcut properties, in the target field, add -editor after the last quote, outside the quote. As far as crashing more with more NVSE mods, the problem is more than likely someone not knowing how to mod correctly, and making scripts that can crash. Alternatively, NVSE mods tend to be more process intensive because NVSE allows for much cooler things (such as ref walking cells, and manipulation of form lists). Personally I use NVSE for anything that I know I can do more easily with it as opposed to vanilla. Since my mods are built for me first, I'll make them in a way that's easier for me to maintain and add onto. For example, I have a food mod that uses NVSE to detect Project Nevada and enable or disable food healing based on the PN settings for that. No need for a patch file, because NVSE lets me check for installed mods and do something about that. Otherwise I'd have to maintain a separate patch file that overrides every food item, and if I make any changes to any of the foods, I'd have to update the patch file. Of course, you're just changing one value. But again it's something that just can't be done in vanilla, so if you want to do it, use NVSE. Personal choice of course, but if your mod is for you first, then I don't see how it's an issue, since you already use NVSE. And your script is fine, especially if it will auto-stop its own quest after it runs. You'd have almost no impact on a game at all. EDIT: HAH!! Don't I feel silly now. I totally forgot about the function SetNumericGameSetting. Vanilla function that does exactly what you want. Edited June 25, 2012 by Gribbleshnibit8 Link to comment Share on other sites More sharing options...
senterpat Posted June 26, 2012 Author Share Posted June 26, 2012 (edited) EDIT: I got it working, my problem was i didnt put a space ( ) after the " in the target field, its all working now tho, all i needed was to power up :P thank you sir, kudos to you I did have one other question, you said that the setnumericgamesetting command was vanilla, but on the geck site it said fose required, and in the geck it didnt accept it til I used it with NVSE, so is there a way to use the command without NVSE, or was it just a honest mistake? so this is the script I came up with, and the geck accepts all of it, up until i throw in the setnumericgamesetting command, then it wont work, i tried using con_setgamesettings, con_setnumericgamesetting, and setgamsetting, I also tried it without the float variable, with just the direct "2" after "iskillpointstagskillmult", but nothing seems to work. putting in any of the above gives me "command not found" except for setgamesettings, which says its a console command only. scn myscript float tagskills begin gamemode if player.hasperk myperk == 1 set tagskills to 1 + (getgamesetting iskillpointstagskillmult) setnumericgamesetting iskillpointstagskillmult tagskills endif stopquest myquestend also, I tried adding "-editor" to the target field, but i get a message saying that the name specified in the targetbox is invalid, any idea for this? Edited June 26, 2012 by senterpat Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted June 26, 2012 Share Posted June 26, 2012 Oh, hmm. I guess it was a mistake. I was really tired when I posted that yesterday, had just gotten off work. So yeah, I guess there really isn't a way to do that without NVSE. Link to comment Share on other sites More sharing options...
reznorms Posted June 26, 2012 Share Posted June 26, 2012 (edited) Also, I tried adding "-editor" to the target field, but i get a message saying that the name specified in the targetbox is invalid, any idea for this? Make sure "-editor" is after the quote in the target field, something like "E:\Fallout\New Vegas\nvse_loader.exe" -editorand not like"E:\Fallout\New Vegas\nvse_loader.exe -editor" EDIT: LOL ok I didnt notice your edit at the beginning of the post, sorry xD Edited June 26, 2012 by reznorms Link to comment Share on other sites More sharing options...
senterpat Posted June 28, 2012 Author Share Posted June 28, 2012 Have some more questions that I can't seem to find answers too. 1.)I'm not sure I completely understand the uses of && || and () so I wanted to check. Will this line: if (player.hasperk myperk && doonce = 0) && (lvlgecko.iskiller player || lvlcoyote.iskillerplayer) do what I'm hoping to, which is check to see if they player has myperk and if they kill one of those animals? 2.)Also, the scripting tutorial on the geck site didn't give much detail on endif. I want to know if it matters where you put an endif if the script, I mean obviously I want it after the functions, but in a script like this: scn myscript short rvshort doonceshort doonce2short doonce3 begin gamemode if player.hasperk myperk1 && doonce == 0set doonce to 1player.addperk myperk2endif if (player.hasperk myperk2 && doonce == 0) && (lvlgecko.iskiller player || lvlcoyote.iskiller player) set doonce2 to 1 player.removeperk myperk2 set doonce2 to 0 if (player.hasperk myperk2 && doonce2 == 0 && player.hasperk myperk1);Id also like to know if the parentheses is needed here, or what it accomplishes set doonce3 to 1 set rv to getrandompercent if rv> 33 player.addperk myperk2 set doonce3 to 0 endif endif endif end Does it matter where I place the endif? Would it matter if I had an endif at the end instead of line 13? I've looked at a lot of scripts, and from what I can tell it's a matter of the writers preference, please correct me if I'm wrong. 4.)And lastly, I've been looking at scripts to learn, and come across something something that confused me, a script had:damageav.playerleftleg 1 ;I cant remember what the right left leg function was at the moment, bear with me.restoreav.playerleftleg 1 I can't figure out why this would be in a script, would this have any effect in game? Or would you have to see the whole script to know? Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts