Talk:Village/@comment-9531161-20140303000856

The dialog system for the NPCs is almost finished. The dialog is all written, and the loading system is in place. However, I still need to write the system which is able to print out oversized strings.

Vague technical crap warning...

If you want to know a bit of interesting coding information in regards to Village, here's a bit about the dialog system. I typed up all the dialog on the computer in a text file. Then I used a program that I created in C# to convert the text file into a GRP file. I put this GRP file inside the Village package so that it's loaded when Village starts. I read each string from the GRP, but here's a problem: Petit Computer strings can only be 256 characters, and some of my dialog strings are over 1000 characters. Most of them aren't though, so how do I solve this problem?

I made a "buffer overflow" array which holds more parts of a string if it's too long. The place where I would have stored the original string will now hold an index into this buffer overflow array, which means that if I see an index instead of a full string, I should go out into the buffer overflow array and build up partial strings from the giant one. It's pretty cool.