Jump to content

What am I doing wrong here?

Not a Bug 1.5.0

J-sleazy182
J-sleazy182

Posted

It states that there is an "unexpected character" in the permission and the command. I'm just trying to create an NPC to sell tanks using the TankCommander mod.

"2": {
    "Message": "Alright, that'll be $100,000",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "Sounds good! Here is $100,000.",
        "Needs Permission (null = No)": talkingnpc.buytank,
        "Player Commands": [],
        "Server Commands": [spawntank],
        "Next Message (null = Close UI)": 6,
        "Price": 100000,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": 7,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      },

Razor

Posted (edited)

strings must be wraped             "Needs Permission (null = No)": "talkingnpc.buytank",           "Server Commands": ["spawntank"],  

Edited by Razor
  • Like 1
Razor

Posted

Changed Status from Pending to Not a Bug

J-sleazy182

Posted

Okay, that worked, and my vendor spawned in; however, I am unable to select any options upon speaking with the NPC. The options are there and say exactly as I wrote in the config; however, when they are clicked on, nothing happens. Also, when pressing the corresponding numbers on the keyboard for the options, nothing happens.

Razor

Posted (edited)

when you click on them they will go to what you have set in         "Next Message (null = Close UI)": 6,    the example you showed above is message 2 i would suggest positing in the open discussion thread to get some help from members who have had more experience editing and creating json's
 

Edited by Razor
J-sleazy182

Posted

That's exactly how I have it set up, yet none of the options are working. Here is my entire config.

Here's my entire conversation file:

{
  "0": {
    "Message": "Welcome to our mechanic shop! We mostly specialize in armoured combat vehicles.",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "I would like to buy am armored combat vehicle.",
        "Needs Permission (null = No)": "talkingnpc.buytank",
        "Player Commands": [],
        "Server Commands": [],
        "Next Message (null = Close UI)": 1,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      },
      {
        "Message": "I am just browsing.",
        "Needs Permission (null = No)": null,
        "Player Commands": [],
        "Server Commands": [],
        "Next Message (null = Close UI)": 3,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      }
    ]
  },
  "1": {
    "Message": "We just finished restoring a tank from scrap pieces that we found up near Launchsite, interested?",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "I would like to buy the tank.",
        "Needs Permission (null = No)": null,
        "Player Commands": [],
        "Server Commands": [],
        "Next Message (null = Close UI)": 2,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": 1,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      }
    ]
  },
  "2": {
    "Message": "Alright, that'll be $100,000",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "Sounds good! Here is $100,000.",
        "Needs Permission (null = No)": "talkingnpc.buytank",
        "Player Commands": [],
        "Server Commands": [
          "spawntank"
        ],
        "Next Message (null = Close UI)": 4,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": 5,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      },
      {
        "Message": "I changed my mind.",
        "Needs Permission (null = No)": null,
        "Player Commands": [],
        "Server Commands": [],
        "Next Message (null = Close UI)": 3,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      }
    ]
  },
  "3": {
    "Message": "Let me know if there's anything I can do to help!",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": []
  },
  "4": {
    "Message": "Go get your ride before someone steals it and please stop by again.",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "See you later.",
        "Needs Permission (null = No)": "talkingnpc.buytank",
        "Player Commands": [],
        "Server Commands": [
          "spawntank"
        ],
        "Next Message (null = Close UI)": null,
        "Price": 100000,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      }
    ]
  },
  "5": {
    "Message": "I am sorry you do not have enough money.",
    "Message Display Time (seconds) - Only used if there are no responses": 2.0,
    "Responses": [
      {
        "Message": "I will come back later.",
        "Needs Permission (null = No)": null,
        "Player Commands": [],
        "Server Commands": [],
        "Next Message (null = Close UI)": null,
        "Price": 0,
        "Currency": {
          "Item ID": 1,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 0,
        "Server Wide Cooldown": false
      }
    ]
  }
}

Razor

Posted (edited)

so if you click on "I would like to buy am armored combat vehicle"  its not moving to "We just finished restoring a tank from scrap pieces that we found up near Launchsite, interested?" ??

Edited by Razor
J-sleazy182

Posted

No, the first page of options are there, but when they are clicked on, nothing happens. 

 

 

Razor

Posted (edited)

32 minutes ago, J-sleazy182 said:

No, the first page of options are there, but when they are clicked on, nothing happens. 

 

 

 

when i click on them they are working for me using your posted json

Edited by Razor
J-sleazy182

Posted

I don't know what the issue is, I've tried everything except editing the CS file

J-sleazy182

Posted

It seems that when I try to use the tank mechanic vendor, it is searching for a previous npc I created and then removed that was named "tank". This pops up in the console when the chat options are clicked.

image.png

Razor

Posted

3 hours ago, J-sleazy182 said:

It seems that when I try to use the tank mechanic vendor, it is searching for a previous npc I created and then removed that was named "tank". This pops up in the console when the chat options are clicked.

image.png

Delete your talkerspawns.json file to refresh the npc and recreate them  most likely caused an error when you had the invalid json.

 

  • Like 1
2m

Downloads

Total number of downloads.

9.6k

Customers

Total customers served.

140.3k

Files Sold

Total number of files sold.

3m

Payments Processed

Total payments processed.

×
×
  • 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.