Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
JohnCook1994

Help with NPC Dialogues (UDMF)

Question

Hello there, I have a problem with interactable NPCs, I looked up this link https://forum.zdoom.org/viewtopic.php?f=39&t=52710/

I've done a bit of what he said, here is the dialogue for MAP53, I want to make a townlike setting with NPCs that talk and a merchant.

Spoiler

namespace = "zdoom";
include = "script00";

conversation
{
    //A Civilian of Stannis speaks to you.
    actor = "StannisCivilian";
    page
    {
        name = "Citizen";
        dialog = "Hello there.";
        
    }
}

conversation
{
    //Zofa the Shopkeeper
    id = 2;
    actor = "Zofa";
    page
    {
        name = "Zofa the Shopkeeper";
        dialog = "Welcome to Zofa's Shop, whatcha wanna buy?";
        choice
        {
            text = "Ammo Box";
            yesmessage = "Here's a replenisment of ammo!";
            giveitem = "ClipBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Shells";
            yesmessage = "Here's the wide ranged box!";
            giveitem = "ShellBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Rockets";
            yesmessage = "Thanks, be sure to blow up Cyberdemons!";
            giveitem = "RocketBox";
            closedialog = true;
        }
        choice
        {
            text = "Cell Charge Pack";
            yesmessage = "My my, a wise choice! Burn these baddies up!";
            giveitem = "CellPack";
            closedialog = true;
        }
        choice
        {
            text = "Grenades";
            yesmessage = "Be careful with these, you might hurt youself.";
            giveitem = "FragGrenadeAmmo";
            closedialog = true;

1

 

The problem is, when I test this map on GZDOOM Builder (UDMF format), I can't interact with them. Could somebody help me with that, I would appreciate that. Thank you!

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 1

I already fixed the first npc, I used conversation id 1 on the thing tab on GZDOOM Builder and tried it on the merchant, but nothing happens. is it alright if somebody give me an advice on how to fix this. Here's the decorate file for Zofa

 

Spoiler

actor Zofa 21470
{
  Game Doom
  //$Category Cook NPC
  //$Title Zofa the Shopkeeper
  Health 9000000
  Scale 0.85
  GibHealth -45
  Radius 20
  Height 56
  Speed 15
  PainChance 64
  OBITUARY "%o caught stealing Zofa's goodies."
  SeeSound "fatzombie/sight"
  AttackSound "q1knight/hit"
  PainSound "grunt/pain"
  ActiveSound "grunt/active"
  DeathSound "fatzombie/death"
  MeleeThreshold 64
  MeleeRange 64
  MaxStepHeight 32
  MaxDropoffHeight 64
  MONSTER
  +SOLID
  +NOTDMATCH
  +NOSPLASHALERT
  +NODAMAGE
   states
  {
  Spawn:
        ZOFA AB 10 A_Look
        Loop
  See:
        ZOFA AABBCCDDEEFF 4 A_Chase
        Loop
  Melee:
        ZOFA G 8 A_FaceTarget
        ZOFA H 8 A_CustomMeleeAttack (random(2, 6) * 6)
        ZOFA I 8
        Goto See
  Pain:
        ZOFA J 3
        ZOFA J 3 A_Pain
        Goto See
  Death:
        ZOFA K 5
        ZOFA M 5 A_Scream
        ZOFA N 5 A_NoBlocking
        ZOFA O 5
        ZOFA P -1
        Stop
      Goto See

  }
}
 

 

 

Share this post


Link to post
  • 1
On 3/14/2019 at 3:30 PM, JohnCook1994 said:

Hello there, I have a problem with interactable NPCs, I looked up this link https://forum.zdoom.org/viewtopic.php?f=39&t=52710/

I've done a bit of what he said, here is the dialogue for MAP53, I want to make a townlike setting with NPCs that talk and a merchant.

  Reveal hidden contents

namespace = "zdoom";
include = "script00";

conversation
{
    //A Civilian of Stannis speaks to you.
    actor = "StannisCivilian";
    page
    {
        name = "Citizen";
        dialog = "Hello there.";
        
    }
}

conversation
{
    //Zofa the Shopkeeper
    id = 2;
    actor = "Zofa";
    page
    {
        name = "Zofa the Shopkeeper";
        dialog = "Welcome to Zofa's Shop, whatcha wanna buy?";
        choice
        {
            text = "Ammo Box";
            yesmessage = "Here's a replenisment of ammo!";
            giveitem = "ClipBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Shells";
            yesmessage = "Here's the wide ranged box!";
            giveitem = "ShellBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Rockets";
            yesmessage = "Thanks, be sure to blow up Cyberdemons!";
            giveitem = "RocketBox";
            closedialog = true;
        }
        choice
        {
            text = "Cell Charge Pack";
            yesmessage = "My my, a wise choice! Burn these baddies up!";
            giveitem = "CellPack";
            closedialog = true;
        }
        choice
        {
            text = "Grenades";
            yesmessage = "Be careful with these, you might hurt youself.";
            giveitem = "FragGrenadeAmmo";
            closedialog = true;

1

 

The problem is, when I test this map on GZDOOM Builder (UDMF format), I can't interact with them. Could somebody help me with that, I would appreciate that. Thank you!

 

Double and triple check your curly braces. If you're missing even one of them, the script won't trigger at all.

Share this post


Link to post
  • 1
Spoiler

    //Zofa the Shopkeeper
    id = 2;
    actor = "Zofa";
    page
    {
        name = "Zofa the Shopkeeper";
        dialog = "Welcome to Zofa's Shop, whatcha wanna buy?";
        choice
        {
            text = "Ammo Box";
            yesmessage = "Here's a replenisment of ammo!";
            giveitem = "ClipBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Shells";
            yesmessage = "Here's the wide ranged box!";
            giveitem = "ShellBox";
            closedialog = true;
        }
        choice
        {
            text = "Box of Rockets";
            yesmessage = "Thanks, be sure to blow up Cyberdemons!";
            giveitem = "RocketBox";
            closedialog = true;
        }
        choice
        {
            text = "Cell Charge Pack";
            yesmessage = "My my, a wise choice! Burn these baddies up!";
            giveitem = "CellPack";
            closedialog = true;
        }
        choice
        {
            text = "Grenades";
            yesmessage = "Be careful with these, you might hurt youself.";
            giveitem = "FragGrenadeAmmo";
            closedialog = true;
        }
    }

 

I have made the brackets already. Still doesn't work.......

 

Share this post


Link to post
  • 1

hate to revive a dead thread but I have a copy and paste you can use:

conversation
{
    //A shady outcast of Pheimos speaks to you.
    id = 8; <------ NOTE THAT IS UNREQUIRED IF IT IS THE ONLY MONSTER IN THE LEVEL OF THAT CLASS THAT HAS DIALOG
    actor = "Imp";
    page
    {
        name = "Ally imp";
        dialog = "hey kid u want a shotgun?";
        goodbye = "fuck no you fucking creep!";
        choice
        {
          text = "uhhhh sure?";
          yesmessage = "good choice,kid!";
          giveitem = "Shotgun";
          closedialog = true;
          }
          
    }
}

just replace what I have and you're good to go

Share this post


Link to post
  • 0

Okay, it may sound weird, but here's the problem. I got Zofa the Bloated Butcher Merchant to work, but when I added the citizen of Stannis, he won't do anything. I'll get the code ready. Thank you!

 
 
 
 
 
 
 
 
Spoiler

namespace = "ZDoom";
include = "SCRIPT00";

conversation
{
    actor = "Zofa";
    page
    {
        name = "Zofa the Merchant";
        dialog = "Welcome to my shop, want browse?";
        link = 2;
        goodbye = "Thanks, bye.";
        choice
        {
          text = "Yeah!!!!!";
          yesmessage = "good choice,kid!";
          giveitem = "Shotgun";
          closedialog = true;
          }
          
    }
}

conversation
{
    actor = "StannisCitizen";
    page
    {
        name = "Citizen";
        dialog = "Hello there.";
        goodbye = "Later!.";
    }
}     

 

Just help me with this please, I appreciate it!

Share this post


Link to post

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
×