Quest scripting for 2D RPG

Hey there, I’ve been working on a 2D RPG the LibGDX framework. I have a working quest system right now using XML for quest data but it seems to be fairly inflexible and I want to have more flexibility in my game. I’ve seen a lot about using scripting langauges such as lua or Python for quest scripting. So I have a few questions.

  1. How should one scructure a script that describes a quest? For example say you need to collect 10 of some Item and return to a specific NPC to complete the quest. After completion you get some reward.

  2. What are the pros/cons of using LuaJ/Jython? I’m not familiar with either language so I have no bias towards either of them.

  3. How difficult would it be for a script to interact with a java object, call Java methods, etc?

Any suggestions or links to references would be greatly apprecated.

Thanks.

This question is very involved. Short answer: Most likely you don’t need a scripting language. If you do, then you’re unlikely to really need a dynamically typed language (so java could be the scripting language). Your example certainly doesn’t show any particular need.

This thread might give you a bit more insight…

Scripting languages are very good for data that you need to customize or expand dynamically, but the time you lose to access these files is not worth it for most games. Usually, you need a plan as to where you’ll be using scripts in order to use it effectively. (The best spot is usually at the beginning of the game when you have to load the data in, and leaving the rest to your program).

If you are still wondering about your questions and the information above isn’t enough, respond here and I’ll be a lot more specific in my next reply.