Jump to content

Buyable schematic script help needed.


OrcSaysWoopWoop

Recommended Posts

Hey there, i was just thinking of adding terminals to my mod so i can create rooms with tiered buyable recipes. And i was wondering if anyone got point me or even create me a script for basically saying

"Bought item, item removes add recipe to Tier 1 workbench"

With/without multiple stages would be a great help thanks. My intension was creating 6 rooms, each with tiered workbenches and terminals. Once i bought a recipe (item form) from the terminal then deleted the item in my inventory and made a new recipe visible at the crafting bench. Also if you could describe afew set by set instructions if i have edit the recipe someone to fit the script. Cheers ~ OrcSaysWoopWoop

 

EDIT1: Also how do i script a script saying when i aquire an item it adds a note? (Recipe wise)

Edited by OrcSaysWoopWoop
Link to comment
Share on other sites

I am not aware of any tutorials that specifically cover this. However, I was able to figure it out last week by tracing the way that one schematic works in the base game. I used the railway rifle. If you type "schematic" into the filter in the object window and select "all" at the bottom left, you will see all the schematics in the game. If you then look at the five items for the railway rifle, you will see how they all fit together. I simplified mine by deleting the capability to make a better item with more copies of the schematic. In general, I find tracing out a base game item to be the best way to learn.
Link to comment
Share on other sites

Hey there, i was just thinking of adding terminals to my mod so i can create rooms with tiered buyable recipes. And i was wondering if anyone got point me or even create me a script for basically saying

"Bought item, item removes add recipe to Tier 1 workbench"

With/without multiple stages would be a great help thanks. My intension was creating 6 rooms, each with tiered workbenches and terminals. Once i bought a recipe (item form) from the terminal then deleted the item in my inventory and made a new recipe visible at the crafting bench. Also if you could describe afew set by set instructions if i have edit the recipe someone to fit the script. Cheers ~ OrcSaysWoopWoop

 

EDIT1: Also how do i script a script saying when i aquire an item it adds a note? (Recipe wise)

 

Hi Orc, What Davidlallen said will help you, but I'll give you some more info as to how I'd go about doing it.

 

http://geck.bethsoft.com/index.php/OnAdd - When you attach a script with an OnAdd block to an item, that block runs when the item is added to any container or inventory. You can have it when it is added to a specific container by adding a parameter to the block, otherwise it runs any time it's added to any inventory.

 

For instance:

 

scn MyNewSchematicSCRIPT

 

begin OnAdd player

AddNote MyNewSchematicNote

player.RemoveItem MyNewSchematic 1

end

 

Attaching the previous script to an item called MyNewSchematic will, when added to the players inventory, (whether picked up, purchased, or added through a script) add the MyNewSchematicNote to the player, and then immediately remove the MyNewSchematic item.

 

If you want to add the note via a terminal, you have just the terminal selection run the script:

 

player.AddItem MyNewSchematic 1

 

which should add the schematic to the player's inventory. The schematic's attached script will then run, adding the note to the player, and removing the item from the player's inventory.

Link to comment
Share on other sites

Cheers for the help, but it seems it won't let me save it. I'm using

 

scn 000A

 

begin OnAdd Player

 

AddNote 000

 

Player.RemoveItem 000B 1

end

 

What errors are there or is it a bug or something that is causing it to not allow me to save?

 

If it won't save, it's because of a compile error. Unfortunately it won't say which line is in error.

 

Remove each line one at a time and see what will allow you to save. My best guess is that it's your reference names. The fact that they are formatted like 000 and 000a might mean the compiler isn't sure if it's a reference name or the hex value of the object and is screwing it up. Try to give them more standard names maybe? I know that other people have had issues like that in the past.

Link to comment
Share on other sites

Tried doing

 

scn TestScript

 

begin OnAdd Player

 

AddNote TestNote

 

Player.RemoveItem TestItem

 

end

 

But it won't save still. I even tried saving a black script except the scn Test and it still won't work. Maybe its a directory error? I have FNV set up in (Windows 7)

 

C drive > Programm Files (x86) > Steam > Steam Apps > common > Fallout New Vegas

Link to comment
Share on other sites

  • Recently Browsing   0 members

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