Aller au contenu

Photo

On the road to a debugged dynamic convo system for Windows - Solved, at last!


  • Veuillez vous connecter pour répondre
43 réponses à ce sujet

#1
Kato -

Kato -
  • Members
  • 392 messages
Hi,

Well, I know it's quite a challenge but I'm trying my hand at debugging ZDialog, since it does not seem like we'll see the Linux convo functions ported to Windows. Hopefully I'm mistaken but meanwhile it would be so nice to have a fully reliable convo system for us poor Windows users.

So, I'm gathering as many infos I can in that process, both from the community and my own tests, of course. Now, I remember a comment from Lightfoot8: "I write my own dynamic convos as needed...". Sounds great at the bar lol. It's most probably the best option, but I'm not sure yet where to start from, hence the current project.

I have only a few infos currently but I might append more to the list if it interests anyone. If you have any info(s) to share it will be greatly appreciated, thank you!

KNOWN:

- ZZDialog, the "new" version, ported the missing entries bug(and possibly more), tested many times.
- Colored strings can break the dialog. (from Funky)
- The dialog can also break without colored strings.
- The entries are all properly stored on the PC speaker, they are simply not always displayed.
- The number of missing entries is always the same for a given dialog, and it consistently happens at the same place in the dialog.



Kato 

Modifié par Kato_Yang, 14 juillet 2012 - 06:22 .


#2
Shadooow

Shadooow
  • Members
  • 4 465 messages
I havent see Z-dialog yet, but there are some remarks I have found out about dynamic convo.

I was developing my own craft skill which was conversation based so I had to create a dynamic convo. It was very simple to do it actually but I had different problem; I was unable to create a good and easy way how to set it up. I needed several subbranches and the way I think of was so difficult to set up via scripting that I had to choose another approach and make pseudo dynamic convo where I needed to set only the last branch with recipes.
Guess I check the Z convo but maybe someone can help me how to make the setup part better.

#3
Kato -

Kato -
  • Members
  • 392 messages
Thanks for the reply, ShadoOoW. I'm not sure to understand what you mean by "the setup part", still I would be glad to help if I can. I have not yet found the exact source of the missing entries bug but I have used the system for many years and I know under wich circumstances it appears or not. As a result, my dialogs are not bugged(even my biggest one wich holds 2000 lines of code) but I'll of course be able to do even more with them once I find and hopefully fix the bug...


Kato

Modifié par Kato_Yang, 27 décembre 2011 - 06:09 .


#4
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Before I Download anything to take a look at this. Are you using ZDialog or ZZDialog?

#5
Kato -

Kato -
  • Members
  • 392 messages
@Lightfoot8: I'm using ZDialog. The version packaged with HGLL is somewhat cleaner and less buggy than any other, except if there's anything new I'm not aware of. Thanks for taking a look Lightfoot :)


Kato

Modifié par Kato_Yang, 27 décembre 2011 - 07:29 .


#6
Shadooow

Shadooow
  • Members
  • 4 465 messages

Kato_Yang wrote...

Thanks for the reply, ShadoOoW. I'm not sure to understand what you mean by "the setup part", still I would be glad to help if I can. I have not yet found the exact source of the missing entries bug but I have used the system for many years and I know under wich circumstances it appears or not. As a result, my dialogs are not bugged(even my biggest one wich holds 2000 lines of code) but I'll of course be able to do even more with them once I find and hopefully fix the bug...


Kato

By a setup part I mean a script in which you set up all brances and subbranches.

thats how looked my first dynamic convo script where the convo was absolutely dynamic in all ways:

SHC_Rozhovor_MenuVytvorMenu(CRAFT_SKILL_ZBRANIR,"1. menu kovare-zbranire");
 SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,1,1,"Měděné zbraně");
  SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,2,1,0,"Vyber druh zbraně:");
   SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,1,"Čepele");
    SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,3,2,1,"Vyber si druh čepelí:");
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,1,"Dlouhé meče");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,4,3,1,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,4,1,"Meděný dlouhý meč","shc_zba_melon001",0,20,"shc_sle_medingot",3,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,2);
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,4,1,"Bronzový dlouhý meč","shc_zba_brlon001",0,20,"shc_sle_broingot",3,1,2);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,2);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,2,"Krátké meče");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,5,3,2,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,5,1,"Meděný krátký meč","shc_zba_mesho001",-1,16,"shc_sle_medingot",2,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,3,"Dýky");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,6,3,3,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,6,1,"Meděná dýka","shc_zba_medyk001",-3,10,"shc_sle_medingot",2,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",50,1);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,4,"Meče bastardy");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,7,3,4,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,7,1,"Meděný meč bastard","shc_zba_medyk001",12,27,"shc_sle_medingot",3,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,5,"Obouruční meče");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,8,3,5,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,8,1,"Meděný velký meč","shc_zba_megsw001",18,33,"shc_sle_medingot",5,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",50,2);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,6,"Katany");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,9,3,6,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,9,1,"Meděná katana","shc_zba_mekat001",9,20,"shc_sle_medingot",3,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,2);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,7,"Scimitary");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,10,3,7,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,10,1,"Meděný scimitar","shc_zba_mesci001",11,23,"shc_sle_medingot",3,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
     SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,3,8,"Rapíry");
      SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,11,3,8,"Výrobky, které dovedeš vykovat:");
       SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,11,1,"Meděný rapír","shc_zba_mesci001",12,24,"shc_sle_medingot",3,1,1);
       SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,2,"Sekery");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,12,2,2,"Vyber druh sekery:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,12,1,"Ruční sekerky");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,13,12,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,13,1,"Měděná ruční sekerka","shc_zba_mehax001",2,14,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",10,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,12,2,"Bitevní sekery");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,14,12,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,14,1,"Měděná bitevní sekera","shc_zba_mewax001",5,17,"shc_sle_medingot",2,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",25,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,12,3,"Obouruční sekery");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,15,12,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,15,1,"Měděná obouruční sekera","shc_zba_mewax001",17,30,"shc_sle_medingot",5,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",15,4);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,12,3,"Trpasličí válečné");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,15,12,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,15,1,"Měděná trpasličí válečné sekera","shc_zba_medax001",15,26,"shc_sle_medingot",4,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",45,2);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,3,"Dřevcové zbraně");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,16,2,3,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,16,1,"Halapartny");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,17,16,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,17,1,"Měděná halapartna","shc_zba_mehal001",7,23,"shc_sle_medingot",4,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",45,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,16,2,"Kopí");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,18,16,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,18,1,"Měděné kopí","shc_zba_mekop001",4,19,"shc_sle_medingot",3,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,16,3,"Kosy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,19,16,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,19,1,"Měděná kosa","shc_zba_mekos001",10,31,"shc_sle_medingot",6,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",15,6);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,16,4,"Trojzubce");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,20,16,4,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,20,1,"Měděný trojzubec","shc_zba_metro001",5,21,"shc_sle_medingot",3,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",70,1);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,4,"Exotické zbraně");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,21,2,4,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,1,"Biče");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,22,21,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,22,1,"Měděný bič","shc_zba_mebic",9,21,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",15,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,2,"Kamy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,23,21,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,23,1,"Měděná kama","shc_zba_mekaa001",0,18,"shc_sle_medingot",2,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,3,"Kukri");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,24,21,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,24,1,"Měděná kukri","shc_zba_mekuk001",1,19,"shc_sle_medingot",2,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",20,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,4,"Srpy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,25,21,4,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,25,1,"Měděný srp","shc_zba_mesrp",3,22,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",25,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,5,"Oboustranné meče");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,26,21,5,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,26,1,"Měděný oboustranný meč","shc_zba_medsw",7,25,"shc_sle_medingot",4,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",45,3);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,6,"Oboustranné sekery");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,27,21,6,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,27,1,"Měděná dvojitá sekera","shc_zba_medax",8,22,"shc_sle_medingot",4,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",40,3);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,21,7,"Oboustranné palcáty");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,28,21,7,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,28,1,"Měděný strašlivý palcát","shc_zba_medma",10,23,"shc_sle_medingot",5,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",50,3);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,5,"Tupé zbraně");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,29,2,5,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,1,"Hole");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,30,29,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,30,1,"Měděná hůl","shc_zba_mehul",5,23,"shc_sle_medingot",1,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",15,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,2,"Lehké cepy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,31,29,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,31,1,"Měděný lehký cep","shc_zba_melma",3,23,"shc_sle_medingot",2,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",25,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,3,"Těžké cepy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,32,29,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,32,1,"Měděný těžký cep","shc_zba_mehfl",8,27,"shc_sle_medingot",4,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",40,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,4,"Lehké kladiva");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,33,29,4,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,33,1,"Měděné lehké kladivo","shc_zba_melha",3,22,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",22,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,5,"Válečné kladiva");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,34,29,5,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,34,1,"Měděné válečné kladivo","shc_zba_mehha",6,27,"shc_sle_medingot",3,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,2);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,6,"Kyje");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,35,29,6,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,35,1,"Měděný kyj","shc_zba_mekyj",2,22,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",30,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,7,"Palcáty");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,36,29,7,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,36,1,"Měděný palcát","shc_zba_memac",2,22,"shc_sle_medingot",1,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",10,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,29,8,"Řemdihy");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,37,29,8,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,37,1,"Měděný řemdih","shc_zba_memor",4,25,"shc_sle_medingot",2,1,1);
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",22,2);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,6,"Ostatní");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,38,2,6,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,38,1,"Hvězdice");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,39,38,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,39,1,"Měděná hvězdice","shc_zba_mehve001",0,17,"shc_sle_medingot",1,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",60,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,38,2,"Munice do praku");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,40,38,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,40,1,"Měděný kámen","shc_zba_mekam001",-3,14,"shc_sle_medingot",1,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",77,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,38,3,"Vrhací sekery");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,41,38,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,41,1,"Měděná vrhací sekera","shc_zba_metax",3,23,"shc_sle_medingot",1,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",15,1);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,7,"Komponenty");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,42,2,7,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,42,1,"Hroty");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,43,42,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,43,1,"Měděný hrot","shc_zba_mehro001",-4,12,"shc_sle_medingot",1,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",71,1);
  SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,2,8,"Nářadí");
   SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,44,2,8,"Vyber druh:");
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,44,1,"Lovecké nože");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,45,44,1,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,45,1,"Měděný lovecký nůž","shc_lov_dyka001",0,21,"shc_sle_medingot",2,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",22,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,44,2,"Kovářské kladívka");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,46,44,2,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,46,1,"Měděné kovářské kladívko","shc_zba_mekkl001",4,27,"shc_sle_medingot",2,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",22,1);
    SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,44,3,"Krumpáče");
     SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,47,44,3,"Výrobky, které dovedeš vykovat:");
      SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,47,1,"Měděný krumpáč","shc_zba_mekru001",6,30,"shc_sle_medingot",4,1,1);//TODO drevo
      SHC_Recept_NastavReceptItemPriNeuspechu("shc_sle_medingot",22,3);
 SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,1,2,"Bronzové zbraně","",50);
 SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,1,3,"Železné zbraně","",100);
 SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,1,4,"Stříbrné zbraně","",150);
 SHC_Rozhovor_MenuVytvorVetev(CRAFT_SKILL_ZBRANIR,1,5,"Speciální zbraně","",0,0,"",0,-1);
  SHC_Rozhovor_MenuVytvorPodMenu(CRAFT_SKILL_ZBRANIR,999,1,5,"Výrobky, které dovedeš vykovat:");
   SHC_Rozhovor_MenuVytvorSpecialniVetev(CRAFT_SKILL_ZBRANIR,999,1,"Ultrahusty mec","shc_rec_001");

This is a setup script for several sublevels a recipes but only for one kind of material! not only it needs many lines of code but it was very hard to understand how to make sublevel etc.

So I changed the approach to pseudo dynamic convo where I have static part where you can choose material etc. and once you click on recipes, script will get all recipes set up for menu #X, and I do set it up like this now:

//menu 1 - proste
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,1,"Měděná halapartna","shc_med_hb",20,40,"shc_ingot_med",5);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,4);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,1,"Měděné kopí","shc_med_sp",20,40,"shc_ingot_med",4);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",35,3);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,1,"Měděné krátké kopí","shc_med_os",20,40,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,2);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,1,"Měděná hůl","shc_med_qs",20,40,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,2);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,1,"Měděný srp","shc_med_si",-10,10,"shc_ingot_med",1);
//menu 2 - cepele
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděná dýka","shc_dagger001",-10,10,"shc_ingot_med",1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný dlouhý meč","shc_med_ls",10,30,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",45,2);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný krátky meč","shc_med_ss",0,20,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",50,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný meč bastard","shc_med_bs",20,40,"shc_ingot_med",4);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,3);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný obouruční meč","shc_med_ts",30,60,"shc_ingot_med",6);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",35,4);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný rapír","shc_med_ra",10,30,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděný scimitar","shc_med_sc",10,30,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,2,"Měděná katana","shc_med_ka",20,40,"shc_ingot_med",4);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,3);
//menu 3 - tupe
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděné lehké kladivo","shc_med_lh",-10,10,"shc_ingot_med",1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděný lehký cep","shc_med_lf",0,20,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděný těžký cep","shc_med_hf",30,60,"shc_ingot_med",6);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",25,5);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděné válečné kladivo","shc_med_wh",20,40,"shc_ingot_med",4);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,3);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděný kyj","shc_med_cl",-5,15,"shc_ingot_med",1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděný palcát","shc_med_ma",0,20,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,3,"Měděný řemdih","shc_med_ms",10,30,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",35,2);
//menu 4 - sekery
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,4,"Měděná bitevní sekera","shc_med_wa",-10,10,"shc_ingot_med",3);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",45,2);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,4,"Měděná ruční sekerka","shc_med_ha",0,20,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",50,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,4,"Měděná trpasličí sekera","shc_med_da",20,40,"shc_ingot_med",4);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,3);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,4,"Měděná velká sekera","shc_med_ta",30,60,"shc_ingot_med",6);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",35,4);

//menu 5 - exoticke
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděný bič","shc_med_wi",-5,15,"shc_ingot_med",1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděná kama","shc_med_km",10,30,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",50,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděná kukri","shc_med_ku",20,40,"shc_ingot_med",2);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",40,1);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděná kosa","shc_med_sy",30,50,"shc_ingot_med",5);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,4);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděná dvojitá sekera","shc_med_ba",30,50,"shc_ingot_med",5);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,4);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděný dvouhlavý palcát","shc_med_dm",30,50,"shc_ingot_med",5);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,4);
SHC_Recept_NastavRecept(CRAFT_SKILL_WEAPONMAKER,5,"Měděný dvoubřitý meč","shc_med_ds",30,50,"shc_ingot_med",5);
SHC_Recept_NastavReceptItemPriNeuspechu("shc_ingot_med",30,4);


not sure if it helps at all anyone, but I posted this rather to get some advices from others, how do you set up several levels convo in ZDialog?

i mean something like:

basic menu
-weapons
--material 1
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result
--material 2
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result
--material 3
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result
-armors
--material 1
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result
--material 2
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result
--material 3
---recipe1
----recipe details
----craft recipe
-----craft attempt result
---recipe2
----recipe details
----craft recipe
-----craft attempt result
---recipe3
----recipe details
----craft recipe
-----craft attempt result


#7
Kato -

Kato -
  • Members
  • 392 messages
@ShadoOoW:
Here is a dialog template for ZDialog along with a few comments:

#include "zdlg_include_i"
const string PAGE1 = "main"; // The main, first page or list.
const string PAGE2 = ""; // Any name, preferably explicit, add as many pages as you need "submenus"
object oPC = GetPcDlgSpeaker();
// OBJECT_SELF is the owner of the convo

void Init() // This fires once during the convo, at the beginning
{   
   SetShowEndSelection(TRUE); // Optional, simply adds an "End" entry at the end of lists
}

void PageInit() // Populating the pages/lists here yet it's also frequent to do it in the handle section
{  
   string page = GetDlgPageString();
   if(page == "" || page == PAGE1)
   {
      DeleteList(PAGE1, oPC); // Delete previous list to "refresh" the page and avoid stacking
      SetDlgPrompt(""); // The text shown at the top of the page, spoken by convo owner
      AddStringElement("", PAGE1, oPC); // Add selectable element to list or page
      ReplaceIntElement(0, 1, PAGE1, oPC); // Store an int along with the previous string, a special feature
      SetDlgResponseList(PAGE1, oPC); // The list wich elements should be displayed for selection
   }
   else if(page == PAGE2)
   {
      DeleteList(PAGE2, oPC);
      SetDlgPrompt("");
      SetDlgResponseList(PAGE2, oPC);
   }
}

void Clean() // Delete variables lists(and others if needed) set on oPC during convo
{
   DeleteList(PAGE1, oPC); 
   DeleteList(PAGE2, oPC); // etc...
}

void HandleSelection() // Handle oPC's selection
{
   int nSel = GetDlgSelection(); // The index of the clicked entry(or list element), zero-based.
   string page = GetDlgPageString(); // The page or list where the selection was performed
   if(nSel == GetElementCount(page, oPC)-1) EndDlg();
   if(page == "" || page == PAGE1)
   {
       // Do anything as a reaction to any entry having been clicked on PAGE1
       SetDlgPageString(PAGE2); // Jump to PAGE2 or any other specified as in submenus
   }
   else if(page == PAGE2)
   {
       // Same concept as above
   }
}

void main()
{
   switch(GetDlgEventType()) // Handle convo events here
   {
      case DLG_INIT: Init(); break;
      case DLG_PAGE_INIT: PageInit(); break;
      case DLG_SELECTION: HandleSelection(); break;
      case DLG_ABORT:
      case DLG_END: Clean();
   }
}

It's only really a skeleton, it does nothing currently. However, the complete hierarchy wich you posted should not be a problem to code with this system, as you can see. I have some complete dialogs if the above template is unclear.


EDIT: For the example you posted, I'd probably start with something like this:

#include "zdlg_include_i"
const string PAGE1 = "basic_menu";
const string PAGE2 = "weapons";
const string PAGE3 = "armors";
const string PAGE4 = "mat1";
const string PAGE5 = "mat2";
const string PAGE6 = "mat3";
const string PAGE7 = "recipe1";
const string PAGE8 = "recipe2";
const string PAGE9 = "recipe3";
const string PAGE10 = "recipedetails1";
const string PAGE11 = "recipedetails2";
const string PAGE12 = "recipedetails3";
const string PAGE13 = "craftrecipe1";
const string PAGE14 = "craftrecipe2";
const string PAGE15 = "craftrecipe3";
const string PAGE16 = "attemptresult1";
const string PAGE17 = "attemptresult2";
const string PAGE18 = "attemptresult3";

object oPC = GetPcDlgSpeaker();

void Init()
{
   SetShowEndSelection(TRUE);
}

void PageInit()
{
   string page = GetDlgPageString();
   if(page == "" || page == PAGE1)
   {
      DeleteList(PAGE1, oPC);
      SetDlgPrompt("Please choose an option");
      AddStringElement("Weapons", PAGE1, oPC);
      AddStringElement("Armors", PAGE1, oPC);
      SetDlgResponseList(PAGE1, oPC);
   }
   else if(page == PAGE2)
   {
      DeleteList(PAGE2, oPC);
      SetDlgPrompt("Please choose a weapon");
      AddStringElement("a_weapon", PAGE2, oPC);
      AddStringElement("a_weapon", PAGE2, oPC);
      SetDlgResponseList(PAGE2, oPC);
   }
   else if(page == PAGE3)
   {
      DeleteList(PAGE3, oPC);
      SetDlgPrompt("Please choose an armor");
      AddStringElement("an_armor", PAGE3, oPC);
      AddStringElement("an_armor", PAGE3, oPC);
      SetDlgResponseList(PAGE3, oPC);
   }
}

void Clean()
{
   DeleteList(PAGE1, oPC);
   DeleteList(PAGE2, oPC); // etc...
}

void HandleSelection()
{
   int nSel = GetDlgSelection();
   string page = GetDlgPageString();
   if(nSel == GetElementCount(page, oPC)-1) EndDlg();
   if(page == "" || page == PAGE1)
   {
      if(nSel == 0) SetDlgPageString(PAGE2); // oPC chose weapon option, send to weapon page
      else if(nSel == 1) SetDlgPageString(PAGE3); // oPC chose armor option, send to armor page
   }
   else if(page == PAGE2)
   {
       // Same concept as above
   }
}
void main()
{
   switch(GetDlgEventType())
   {
      case DLG_INIT: Init(); break;
      case DLG_PAGE_INIT: PageInit(); break;
      case DLG_SELECTION: HandleSelection(); break;
      case DLG_ABORT:
      case DLG_END: Clean();
   }
}

And so on. You could probably remove some of the constants and and re-use some pages while displaying only what each page should, the above is rather generic but functional. 


Kato 

Modifié par Kato_Yang, 28 décembre 2011 - 02:40 .


#8
henesua

henesua
  • Members
  • 3 858 messages
I'm interested to see where you go with this.

#9
Kato -

Kato -
  • Members
  • 392 messages
Thanks Henesua, I'll make sure to report my findings if any.


Kato

#10
zunath

zunath
  • Members
  • 83 messages
Afraid I don't have much info to offer you but I'm also interested in this. Almost all of my systems depend heavily on ZZDialog. If you come up with some fixes for it, I'll be the first in line to try it out :)

#11
zunath

zunath
  • Members
  • 83 messages
I do have a request though - and I'm not sure how feasible it'd be.

In some of my conversations, I have the players provide text entries. These entries don't appear in the prompt until the PC clicks the "refresh" button I've added. It would be nice to be able to refresh the current page the player is on from outside of the dialog script.

Modifié par zunath, 08 janvier 2012 - 08:01 .


#12
Kato -

Kato -
  • Members
  • 392 messages

zunath wrote...

I do have a request though - and I'm not sure how feasible it'd be.

In some of my conversations, I have the players provide text entries. These entries don't appear in the prompt until the PC clicks the "refresh" button I've added. It would be nice to be able to refresh the current page the player is on from outside of the dialog script.


Yes, refreshing the pages is most often needed, but this can be and is usually done from inside the dialog itself. Whenever an entry is clicked, the page onto wich the player is sent is first deleted if it existed, then a new page is created from the available data just prior to being displayed, thus keeping the page up-to-date. From outside the dialog, well I have not yet seen that practice, I'll manage to get more infos...


Kato 

Modifié par Kato_Yang, 08 janvier 2012 - 08:30 .


#13
zunath

zunath
  • Members
  • 83 messages
Okay thanks. I may have been a little ambiguous in my previous post. By "text entries" I mean the player physically types in something to the chat box, and I grab that data by way of the Module OnChat event.

If you can figure out a way to reload from outside the conversation, that would be amazing :)

Let me know if there's some way I can help!

#14
Kato -

Kato -
  • Members
  • 392 messages
@Zunath : Thanks for the precision. I'll have to get more familiar with the chat thing first but I'll look into this anyway.



Kato

#15
henesua

henesua
  • Members
  • 3 858 messages
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.

#16
Kato -

Kato -
  • Members
  • 392 messages

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. :)


Kato 

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


#17
henesua

henesua
  • Members
  • 3 858 messages
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 .


#18
Kato -

Kato -
  • Members
  • 392 messages
Thanks for the info Henesua!


Kato

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


#19
henesua

henesua
  • Members
  • 3 858 messages
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. :)

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


#20
Kato -

Kato -
  • Members
  • 392 messages
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

#21
henesua

henesua
  • Members
  • 3 858 messages
I don't know about any such thing for Windows. Its a linux plugin yes?

#22
henesua

henesua
  • Members
  • 3 858 messages
 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.

#23
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
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 .


#24
Kato -

Kato -
  • Members
  • 392 messages
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 .


#25
Failed.Bard

Failed.Bard
  • Members
  • 774 messages

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.