Aller au contenu

Photo

Party Chat


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

#1
andysks

andysks
  • Members
  • 1 654 messages
I saw on the X2 modules, that they don't use the gc_skill_rank and so on on the NPC node, but on the PC.
There is no success and failure node after that.
I like to use the skill checks on the NPC node. What I mean is:

PC NODE: (Diplomacy) blah blah blah
NPC NODE: (Success)
NPC NODE: (Failure)

on the NPC node, I have the gc_skill_rank, and it sees if the PC had a success or not. However, it doesn't work on party chat. It seems that the SoZ, the moment that you have a diplomacy option on a dialogue shown, you have already passed the check. I don't want this.

Can someone tell me why the gc_skill_rank on the NPC node doesn't work with party chat, and if there is a workaround to offer success and failure nodes on party chat?

#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You need to use the script with the d20 check in it, ('gc_skill_dc'?). gc_skill_rank returns true if the PC has the requisite number of skill ranks, no roll involved.

How exactly is your conversation failing, though? Is it just ending abruptly, or is it always passing or always failing the check?

#3
andysks

andysks
  • Members
  • 1 654 messages
It always passes a fail if the companion tries to use diplomacy. I checked it specifically for it. The gc_skill_rank was checking for 1, and companion had 4.

The roll, do I use it on the NPC or PC node?

#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
The party chats do it on the PC node because they're checking the different PCs' (companions) stats, while the NPC node must just check the party-leaders stats. Technically, the scripts use GetPCSpeaker, which I guess the SoZ team rigged up to point to the actual party member speaking that particular line, and not the PC that initiated the conversation.

Your convo, as far as I can tell, is still checking the player's PC's diplo, not the companions. You might have to rig up a special script to check the comp's stats instead of the player's PC.

I'll go poke around in the scripts, and see what I can find.

EDIT: GetPCSpeaker seems pretty straightforward, I'd just remake the script with the more robust GetTarget function from ginc_param_const and add in a parameter for companion tag to the gc_script.

Modifié par Lugaid of the Red Stripes, 29 décembre 2013 - 09:15 .


#5
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
Those scripts use GetPCSpeaker(). So regardless of the node they check the PC.

Regards

Modifié par Kaldor Silverwand, 29 décembre 2013 - 08:52 .


#6
andysks

andysks
  • Members
  • 1 654 messages

Lugaid of the Red Stripes wrote...


EDIT: GetPCSpeaker seems pretty straightforward, I'd just remake the script with the more robust GetTarget function from ginc_param_const and add in a parameter for companion tag to the gc_script.


This could prove impossible to predict. By my calculations, by the end of this campaign there will be around 15-20 available companions to recruit. So the tag param... yes. :blink:

#7
kamal_

kamal_
  • Members
  • 5 259 messages
There is a function that calls whomever interacted, GetLastSomething I think. Make a copy of the script, replace with that.

object oPC=GetSomething()....

that would be the only edit needed, as you'd define the "PC" in the script to be whichever party member is making the interaction.

#8
Claudius33

Claudius33
  • Members
  • 258 messages
This is the script I use in my campaigns. The main loop returns the highest skill value of the party (ie PC + all companions currently in the party) for a specific skill (variable n). It's a conditional thats works like gc_skill_rank, except it tests all the current party. It can be easily adapted to a script wotking like gc_skill_dc. 

It has two int parameters :
  • nSkill : the skill to test
  • nRank : the threshold to equal or pass
// check party skill

/* skill ints
  0 APPRAISE
  1 BLUFF
  2 CONCENTRATION
  3 CRAFT ALCHEMY
  4 CRAFT ARMOR
  5 CRAFT WEAPON
  6 DIPLOMACY
  7 DISABLE DEVICE
  8 DISCIPLINE
  9 HEAL
10 HIDE
11 INTIMIDATE
12 LISTEN
13 LORE
14 MOVE SILENTLY
15 OPEN LOCK
16 PARRY
17 PERFORM
18 RIDE
19 SEARCH
20 CRAFT TRAP
21 SLEIGHT OF HAND
22 SPELL CRAFT
23 SPOT
24 SURVIVAL
25 TAUNT
26 TUMBLE
27 USE MAGIC DEVICE
*/

#include "ginc_param_const"

int StartingConditional(int nSkill, int nRank)
{
     int nSkillVal = GetSkillConstant(nSkill);
     object oPC = GetFirstPC();
     int n = GetSkillRank(nSkillVal, oPC);
     string sRoster = GetFirstRosterMember();
     int p;
    object oNPC;

    while (sRoster != "")
    {
         p = 0;
         oNPC = GetObjectByTag(sRoster);
         if (GetFactionEqual(oPC, oNPC)) p = GetSkillRank(nSkillVal, oNPC);      // if in party
         if (p > n) n = p;
         sRoster = GetNextRosterMember();
     }
     
     if (n >= nRank)
        return (TRUE);
    else
        return (FALSE);
}

Hope it helps.

Modifié par Claudius33, 29 décembre 2013 - 10:50 .


#9
Tchos

Tchos
  • Members
  • 5 079 messages
For reference, there is already a gc_ script that checks the speaker's tag, used for companion lines, in the SoZ campaign folder.

Also, according to the SoZ party chat documentation, the idea of setting up the conversations with the checks on the PC line is that it only shows the special options if the character would succeed at them, and there is no "failure" option for a skill check in the SoZ conversations. This is the same mechanic that allows you to have different spoken options for different party members, based on their stats, skills, alignment, etc. The lines appear for them, but not for the others.

#10
andysks

andysks
  • Members
  • 1 654 messages
Claudius: Do you use this script with party chat or it will just check the stats on a normal convo and return true if one of the party has the required rank?

Tchos: Yes, I figured. I read the documentation, and saw how they used it in SoZ. It's not so bad... it also gives some satisfaction to the player the moment he sees the dialogue option for bluff let's say, thinking "yes, good thing I put some points there".
If I cannot make it with success and failure, I will go this way of course. I was just wandering... for the shake of more dialogue options and suspense :).

#11
Claudius33

Claudius33
  • Members
  • 258 messages
Correct : I use the script in a normal convo. It returns true if one member of the current party has the required rank.

#12
andysks

andysks
  • Members
  • 1 654 messages
I remembered now that ToEE uses the same system as SoZ. You will get the convo option only if you have a high enough rank, and it is automatic success. Also in the OC, the "wisdom" dialogue option work like that I think. So, I think after all it's not so bad. I will maybe use both, just a success/failure in a non party dialogue. Thanks for the info on how the thing works.