Game Logic in XML Files

前端 未结 5 1507
迷失自我
迷失自我 2020-12-22 20:24

I\'m dealing with game dialogue files (conversation between player and non-playable-characters) where dialogue choices and their outcome depend on certain conditions and res

5条回答
  •  再見小時候
    2020-12-22 21:18

    To get inspiration, or maybe even adoption, take a look at AIML and BuddyScript. AIML is XML for chatbots, BuddyScript is another variant - now owned by Microsoft.

    The following is a sample of AIML from http://www.alicebot.org/aiml.html

    
    WHAT ARE YOU
    
    

    If you were to integrate AIML technology (which I think is free) into your game, your NPC's would have AI that your players could talk to. Wouldn't that be interesting?

    AIML is modular so all your NPCs could have a common file describing all the standard knowledge about their world. Then you could add specific files for the stuff that would be typic to each race, class, place, individual or task. There are plenty of interesting sample AIML files, for example Eliza.

    Situational information, can be added at the start of a conversation, and you may have some software outside the AIML engine listening for "magic" words from the NPC indicating that the NPC wants something to happen in the "real" game world. like "***GIVE PLAYER 20 BUFFALO WINGS".

提交回复
热议问题