Hello! In this tutorial I'll show you how to make an "advanced terminal". What can it do? Well, it can:
-Sell/Give all kinds of items.
-Repair your current weapon.
-Add/Remove skill or S.P.E.C.I.A.L. points.
-Add an perk.
-Modify your stats (Hit Points, Action Points, Carry Weight, Karma,Fame or Infamy with a group etc.).
-Give you XP.
-Craft items!
First of all, in GECK go in the Terminal section in World Objects. Search for "DefaultDeskTerminalUnlocked". Double click it and give it a new ID (like MyTerminal, this is how it will appear in GECK, and a name, how it will be seen in-game). You can edit the welcome text if you want and the server number. Click OK and then Yes. There you go! Your terminal is created!
Sub-menus
Now let's make the items to be displayed on the screen. First we'll make the sub-menus, so that everything is organised. To make a sub-menu, you got to make another terminal. I suggest making a template if you're going to use lots of sub-menus. Go again to the "DefaultDeskTerminalUnlocked" and make a template just like here.
This will save you the time to re-select the server number and retype the welcome message.The name doesn't matter. After editing click OK then Yes.
Now double click the template and change the ID to let's say TheTerminalWeapons. This will hold all our weapon buying options! Select Ok then Yes.
Linking the weapon terminal sub-menu with the main terminal
Go back to the main terminal (MyTerminal or whatever) and add a new menu item. In the item text write "Buy Weapons". Then in the sub-menu select the weapon terminal like here and click OK.
Now open back the weapon terminal and let's start adding some guns to be bought or be given for free!
How to purchase an item
Open the weapons terminal. In the menu items right-click and press New. In the item text, type for example Buy 9mm Pistol (100% - 100&) 100% being the condition and the latter being the value. Now in the response put something like "Processing...". And now... The Item result script... Here is the template.
If Player.GetItemCount Caps001 >= 100
Player.AddItem WeapNV9mmPistol 1 (OR Player.AddItem 000e3778 1)
Player.RemoveItem f 100
EndIf
First, we check if the player actually has 100 caps. If he has an fully functional 9mm Pistol is being added to his inventory. You can use either the Editor ID(WeapNV...)or the Form ID (The code) . The 1 represents the quantity. For ammo you might want to set it to 10, to sell in larger quantities. Then we remove 100 caps from the player.
You can find the Form ID of an object in the Fallout Wiki or directly within GECK.
Now let's make some messages in order to tell the player if the transaction was successful. Go to Miscellaneous -> Message. Create a new one, give it an ID,title and message text. Be sure to have Message Box checked. In the menu buttons, make a new one that says OK. It should look like this:
Do the same for a success message. Now edit the script like this:
If Player.GetItemCount Caps001 >= 100
Player.AddItem WeapNV9mmPistol 1 (OR Player.AddItem 000e3778 1)
Player.RemoveItem f 100
showmessage terminalsuccess
else
showmessage terminalerror
EndIf
How to be given an item
The steps are exactly the same, only that the script must be modified a liitle:
Player.AddItem WeapNV9mmPistol 1 (OR Player.AddItem 000e3778 1)
Adding an item that isn't at 100% condition
To do this, do as you did above, only that instead of "Player.AddItem WeapNV9mmPistol 1" we'll type "player.additemhealthpercent WeapNV9mmPistol 1 .50" (.50 meaning 50% condition)
Repairing your currently equiped weapon
To do this, create a new menu item, give it whatever item and result text you want. The script for repairing is:
player.setweaponhealthperc 100
If you want to charge let's say 200 caps for the repair it would look like this.
If Player.GetItemCount Caps001 >= 200
player.setweaponhealthperc 100
Player.RemoveItem f 200
EndIf
And just like adding an item, you can make messages indicating whether it worked or not. The disadvantage of terminals (or advantage) is that the price for repairs doesn't depend on weapon condition or the weapon itself. (A knife is just as much as a machine gun.)
Adding perks
To add a perk, do the exact steps above. Just replace "player.setweaponhealthperc 100" with something like "player.addperk rapidreload" without the " marks.
Crafting
Why wait till your science skill is up to 70 to make a stimpak? The RobCo all-in-one terminal can help you out!
First, get the IDs of the ingredients. Go to Game Effects ->Ingestibles for food items. There we find the BrocFlower and XanderRoot. The third ingredient is called SurgicalSyringe01 (Empty syringe). Now let's make the script.
If Player.GetItemCount BrocFlower >= 1
If Player.GetItemCount XanderRoot >= 1
If Player.GetItemCount SurgicalSyringe01 >= 1
player.removeitem 0013b2ba 1
player.removeitem 0013b2b9 1
player.removeitem 000250a8 1
player.additem 00015169 1
endif
endif
endif
The codes are from the Fallout Wiki.
Adding skill/SPECIAL points & editing player values (Action Points etc.)
Make a new menu item and give it whatever text you desire. In the script result box type:
player.modav speech 5 (This will add 5 skill points to your speech skill) OR
player.modav perception 1 (This will add 1 point to your perception) OR
player.modav actionpoints 1 (Adds 10 AP)
If you want to remove say 5 skill points from speech, type: player.modav speech -5. Why remove skill points? Here's a scenario:
You can have the computer give you caps if you deduct skill points for you, which you can invest in another skill! For example
Script 1:
player.modav speech -5
player.additem f 100
Script 2:
If Player.GetItemCount Caps001 >= 100
player.modav guns 5
player.removeitem f 100
endif
Giving XP
You can also add XP from a terminal. In the script box type:
player.rewardxp 15000
This will instantly give you 15000 XP. And if you want it to be more fair, give it a price:
player.rewardxp 15000
player.removeitem f 1000
endif
Teleporting
To teleport to a location, use the script: player.MoveTo REF
Where "REF" is a reference marker. Please note that sometimes the game may crash when teleporting!
Opening a container
In the script box, type:
forceterminalback
containerREF.activate player 1
Buy/Repair from an NPC
Buy:
Forceterminalback
GSChetRef.showbartermenu OR GSChetRef.showbartermenu 100 (if you type 100, you will get 1:1 price ratio no matter what)
Repair:
Forceterminalback
RepairmanREF.srm