Savage117 Posted November 23, 2010 Share Posted November 23, 2010 Hi experienced modders, Im trying to make a mod where a player can add a perk, for a price, via a terminal in the Medical Center, and Im having trouble with the scripting part. I was thinking of using part of this script: player.AddPerk ImplantPerceptionPerkplayer.RemoveItem caps001 4000set vDialogueMedicalClinic.bInstalledPerception to 1set vDialogueMedicalClinic.nImplantsInstalled to (vDialogueMedicalClinic.nImplantsInstalled + 1) DisablePlayerControlsStartQuest ImplantTimerQuestset GameHour to (GameHour + 3) But I don't understand what the "set vdialogmedicalclinic" parts do and whether I need them to get my terminal to work properly. And before anyone asks, i have read and followed the scripting tutorial on the GECK wiki, I just can't seem to wrap my head around the concept. A little help would be much appreciated,Savage117 Link to comment Share on other sites More sharing options...
Interfer0 Posted November 24, 2010 Share Posted November 24, 2010 Not really needed if I understand what your trying to do exactly. You are trying to use a terminal. Which gives you a menu items list. I assume you want to remove the option to select perks you already have. So for for each menu item you will need to need to add an item condition to check if the player "HasPerk". The Item result script will just be player.AddPerk ImplantPerceptionPerkplayer.RemoveItem caps001 4000 I hope that helps. Link to comment Share on other sites More sharing options...
Savage117 Posted November 24, 2010 Author Share Posted November 24, 2010 Not really needed if I understand what your trying to do exactly. You are trying to use a terminal. Which gives you a menu items list. I assume you want to remove the option to select perks you already have. So for for each menu item you will need to need to add an item condition to check if the player "HasPerk". The Item result script will just be player.AddPerk ImplantPerceptionPerkplayer.RemoveItem caps001 4000 I hope that helps. Actually that helps a lot, I didn't even think of using the "has perk" condition, thank you. If anyone has any more advice keep it coming, I want my mod to be as good as I can make it. Link to comment Share on other sites More sharing options...
Interfer0 Posted November 24, 2010 Share Posted November 24, 2010 Oops totally overlooked the fact that you could buy a perk without even having the money. You will need to add a bit more scripting. let me figure this out reals quick Link to comment Share on other sites More sharing options...
Interfer0 Posted November 24, 2010 Share Posted November 24, 2010 if Player.GetItemCount Caps001 <= 4000 Player.AddPerk ImplantPerceptionPerk Player.RemoveItem caps001 4000 else ShowMessage Youarepoorloser end I think this should work. You will need to create a new message and put the name of it instead of Youarepoorloser. Link to comment Share on other sites More sharing options...
dieangel68 Posted November 24, 2010 Share Posted November 24, 2010 Excepted you got your sign backward i believe it should be >= Link to comment Share on other sites More sharing options...
Interfer0 Posted November 24, 2010 Share Posted November 24, 2010 yep, I did. Link to comment Share on other sites More sharing options...
Savage117 Posted November 24, 2010 Author Share Posted November 24, 2010 Oh good Im glad you corrected that, I was starting to think all my scripts were backwards. I like the your a poor bastard part, I was thinking of making it kinda humorous. Thank you again. Link to comment Share on other sites More sharing options...
Savage117 Posted November 24, 2010 Author Share Posted November 24, 2010 (edited) Ok, now im stuck on the "Hasperk" condition, I cant seem to get it to work right, iv tried all the combination of values I can think of and it either displayed the item on the screen even if I already have the perk in question or it doesnt display the item at all, whether I have the perk or not. Here is a screenie of my current layout and this will always display the perk even if I have it. http://img194.imageshack.us/img194/8026/modquestionscreenshot.png I just want to know what the values need to be to tell it not to display when I have the perk. EDIT: Ok now im having the problem where it will give me the perk and take all the caps I have, even if they dont meet the required value, even if I put in the " if player.getitemcount caps001 >= 4000" in the script area or put it in the condition area, same result. Im stumped this should work. Edited November 24, 2010 by Savage117 Link to comment Share on other sites More sharing options...
Interfer0 Posted November 24, 2010 Share Posted November 24, 2010 I believe Capitilization matters. make sure its GetItemCount Caps001. You may need to change the Run on in the Item Condition. Link to comment Share on other sites More sharing options...
Recommended Posts