Aller au contenu

Photo

Cannot I apply a disease to the PC?


  • Veuillez vous connecter pour répondre
38 réponses à ce sujet

#26
andysks

andysks
  • Members
  • 1 645 messages

Hmm. Did some more tests, on the same dialogue. The results are these. The script, the custom one which calls ActionStartConversation will fire the convo, and the scripts in the convo like gc_rollsave_kl. All good. Then the trigger gets destroyed, and with your correction on if (!GetIsPC(oEnter)) return; companions fire it as well all fine.

 

Because I don't like to leave things unfinished though, I was bumped as to why the DoSpeakTrigger behaves like that. I placed down a normal speak trigger, which had gtr_speak_node in it. Variables set, convo fired, fortitude succeeded, which means it bypassed the failure node. It shouldn't have done this. My testing character has +4 on fortitude and I have set this on the node 25DC for this reason. To fail.

 

I then tried my favorite method as well.

 

#include "ginc_trigger"
#include "ginc_ipspeaker"

void main()
{
    object oPC = GetFirstPC();
    object oEntering = GetEnteringObject();
    location lLocation = GetLocation(oPC);

    if (!GetIsPC(oEntering)) return;
        
    {
        CreateIPSpeaker("rw_enter_speaker","rw_enter", lLocation, 0.5);
        DelayCommand(3.5,DestroyObject(OBJECT_SELF));
    }
}

 

Guess what happened. Same as gtr_speak_node. Now... the CreateIPSpeaker has never failed me. Something's fishy here. I made a search on my NWN2 documents folder for the ginc_trigger with no results. I made one on the installation folder and it found a ginc_trigger in the SoZ campaign folder. Don't know if it was always there and why it should be there. Anyway, even if, there's no way it causes the problem. So that's that I guess. My DoSpeakTrigger doesn't recognise scripts. I could expect it from this function. But CreateIPSpeaker as well? Then I went waaaah?

 

Maybe a copy of your ginc_trigger would be helpful to check anything different. For the time being I will go with the custom script, and hope that it's an one time thing and I won't have to check all previous convos which use DoSpeakTrigger. Because then we are talking about a major undertaking...



#27
andysks

andysks
  • Members
  • 1 645 messages

More test: I checked a convo from quite a while ago. Prologue stuff. I had no idea back then how to create a script so all convos where firing by gtr_speak_node. Perfect place to search. The convo I tested had a gc_check_item, ga_alignment and x0_d1_go_hostile in a sequence. The all fired properly. Now, this was in the second module of the work and the problem we are talking about here on the 8th. I though module properties for some reason, but were all the same.



#28
kevL

kevL
  • Members
  • 4 052 messages

had a look: ginc_trigger is found in Data\scripts.zip and \Campaign_x2 as well. SoZ adds some sort of bark-priority thing in GetIsHighestPriorityNPCinParty(). red herring.

What just struck me: The scripts will fail, while the dialog itself fires up normally, iff the module is not actually getting access to the scripts.

So i'm thinking that your early module has my ga_* scripts, say in its module-folder, or say in a .Hak attached, etc. -- but your newer module doesn't.

TESTer:
1. Do stock ga/gc scripts work in the area mine fail?
2. Do mine fail in the area the stock ga/gc scripts work?

 

 

 

/bleh, that's not it ... have a look anyway i guess

 

here is ginc_trigger fresh from <install>\Data ( but if CreateIPSpeaker exhibits the same behavior, that's prob. not it either )



#29
andysks

andysks
  • Members
  • 1 645 messages

Here are some more results:

 

I made a testing convo where the ipoint/NPC asks the PC if he is male. Response Yes with conditional gc_is_male. And no just like that. They both show, correct. No matter the answer, he will get some xp and Blindness from ga_effect. Both worked... even ga_effect, the most bugged stock script lol. This convo got tested on the same module, same area with all scripts. Even gtr_speak_node fired everything correctly. How's that for a surprise :).

 

The good news for me, is that my stock scripts are not broken. ginc_trigger looks fine there's nothing in overrides etc etc. The disturbing? news is why your scripts don't wanna fire except with an ActionStartConversation... It just makes no sense at all. Does it?



#30
Tchos

Tchos
  • Members
  • 5 030 messages

Personally i think I can figure things out on a case-by-case basis, and I believe Tchos vouches for the integrity of many of the stock dialog scripts that handle things, CreateIPSpeaker() in particular. ( so do i ) EE in fact started a whole thread on this, asking for a "bullet proof" dialog startup.

iirc, there was no firm conclusion. So, KISS (and stock scripts) are best until a glitch shows up.

 

I certainly do vouch for CreateIPSpeaker().  I don't think I was capable of participating in that thread you mention, but my conclusion after learning how to use the ipoint speaker is that the only reasons it wouldn't work would be if it were either being used incorrectly (such as being placed instead of being spawned using the CreateIPSpeaker() function), or if the module load script happened to be imported from one of the official campaigns which set a custom PC leader check to a script from that campaign which wasn't also copied over.

 

The group scripts are also very robust, useful, and flexible, as well as the SoZ loot script.



#31
kevL

kevL
  • Members
  • 4 052 messages


Here are some more results:
 
I made a testing convo where the ipoint/NPC asks the PC if he is male. Response Yes with conditional gc_is_male. And no just like that. They both show, correct. No matter the answer, he will get some xp and Blindness from ga_effect. Both worked... even ga_effect, the most bugged stock script lol. This convo got tested on the same module, same area with all scripts. Even gtr_speak_node fired everything correctly. How's that for a surprise :).
 
The good news for me, is that my stock scripts are not broken. ginc_trigger looks fine there's nothing in overrides etc etc. The disturbing? news is why your scripts don't wanna fire except with an ActionStartConversation... It just makes no sense at all. Does it?


not to me :\

as i say, they work fine here
 
 


The group scripts are also very robust, useful, and flexible, as well as the SoZ loot script.


I'm leary of the group-onDeath-StartConversation function. it's failed a couple of times in the OC. instead, i'll use group-onDeath-ExecuteCustomScript ... and fire up ActionStartConversation(!)

#32
andysks

andysks
  • Members
  • 1 645 messages

The CreateIPSpeaker, I still believe it is one of the most powerful functions out there. And since I got the handle on groups I use them whenever I can. KevL, I still don't leave the matter. Just because it worked one time doesn't mean I don't want to get to the bottom of it. Something fishy is going on in there and it's better to find it now instead of hearing the people complaining about convos not firing once the release comes. ColorsFade told me recently on a conversation of ours, just because you found a work around the bug doesn't mean it's gone. Find it and solve it.



#33
kevL

kevL
  • Members
  • 4 052 messages

i'm out of ideas though, if anyone reading has any notion why ActionStartConversation() allows a/my custom scripts to fire from dialog, but DoSpeakTrigger() and CreateIPSpeaker() don't

 

pls speak up.

 

 

Personally, andy, the first thing I'd do to debug is use the very simple SendMessageToPC() script that i posted above. Attach it to your dialog. Put it in the same folder you have my ga_* scripts. Get the ducks lined up and see if it fires off its chat-message.

 

Beyond that, I'd start replacing #includes with the actual scripting, and put the #include scripting into your trigger's onEnter -- but that's a long and tenuous process, using more and more SendMessageToPC() calls to find out exactly where the code fails

 

 

[edit] but right now i don't think this is a code fail ; I think it's about implementation ... /could be wrong,

 

[edit2] I just don't know what it is.



#34
andysks

andysks
  • Members
  • 1 645 messages

Done this. Script runs on DM is the message I get on every possible fire of the trigger. DM is the ipoint. I changed it to an NPC just in case but nothing changed. Pretty weird stuff. When we say implementation what exactly do we mean? I mean... I only know one way to do such things. Place the script on the OnEnter of a generic trigger. If I had to take things from the start, and by the way we are in a completely different topic since this thread got started :D, it would be like that.

 

Scripts fire from the OnEnter of a generic trigger

Scripts fire from functions of ginc_trigger

DoSpeakTriggerWorks in other words.

 

All these mean that there is no problem with includes I think.

 

Conversation fires normal.

I can reply and everything.

Scripts in conversation work, scripts like gc_is_male and ga_give_xp

Scripts in conversation like gc_rollsave_kl and ga_disease not.

 

EDIT: Did a swap and put the ga_effect you gave me to the succeed rollsave node as well, just in case it works and we just cannot see it because the save succeeds in any case. Didn't work as well.

Then I put the normal ga_effect again and it get the visual but no effect, which was the reason I started this topic I remembered, lol.

 

So both rollsave and effect fail me with ipointspeaker and DoSpeakTrigger. Except... if the function for firing the convo is not linked to the failure of the scripts. Then I am searching on a completely wrong field for the bug. A recompile, new script, new name maybe will fix something? Who knows.



#35
kevL

kevL
  • Members
  • 4 052 messages


When we say implementation what exactly do we mean?

things like, What's in the dialog fields for the script parameters, how are they typed in. What node of the dialog are the scripts supposed to fire from. What are the parameters on the Speaker. Where are the scripts stored and accessed/not accessed. How is the dialog formatted, does it have a clean exit. What order are scripts on any node called if there's more than one. Are tags all in order, any typos.

you get the idea, and we've kinda ruled out all of those.


I still don't know if you can get a simple custom SendMessageToPC() to work ...

#36
andysks

andysks
  • Members
  • 1 645 messages
I normally put the send message between my calls to see if they are all fired. Never worked it as a ga. The one you gave me I just put it as action on the nodes. Anyway. I think I will make a copy of the rollsave script, and add such a debug on it. Then I'll know if it fired and where it broke.

#37
Tchos

Tchos
  • Members
  • 5 030 messages
I'm leary of the group-onDeath-StartConversation function. it's failed a couple of times in the OC. instead, i'll use group-onDeath-ExecuteCustomScript ... and fire up ActionStartConversation(!)

 

I know of one thing that can cause that one to fail, and that's if someone specifies the deathscript as the "DeathScript" variable on the NPC, instead of letting the GroupOnDeathStartConversation function handle it.  I don't know if that's what happened in those OC situations, but I've seen it as the cause elsewhere before.



#38
andysks

andysks
  • Members
  • 1 645 messages

KevL I tested the disease script on a test module with nothing but the testing area. new module etc etc. I tried with CreateIPSpeaker and it didn't fire. Now, I will close this thread because the script actually works with ActionStartConversation, and a working script is what I asked in the first place. The weirdness... will stay for me to explore further in rainy days :). Until the, I will use the function that worked when I want to use these two scripts that seemed to have trouble so to say. (Which is on two conversations so far. It's not so tragic).

 

Thanks again for the ga_ script you gave. Much appreciated, as well as the help and conversation we had on the further problems that occurred :).



#39
kevL

kevL
  • Members
  • 4 052 messages

no prob.

 

just another mysterie