Battle system flexibility

Avatar

By MirceaKitsune 21 Jun 2016 12:33

Member · 38 comments

I want to know a bit about how flexible the battle system is or can be expected to become. Obviously you can define your own attacks and statuses, with a working poison status already implemented. What I'd like to know beyond that is:

  • Are there plans to allow dialogs during battles? They could be triggered by various events... such as using an attack, a certain status being activated, a certain party dropping below or going over a specific HP, the use of a given inventory item, and more. This could for instance allow special chats in trainer battles based on what's happening, like your opponent saying "using type X attacks against my type Y Tuxemon I see".
  • Similarly, variable setting ran by the same triggers would be as useful... so specifics that happened in a battle can affect the world. For instance, let's say you electrocuted a trainer's Tuxemon during a battle, so when you meet that trainer later they'll tell you "last time you fried my Tuxemon".
  • Can world events be invoked after a battle, based on the outcome of that battle? If standard conditionals and events are defined as act# and cond#, maybe NPC and Random Encounter definitions could have additional properties such as act_win# / cond_win# and act_lose# / cond_lose#?
  • Can battle events, such as giving / receiving a certain attack or the creature having a status active, change the battle sprite of a creature? For instance: If you want a Tuxemon to look dizzy while poisoned, can you define unique front / back sprites for the poisoned status? The definition could include an optional timer, where you may specify if you want the override sprite to last for # seconds or be permanent until cleared out by another event.

Avatar

By bitcraft 28 Jun 2016 20:28

Champion · 166 comments

I've implemented most of the new combat screen, so I'll try to answer your questions about it.  In general, I've tried to make it flexible and easy to extend.

#1 Are there plans to allow dialogs during battles?

No plans, but it wouldn't be difficult to do; dialogs can be used anywhere in the game.  So far, many of the game screens have a predefined area where messages are displayed, in addition to using a dialog.  It isn't hard to display messages.  I think it is just a matter of design why it may seem lacking.  As for specific triggers, I could add a hook into the event system and use the normal events that are used during the world state.  At that point it would just be a matter of getting the event triggers into the engine.

#2 Similarly, variable setting ran by the same triggers would be as useful

Yes, this is a good idea.  These types of events are possible already.  https://github.com/Tuxemon/Tuxemon/wiki … s-together

#3 Can world events be invoked after a battle, based on the outcome of that battle?

I could be mistaken, but I don't think that the player win/loss record (or anything related to it) is being recorded right now, but I think its a great idea.

#4 Can battle events, such as giving / receiving a certain attack or the creature having a status active, change the battle sprite of a creature?

This isn't a planned feature.  Right now we have status effect icons, and I think the only one we have is for poison.  I don't see much value in new sprites for statuses, as it would put a pretty big burden on the artists to make sprites for each status.  Its a lot of work already to make the front/back sprites, mini ones, etc.  We could def use more icons, or animations for status attacks.  I could be wrong though, so feel free to ask around.

#1 is pretty vague, but if you had some specific ideas, it would be nice to open a thread here or an issue on github when it is all finalized.  Think about what dialogs should say, or what event trigger conditions to use.  If there isn't a condition already available, then solicit some opinions on what content creators think would be useful.  As for #3, opening an issue on github along with some specific variabels to capture and record would help.

For your reference, you can find existing documentation on the events below.
https://github.com/Tuxemon/Tuxemon/wiki/event-reference
https://github.com/Tuxemon/Tuxemon/tree … ents/event

Last edited by bitcraft (28 Jun 2016 21:04)

Avatar

By MirceaKitsune 28 Jun 2016 21:03

Member · 38 comments

Thanks for your reply, that is helpful!

About #4: It would be optional of course, for people who'd want to use such in their mods. I don't believe custom status-based or attack-based sprites would make sense in the default game either.

Avatar

By bitcraft 28 Jun 2016 21:06

Champion · 166 comments

No problem.  I've edited my reply with a few links about the events, if you haven't seen them before.