FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Draft of Dialog system - enhancements  (Read 2257 times)

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Draft of Dialog system - enhancements
« on: February 06, 2008, 02:07:56 pm »

Since I am away from my computer I'll use this post as a repository for the enhancement/bug fixes I don't want to forgot to add to my diff concerning a draft of dialog system :

Multiline labels :
- C++ side :  splitTextToWidth is called way too often. Labels should'nt call the split function if width = 0 or if text = "", or if neither the text or the width has changed.
- ? side : spot where the display bug comes from : image of the label text seems to be split in two parts separated by a void zone, so maybe it's linked to pychan layout engine, or to spacers, or I don't know...
A good test to spot the weakness would be to try drawing a button in a non-auto layouted container, and see if it is displayed properly.

Dialoguelogic files :
- Should add the possibility of defining global logic rules that apply to all dialogues. It would be loaded by the dialogue manager on init, and passed to every dialogue that is started, which would call both logic functions (global and dialog-specific).
Example : if the metadata param 'hostile' is set to 1, the speaker is set as an ennemy of the player and combat will begin : this should apply to all dialogues in a game,  but can differ between the games itself, so we don't want to it to be implemented in the dialogue system itself.

- Should make the base dialoguelogic functions get the line or the node object itself and not just the line or node ID, so the functions can easily get any embedded metadata.

- onLineSelected could be merged with conditionalNodeDisplay, but it would be less intuitive, so in fact it's not an enhancement

Dialogue class :
- I think I forgot to make it check whether a line or a node of the same ID has already been loaded before loading one.
- I also forgot to fire the onNodeDisplay and conditionalLineDisplay in the displayNode() function of the dialogue class, if needed

Miscellaneous, adjustments :
- Remove 'import dialogueloader' in dialogues.py
- Remove all debugging prints I added to track bugs
- Remove call to self.update() from DialogueGui.start()
« Last Edit: February 06, 2008, 02:17:11 pm by November »
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Draft of Dialog system - enhancements
« Reply #1 on: February 21, 2008, 04:24:52 pm »

Work on the dialogue system is finished. It can be improved, but I think this is good for a start.
The new diff is attached to the ticket here : http://mirror1.cvsdude.com/trac/fife/engine/attachment/ticket/277/dialogsystem.diff

Feel free to test it (an example dialogue is included in island demo) and tell me what you think.
« Last Edit: February 21, 2008, 07:12:10 pm by November »
Logged