Jump to content

Scripting help


Savage117

Recommended Posts

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 ImplantPerceptionPerk

player.RemoveItem caps001 4000

set vDialogueMedicalClinic.bInstalledPerception to 1

set vDialogueMedicalClinic.nImplantsInstalled to (vDialogueMedicalClinic.nImplantsInstalled + 1)

 

DisablePlayerControls

StartQuest ImplantTimerQuest

set 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

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 ImplantPerceptionPerk

player.RemoveItem caps001 4000

 

I hope that helps.

Link to comment
Share on other sites

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 ImplantPerceptionPerk

player.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


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

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 by Savage117
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...