hey! i've also written a dialog system! it's very powerful, but i didn't create choices yet. i think i will do this now, but here is my first sample of a dialog file:
Code:
;Settings, like NPC name and start element
[Settings]
start=SayHello
;Say something to the player
[SayHello]
type=text
value=Hey Guy!\nYou have to do a small job for me!
termination=key
next=quest_add
;Add the quest
[quest_add]
type=quest_add
file=quests\quest_first.qst
next=quest_setskill
[quest_setskill]
type=skill_set
skill=1
value=1
next=END
i think this is a whole programming language which allows you to create good dialogs with different texts, sounds, choices, ... i will publish a demo of the system, but i don't know when...
Do you use Lite-C or C-Script? The "next" function is quite nice, I think I'll implement something like that, too And I've to admit, that your code looks much cleaner
i use Lite-C, because you can use the strio.c and it's easier to program. but i think it will be possible to port it to c-script the choices are working now... also you can check if the player has any quest active or has an item or the npc has set a skill also a very useful function is the command:
Can you guys create a simple stand a lone .c file so we can take an actual look at it? Would be much appreciated. Thanks, looks fantastic, cant wait to try it.
i thin i will publish a demo of my game in around an hour... wait for this and you can see the script in action! the conversation script is nearly standalone, but i think i can convert it to... i'm also writing on a easy-to-use NPC script editor, so you don't have to write those scripts
However, the program crashes when clicking "Maybe". Sometimes it also crashes when exiting. I haven't looked into the reason, but perhaps I've messed up the code by adding the functions or something?
Maybe you could include a demo, to make things easier.
Hey Saturnus, thanks for the feedback. I'm currently translating the code to be usable with XML-Dialog files. This makes it more dynamic and extendable. In the upcoming version I'll add a demo how to use the "snipped" properly.