Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Dialogue System Bug

A topic by aklgupta created Mar 12, 2020 Views: 482 Replies: 10
Viewing posts 1 to 9

I am getting this bug repeatedly. It asked me to report the bug, so here you go.

(1 edit)

I am unable to progress any further. Talking to any NPC is resulting in the same error. I am playing Verdant Village V0.12 Windows.

Developer

Good to know thanks, I’ll look into his dialogue. I’m curious, when you say repeatedly do you mean literally every time you talk to Sven? Or is it just happening frequently? Also is it only Sven or can you recall other characters that you’ve run into this with? Thanks for taking the time to post this, it’s appreciated.

Every time I try talking to any NPC. I can not talk to any NPC.

Also, I noticed something. When talking to Sven, it is Sven who says these set of dialogues, but when talking to other NPCs, it's the player who says "Oops, you've encounters a bug...", if that means anything.

This bug first appeared when I tried talking to Sven for the first time. By then I already had the Forge quest for Sven, and a few others, in case they are the trigger.

Developer

Thanks for that information, I’m currently looking around in the code. That’s extremely odd that you can’t talk to anyone. That prompt is only there to catch the occasional odd error, usually caused by me misnaming a key somewhere. The fact that you can’t talk to anyone seems nuts to me. There is one potential issue that started in 0.12 that will be fixed in the next patch but I can’t be certain it’s the cause.

One other question that slipped my mind before, if you don’t mind. Did you start this game in V0.12 or did you patch up from a previous version? In case you haven’t seen it, if the game patches you’ll get a black screen when you load your save and it will say “patching game” in the bottom right. Then when everything does load you get a prompt that says “welcome to patch 0.whatever”.

Downloaded a fresh copy of the v0.12 today.

Could it be that once this error is triggered, it somehow is corrupting all dialogues? Maybe it is disabling all dialogues?

Sorry if I am meddling, but as a developer myself, I'd suggest to look for alternatives to any text based keys, if possible. I have no experience with or any idea about construct, but I am quite sure there must be a way. I recently developed a dialogue system for my new project as well, so I understand that it can be a bit challenging and time consuming, but it will be worth it, saving you from a lot of possible headache.

Developer

Good to know, interestingly I downloaded the game from the itch a half hour ago or so and ran it from a fresh save and loaded from an old version. Both times dialogue functioned fine, couldn’t get a single error to trigger no matter how many times I spammed conversations. Based on the number of downloads I have to assume this is some sort of weird isolated error, or the people playing are just very quiet. That obviously isn’t a reason to ignore it however, since its a pretty massive issue.

I suppose its possible that the dialogue entries are getting corrupted. I’ll double check the code, but I can’t think of a single thing that alters regular dialogue. Once a player name and gender are picked the game basically sets the entries and then doesn’t touch them again. Things like quest dialogue are stored in their own array, and I don’t think they ever interact with the regular dialogue system. Which means there shouldn’t be any chance of accepting or completing quests effecting dialogue.

As for meddling, nah, don’t worry about it. I’m happy that you’re willing to have a conversation and offer suggestions. I don’t think I’ve said it yet, but I’m sorry it broke on you, I can imagine how frustrating it is. With any luck I can patch the issue without you losing your save.

As far as the dialogue system itself and how it’s coded there may be a better way, but I’d have to think on it. It would also likely require ripping out massive chunks of the engine, so I’d like to avoid it if possible. I’ll see if I can give you a brief overview since you seem interested.

Basically, every conversation in the game is stored in a key/value system. The value is the text that the player sees and the key is a compiled set of values that comprise a string. Every time you talk to an NPC it takes a few variables into account, what season it is, where the NPC is in the world, what the weather is, etc.

Using these values the game checks all the dialogue keys related to that NPC and pulls keys from the list based on the state of the previously mentioned variables. For instance it only pulls keys with the word “Rain” in it when it is raining. Once it has a list of keys it picks one at random and grabs the associated dialogue.

Usually when you get that error message it’s because one of the keys had a typo or something that then gets referenced and it returns a 0 instead of the dialogue. The fact that you are getting that message literally every time you talk to anyone would mean that every key in the game has been tampered with or maybe the key data is just gone entirely, but I can’t think of anything that would do that. Like I said before its pretty much set it and forget it.

Still going to keep looking though. Like I said before there was a bug that got introduced in 0.12 that I noticed yesterday. It relates to the key system and due to the nature of it I could see it somehow tearing up the dialogue system. I plan to upload 0.13 today instead of tomorrow anyway since the game is featured and I’d rather not wait to push bug fixes. The patch will address some other things as well but I’ll be curious to see if it fixes your issue. Assuming I remember I’ll post in this thread once it’s been uploaded.

It could be some specific series of events that cause this issue, which might explain why I am the only one running into this issue, though it's hard to imagine what can cause such a bug only when performing some specific sequence of events. If you want, I can share my save game. Just lemme know f you want it.

I suppose its possible that the dialogue entries are getting corrupted.

I believe so too. Else other NPCs should still be able to talk to. Also, the weird thing that with all NPCs it the player informing about the error, but only with Sven it's him who informs about the error. And it was the first time I tried talking to Sven when the issue was first triggered.

Maybe, you can do a quick search to all the references to the keys, and see if they are being edited anywhere where they shouldn't be. Or, maybe these "conditions" that you are using to generate the keys could be the issue. Is gold amount, or resources/inventory, or open quest being used to generate the key?

With any luck I can patch the issue without you losing your save.

That would be awesome. I hardly get anytime to play (life of an Indie game developer, guess you might know), so I'd hate having to restart from scratch and pray that I don't run into the issue again.

Using these values the game checks all the dialogue keys related to that NPC and pulls keys from the list based on the state of the previously mentioned variables. For instance it only pulls keys with the word “Rain” in it when it is raining. Once it has a list of keys it picks one at random and grabs the associated dialogue.

I have a similar system. I as thinking of showcasing it this Saturday on twitter for #screenshotsaturday, but I guess I can show you in advance (check your Twitter in some time). It too takes a lot of variables into account to see which dialogues are possible at the moment. 

The fact that you are getting that message literally every time you talk to anyone would mean that every key in the game has been tampered with or maybe the key data is just gone entirely, but I can’t think of anything that would do that. Like I said before its pretty much set it and forget it.

or, the key is being generated incorrectly for a particular variable/scenario, which is constant, at least for the time being, like perks, gold amount, tool proficiency, etc.

Hope 0.13 fixes the issue. Look forward to it.

Update: I was wrong about one thing. When trying to dialogue with NPCs other than Sven, it's not always the player/MC reporting the issue. I am not sure how accurate this is, but I noticed whenever I try to initiate the dialogue from the counter, the NPCs avatar shows up and reports the issue, but whenever I reach behind the counter to get closer to them (I almost always do that to make it easier to trigger the dialogue), then it is always the player that reports the bug. It could just be a coincident though.

(1 edit)

Read your message after posting this.

The updated version doesn't allow me to load my saved game!


Ran into the same error with v0.13. This time I was able to talk to Sven initially. However, as soon I completed his quest (the one where we need to get 50 stones for the forge), and went back to speak to him, the error re-appeared. Can't talk to any of the NPCs.