OrcSaysWoopWoop Posted January 17, 2011 Share Posted January 17, 2011 (edited) 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 January 19, 2011 by OrcSaysWoopWoop Link to comment Share on other sites More sharing options...
OrcSaysWoopWoop Posted January 20, 2011 Author Share Posted January 20, 2011 Can anyone help please? im terrible at scripting and i can't find it anywhere else.Basically i need help with:Aquire schematics - remove item in inventory - add noteBuy item from terminal - item goes in inventory - removes item - adds note I felt there was no need to create a new post. Link to comment Share on other sites More sharing options...
davidlallen Posted January 20, 2011 Share Posted January 20, 2011 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 More sharing options...
zeidrich Posted January 20, 2011 Share Posted January 20, 2011 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 1end 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 More sharing options...
OrcSaysWoopWoop Posted January 20, 2011 Author Share Posted January 20, 2011 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 1end What errors are there or is it a bug or something that is causing it to not allow me to save? Link to comment Share on other sites More sharing options...
zeidrich Posted January 20, 2011 Share Posted January 20, 2011 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 1end 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 More sharing options...
OrcSaysWoopWoop Posted January 20, 2011 Author Share Posted January 20, 2011 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 More sharing options...
davidlallen Posted January 20, 2011 Share Posted January 20, 2011 This really needs to be a faq. (a) don't use object names that start with a number. Use "aaa" instead of "000". (b ) Install and use geck powerup, in order to see the script error messages. Removing one line at a time is needlessly painful. Link to comment Share on other sites More sharing options...
OrcSaysWoopWoop Posted January 20, 2011 Author Share Posted January 20, 2011 (edited) Haha, always is when im in trouble. Cheers for the help guys, really did need it. EDIT1: I did complete the script in the end haha. Something missing from the parimiter values and start/end block. Edited January 20, 2011 by OrcSaysWoopWoop Link to comment Share on other sites More sharing options...
Recommended Posts