Author Topic: When editing quest dialogue...  (Read 4506 times)

Chagero

  • Member
  • Posts: 30
  • Karma: +0/-0
    • View Profile
When editing quest dialogue...
« on: March 07, 2016, 10:01:58 PM »
I have some more questions!  ;D

When editing quest dialogue, is there a certain limit to the amount of words one can use?
And how exactly should the text be formatted? I saw the other QUEST.INI files had a "dialogue =" tag at certain intervals, as well as the /r which I am guessing is to signify breaks between paragraphs. I have recently written the quest dialogue for my map pack but the game now crashes after I select my character. Maybe I am using the dialogue = wrong?

I was going to upload the QUEST file but for some reason it cannot access my upload path... I know, I am full of errors!

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #1 on: March 08, 2016, 11:50:39 AM »
Those \r sequences are carriage return characters. They are equivalent to a line break. There's typically two for each new paragraph. You can get pretty fancy with them if you play around.



There are a lot of little quirks in the quest .INI files. It would be hard to diagnose what might be wrong but I can give you some general advice that I've stuck to.

Every description line in the .INI should start with "dialogue = " This continues building the dialog string line by line.  Note that there is a space before and after the equal sign.

I never allow one of the dialog lines to exceed 80 characters. That's about how wide the existing .INI files are.

If you use the color code (^005) make sure the 3 digit number is one of the supported numbers and make sure the whole 4 character string is on the same line.

Only use letters, numbers, and basic punctuation. Some special characters don't have font equivalents and diacritics might just cause a crash because of the encoding and wide-char format.

Don't add any empty lines. I'm pretty sure that the following will crash the game.
Code: [Select]
dialogue = on your quest.
dialogue =
dialogue = Take care on your adventure...

Make sure the mapnumber variables above the map descriptions are valid map numbers

Make sure there are no duplicate map attributes and they are sequential. i.e.:
Code: [Select]
[map1]
mapnumber = 90
description = ...

[map2]
mapnumber = 91
description = ...

Make sure there is a blank line with no whitespace in between sections.

Make sure the firstmap variable at the top matches the first map defined above the [map1] description.

Make sure the nummaps variable at the top is correct

You can replace spaces in the dialogue sections with underscores (_) if you'd like. I'm not 100% sure why the original quests do this but it's not a requirement anymore.

Make sure there is not an extra empty line at the end of the file.
« Last Edit: March 08, 2016, 12:19:16 PM by peewee_RotA »

Chagero

  • Member
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #2 on: March 08, 2016, 02:31:34 PM »
Thanks for the tips peewee; I tried shortening the lines and making sure that dialogue = tags were at the beginning of each line. I checked for unnecessary spaces at the beginning, in between lines, and at the end and I found none. The font modifiers were all codes I saw used in other quest files, mainly ^003 ^007 and ^009 and all 4 characters were on the same line. The map numbers correspond correctly where applicable.

It is odd, the quest was working before I went in and modified the quest file.

I am going line by line and it accepts my first line of dialogue. As soon as I add a second line, whether it is separated by a \r or not, tagged by dialogue = or with it just being a part of my first line it crashes. The crash doesn't seem to be dependent on how the line is formatted but merely by the presence of a second line of dialogue, which makes no sense to me.

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #3 on: March 08, 2016, 06:06:42 PM »
What text editor are you using?

Chagero

  • Member
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #4 on: March 08, 2016, 07:32:10 PM »
I was typing it in using Notepad... which is probably my problem...  :o

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #5 on: March 08, 2016, 08:30:10 PM »
Give Notepad++ a try. It might be easier to find whitespace issues. I'm also wondering if there is a line ending inconsistency. Notepade++ will let you force it to use windows line endings

Here's a quick tutorial on fixing line endings.
https://www.youtube.com/watch?v=x36T7Ebzd78

Chagero

  • Member
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #6 on: March 08, 2016, 08:55:33 PM »
OK I will definitely give it a shot. There does seem to be a line-end inconsistency going on cause I would have dialogue = at the beginning of every line, but in-game it would have a dialogue = in the middle of my next sentence at times, and the \r's would show up as regular text as well, causing me to suspect that it was due to my editor of choice, like you said.

Edit: That fixed it. When I opened the quest file in Notepad++, I noticed a line that was over 80 characters sticking out like a sore thumb. I shortened that down and moved a few dialogue = tags around, and voila, it now works!
« Last Edit: March 08, 2016, 09:09:35 PM by Chagero »

peewee_RotA

  • Sr. Member
  • Posts: 272
  • Karma: +8/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #7 on: March 10, 2016, 12:08:51 PM »
Glad you got it working :D

Chagero

  • Member
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: When editing quest dialogue...
« Reply #8 on: March 10, 2016, 05:49:11 PM »
Thank you, as was I! I was getting pretty frustrated there. The first level is coming along nicely, and it's always a plus to have some good dialogue to set up the story.  ;D