Jump to content

GECK Question on building a Quest house


rockygohard18

Recommended Posts

So I am currently working on my first ever mod, I have somewhat self-taught myself the GECK on a fundamental level, with no level list or scripting knowledge. What I am looking to find is how I can have a feature for the house to have "upgrades"  how you upgrade your house with the school house mod or just the in-game suite that Mr.House gives you. I know this is a very basic question but I cannot think of a better location to ask. I would really like to learn some scripting or level list knowledge if that plays apart in creating those features.

 

The idea behind my mod is that I am trying to build a gunshop that you take over from a dead NPC and after you take it over you have to go search for these specific specifications to build new hardware to sell, the bottom floor is a shop and the top floor will be your apartment...before I can get to all of that I need to at least learn how I can incorporate a feature that allows upgrading to houses. Thank you all for the great mods and I hope to hear something.

image.png.974c654e0ce9e994f32e428d5e3c6c71.png

Link to comment
Share on other sites

I'm sure there is probably a better way to do this, but I'm also pretty new and this way works for me really well.

I use this script (I found it on the Geck Wiki, think it was called a light switch script. So you can use it all you want.) I'll type out the script of it here for you.

ScriptName MyScriptName

ref light

Begin OnActivate
;ShowMessage MyMessage

    if light == 0
        set light to GetLinkedRef
    endif

    if light.GetDisabled
        light.Enable
    else
        light.Disable
    endif
    Activate
End

The show message line I added just so I could have text appear when a player interacts with the object I have placed in the world. If you don't want a message to show up, you can delete the line. If you want a message, delete the semi-colon or it wont run that line.

If you wanna make an activator it helps a lot to get a .bsa extraction tool (I think most the mod managers have one.) and extract all the meshes. Make a new folder called 'Data' and put the meshes folder in there. That will let you keep it separate from your actual game folder but let you select from that folder and keep the file paths the game needs to find the meshes. I have mine on my desktop lol. Afaik, as long as the 'meshes' folder is in a data folder you can put it where you want. Once you do that then inside the geck you can make your activators. I normally just pick one and start editing it. Put in its own ID, the name you want it to have, and switch the mesh to the object you want. (If it's supposed to be a log, select the OasisCouch mesh inside the folder you made earlier.)

Then in the same edit box you changed the name in, it'll have a spot for a script. Select your script from the list, and that should be it. Hit 'Ok' and select 'Yes' when it asks if you want to make a new form. Always hit Yes, otherwise you're editing the base object and we don't want that lol. Place the newly made Activator where you want it to be in the world.

Now add in the object where you want it inside the store. (If you wanted a log bench on the side of the room for customers to wait, put it in.) Double click the object in the render window to open the reference box for it. Put in a Reference Editor ID and it has to be unique. Once you do that, at the bottom tick Persistent Reference and Initially Disabled. Click  OK.

The kinda annoying part now is linking the Activator and the Object in the store. Go back to the Activator out in the world and open the reference box like you did previous step for the in-store object. Where the tabs are, click on the right arrow until you see Linked Ref. You can either select the reference in the render window, or if its inside the store, select the cell name for the store interior in the cell drop-down menu. After that, go to the next drop-down menu called reference and select the reference ID you put in the previous step for the object inside the store.

Now, click the right arrow button on the reference box again till you see enable parent. This step works exactly like the previous step. Select the Cell then select the Reference. After that, check the box that says 'Set Enable state to the opposite of parents'. This will make the world activator disappear after activating it. If it all went well, you're done. Hit Ok and close the window.

 

If you don't have a cell that pops up like my mod, you can always use the cell view window and just pull it up in the render window. Then you will use the 'Select Reference in Render Window' option when linking the ref and the parents.

Always remember if you're going to link to objects like this, one or both need a Reference Editor ID. The object you're LINKING to always needs a Ref ID.

 

Now when you're in game, you can test if this was done correctly. Just go to the object out in the world and you should be able to activate it. When you activate it, if you have a message it will show up then the object should disappear after closing the message window. Head back to the store and the object should now be inside the store where you want it. And a PSA, I recommend you make new forms for any container you want to use in the store so you can edit them freely without editing the base game container.

 

(I.E. If you want an Ammo Box, find the base game ammo box. Change the ID to something else 'RGHAmmoBox' for example, hit okay and click yes to add a new form. You can change that ammo box all you want without changing every single ammo box in New Vegas.

 

The wording might be hard to follow, hopefully this makes enough sense to get ya moving forward. I'll try and get some screenshots if you still have trouble.

 

Edited by DaleTheeMagnificent
Link to comment
Share on other sites

If you need to learn to make a new script as a whole, I'll try and find the topic that explains how to set that up. I don't want to give you wrong info on that. Maybe someone who is more confident can explain how here too. It's really easy to be honest.

 

EDIT: Found out that sometimes making an object into an activator won't always work. (Just had one of mine not work when I was doing some testing.) I also found what seems to be a solution for those objects. I figure you'll need this info eventually since you'll be doing the same kind of modding I am.

 

Making an Activator with GECK

Edited by DaleTheeMagnificent
Link to comment
Share on other sites

I'll try to explain this as succinctly and novice-friendly as I think I'm being, so feel free to ask me specific questions:

 

So some core concepts you'll need to achieve your goals are: References and the Enable function. (So yeah, you'll need to understand some basic scripting concepts- but for your goals, we can use a very simple method.)

You're already familiar with references even if you haven't realized it yet- everything you've placed in your shop-to-be so far is what is called a reference- a specific instance of an object from the Object window.

The workbench you have placed in your shop is a Reference to the base workbench object in the games database, so let's use that as the basis of this lesson.

 

Double click the workbench you've placed in your shop interior. A window detailing a bunch of things about this reference will appear.

 

What you're most concerned with is going to be the Reference ID box, the tick box for "Initially Disabled", and the tickbox for persistent reference.

The "Initially Disabled" tickbox, when ticked, causes the reference to be non-existent in game. Undoing this flag is what will form the core of your mod's Illusion of the player upgrading the shop.

The Reference ID box is what it sounds like, it's a place you can enter a name for that reference. This does not show up anywhere in game; it's something YOU will be using later for the bit of scripting you'll be doing. Go ahead and call the workbench something like MyShopWorkbenchREF

The Persistent Reference tickbox is something that needs to be ticked. Without going in to details, it's necessary for scripting.

 

At this point, I'd like you to try something. I want you to go in the game, in to your mod's shop. (You can teleport directly to the cell with  COC YourCell'sName in the console) Go to the spot where your workbench is supposed to be.

Now, Open the console and type: MYShopWorkbenchREF.enable

(If you're unfamiliar, the key to open the console is ~ or "tilde".)

You should see the workbench appear in front of you.

Your goal now is to create something that makes the game say MyShopWorkbenchREF.enable.

 

There's a dozen ways to do this, but the simplest is with a Terminal object, which are pretty intuitive to understand. You can figure out how to polish the presentation of the unlock terminal on your own, so I'm just going to explain the basics of what you want to do as far as unlocking things in the shop.

To create a new terminal, it's easiest to just copy an existing one, so you don't have to deal with the hassle of defining the model manually. Pick any terminal in the object window, right click edit. CHANGE THE OBJECT ID, and select Yes on the prompt asking if you want to create a new object. You do not want to overwrite the base object. We call mods that do that "Dirty."

(For this next section, I want to reiterate, I'm only teaching you the most basic form of getting this terminal to do what you want- you can work out how to polish it with submenus and conditions on your own (or asking me or someone else more specific questions.))

 

Open your new terminal object (Not reference). You'll get a window like the one shown in the wiki link just above. The most  important thing in this window is the MENU ITEMS field. These are the options that will appear in the terminal interface you've seen in-game.

Create a new menu item.

Item Text and Result Text are purely cosmetic, just fill them out as "Unlock Workbench" and "Workbench Unlocked!" respectively for now.

The heart of terminal functionality is the big box labeled "ITEM RESULT SCRIPT". This is where you're gonna type out the super confusing and elaborate code that makes your workbench appear.

type MyShopWorkbenchREF.enable in the item result script box.

Congratulations; you've just made a terminal with a button that will make the workbench in your shop appear. Don't forget to place the terminal itself in-game.

 

All this forms the basics of what you'll need to do to make this mod. There are more elaborate and effecient solutions, but I figured this would be the easiest one for a beginner to understand.

Edited by Radioactivelad
Link to comment
Share on other sites

  • Recently Browsing   0 members

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