Author Topic: On the road to a debugged dynamic convo system for Windows - Solved, at last!  (Read 892 times)

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0


               

henesua wrote...

How is this going? I am now taking a look at Z-dialog and am noticing some similarities between it and my own work.

I'm thinking of abandonning my work and using z-dialog. But will need to reduce the number of scripts it uses. If you are interested I'll share the work with you.


Well, I've been testing the pg_lists_i functions a lot, its the include file holding the functions used by the system's main include, zdlg_include_i. Currently, it looks like the problem comes from the latter, yet I need to perform more tests(adding debugging lines) to confirm this. The system correctly stores and retrieves the lists on and from the PC speaker(tested), the issue is with the display, apparently. I'll manage to get back with more infos ASAP.

It's true that the system uses quite a number of scripts(although its half the size of ZZDialog), I'd indeed be interested by your work reducing their number, thank you. '<img'>


Kato 
               
               

               


                     Modifié par Kato_Yang, 22 janvier 2012 - 01:24 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


               You can reduce the package by 12 scripts if you replace all of the check scripts with zdlg_check

Thanks to Lightfoot8 for teaching me that the "Text Appears When" scripts execute in order from first to last.
               
               

               


                     Modifié par henesua, 22 janvier 2012 - 02:33 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0


               Thanks for the info Henesua!


Kato
               
               

               


                     Modifié par Kato_Yang, 22 janvier 2012 - 02:31 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


               No problem.

Incidentally, I have a bigger change that I would like to make.

I't involves a change to the initialize script. The problem I have with z-dialog is that it is not really dynamic. It is not possible to plug in new conversation options dynamically while the game is running. Perhaps you can do this with the NWNX version, but that is irrelevant, because you should be able to do it by script. My goal is to enable other conversation branches to be plugged into the original conversation dynamically. Additional conversation options would fill a pseudo array of strings - each string a potential script reference.

Example: you have a bar keep. He has a series of conversation options related to selling drinks and the like. However one of these options is for the PC to "tell" the bar keep something they know. (Just assume for point of argument that we have a way of tracking "things" that a character knows about). And another option is to ask the bar keep what stories they have heard lately. After PC 1 tells barkeep story A, the Barkeep can tell Story A to the next PC that asks what he's heard about lately. Story A would be a 3 "page" description of a tale that gives the player a "quest". Perhaps page 1 has a synopsis of who told who the story by way of describing the story's source and lineage... But I digress.

So if you had a series of "quests" that could be passed around. You'd prescript these potential conversation branches and enable them to be given to various NPCs.

Other (more important) options would be to take a default conversation script, and expand its functionality modularly. This is something I want to do for the conversation scripts in my Persistent Inn system.

[edit] but I'd like to see the whole thing debugged first. '<img'>
               
               

               


                     Modifié par henesua, 22 janvier 2012 - 02:48 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0


               Yep, adding options dynamically would be a nice feature, indeed. You mention a NWNX version, for Windows? (I must have missed that version, I'm curious)


Kato
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


               I don't know about any such thing for Windows. Its a linux plugin yes?
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


                Ah... never mind. it looks like there is an option for switching which script you are using.

SetCurrentDlgHandlerScript( string script )

I'll have to investigate how I can take advantage of that.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               Sorry, I skimmed this, but saw mentions of my posts and HGLL. AFAIK, the version of ZDialog in HGLL has fixes in it from the original author (pspeed) that he never posted to his vault page, though he may have later - I'm not 100% on that. Those glitches, however, were preventing display of ALL the responses, if my memory of 6-7 years ago is accurate.

What's more, I NEVER saw missing convo options with the HGLL system in all the years we used it on HG. We converted to a linux-based custom convo system a couple years ago, however, so I'm not sure what might be causing those glitches. Are you seeing them in an HGLL convo, or in a convo you made yourself?

I'd offer our current system, but it is both more complicated, and heavily reliant on linux...sorry. It also has a couple of glitches we've been patching case-by-case instead of within the general system, making it unsuitable for distrubtion in any case (the why of that is far beyond the scope of this thread).

Funky
               
               

               


                     Modifié par FunkySwerve, 22 janvier 2012 - 04:09 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0


               Hey Funky, true, ZDialog works flawlessly with HGLL. I've had some problems with some custom dialogs, depending on the operations performed when adding string elements. For instance, displaying entries for guild territory flags in a PvP mod:

DeleteList(a_page, oPC);
int nNth = 1;
for(nNth; nNth <= 10; nNth++)
{
    object oFlag = GetObjectByTag("Terry_Flag" + IntToString(nNth));
    AddStringElement(GetName(oFlag), a_page, oPC);
}
SetDlgPrompt("any prompt");
SetDlgResponseList(a_page, oPC);

This is the kind of code(although it's ultra simple) wich seems to frighten ZDialog, I don't know why yet...


Kato
               
               

               


                     Modifié par Kato_Yang, 22 janvier 2012 - 04:42 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0


               

henesua wrote...

You can reduce the package by 12 scripts if you replace all of the check scripts with zdlg_check

Thanks to Lightfoot8 for teaching me that the "Text Appears When" scripts execute in order from first to last.


  I never thought about how it handled the conditionals.  Just knowing that part will let me chop most of them out of the dynamic convos I use in my little mods deity system.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0


               

Failed.Bard wrote...
I never thought about how it handled the conditionals.  Just knowing that part will let me chop most of them out of the dynamic convos I use in my little mods deity system.


Agreed, this is also a new discovery for me. As soon as I get around to it, I'll be slimming down my module's scripts a gread deal. My deity setup system has 32 scripts that I will no longer need.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0


               

henesua wrote...
Thanks to Lightfoot8 for teaching me that the "Text Appears When" scripts execute in order from first to last.


I can not take credit for the original idea.  I got it from reading the conversations in DMFI 1.09
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               

FunkySwerve wrote...

It also has a couple of glitches we've been patching case-by-case instead of within the general system, making it unsuitable for distrubtion in any case (the why of that is far beyond the scope of this thread).

Funky

I think these glitches happens when:
there is SetCustomToken used twice in one moment (like first call it to "" and then refill)
the SetCustomToken are called in text appear when node an the given (doing this on action node in previous line should fix it)
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0


               

ShaDoOoW wrote...

FunkySwerve wrote...

It also has a couple of glitches we've been patching case-by-case instead of within the general system, making it unsuitable for distrubtion in any case (the why of that is far beyond the scope of this thread).

Funky

I think these glitches happens when:
there is SetCustomToken used twice in one moment (like first call it to "" and then refill)
the SetCustomToken are called in text appear when node an the given (doing this on action node in previous line should fix it)

No, the glitches are entirely unique to the system. Things like not being able to get the speaker properly in some circumstances. They make it unsuitable for public release, but have no other bearing on the discussion. The system itself performs flawlessly ingame, but would be a nightmare to support. Thanks for the attempt to help, though. '<img'>

Funky
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0


               I shouldnt quote you probably because I dont know what are you talking about. I know nothing about your HGLL - what I meant was the glitch desribed in the OP's post about not all lines showing up sometimes - I thought you are also talking about this one.
               
               

               


                     Modifié par ShaDoOoW, 22 janvier 2012 - 04:32 .