Eguintir Eligard wrote...
Oh and embarrassing admission I guess. I never learned how to turn on debugging messages? How do I do that?
you don't have to if you go with SendMessageToPC(GetFirstPC(FALSE), "this is happening now!") <- chat window
The 'other' debug ( eg. PrettyDebug() ) sends messages to a logfile in the NwN2 temp directory...
as to the rest, well... If you want to work through a generic dialog-starter, personally I'd start in 'ginc_ipspeaker', grab CreateIPSpeaker() and its affiliates, rename them rewrite them, tweak them into my own brand new #include file
and go from there. But it too is likely to have limitations, eg the delay I suggested above when first entering areas ( especially when loading from other modules ). but it might work fine; i haven't teased that stuff enough to say for sure,
- except it's not bulletproof. / shrug /
Eguintir Eligard wrote...
So you think an area Hb that keeps running the dialog until it detects a boolean that the dialogue has begun is the best way (aka the infinite loop until sucess)? I did this for Islander in spots but I thought it was clunky and I wanted to run a little cleaner this time. But it certainly sounds superior to an IP speaker that only tries twice. So I go with the loop then?
I think the area_HB is a more stable way to start a dialog than the ClientEnter script, yes. Any clunkiness can be minimized drastically with that simple boolean at the top of a HB script, it seems to me.
About loops: notice that little function "void ee_StartDialog(object oEnter)"? that can
easily be looped ... ie, parsed, expanded, and looped.
I wonder if I could cleanly do this off an IP speaker HB instead. And then make a blueprint with variables to set the name of the conversation when I call the creation. That way it isn't restricted to the area, or shall I say connected. The speaker can be the speaker initiator. But still with the loop as said above. Is that a sound method in theory?
tl;dr : what Tchos said.
There are plenty of places in the OC where the Ipoint is down and ready to go. Offhand I'm thinking of the Battle at the Gates. OEI put a lot of effort into Ipoint dialogs, so you probably should hunt through the OC to see what they did -- even better if you can find Ipoint usage in MotB, which feels more solid at starting convo's. ( not sure what the difference if any is tho )
Just remember that the IPSpeaker has to be already placed down for its HB to fire up in the first place. It strikes me as a good idea; make a template with the right scripts already assigned, so that when building you just plonk one down and give it the string_var of whichever dialog file it starts up. But again you're dealing with a heartbeat script (which is basically a loop), and there should be lots of checks (see 'ginc_ipspeaker'), and the more I think about it you might end up with a bunch of IPSpeakers running HB scripts *all the time*
- or instead of placing them when building, create them from triggers/onEnters/etc, but then we're back at CreateIPSpeaker().....
The one thing I would change though is depending on 2 scipts. 1 being the HB script, and the other having to remember to set a variable in the conversation. I like to eliminate dependency when possible.
What about:
- The Ip speaker tries to start a conversation.
- It loops until it detects that itself is in conversation, then stops. This is critical because the IP speaker only has one possible person to speak to and one conversation to engage in. (If I detected the PC in conversation it could screw it up because it may be a different conversation the PC is engaged in [such as with a companion or other npc] ).
What do you think, any holes in that approach?
Not if, as you imply, the conversation writes the Stop flag to the IPoint itself that started the conversation, and the heartbeat then checks that IPoint for its flag: limit of one dialog per Ipoint ofc -- without screwing up the simplicity that is.
even with this back&forth about loops, I still think there are reliable ways to start conversations on the first try. I mean, obviously there are. I'm sure it becomes an issue only under special circumstances, like entering an area, or like LotRS said, at the end of combat ( i don't trust that groupondeath startconversation function, and will executeCustomScript onGroupDeath instead, btw )
ps. I'm scratching my head trying to remember where I saw a group of variables, that include all the usual bCutsceneBars etc, but has more options like run to speaker etc ...... right: DoSpeakTrigger() in 'ginc_trigger', which has a few more ideas that may help in bazooka-proofing.