Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

Hi there! I have pretty strange issue and it occurs in a few mods at the time.

 

So, I was going to edit one mod but after trying to recompile script I had this message (without any sript editing):

 

"Unknown variable "lock" (syntax was sometnig like SOMELOCKEDITEMREF.lock 100).

 

That mod is extremely out of date so I just decided that there is some issue with missing items in SNG master and forgot about it. But today I iopened FalloutTTWquestoverhaul to check some quest topics and I saw totally the same error (note that I didn't edit this at all, it's original mod syntax):

 

 

 

 

c159202b8d.png

 

 

 

 

33353808b8.png

 

 

 

 

Luckily I don't need to recompile this sript at all, but I wonder - what the problem there? Why GECK doesn't like this "lock" variable so much? If it's something about new NVSE versions syntax, how should I edit this commands to be correct for the game?

Posted

Luckily I don't need to recompile this sript at all, but I wonder - what the problem there? Why GECK doesn't like this "lock" variable so much? If it's something about new NVSE versions syntax, how should I edit this commands to be correct for the game?

 

I'm going to take a look. Which version of the fix is that? is it the latest? can you tell me the steps you're doing to reproduce the issue, please?

 

PS I don't think he wanted to set a var, it should be something like SomeDoorOrContainerREF.Lock 100, which locks it. I will check it, but I feel he's scripting to try to solve the neverending problem with Moira and the locked shop, it's vanilla functions.

Posted

 

Luckily I don't need to recompile this sript at all, but I wonder - what the problem there? Why GECK doesn't like this "lock" variable so much? If it's something about new NVSE versions syntax, how should I edit this commands to be correct for the game?

 

I'm going to take a look. Which version of the fix is that? is it the latest? can you tell me the steps you're doing to reproduce the issue, please?

 

PS I don't think he wanted to set a var, it should be something like SomeDoorOrContainerREF.Lock 100, which locks it. I will check it, but I feel he's scripting to try to solve the neverending problem with Moira and the locked shop, it's vanilla functions.

 

 

Yep, I know that this command (.lock) just locking referenced object to 25/50/75/100 lvl, so cannot understand why it has such problems in two totally different mods. Looks like it cannot find based object for item in command.

 

TTWOverhaul is latest version (oct 2015 or something like that). Fix .esp is my own .esp with some additional tweaks for mod (new dialogues/encounters and other stuff; actually I completely overhauled this "overhaul" for own use ha-ha) and it has nothing to do with this topic that has wrong syntax in script. So there is no steps to reproduce the problem except just opening this topic in GECK. :D

Posted

 

Yep, I know that this command (.lock) just locking referenced object to 25/50/75/100 lvl, so cannot understand why it has such problems in two totally different mods. Looks like it cannot find based object for item in command.

 

TTWOverhaul is latest version (oct 2015 or something like that). Fix .esp is my own .esp with some additional tweaks for mod (new dialogues/encounters and other stuff; actually I completely overhauled this "overhaul" for own use ha-ha) and it has nothing to do with this topic that has wrong syntax in script. So there is no steps to reproduce the problem except just opening this topic in GECK. :D

 

 

My bad I thought it was about another mod.

 

No, it's not the base object, it's the reference. That hatch is located inside aaaquestFFMoiraCell and it's named "aaaquestFFMoiraHatch3", you should check if you have it and it is flagged as persistent reference, or it could break the script when it's executed

Posted

 

 

Yep, I know that this command (.lock) just locking referenced object to 25/50/75/100 lvl, so cannot understand why it has such problems in two totally different mods. Looks like it cannot find based object for item in command.

 

TTWOverhaul is latest version (oct 2015 or something like that). Fix .esp is my own .esp with some additional tweaks for mod (new dialogues/encounters and other stuff; actually I completely overhauled this "overhaul" for own use ha-ha) and it has nothing to do with this topic that has wrong syntax in script. So there is no steps to reproduce the problem except just opening this topic in GECK. :D

 

 

My bad I thought it was about another mod.

 

No, it's not the base object, it's the reference. That hatch is located inside aaaquestFFMoiraCell and it's named "aaaquestFFMoiraHatch3", you should check if you have it and it is flagged as persistent reference, or it could break the script when it's executed

 

 

Yeah, it's there and it is flagged.

 

 

 

 

5c0e44f00b.jpg

 

 

 

 

Cannot even imagine what's wrong with this script. As I see somehow GECK totally doesn't understand function "lock" as correct function at all. When I edit it to "unlock" for example - it compiles (of course result will be wrong but the thing itself). What the hell...

 

 

UPD Oh!! I found issue - it was russian GECK version. I installed english one and now everything is OK, no errors, script is compiling succesfully. Could not even suggest that ru-version just somehow lost few original game functions in it... O_O

  • 3 months later...
Posted

Necroposting this thread... I feel like the only FONV modder around here, this summer -_-

 

First time that I have a practical example of how to use the Priority parameter.

It seems that if two quests have two verified dialogue topics, in game the NPC will pick the line on the quest with higher Priority.

  • 4 weeks later...
Posted

I hope this is the right place.

 

My problem is this I have an nif file with textured in blender and edit in Nifskope . Now I try to bring this clothing in Fallout new Vegas so I try to save time and use an id from an other outfit for example a head. When add it than I will sea it in the edit window from the geck. I save it an load it in the Modmanger they

Modmanger installed it but in game is the item them as it was like there is no replace. When create a new Id then it will appear in the the armo section but when I click on prewiev image the item disappear. So what do I wrong ?

Posted

 

I hope this is the right place.

 

My problem is this I have an nif file with textured in blender and edit in Nifskope . Now I try to bring this clothing in Fallout new Vegas so I try to save time and use an id from an other outfit for example a head. When add it than I will sea it in the edit window from the geck. I save it an load it in the Modmanger they

Modmanger installed it but in game is the item them as it was like there is no replace. When create a new Id then it will appear in the the armo section but when I click on prewiev image the item disappear. So what do I wrong ?

If you can post the files (mesh + texture + your esp), I can take a look one of these days

Posted

 

I hope this is the right place.

 

My problem is this I have an nif file with textured in blender and edit in Nifskope . Now I try to bring this clothing in Fallout new Vegas so I try to save time and use an id from an other outfit for example a head. When add it than I will sea it in the edit window from the geck. I save it an load it in the Modmanger they

Modmanger installed it but in game is the item them as it was like there is no replace. When create a new Id then it will appear in the the armo section but when I click on prewiev image the item disappear. So what do I wrong ?

If you can post the files (mesh + texture + your esp), I can take a look one of these days

well this is very friendly from you so here is it  may it is a ve ry stupid source why it not work may not i  hope you can tell my what i do wrong. Greetings sinola 

ball.rar

Posted

ya esta.

 

you'll receive a copy in your inventory after few seconds that the game starts, it's called "ball", tell me if it's OK. I setted it to hide the player's head since I wasn't sure how big the ball was, so you'll see a "hole" on the neck. But you can change the used slots on GECK and not hide the head, if the ball is enough big to not cause clipping.

 

EDIT:

Oh right, you asked what was wrong. Here few extra details.

 

 

- The ESP you provided was completely empty, maybe you took the wrong one. No problem.

- The texture path was absolute (C:\Program Files\Steam\Fallout NV etc.etc.) and not relative (\textures\MyFile.dds). You can tweak these things easily using Nifskope, if you still don't have that program I strongly suggest you to download it.

- It lacks normals (filename_n.dds). That works, but it won't have these cute effects that normals give you.

- The main issue was that the mesh wasn't rigged on NV skeleton. Is it some kind of a port? you can port meshes from other games, but then you must rig them on NV skeleton, or they won't work in game. This is not only for NV, it's a general rule for games, the body, its rigging, the bones names, them all are different, so they must be adapted. This is the most "interesting" part of a port of a weighted mesh.

 

Ball.zip

Posted

ya esta.

 

you'll receive a copy in your inventory after few seconds that the game starts, it's called "ball", tell me if it's OK. I setted it to hide the player's head since I wasn't sure how big the ball was, so you'll see a "hole" on the neck. But you can change the used slots on GECK and not hide the head, if the ball is enough big to not cause clipping.

 

EDIT:

Oh right, you asked what was wrong. Here few extra details.

 

 

- The ESP you provided was completely empty, maybe you took the wrong one. No problem.

- The texture path was absolute (C:\Program Files\Steam\Fallout NV etc.etc.) and not relative (\textures\MyFile.dds). You can tweak these things easily using Nifskope, if you still don't have that program I strongly suggest you to download it.

- It lacks normals (filename_n.dds). That works, but it won't have these cute effects that normals give you.

- The main issue was that the mesh wasn't rigged on NV skeleton. Is it some kind of a port? you can port meshes from other games, but then you must rig them on NV skeleton, or they won't work in game. This is not only for NV, it's a general rule for games, the body, its rigging, the bones names, them all are different, so they must be adapted. This is the most "interesting" part of a port of a weighted mesh.

 

 

well thanks i try it later :)  i sea theres a lot to learn   for me. And i thik  yeah i have the texture  and the file in blender so the hardest part is done :D 

Your right the original file is a sykrim mod. Have you a link to a good tutorial how i riggged on Nv and tweak iam a complett noob in the moment.

Thanks for your time.  

Posted

So try it out now but nothing happened I as it via the Fmm. When I let the geck run with this file active it will not appear when I search for it in armor.

Posted

Probably because the zipped folder is named "ball" and the mod manager isn't understanding that it needs to be extracted under Data.

 

You could manually extract the content inside Data, so that textures go under "textures", meshes under "meshes" etc.

post-165499-0-12124800-1472842879_thumb.jpg

post-165499-0-61587900-1472842889_thumb.jpg

post-165499-0-89568500-1472842894_thumb.jpg

Posted

Probably because the zipped folder is named "ball" and the mod manager isn't understanding that it needs to be extracted under Data.

 

You could manually extract the content inside Data, so that textures go under "textures", meshes under "meshes" etc.

Okay i try it :)

  • 1 month later...
Posted

Got an interesting one.

 

I guess for starters, I'm wondering whether there is a function I can make use of in NVSE or its multiple offspring which will force a door into the lockpicking minigame.  I'll go from there.

 

Actually, scratch that.  What I'm wondering now is whether I am correct in recognizing that there's no way to write up a script that you can reuse on multiple things with different variables plugged into each, Skyrim-style.  Because right now it looks like I'm going to have to add several dozen individual scripts, each only differing from one another by a single variable's value.

 

Thanks in advance.

Posted

Got an interesting one.

 

I guess for starters, I'm wondering whether there is a function I can make use of in NVSE or its multiple offspring which will force a door into the lockpicking minigame.  I'll go from there.

 

Actually, scratch that.  What I'm wondering now is whether I am correct in recognizing that there's no way to write up a script that you can reuse on multiple things with different variables plugged into each, Skyrim-style.  Because right now it looks like I'm going to have to add several dozen individual scripts, each only differing from one another by a single variable's value.

 

Thanks in advance.

NVSE and NX_Extender may do that, check how some of the stuff in SexoutSpunk works, it may give you a clue.
Posted

NVSE and NX_Extender may do that, check how some of the stuff in SexoutSpunk works, it may give you a clue.

 

Had the bright idea of making use of a form list and pinging it for the script-running object's base object and going from there.  This has proven hopeless because form lists seem to have a mind of their own.  Example: Got a list of 9 random things and 1 item I actually want in there.  Scripting finds it, but always at index 4, no matter where I actually move it in the list.  And FNVEdit is even more confused; it doesn't even show the index for anything, and the target item is at the very bottom of the list.  ListGetCount also returns 6 (rather than 9), so it too is irretrievably confused.

 

I'd like to think that someone has actually gotten some use out of these lists, other than in the wholly generic sense of "does it contain my x or not?"

 

Maybe the most frustrating recent item is how I can't seem to find a single function that can successfully convert a ref into its corresponding numeric ID (int).  Right now I'm taking a look at NVSE's arrays.  Even though there doesn't seem to be any way of defining them for use outside of scripting, it still seems to be the only viable means of avoiding having to use about 40 individual scripts - though it does mean assigning large arrays at the top of each copy of a single script.  So much for that idea.  The arrays are limited to 20 elements and there is no function for returning the key (position) of an element found in the array, which means I'd have to set up a search loop.  At that point, it's literally better just to go ahead and write 40 smaller scripts.

Posted

if you use the same script on different objects, each object will have its own set of variables. That's how it works in vanilla.


RefID are not numbers, so don't try to use them as such. They are a pair of index, one for the mod and one for the form inside the mod. Never try to store them  into an int because, on different load of the same save the mod index can and will change.

 

Where do you get that arrays in NVSE are limited to 20 elements ? 

Posted

RefID are not numbers, so don't try to use them as such. They are a pair of index, one for the mod and one for the form inside the mod. Never try to store them  into an int because, on different load of the same save the mod index can and will change.

 

Let me give you an example of where I believe this is not precisely true.

 

In a different mod I put together just prior to the one I'm currently working on, I frequently made use of (container).GetItemCount.  When doing so, I provided not a ref but rather the refID number - for example, Fission Battery: 33BC6.  This works.  And it works with many other functions.  Furthermore, while the caveat about numbers changing is a fair and obvious point, this isn't going to happen to a core game vanilla asset, and such assets are the only things I'm currently dealing with.

 

I am not trying to say that my approach here was the best option, of course.  I am reaching.  The Geck's limitations have taken me aback and I'm just making sure there really isn't anything better that can be done.  Json support, for example, might have straightened out this mess.

 

Where do you get that arrays in NVSE are limited to 20 elements ? 

 

Here.  When defining the arrays, if you want to be able to do it all in one go, the limit is 20.  Whether or not this is the actual limit of the function is moot, because I'm not going to bloat the script needlessly.  Better to just write separate scripts for each 20 variables.

 

Now here's a question I've been fussing over lately.  I have two options: 1) Put together 40 slightly different versions of the same script and attach them to 40 different objects in the game which the player will eventually be interacting with.  2) Put together just two scripts, each with two sets of defined arrays of 20 items and and array-retrieval loop (making the script twice as large), and attach those to the 40 objects.  The question is: In which case are the player's save files ultimately impacted the least?  It would depend on how such things are stored in saves and whether they are kept after the player is long done interacting with the objects - things which I don't know.

Posted

It might help if you'd be a bit more specific about what you're trying to do.

Arrays in nvse can have as many elements as you want; it's just that the ar_list function can only read 20 elements as parameters max. You could ar_append several arrays together. Also, be sure to look into NX as a way of attaching information to forms (refs/objects).

Posted

It might help if you'd be a bit more specific about what you're trying to do.

Arrays in nvse can have as many elements as you want; it's just that the ar_list function can only read 20 elements as parameters max. You could ar_append several arrays together. Also, be sure to look into NX as a way of attaching information to forms (refs/objects).

 

Decided to go for the arrays.  Ran into a problem and it led me to your old thread in which you detail how they work.  The curious thing is that right near the top, you suggest things should actually be working the way I assumed they would.

 

I'll explain.  All I'm doing is setting up two arrays.  For the sake of this example, I'll just list one:

 

Array1: Ref1, Ref2, Ref3, Ref4, Ref5

 

I set this up on a script (VarScript) attached to a quest set aside solely to hold those arrays.  From a different script (PrimaryScript), I first set up Array1Clone, again with Ref1, Ref2, Ref3, Ref4, Ref5 - the same refs.  This is for experimental purposes.  Then I try this on PrimaryScript:

 

let x := Ar_Find Ref4, Array1Clone

 

This dutifully returns "3".  But then:

 

let x := Ar_Find Ref4, VarScript.Array1

 

This returns 0.  Not -99999, but 0.  The array-defining code is copy-pasted so there's no issue there.  It's simply failing to grab the key from an array on another script, although it seems to believe it's not failing.  I have also tried doing an Ar_Copy of VarScript's array and Ar_Finding from that, but it would seem that Ar_Copy suffers from the same limitation.

 

What did I do wrong? ;p

Posted

If you want, post the whole chunk of script or attach the ESP, it's easier to debug

Posted

If you want, post the whole chunk of script or attach the ESP, it's easier to debug

 

I probably should have done that yesterday.

 

TestingArrayFunctions.7z

 

All this does is print some text to the console when the upstairs door in The Atomic Wrangler is activated.  On my end, it showcases Ar_Find functioning on an array on the same script, but not on an identical array residing in an external script.

Posted

 

 

If you want, post the whole chunk of script or attach the ESP, it's easier to debug

 

I probably should have done that yesterday.

 

attachicon.gifTestingArrayFunctions.7z

 

All this does is print some text to the console when the upstairs door in The Atomic Wrangler is activated.  On my end, it showcases Ar_Find functioning on an array on the same script, but not on an identical array residing in an external script.

Thanks.

But I'm no more sure of what I'm looking for, now -_-

16iefwn.jpg

Posted

But I'm no more sure of what I'm looking for, now -_-

 

So what does that mean?  I've got a uniquely nonfunctional version of NVSE?  I suppose I'll try an earlier version or something.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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