[BUG REPORT] (I think) Interacting with npc that have 'with' in their name

Hi there, I am still frankly new to the quest forums and apologies if my report is either at the wrong place or not written according some standards. I try to make it understandable with a screenshot.

Backstory: I wanted to build a game that, if you enter a part of the game, like a forest, there is a 20% chance to spawn a monster. If said monster spawns, it has a chance to spawn as male, female or others. Imagine pokemon and spawning as either male or female. Basically the same deal.

Here the thing, (I wont go too much into detail as the game goes into 18+ territory) but whenever it choses a gender it changes the gender, as well as the alias of the npc, so it displays at the Places and Objects accordingly.
I also use a different approach in how I interact with people. Instead of directly using "look at" "talk to" and all that, all you see is "interact with" which THEN opens up a menu that has all the things you can do with said npc. I like it that way as it gives me the opportunity to change the menu list dynamically.

[Problem] The problem is, as soon as the npc.alias has "with" in their name (example: guy with gun), and I click interact with, it thinks that I want to combine things with each other and therefor gives me the response "That doesn't work." See attachment for screenshot.

https://cdn.discordapp.com/attachments/1070011252912439347/1127529046000017488/image.png

[Test NPC had a button that rerolled the other npc's gender. That is why you see 'use testNPC' multiple times.]

Now to the question: Can you please either fix the bug so we can use 'with' and other words in alias or provide a workaround to be able to have 'with' in the name without breaking code?

I hope this helped. Please write a comment if there is any questions.

[EDIT] I see that I posted in Site Announcements and Feedback. My apologies. If possible to drag my post where it belongs, or inform me to delete this old post and repost to the right section. I'm sorry for the inconvinience


I would guess that your interact command has a pattern that allows both "interact with #object#" and "interact with #object# with #object2#" versions.

If this is just the default verb pattern, I would suggest changing the command's pattern. I believe you can edit verbs if you have the desktop version of the editor. If you're using the web editor, it's a little harder because for some reason verbs don't appear in the editor. In this case, you would need to work out of the name of the verb and include a change in your start script.

I would suggest something like:

interactwith.pattern = "^interact with +(?<object>.+)$"

or if you still want it to be a multiverb, just not using "with", you could do:

interactwith.pattern = "^interact with +(?<object>.+?)( using (?<object2>.+))?$"

(This is assuming the verb is named interactwith; just change that to whatever its name is)


"] I see that I posted in Site Announcements and Feedback. My apologies. If possible to drag my post where it belongs, or inform me to delete this old post and repost to the right section. I'm sorry for the inconvinience"

Done, somewhat belatedly.


Would it be an easy fix to just have a convention of abbreviating "with" in the aliases? "Man w gun" I don't know if an alias will accept a special character. "Man w/gun". Or even "Man holding a gun"

It sounds like an interesting system. The menu for interacting with NPCs!


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums