Jump to content

Looking for a little help on finding a way to fire Dialogue and AI package.


Raider1

Recommended Posts

Hopefully this is the right place if not Sorry, Mods feel free to move it or delete.

 

I'm working on a custom nightclub that will have entertainers.   I've looked over the Tops quests and scripts, which has given me some guidance but the one thats really vexing me is the singer.  

 

what I want to happen is once the Courier enters the Club,  the singer either appears on stage or an Ai travel package is fired sending the singer to the Ref Mark on the stage.  

 

when the next stage is set, the Song is used in place of dialogue.  

 

I've set up the file as a Topic, but not sure if that will work. 

 

after alot of searching, the closest thing I have seen that might work to fire an AI package from with in the quest looks like using a Quest variable search in the Package.  But then a set stage will have to be fired to move the dialogue to the song which suggests that I would need to find a way to time the switch to the completion of the travel package. 

 

Being a poor scripting, I stare at this stuff till I am Cross eyed.  So any suggestions, help or links would be welcome. 

Link to comment

The first question is this: Where is the singer going to be other than on stage?

 

What I would like to do is have the singer hang out at the bar or at one of the Casino tables till the performance.  once triggered, move to the stage then fire off the song stage of the quest.

 

 

once I get the basic triggering and stuff  down, I would like to have the performance reoccur on a timer and use the regular AI packages in between. 

 

thanks for the reply

Link to comment

I have a simple trigger set up to trigger the song quest at the moment. 

 

I'm not even sure that using a check Variable would be the right thing.  Maybe have the package check the quest stage, or  just write a script to handle the entire affair. 

 

 

Link to comment

I copy pasted you the missing messages since the new site is going to die

 

 

 

 

sorry about the long delay, Family medical emergency.

 

 

 

What I have set up is a "onplayer enter" Trigger that supposed to trip the dialogue. one line of dialogue has a end script that is supposed to activate the travel package of the singer NPC so she arrives at the stage. then the goodbye topic is supposed to set off the singing portion which is a topic in a second dialogue quest.

 

 

 

so far nothing happens when the player enters the trigger which is set up around the teleport door marker.

 

 

 

 

0

A.J.

 

Feuerschwinge

A.J.

Contributor

428

1560 posts

 

Posted Tuesday at 05:04 PM · Report post

 

There's many ways to do that. There are some ways that reduce drastically the whole scripting, if you don't like it. Problem is, when it comes to packages and triggered events, having an external quest with a GameMode script that continuously checks what's happening would be a very good way to avoid issues.

 

 

 

Said that... Excuse if I'll write something redundant to you, it's better explaining from start.

 

Create a quest, something like MyQuest, set Start Game Enabled, set Script Delay to Default.

 

Create a script, something like MyQuestScript, set the script as Quest on the top dropdown menu, so you can attach it to the above quest

 

Inside the script, just put the name and declare a variable, something like this:

 

SCN MyQuestScript

 

int bTrigger

 

 

 

I also assume you created a NPC and named its istance as MyNPCREF. This NPC will have different AI packages, based by what you want it do to. I assume the npc is near some tables, sandboxing. So, the first AI package on the list will be a SandBox Package with not a long range, something like 300-500. If I want to avoid issues, I'll unflag the ability to sit down / use furnitures, stuff like that, so she simply walks few steps and eventually speaks if she encounters other NPCs. This package will have a condition, GetQuestVariable MyQuest bTrigger == 0.

 

The second package she'll have, it could be a Dialogue package, so that she'll approach you and start with a GREETING topic. This package will be conditioned with GetQuestVariable MyQuest bTrigger == 1

 

The last package will be a travel package to the destination, probably you must drop a X-Marker near the microphone and set it as destination. This will be conditioned with GetQuestVariable MyQuest bTrigger == 2.

 

 

 

Now you can draw a trigger box (be very careful when you create one, click on Create New, if you use an existing one you risk to make mess even if you'll change it later), double click on the box and flag it as Persistent reference, attach an object script with something like this:

 

 

 

SCN MyTriggerScript

 

 

 

Begin OnTriggerEnter Player

 

if bTrigger == 0

 

Set MyQuest.bTrigger to 1

 

MyNPCREF.EVP

 

endif

 

End

 

 

 

What will happen is that the variable will be set to 1 when the player will enter the trigger box, EVP will make the npc to re-evaluate its own packages. Inside the dialogue end you will put:

 

Set MyQuest.bTrigger to 2

 

MyNPCREF.EVP

 

 

 

Which means that the npc will now move to the microphone.

 

This should cover the first part of your problem.

 

 

 

As you can see, conceptually the whole thing is pretty easy, but the realization could be overwhelming. Especially when you have issues, like the npc is supposed to change package but she doesn't, in that case you must debug via console.

 

 

0

 

Edit

Options

 

A.J.

 

Feuerschwinge

A.J.

Contributor

428

1560 posts

 

Posted Tuesday at 05:10 PM · Report post

 

I can't edit the previous post.

 

 

 

Among the possible issues you can encounter, there's the fact that OnTriggerEnter *could* skip the very first frame if the trigger box is on the door, it would be suggested to put the trigger box a bit more far away.

 

To narrow down why a npc is not doing what you expect, you can use console. For example, if you follow the above post, you'll see the npc is supposed to change from sandbox to dialogue to travel package. If the npc stopped, it doesn't mean that the package isn't changed, it could mean that the npc isn't re-evaluating. To understand that, click on the npc and DISABLE / ENABLE on console. When you enable it, it will tell you which package he just evaluated. So, if you find that the issue is the re-evaluation itself (happened often to me), you can change EVP with RESETAI: this will make the npc a bit "jumpy", but usually it doesn't fail.

0

 

Edit

Options

 

Raider1

 

Member

Raider1

Members

0

25 posts

 

Posted yesterday at 05:25 AM · Report post

 

 

On 5/7/2016 at 5:04 PM, A.J. said:

 

There's many ways to do that. There are some ways that reduce drastically the whole scripting, if you don't like it. Problem is, when it comes to packages and triggered events, having an external quest with a GameMode script that continuously checks what's happening would be a very good way to avoid issues.

 

 

 

Said that... Excuse if I'll write something redundant to you, it's better explaining from start.

 

Create a quest, something like MyQuest, set Start Game Enabled, set Script Delay to Default.

 

Create a script, something like MyQuestScript, set the script as Quest on the top dropdown menu, so you can attach it to the above quest

 

Inside the script, just put the name and declare a variable, something like this:

 

SCN MyQuestScript

 

int bTrigger

 

 

 

I also assume you created a NPC and named its istance as MyNPCREF. This NPC will have different AI packages, based by what you want it do to. I assume the npc is near some tables, sandboxing. So, the first AI package on the list will be a SandBox Package with not a long range, something like 300-500. If I want to avoid issues, I'll unflag the ability to sit down / use furnitures, stuff like that, so she simply walks few steps and eventually speaks if she encounters other NPCs. This package will have a condition, GetQuestVariable MyQuest bTrigger == 0.

 

The second package she'll have, it could be a Dialogue package, so that she'll approach you and start with a GREETING topic. This package will be conditioned with GetQuestVariable MyQuest bTrigger == 1

 

The last package will be a travel package to the destination, probably you must drop a X-Marker near the microphone and set it as destination. This will be conditioned with GetQuestVariable MyQuest bTrigger == 2.

 

 

 

Now you can draw a trigger box (be very careful when you create one, click on Create New, if you use an existing one you risk to make mess even if you'll change it later), double click on the box and flag it as Persistent reference, attach an object script with something like this:

 

 

 

SCN MyTriggerScript

 

 

 

Begin OnTriggerEnter Player

 

if bTrigger == 0

 

Set MyQuest.bTrigger to 1

 

MyNPCREF.EVP

 

endif

 

End

 

 

 

What will happen is that the variable will be set to 1 when the player will enter the trigger box, EVP will make the npc to re-evaluate its own packages. Inside the dialogue end you will put:

 

Set MyQuest.bTrigger to 2

 

MyNPCREF.EVP

 

 

 

Which means that the npc will now move to the microphone.

 

This should cover the first part of your problem.

 

 

 

As you can see, conceptually the whole thing is pretty easy, but the realization could be overwhelming. Especially when you have issues, like the npc is supposed to change package but she doesn't, in that case you must debug via console.

 

 

 

thanks for the help,

 

 

 

since my way wasn't working I tried testing yours.

 

 

 

setting up the int Btrigger worked fine, setting up the conditions for Btrigger, 0 through 2 worked fine.

 

 

 

setting up the trigger script, got error messages that Btrigger was an error and NPCref was not valid.

 

 

 

should I use a Short or Var command to set the variable?

 

 

 

I'm sure its something simple I'm screwing up. trying to script makes my eyes cross most of the time LOL

 

 

 

 

0

A.J.

 

Feuerschwinge

A.J.

Contributor

428

1560 posts

 

Posted yesterday at 06:50 AM · Report post

 

Quoting myself:

 

Quote

 

 

 

I also assume you created a NPC and named its istance as MyNPCREF

 

You create a NPC, you drag and drop it inside the render window, to position it in the game. When it is in the position you like, you double click on it so that it will open its window, you'll be able to write its reference name on the top line.

 

As example, if you want take a look at Sunny Smile inside the Prospector: her base ID is something like GSSunnySmile, it's the name you filter to find her form, but her reference ID should be something like SunnySmileRef >>> you can see it if you double click on her in the render window - well, you need to set this, the reference name. 99% of times that you'll need to refer to your npc via script, you'll do it with the reference name and not the base ID.

 

 

 

Hope I explained well, I just woke up

0

 

Edit

Options

 

Raider1

 

Member

Raider1

Members

0

25 posts

 

Posted yesterday at 07:16 AM · Report post

 

 

On 6/7/2016 at 6:50 AM, A.J. said:

 

Quoting myself:

 

 

 

 

 

You create a NPC, you drag and drop it inside the render window, to position it in the game. When it is in the position you like, you double click on it so that it will open its window, you'll be able to write its reference name on the top line.

 

As example, if you want take a look at Sunny Smile inside the Prospector: her base ID is something like GSSunnySmile, it's the name you filter to find her form, but her reference ID should be something like SunnySmileRef >>> you can see it if you double click on her in the render window - well, you need to set this, the reference name. 99% of times that you'll need to refer to your npc via script, you'll do it with the reference name and not the base ID.

 

 

 

Hope I explained well, I just woke up

 

Actually it was me that didn't explain it well LOL. I just used NPCref because of your example. the Actual NPC in my mod is TC1clubsinger and for some reason when I tried adding it as you suggested using the ref followed by .EVP GECKPU says its not a valid reference, though persistence is checked.

 

just as it kicks back the Btrigger as invalid in the trigger script, but accepts the NPC and the bTrigger Var in the package conditions and the quest script.

0

A.J.

 

Feuerschwinge

A.J.

Contributor

428

1560 posts

 

Posted 22 hours ago · Report post

 

because I did a syntax error, sorry:

 

SCN MyTriggerScript

 

 

 

Begin OnTriggerEnter Player

 

if MyQuest.bTrigger == 0

 

Set MyQuest.bTrigger to 1

 

MyNPCREF.EVP

 

endif

 

End

 

 

 

 

 

However, if MyNPCREF is not valid, there must be a syntax error in the ref name you've put, I'd try to copy/paste eventually.

 

PS, if you're copy pasting from here, I'd suggest first to paste on a notepad and not directly on GECK

 

 

Link to comment

Thanks for the Copy/paste and thanks for the help.    It turns out, that it wasn't just your mistake either.   LOL  I had made a couple of syntax errors of my own, once that was corrected The trigger fires off the travel package, the dialogue topic doesn't work but I'm going over it since its probably some minor error I made.  

 

just one other question, do you know any reason why Idle markers would suddenly stop playing their idle animations?  a  couple of NPC's follow their patrol and travel packages, stop at the right idle markers along the way, then head on with out playing any of the animations?  the idle animation times and patrol idle times have not changed, one day they worked the next nothing.

Link to comment

Hard to say, I'd need to inspect the mod itself.

 

But I can tell you my personal experience, which corresponds in stating something definetely obvious... because troubles on GECK often are, very obvious. When I started, I fought a lot with packages and scripts and everytime something wasn't working I was double checking and everytime I was like "oh come on, it makes no sense. I did everything correct and it must work", and usually after 2-3 days, or one week at worst, I was finding that it was my mistake, it wasn't correct at all. It can be definetely frustrating, but it's also part of the game.

What I mean is... excluding some issues typical of the game engine, and with experience you'll know them and know how to workaround, 99% of the times if something doesn't work is your own fault, and if double checking the issue doesn't come out, all you can do is sleeping over it and retry the next day and the day after, and if it still doesn't work then post the ESP here, because 4 (or more) eyes are better than 2. I'm usually fine in inspecting during weekend.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use