DLG File Comments

Discussion in 'General Modification' started by thearioch, May 29, 2008.

Remove all ads!
  1. thearioch

    thearioch Need More Cowbell

    Joined:
    Sep 16, 2007
    Messages:
    178
    Likes Received:
    0
    DLG File Comments (edited)

    [edited because I think I found the answer and wanted to share with the group for...commentary]

    I've searched the web and read the general DLG/Python thread, but I haven't seen any posts addressing comments in DLG files. I noticed that the DLG files originally supplied by Troika don't seem to have comments or whitespace (the Troika programmers either didn't use them, which could explain a lot of the bugs, or stripped the comments out before shipping to make modding more difficult).

    I'm not very fluent in Python (I prefer C++ and Assembly). I tried using the Python single-line comment indicator ('#'), but ToEE doesn't handle this very well (lot's of blank dialog lines when running ToEE). Just 'cause I like C++, I tried C++-style comments ('//'), but they didn't seem to work either. I must have been editing files in the wrong DLG directory, because I tried it again this morning and the C++-style comments seem to work (the game appears to skip DLG file lines staring with '//').

    I noticed that some of the Co8-modded DLG files use whitespace (blank lines) to group blocks, and that seems to work with the C++-style comments.

    Just an FYI.

    -- thearioch
     
    Last edited: May 29, 2008
  2. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    Thanks for that, I seem to remember running into a problem with comments in dlg files myself. And I have found they can cause problems in .py files too, though they are use there pretty regularly - one of those things, maybe only on my PC :shrug:

    Your name looks familiar - you used to post on the Atari forums?
     
  3. thearioch

    thearioch Need More Cowbell

    Joined:
    Sep 16, 2007
    Messages:
    178
    Likes Received:
    0
    1) I just found your 185-page modding PDF -- you mention the '//' comments in there, and it matches what I found for *.dlg files. I checked random_encounter.py, and comments start with '#' (the normal start for Python files). That's probably the confusion -- *.dlg files use '//' to start of comments, *.py files use '#'. Note: I am not up to speed on Python, so I don't know if *.py files accept '//' single-line comments. I also did not test multiple-line comments for either file type (I generally prefer single-line comments).

    2) I tested splitting lines in *.dlg files and it seems to work (this is another tool for making text files more readable). E.g.:
    {1}{Text to male}
    {Text to female}
    {}{}{}{}

    I checked and this seems to work as well:
    {1}{Text with comment to male} // explain text
    {Text to female}
    {}{{}{}{}}

    3) You probably recognize my name b/c I asked for KotB Beta access last summer. I was hoping to playtest, but ended up getting too busy, so now I forgot almost everything learned about dlg modding a couple of years ago. I'm also arioch on Usenet (c.s.i.p.g.* hierarchy) and a couple of other aci fi / fantasy fora.

    4) When I'm done with my current project (Meleny and her family) I'll post what I learned about comments and formatting *.dlg/*.py files in case anyone is interested.

    --thearioch
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    That sounds intriguing, thearioch. Not sure what you're gonna do, but please bear in mind that fidelity to voice files is important to a lot of us. So adding in dialogue for Mel that is not supported by audio or changing existing lines so they don't match existing audio might not be especially well received. :nervous:

    Not trying to scare you away with that; it's just that a lot of times that consideration seems to get short shrift.

    Not sure about anything to do with C++, but I added blank lines to a lot of dlg files I've modded simply because it makes them easier to deal with at a glance. There seems to be no limit to the amount of blank space that can be contained in one.
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    *cough* while I can agree with attempting to retain text-to-audio fidelity, I don't think one should refrain from adding content just because of it. In other words, it should remain a 'soft constraint' rather than a hard one (in my humble opinion). Sure, you can sometimes shoe-horn, cut, splice and manipulate existing lines to fit what you want the NPC to say, and phrase the text accordingly, but some things are just impossible (e.g. Burne's puzzles, some of Livonya's modifications to Lareth, and many lines I've added myself in my traders mod).

    In fact, this is one of the things I dislike about modern games. Writing dialogue is made less flexible since you have to record lines for it all. If only we had advanced voice synthesis utilities...
     
  6. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    The main problem I see with it though is that when normally voiced characters suddenly go silent, it instantly identifies what you're playing as a mod. In a perfect world, players would never be able to tell the difference between original content and mods, and I believe that for the most part, our work is of such quality that they wouldn't know if not for indicators like this. We have achieved transparency with voiced NPCs before in mods like the Moathouse Ambush, and we've gone to great lengths to customize voice content in other mods for this consideration alone, so it can be done in many cases if you're willing to bend to the limitations of the existing audio.

    This isn't just a personal hangup of mine btw: we catch a lot of flak from places like the Codex for appearing to be sloppy or making second rate content, and I suspect that to some degree it's just such shortcomings as these that gives them that impression.

    I guess it's kind of a problem with no solution really, particularly given the position we're coming from where we're modifying a game instead of creating one. We have no choice but to deal with the fact that there are voiced characters in ToEE. But as you say that shouldn't stop us from modding anything. All I'm asking is that thearioch bear it in mind (if he's even entertaining the prospect in the first place) and avoid that pitfall if possible. And if he's got something really ambitious in mind, we could even help him with it. :shrug:
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    I definitely see your point regarding transparency, but ultimately you'll have to compromise on this if you want to add significant new content to existing NPCs.

    As for the Codex... it's a certainly a special place. But consider that some of the residents play games with ascii characters for graphics (with no sound at all...).
    Some of the detractors there are overly vocal (or just plain assholes), but some of them do offer legitimate criticism some of the time (which is unfortunately complemented with insults and mudslinging). If you want quality, constructive feedback, though, I'd try the Iron Tower Studio forums. It's kind of like Codex 2.0, created by a codex admin who got fed up with Codex idiocy and trolling.
     
  8. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Will check out the Iron Tower link, thanks. :thumbsup: The Codex surely has its share of trolls, but one thing I like about that site is that hearing from your detractors is actually a healthy thing, imo. If we ignored the naysayers and listened only to our fans we'd be seeing only half the picture, which doesn't put us in a well-informed position. The trick is to separate the honest feedback from that which is intended only to be hurtful. You're right that there are some thoughtful posters there, and even some few who are fairly polite in the process. So there's much to be gained from them in the end.

    Bear in mind that it's not as if we have some policy in place that says any new content like this will be rejected out of hand. Either way, the easy solution to this is to add new content to NPCs in KotB, where the field is wide open and no voice audio exists at all at this point. I mainly view ToEE now as something that needs to be fixed up instead of expanded upon, for the most part.

    @thearioch - sorry to have taken your thread off course. Please feel free to contiinue with your own original topic here. :)
     
  9. thearioch

    thearioch Need More Cowbell

    Joined:
    Sep 16, 2007
    Messages:
    178
    Likes Received:
    0
    No prob -- I did mention making mods, so anything related is on topic AFAIK :) I assume I'd have to submit something somewhere for review (that's about how far I've thought on sharing the content of my changes). Even if I don't change any content, changing files to make them more readable is a pretty big order. I'm planning on doing this only for things I change at first -- one thing I've learned over the years is that all programmers (authors, etc.) have their personal style, so I try to speak softly when saying things like "improve." That said, as a programmer, I find formatted text a bit easier to read and manipulate.

    I plan on making several flavors of ToEE mod -- pretty much for my personal use, but I'll offer them if there seems to be interest. I'm definitely with Gaear right now -- I'm trying to limit my modification of voiced characters to PC reactions so that the voiced flow is the same. I think I'll wait until I have a few successful (or at least not completely loathed) minor changes working before I attempt publicly working with voiced dialog.

    FYI, for Meleny's family, I don't plan on modding Meleny directly (other than PC responses), I was planning on more heavily editing Filliken and Althea. I haven't finished reading through the related characters, so I don't know how many are voiced. My plan was to let St. Cuthbert (or "New Faith") followers convert Althea instead of having to lose one of their followers (Marek). I've made a couple of tweaks in Althea's dialog already -- Lawful characters won't get the line to tell her to skip her father, Chaotic characters won't get to remind her it's her duty to follow her father's decision. Neutral characters will still get both options. Etc. She's not voiced, so I might give NE, CE, and CE the option to suggest a more permanent way of going around her father than just elopement...

    Anyway, thank you all for the polite comments. It can be awkward going to a group that's put thousands (ok, probably lot's more) hours over several years into a project.

    --thearioch
     
  10. Half Knight

    Half Knight Gibbering Mouther

    Joined:
    May 16, 2007
    Messages:
    2,148
    Likes Received:
    1
    But that's part of the plot, i think. You lose one follower and gain another, part of the balance, bah blah..
    And also, you'll probably need to check other dlgs, that are related (Terjon and maybe a few more?)

    If Althea it's not voiced, and you feel inspired, you could add something about the little brother, or the guy that takes care of them since the mother died (Rony? Roddy?)...i think that something was planned for that, but it was never developed. ;)
     
  11. thearioch

    thearioch Need More Cowbell

    Joined:
    Sep 16, 2007
    Messages:
    178
    Likes Received:
    0
    Maybe I should have been more specific -- I'm talking about *Paladins* helping "New Faith -- i.e., civilized) people converting to Paganism (or whatever the Old Faith is). I suppose Clerics might see a wider picture. Maybe I'll just make the Paladin fall if the party completes the quest, with a Botched option if the Paladin refuses to complete.

    Again, I am still reading through all the related NPCs' dialogs, so I haven't committed to anything, it's just an idea I had playing through with a mostly Paladin party.

    I'm not sure what you mean by a balance (I assume a tradeoff of worshippers of some sort), but last time I checked, Paladins ain't TRUE_NEUTRAL :)

    --thearioch
     
  12. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    I like the sound of this - anything to make those excruciating romance plots more interesting. Focusing on Althea and side-stepping the Meleney sound issue sounds like a good idea.

    Of course, a good way to avoid all this would be to write dialogue for some of the new characters in KotB who are crying out for it - those hapless fellas in the cellar of the Guildhouse, for instance. Or a new peasant for the Thorp. Or a unique guard patroling the Outer Bailey. Or the Banker. Or the Jeweller. Or the Jeweller's wife. Or... well, there's lots to choose from :gotmyatte
     
  13. Half Knight

    Half Knight Gibbering Mouther

    Joined:
    May 16, 2007
    Messages:
    2,148
    Likes Received:
    1
    Ah, i see...really good idea :yes:
    But please, don't make the paladin fall for something so trivial...they are there to fight evil, not focused on followers.
    On the other hand, while a Cleric could have a wider picture, they could have indeed something to say on that, they're much more zealous regarding their "flock".
    Not to mention a cleric of St Cuthbert ;)

    Anyways, any change like that only adds depth to the game, specially those damned love quests :) (what a way to start a game, btw :blegh: )
     
Our Host!