• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.
Halstrom

Fallout New Vegas GECK / Scripting Help 101

2,597 posts in this topic

EDIT AGAIN:


awww no, it was initialized. But I dont' get it.


This doesn't parse:



                Let antQuest.arAnimName[iCat][iCounter] := sAnimName

I will have error in console and if I ar_dump I see it's empty.


 


But this one, this one works:



    Let antQuest.arAnimName[0][0] := sAnimName

I'm confused. iCat and iCounter are obviously two integers.


0

Share this post


Link to post

Then I guess iCat or iCounter are a number that isn't an index in those arrays. Also, if you use regular arrays, the numbers need to be consecutive - you may be trying to park something under an index that leaves a gap with the other indices, like going let array[2] := something while there is no array[0] or array[1].


0

Share this post


Link to post

I found it just in this precise moment, then I've read your comment that confirmed it :) yes, my key starts from 1 and not 0, I didn't know it was an issue... sorry...


0

Share this post


Link to post

Not sure if this thread is just for scripting, or GECK in general, but I figure I might as well ask here:


 


How do you create new topics (the things in the list located under the "Top-level only" checkbox in the Dialogue window)? You'd think right clicking would work, but apparently not.


 


I vaguely remember having a similar problem in the Morrowind editor years ago, but I can't remember how I solved it. Possibly something unnecessarily convoluted and complex about using quests just to add a couple of dialogue lines to an NPC.


0

Share this post


Link to post

oh well that's the way, usually. Right click on that small panel - Add Topic in the menu that shows up. It opens a new window where you choose a name, then you add it


What's exactly the problem, the small menu with Add Topic doesn't show when you Righ Click? (see pic)


post-165499-0-51749500-1416597020_thumb.

0

Share this post


Link to post

What's exactly the problem, the small menu with Add Topic doesn't show when you Righ Click? (see pic)

Exactly.

Nothing happens when I right (or left) click the indicated area.

 

Yeah, I'm making another "generic prostitutes at the Wrangler" mod. It just bothered me that there weren't any in that casino.

post-21144-0-08484300-1416598965_thumb.j

0

Share this post


Link to post

JohnNewton, your screenshot is from dialogue tab!


You should add topics inside WranglerPro1 quest's topic tab.


0

Share this post


Link to post

JohnNewton, your screenshot is from dialogue tab!

You should add topics inside WranglerPro1 quest's topic tab.

Bwah? "WranglerPro1" is an NPC. Am I supposed to go create a quest called "apparentlyIneedoneofthesetomakeNPCssaythings1" or something and add dialogue through that?

0

Share this post


Link to post

- yes, make a new quest, give it an editorID, set the priority, & possibly the enabled on game start flag


- hit ok, save the esp


- open the quest again, add the quest script if you have one, go to topic tab


- right click n left column, choose add topic, right click in the window that opens, choose new again, enter a name for the topic


- you have a new topic now, flag it as top-level to have it be automatically added in the dialog menu in-game


- use conditions to have the topic only appear for some NPCs


0

Share this post


Link to post

- yes

That's... confusing (not your explanation, just the fact that it has to be done like that). Having to create a new quest just to have a minor NPC say a single, trivial line.

 

I'll try that then. Thanks for the help, everyone involved.

 

EDIT: Oh my freaking fuck how do I disable that infernal GECK spell checker?

EDIT 2: How to you rearrange the "Response text" entries?

EDIT 3: The generic "What do you need?" greeting is at the top of the list. How to I move to to the bottom (so that my custom greetings have priority)? Ideally without editing the base game "What do you need?" entry.

EDIT 4: Is it possible to get a script to play the audio of a certain line of dialogue?

Better yet, is there an easy way to get an NPC to use another NPCs dialogue line (lip movement and all)?

I'm creating an NPC that is supposed to be a very skilled actor, able to mimic peoples voices. I want her to be able to repeat certain lines used by NPCs by simply copying the audio and text into her dialogue somehow.

0

Share this post


Link to post

Could someone help me with a variant of John's Problem? I recently got the Sunny Smiles companion mod and am trying to add dialogue to have sex with her like you can in SexoutCompanions but I'm having trouble doing the following: 

  • Getting the scripts for sex to compile 
  • Having the dialogue option show up in-game
  • Success at creating a patch ;-;

Any help will be appreciated. 

 

What I've already done: 

I've created a "quest" in the quest tab under Actor Data and created a topic within it with a prompt, response and conditions. The quest is marked as a top-level quest and has the Start Game enabled checked. I put in a script for sexout to (hopefully) begin. I check to see in the GECK if Sunny has the dialogue line in her dialogue tree and she does. I check in game and she doesn't have it.


 

I am sure I did some stupid noobish thing but this is my first attempt at legit modding due to how much the GECK itself frustrates me.

0

Share this post


Link to post

@JerseyWalrus: Probably not running GECK with NVSE. Check the tutorial link in my signature, I go through it.


 


Top level dialog does not appear if the topic has 'choices', which can be awkward. You have a few options


- If dialog starts via smaller talk it will work.


- If you say another topic to her first which has no 'choices', your top level will appear after.


- You can add your topic as a choice to her vanilla GREETING. This means overwriting vanilla records, meaning possible load order issues, etc, and should be avoided when feasible- but sometimes you have to.


 


@JohnNewton: you can disable the spell checker or copy the dictionary for FO3 so that it works. Forget exactly where, but google should know.


0

Share this post


Link to post

I followed the tutorial to set up the GECK but I still get an error. It reads something like this


 


Operation could not be completed because:


                 Info (04000AE0) results script failed to compile


 


 


0

Share this post


Link to post

I followed the tutorial to set up the GECK but I still get an error. It reads something like this

 

Operation could not be completed because:

                 Info (04000AE0) results script failed to compile

There's an error in your script, or you're missing something like NX but you're trying to use NX functions in the script. You didn't say what you DID when you caused that error, so it's hard to say exactly.

If the sunny dialog is still not showing up, you need to take a step back and go slower. It's insane for someone brand new to modding to try to do things "all at once." Delete all the scripts and sexout stuff. Just leave the quest and dialog.

Test to make sure the dialog is there and working.

Once it is, and it's working in all the cases you want (conditions, repeated topic, etc) THEN you go in and start adding scripts. Simple scripts, one at a time, and testing them as you go. It's slow and painful but the geck is terrible and the language is a horror show. Methodical testing is the only way to get things done in it, especially for a beginner.

0

Share this post


Link to post

Could someone help me with a variant of John's Problem? I recently got the Sunny Smiles companion mod and am trying to add dialogue to have sex with her like you can in SexoutCompanions but I'm having trouble doing the following: 

  • Getting the scripts for sex to compile 
  • Having the dialogue option show up in-game
  • Success at creating a patch ;-;

Any help will be appreciated. 

 

What I've already done: 

I've created a "quest" in the quest tab under Actor Data and created a topic within it with a prompt, response and conditions. The quest is marked as a top-level quest and has the Start Game enabled checked. I put in a script for sexout to (hopefully) begin. I check to see in the GECK if Sunny has the dialogue line in her dialogue tree and she does. I check in game and she doesn't have it.

 

I am sure I did some stupid noobish thing but this is my first attempt at legit modding due to how much the GECK itself frustrates me.

 

You know you could use wsex sexual innuendo and prides wsex/sexout conversion script to achieve this right?

 

I use a slightly tweaked version of it myself. It works well and has a bonus of treating sunny as a vanilla companion (because it's the vanilla npc, companion'ised) which means you can tell your other companions to fuck her if you like, hookers can fuck her too.

0

Share this post


Link to post

Okay, I added the dialogues in(without any scripts and complications) and they show up in game and work when selected! Success!


 


How would I go about adding Sexout functions right after picking a dialogue option?


0

Share this post


Link to post

I got this script working to make my companion sit when I do, but when I get back up their weapon isn't equipped. Any ideas on what I could add to make them re-equip it?

 

If ((FollowerREF.GetInSameCell Player) || (FollowerREF.GetDistance Player < 500))


        If ((Player.IsInCombat) || (FollowerREF.IsInCombat))
            If (SitWithMe)
                Set SitWithMe to 0
                FollowerREF.evp
            EndIf
        ElseIf (Player.GetSitting == 3)
            If (SitWithMe)
            Else
                Set SitWithMe to 1
                FollowerREF.evp
            EndIf
        EndIf
    EndIf

    If SitWithMe && Player.GetSitting == 0
        Set SitWithMe to 0
        Set FollowerREF.IsFollowingDefault to 1
        FollowerREF.evp
    EndIf


Took me a while to get it to work. Had to use a script similar to RickerHK's code he used on his FO3 Brisa, just edited for my purposes...

0

Share this post


Link to post

Maybe there is something wrong with flags inside packages? Try looking there.


0

Share this post


Link to post

Thanks! That was it! I had first tried using Willow's script, where they had marked "Weapons Unequipped" in the flag list of the package, so I had forgot about that.


 


Yet another question - how do you make a generic teleport script for this companion? She's a standard one that doesn't require convoluted scripts, so how would


I add that to the existing follower script without too much trouble? And by teleport I mean when they get stuck or far from me they appear next to me.


0

Share this post


Link to post

I believe AJ did something clever with her Nina companion for that, would be worth taking a look.


 


A rudimentary method would just be:



float fTimer
Begin GameMode
if eval (fTimer += GetSecondsPassed) < 5 ; check at most every 5 seconds
    return
endif
let fTimer := 0
if CompanionREF.GetDistance PlayerREF > MAX_DISTANCE
    CompanionREF.MoveTo PlayerREF

0

Share this post


Link to post

This is the UDF I use to make her warp behind me:



scn aaPDogWarpUDF

Begin Function {}

    if (Player.GetAngle Z >= 0) && (Player.GetAngle Z < 90)        ; Relative position
        aaPDogREF.MoveTo Player, -100, -100, 10
    elseIf (Player.GetAngle Z >= 90) && (Player.GetAngle Z < 180)
        aaPDogREF.MoveTo Player, -100, 100, 10
    elseIf (Player.GetAngle Z >= 180) && (Player.GetAngle Z < 270)
        aaPDogREF.MoveTo Player, 100, 100, 10
    elseIf (Player.GetAngle Z >= 270) && (Player.GetAngle Z < 360)
        aaPDogREF.MoveTo Player, 100, 100, 10
    endIf

end

(SPONSORED BY T3589 ® )


 


I would add some extra condition OnLoad. When you change cell the companion warps on its own, without script, this was causing glitches because was punching with my script.


0

Share this post


Link to post

OnLoad works only once game started  and NPC got into new cell once.


 


So for instance


 


You have ActorA in the same cell and you load the save - OnLoad doesn't trigger


You go into another cell - OnLoad triggers


You go into another cell again - OnLoad doesn't trigger


 


So it's pretty useless block in my opinion (unless you apply permanent changes for Actor)


Beth uses that to upgrade securitrons for example.


0

Share this post


Link to post

It's not a matter of cell but a matter of cache, buffer. If it's buffered it won't be rexecuted.


0

Share this post


Link to post

Is using too many if statements a bad thing? There's a mod I'm working with which involves more than three weapon mods and because of that I needed to make my own "mod" system. Basically what it should do is that depending on a key press, a mod menu should open up to change the weapon's mods, but there are three versions of the weapon, a 10 inch version, a 15 inch version and a 20 inch version, and each has different set of mods. Now here's what I do, I identify the weapon first, then depending on the options chosen in the menu it gets replaced with another version with the mod chosen, but then there are scenarios like this one. The weapon has a grip, and the player wants to add a silencer, so then it would have to check if the weapon is the 10,15 or 20 version and check if it has a grip in order to give the player a version that has both a grip and a silencer. 


 


I already saw how large and ugly it would be to check for all of those conditions for all three weapons, there were simply to many ifs, for something that should not be this complex. I thought about giving each mod option a number, and then selecting an index of an array with all the weapons with that number, but then the problem to check if it has a grip or not comes up, as well as I'm also not so sure what to do if the player wants to remove a mod and not just add it. I'd just do the ifs, but I want to see if I can figure out something else before resorting to that. 


0

Share this post


Link to post

Don't use too many conditions in the same statement and avoid too many elseif in a row. It has been known to break (and answer select the wrong case).


 


Nesting ifs should not be an issue, except the compiler will NOT complain you forgot an endif so indent well :) Nor will it complain if you add one extra endif in fact.


 


 


 


0

Share this post


Link to post