Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event] changeable battle themes / bgms #124

Open
tamashihoshi opened this issue May 5, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@tamashihoshi
Copy link
Contributor

commented May 5, 2016

see here in the forum: https://forum.tuxemon.org/thread.php?pid=971#p971
also my reply to the post (directly under it)

we could move specific soundtracks (special battle themes and region themes) to the db folder; the main battle theme should stay at res/music

the music should be changeable through events. this might not only be useful for a changing region or when having a boss battle, but also if you have a cutscene where the bgm changes.

a possible solution could be a "music emitter", like the translator object we have.
this object should keep in mind: the normal battle theme + the normal map theme
when in the overworld state the map theme would be used, during battles the battle theme. if you change the area, an event could be triggered through the map


here is how i imagine it:
music_emi.change("map", "desert_map")
now music emit changes the map soundtrack to desert_map. cant find it? okay, change it to the default map theme, which will stay at res/music as fallback
music_emi.change("battle", "desert_battle_theme")
the desert plays a different battle theme

a cutscene plays. the character says something drastic.
music_emi.play("drastic_story")
this does NOT change the battle/map theme; the soundtrack plays a specific track!
after the cutscene:
music_emi.reset()
normal map starts playing


is something like this useful? is this a good approach?
thanks for reading the rather long post!

@ShadowApex ShadowApex added this to the Version 0.5 milestone May 9, 2016

@bitcraft

This comment has been minimized.

Copy link
Collaborator

commented May 9, 2016

I like the idea of changing music based on the map or events. If I am understanding correctly, you are proposing to create a set of "music types", where each "music type" refers to a music file somewhere in the database. The actual mapping of "types" to "files" is part of a campaign or theme.

So, its a bit like what we've done with the text and locale? Let me know if I understand correctly.

@tamashihoshi

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2016

if I understand what you understand correctly, then what yo understood is what I meant. so yeah, i guess :D

@bitcraft

This comment has been minimized.

Copy link
Collaborator

commented May 9, 2016

I like the idea of it, as it would make sharable campaigns more simple in the future. We would have to do an inventory of music types and maybe plan for some future reserved names "end credits", "you lost", type stuff. Eventually, maybe even do the same for sounds, idk. Something to think about.

@bitcraft

This comment has been minimized.

Copy link
Collaborator

commented Jun 28, 2016

Maybe @ShadowApex has an opinion about this. Let's suppose after version 0.4 we start "The Great Divide", where we start treating the game engine and campaign separately. Would there be a config file (json?) the defines certain properties of the game?

How about this:

  • Campaigns have a config file that is loaded with a new game
  • The config file is simply a list of key value pairs
  • The keys/values become "campaign global" variables
  • Many of the values in the file define sounds/music used
  • Other values can be difficult modifiers, locale definitions, etc

For implementing campaign-specific music, borders, artwork, sounds, etc, we start changing all the internal references to the sound/music/graphic files. Replace the hard-coded values to lookup campaign variables.

Eventually, once we have changed the hard coded values, we will have our first campaign...Tuxemon! After that, it will be less difficult to extend the engine portion of the game.

Thoughts?

@xirsoi

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2016

Perhaps maps could specify the map and battle themes themselves, rather than having to include an event? Obviously, events should be able to over ride that.

I like the music emitter and config ideas!

@bitcraft

This comment has been minimized.

Copy link
Collaborator

commented Jun 30, 2016

The unifying answer to all this seems that maps should have the option of running a event/script when they are loaded. At that point they can set game variables like music and what not. I'm not sure if this is available to do now, but it seems simple enough to implement.

@bitcraft bitcraft changed the title changeable battle themes / bgms [Event] changeable battle themes / bgms Sep 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.