Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

You cannot set a reference on a inventory object simply because when you "pick it up"  you destroy the original and create a copy.

 

GetSelf is prohibited on inventory object, GetContainer is what is available.

 

Set/GetTokenRef (nvse 3) are meant to contain another ref, not to make a token "referencable".

 

GetBaseObjct should let you differenciate multiple token sharing the same script.

 

Posted

Is it possible to a quest script access information from a object script?

 

- I made a new Misc Item with a script attached (Object script)

- I made a new Quest with a script attached (Quest Script)

- I added this new misc item to a ref NPC

 

Now i want my quest script to get, for example, a value from some variable inside this misc item script inside this ref NPC inventory

 

Can be done?

 

Posted

You can't set a reference on an inventory object, so no. You could if it were an object script on the actor, but really NX is the best way to deal with sort of thing.

Posted

Is it possible to a quest script access information from a object script?

 

- I made a new Misc Item with a script attached (Object script)

- I made a new Quest with a script attached (Quest Script)

- I added this new misc item to a ref NPC

 

Now i want my quest script to get, for example, a value from some variable inside this misc item script inside this ref NPC inventory

 

Can be done?

 

If I understood well... I would do the contrary. I would store the item's variables inside the quest script, and inside the item's script I would refer to them as quest.var.

Posted

That doesn't work well when you have 5.. or 50.. or 5000 such items scattered around the world potentially.

 

As Doc said, NX variables were invented to solve exactly this problem.

Posted

Ok, thanks for the help guys, now i need help about animations. i'll try to explain what's happening.

 

I created a new idle group, and put some new idle animations inside (Geck menu > Gameplay > Idle Animations...), created the conditions and bla bla bla.

 

The problem is, after a new animation finished to play, the NPC affected (the one playing the new animation), stops for a minute (stands normal idle doing nothing), and then play again the animation.

What i want is to play the animation in a continously loop. (did i wrote correct the word continously?)

 

I'm not a animator, i just grabbed these animations from another Fallout NV mod and they seems to work fine (in the original mod), so i'm assuming the problem is not in the new animations (maybe) but between the keyboard and the chair (probably) :(

 

 

Posted

In the idle animation in the GECK, there's a checkbox to make it do exactly that.

 

Make sure you open your mod in FNVEdit and delete the modification it likely made to "general idles". This is a bug the GECK introduces when adding a new animation group (or reordering them) that breaks sexout and other animation systems, and is why grooveatron and the like don't work properly with sexout unless you edit them to fix it.

Posted

You mean the Looping > Loop Forever checkbox? Yes, it's checked.

The new animations are indeed, playing in a loop, but before "replaying", the NPC stop and stands idle, and then play again.

 

I don't have any experience with FNVEdit, but well, i'll have a look.

Posted

The standing still part may actually be in the .kf file in that case. Have you checked? They contain pointers that tell the game what the first frame to play is, the section (start and end frame) for looping when told to, and the last frame. It's quite possible somebody set the startloop and endloop values wrong when creating it.

Posted

The problem WAS between my keyboard and my chair :idea:

I was calling multiple times to play the idles *sigh*

 

Fixed and working like a charm

 

Thanks for your attention, Pride :heart:

Posted

Haha no problem, glad you have it working.

 

If you look in the sexoutNG thread there is a post there (or a link to one) on what the problem is that you'll have to fix in FNVEdit.

 

You only have to do it once if you make your top group and add all the rest beneath it, it only happens when you make an edit at the root level of the idle animations tree and the fix is easy -- just delete a record and save.

Posted

What is the best way to stop combat when there is a group attacking you or another NPC?

 

For example, 4 NCR soldiers attacking the player at the same time become unagressive.

 

Surely, i can use StopCombat in each one, but according with the docs "If the actor is still aggressive and has low disposition towards any nearby actors, it may immediately go back into combat."

So i presume StopCombat could be only a short-temporary-workaround, which doesn't suits me.

Posted

How to prevent the player to advance time?

When in combat, you can't fast travel or advance time so i guess there is a command to do this. 

 

Searching in Geck docs, i've found the EnableFastTravel command that enable/disable fast travel but no advance time command.

 

Posted

@ cuceta: You could use a script with

Begin MenuMode 1012
   WakeUpPC
End

If there definitely isn't an inbuilt function for it

Posted

Yes, i saw the docs about disabling the pipboy, which is perfect for me. I really needed to disable any player controls. (Hooray)

Thanks for your script Odessa. It also works fine.

 

Oh man, i miss my vacations.

Posted

Ah well, just make sure you set them back 'politely' when you're done. E.g. the pipboy might already be disabled when your script runs, or some of the other things you have 0'd might be, and you don't want to enable them afterwards if they are already disabled.

 

You want to use GetPlayerControlsDisabled before you run, and make sure you set the controls back to those values when you're done. That way if some other mod has disabled movement or something before your script runs, it will stay disabled after you are done.

Posted

Another question (and sorry if i'm bothering you guys too much)

I've been trying to compile a script with con_tfc command inside, but Geck displays "con_tfc" command not found everytime i try to save.

However, if i load the game and type con_tfc in the console, or if i use any mod that use con_tfc, it works as expected.

 

Is there a trick to work in Geck scripts? I'm using NVSE v2 beta 12 (with nvse_loader.exe -editor shortcut command)

Posted

Alright, now one question about dismemberment

 

Is it possible to kill an actor wthout exploding it's limb, but dismembering only?

If i use targetREF.KillActor killerREF 1, it will explode the targetREF's head. What i want is simulate decapitation (using this example)

 

If i equip the killer with a knife and set the target's health to 1, his last attack (during combat) has a chance to dismember the hitted limb (not exploding). Increasing this chance to 100% could achieve what i want (maybe).

 

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...