Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

 

What is a topic? Here is an example for  you. Take a look at this picture. Each dialogue choice is a topic which consists of responses. Responses consist of:

1)player text  – what player says

2) NPC text – what NPC answers.

 

That's from my unfinished guide for dialogues.

<SNIP>

etc.

 

and player will always see the response according to his pregnancy stage in 1 topic. Or won't see it at all if all conditions are false.

 

Cool thanks, that does explain things a lot and some other weirdness, I'll poke it again and see if it squeals :)
Posted

 

If I put it in another script, it'll require another new quest. My question is this, if I have too many quests and scripts tied to those quests, will that cause trouble, especially if some of those use GameMode? This mod is heavily scripted, in fact I'd say that most of its features exist through scripting.

 

Don't be too much paranoid about buggin game down with quests. Just do what you can and then optimize script as you can.

 

You have no idea(figure of speech) how heavy some mods are(Project Nevada, reactive people, IHud).Some of them They have delay o 0.00x running and their scripts are heavy and still people have no trouble playing with them. If you stick with 0.1 or more, I'm sure your mod won't be the reason game slows down. If less, nothing bad will happen too, just don't forget about optimizing.

 

 

What is meant by optimizing? I assume it is using things like staged timers, making sure scripts aren't being checked when necessary, etc. If so, I believe I'm going in the right direction with this. I plan to tie most scripts with a quest that only gets initiated if the player equips power armor. Not really a fan of checking whether if the same thing is running in all my scripts, since that involves repeat code, but then it will likely only require one line which ensures that most scripts will stop running or will not run all the way if said quest isn't running as well. 

Guest tomm434
Posted
I assume it is using things like staged timers, making sure scripts aren't being checked when necessary, etc.

Exactly.

Guest luthienanarion
Posted

 

If I put it in another script, it'll require another new quest. My question is this, if I have too many quests and scripts tied to those quests, will that cause trouble, especially if some of those use GameMode? This mod is heavily scripted, in fact I'd say that most of its features exist through scripting.

 

Don't be too much paranoid about buggin game down with quests. Just do what you can and then optimize script as you can.

 

You have no idea(figure of speech) how heavy some mods are(Project Nevada, reactive people, IHud).Some of them They have delay o 0.00x running and their scripts are heavy and still people have no trouble playing with them. If you stick with 0.1 or more, I'm sure your mod won't be the reason game slows down. If less, nothing bad will happen too, just don't forget about optimizing.

 

 

That depends on what you're doing. I once locked the game up in a single frame for over 20 minutes completing a once-through script that called BuildRef, IsWeapon, and PrintC 16 million times. That's when I moved over to the C++ side of NVSE.

 

Just avoid using object scripts (which run every frame--all of them) for things that aren't timing-critical, and don't try to calculate celestial body trajectories for the entire known universe (analogous to the example above) in a single iteration.

 

It was linked back on page 15, but here's a good read if you want to know how bad the script compiler is: http://forums.bethsoft.com/topic/987561-script-optimisation/

 

Posted

I actually put a count in most of my scripts to make the bulk of them only execute every 99th to 599th frame and I find it also gives time for variables in other scripts etc to set up and refs to actually not be <null>

I also set tokens to check if the actor is valid (not a container for example) for running and remove itself if the actor is dead

 

Ok back to a Dialogue question, looking in FNVEdit under PNAM - Previous INFO

Some of my dialogue seems to be <NULL> and some seems to be all sorts of things some unrelated probably because I copied Topic responses from one to another, does this mean anything and I don't see it in GECK so assuming I can ignore it.

 

I only noticed because I had an <unresolved error> due to a deleted response and didn't know what to set it to, so set them to <NULL> as some of the others were set to <NULL>

Guest tomm434
Posted

Halstrom,you sure you followed this instruction and didn't added some existing or "emthy" topics to quest?

 

and Halstrom - don't edit VMedical clinic quest when you can create your own quest, make him "enable from game start" and put dialogues there. That way you won't be editing any vanilla records. Now you can create quest and move responses to it. But I would better delete all dialogues and recreated them again(You will have trouble with adding player responses -GECK will consider VDoctorMedical as  their original quest an you'll have to search for them in a big topic list.)

Nothing bad'll happen if you leave topics in this quest - it's just me being extra vanilla preserving and it's always feels good to say that "my mod doesn't change any single of vanilla records"

 

Waffles, yeah, get distance is very heavy function for example.

 

But simple variable check shoudn't slow the game down(unless you check for 100 of them every frame)

post-187071-0-15300400-1404226778_thumb.jpg

post-187071-0-76109000-1404226778_thumb.jpg

post-187071-0-61620600-1404226779_thumb.jpg

post-187071-0-39312100-1404226780_thumb.jpg

Guest tomm434
Posted
It's Halstrom ya git!

Ahahaha.

 

Sorry, Halstrom. I'll probably leave things as they were so you understand what's going on here.

 

 

Update: Oh no, I won't.

 

Posted

Halstrom,you sure you followed this instruction and didn't added some existing or "emthy" topics to quest?

 

and Halstrom - don't edit VMedical clinic quest when you can create your own quest, make him "enable from game start" and put dialogues there. That way you won't be editing any vanilla records. Now you can create quest and move responses to it. But I would better delete all dialogues and recreated them again(You will have trouble with adding player responses -GECK will consider VDoctorMedical as  their original quest an you'll have to search for them in a big topic list.)

Nothing bad'll happen if you leave topics in this quest - it's just me being extra vanilla preserving and it's always feels good to say that "my mod doesn't change any single of vanilla records" 

But simple variable check shoudn't slow the game down(unless you check for 100 of them every frame)

Cool, that helps explain things a lot, that second picture is the thing that I really lost some time sorting, I watched 3 different video's and I couldn't work out how any of them created a new topic in the window when it opened till I accidently right clicked and saw the new option :)

Like I already right clicked to create new on the previous window, "where's my NEW topic?", I edited EMPTY first time but then couldn't find another EMPTY after that :)

I create a new quest & move, copy everything to that now I have a better idea how it all works

Posted

Can anyone offer more clarification on these 3 list functions, this is my understanding:

 

IsInList: checks if a reference's base form is exactly in a list, only

 

ListGetFormIndex: Checks if anything is exactly in a list and returns index or -1

 

IsRefInList: Checks if anything is exactly in, or if its base/leveled version is in a list and returns index or -1.

 

(According to docs, despite the 'IsRef' part of name it possibly works on anything and returns index not boolean)

 

 

 

(Integer) ListGetFormIndex form list:FormList form:AnyForm

 

Returns the index for the specified form or base Form or permanent base Form.

--

(index:Integer) IsRefInList form list:FormList form:GenericObjec (sic, not ref?)

 

Checks whether a ref, its baseform, or its leveled baseForm is in a FormList and Returns the index.

 

 

Posted

IsInList is vanilla. In vanilla FormList can only contain baseform and variables can only contain references so it is logical to convert the ref into a baseform.

  Script edition of FormList only appeared to support DLC in FO3.

 

ListGetFormIndex and IsRefInList do what you described. Note that the search for baseform/leveled form only happens if the reference is not found with IsRefInList.

 

Posted

So in Dialogue, by the looks I am better leaving Topic blank or as the ID and using the Prompts?

 

Unless you're tossing topic refs around.  For example:

 

set rTopic to DialogTopicREF

 

rTopic will be blank <no name> if the topic is blank.  If it is then used in StartConvo at least.

 

Posted

 

So in Dialogue, by the looks I am better leaving Topic blank or as the ID and using the Prompts?

 

Unless you're tossing topic refs around.  For example:

 

set rTopic to DialogTopicREF

 

rTopic will be blank <no name> if the topic is blank.  If it is then used in StartConvo at least.

 

Cool, I made them all the ID, I was initially worried it would be visible in game but the Prompts are the way to go.

 

I'm a bit bambozzled trying to find where to add them to the other doctors dialogue though there's 2 Doctor dialogue quests but neither seem to be the "Greeting" "Top" Dialogue for them to add a Pregnancy test option.

Guest tomm434
Posted

Sometimes you can't leave vanilla records untouched. I think you'll have to look for a quest which changes doctor dialogues somewhere and if it doesn't exist. freely change doctors greeting. Even if it exists but has like <500 downloads, I would do it too.

 

ps. but I think it's okay to change greeting anyway. Everybody has to to make a choice someday...

Posted

 

I'm a bit bambozzled trying to find where to add them to the other doctors dialogue though there's 2 Doctor dialogue quests but neither seem to be the "Greeting" "Top" Dialogue for them to add a Pregnancy test option.

 

 

Is an actual greeting what you want there, or just a top-level line after the greeting's done? If the latter, you create a topic and flag it as 'top-level'.

 

Posted

 

I'm a bit bambozzled trying to find where to add them to the other doctors dialogue though there's 2 Doctor dialogue quests but neither seem to be the "Greeting" "Top" Dialogue for them to add a Pregnancy test option.

 

Is an actual greeting what you want there, or just a top-level line after the greeting's done? If the latter, you create a topic and flag it as 'top-level'.

 

No, I just want to add basic Pregnancy testing to most of the doctors as a dialogue option, I'll poke around a bit more.
Posted

Unless you want the doctor to start conversation with "Hey. How's our mom-to-be feeling?" or something of the like, don't add to GREETING.  Just add it like you had it as a top-level new topic.  If you chose to add to the GREETING topic, it shouldn't break anything so long as you've got your conditions on there (NPC = doctor class or list of NPCs + var to keep track if the doc has seen the player as pregnant before or if it's extremely evident).

Posted

Unless you want the doctor to start conversation with "Hey. How's our mom-to-be feeling?" or something of the like, don't add to GREETING.  Just add it like you had it as a top-level new topic.  If you chose to add to the GREETING topic, it shouldn't break anything so long as you've got your conditions on there (NPC = doctor class or list of NPCs + var to keep track if the doc has seen the player as pregnant before or if it's extremely evident).

Yeah, I gathered if I add to Greeting I have to add "In Doctor Faction" check, but what I'm trying to work out is where the link is between GREETING & the Doctors quest dialogue :)
Posted

If you mean regular doctor's quest, there doesn't have to be a link to it.  GREETING is one of those reserved topics that's used whenever you initiate conversation with an NPC.  There's a GetIsClass that you could use for doctor that I'm assuming appears as a conditional.

 

I'm going to guess that I'm not answering the question that you're asking.  Anyway, if you want to see other reserved topics, you can look at each tab from this page.  GREETING isn't mentioned on the GECK Topic Tab page, but it is on the TES Topic Tab page.  : P

Posted

If you mean regular doctor's quest, there doesn't have to be a link to it.  GREETING is one of those reserved topics that's used whenever you initiate conversation with an NPC.  There's a GetIsClass that you could use for doctor that I'm assuming appears as a conditional.

 

I'm going to guess that I'm not answering the question that you're asking.  Anyway, if you want to see other reserved topics, you can look at each tab from this page.  GREETING isn't mentioned on the GECK Topic Tab page, but it is on the TES Topic Tab page.  : P

Hmm maybe that's why I can't find anything, because I'm looking for something that doesn't exist. I'll try under GREETING and see how that goes :)
Posted

Remember:  GREETING is what's used when you initiate dialogue with the NPC.  Avoid putting dialogue choices with it.  Screws up other mods like DRL since it won't show the other top-level stuff (or not until you've gone through a linked dialogue option to get back to the top-level options).

Posted

Anyone ever done something similar to a power consumption counter that decreases over time? The old mod used some formula to calculate how much "power" it should subtract over time but it uses  a formula with a lot of variables that are spread out all over the script and with some names that aren't really clear. My solution is just to come up with a new one to do that instead of figuring out what the heck each one is supposed to do. I just need some pointers on how to make a timer that doesn't decrease too fast or too slow, maybe something like how hardcore needs work. 

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