Requirements: No addons required
Short description: Dynamically plays music by mood in playlists according to player stress level.
Date: 2011-09-21 14:36
This script automatically sums an unlimited number of music packs, dynamically selects the most appropriate mood according to player's stress level, engagement and weather and randomly plays its track.
This is a very powerful script/addon which can dynamically turn the silent Arma2 into a completely musical game.
Every music packs entered in arguments list are automatically summed and its tracks are assigned to its respective mood playlists.
The player is influenced by two event handlers. When the player is "hit" his stress is set to 100%, and when he's "firedNear" his stress increases by 10.
When you spot enemies, their threat is proportional to how much you know about them. Then the stress level increases towards "tension" mood according to the sum of their threat level.
Defining mood by stress level
There are four moods:
Selecting random track
Random track are dynamically selected according to mood players mood.
Music will be played whenever the mood changes or the track ends.
You can costumize which MoodJukebox data and music data are displayed.
Music volume dynamically drops as stress level approaches a change of mood.
When game is paused or loaded, the last track is resumed from where it stopped.
Death scene was altered in visual and it plays a random music in a special mood called "sadness".
Installation / Usage:
As we always recommend use modfolders to seperate the custom content from the official game content to prevent problems. For different ways to set up your modfolders and use them please visit our FAQ.
When you are using the Steam version you can find a Steam mod installation and activation FAQ here.
Warning: MoodJukebox version 1 addons will not be compatible with version 2.
* Copy "description.ext", "onPlayerKiller.sqf" and "scripts" folder from sample mission into your mission folder.
* Activate @MJB modfolder in you shortcut parameters or in game main menu at "EXPANSIONS" option.
Included .pbo files:
* Place the following code in your mission init.sqf, where the arguments are the music packs:
nul = ["arma2", "oa", "baf", "pmc", "your-pack"] execVM "scripts\MoodJukebox\main.sqf";The display items can be customized in "scripts\MoodJukebox\display.sqf"
Version 2.5 highlights:
Stupid 2.4 "resume.sqf not found" bug undone
Always use BAF or PMC in conjunction with other packs. BAF and PMC don't have all moods and may cause malfunction when used alone.
* Individual tress level for all switchable units
* Now stress and mood functions work inside vehicles
* packs without all moods don't crash anymore
* No individual stress functions for every unit anymore. It was too heavy
* Max music volume lowered to 0.5
In order to make this project expandable, the following measures where implemented:
* individual stress functions for every units
* sub-functions are called by "main.sqf" function
* Lots of optimization
* Independents side is evaluated in enemy detection now
* music volume steep oscillations mystery solved. It was ACE rising volume to 1.
* mood.sqf renamed to main.sqf
* Stress and threat functions moved to a separate file
* Stress is proportional to threat
* Stress is relieved only if there is no threat
* Threat is proportional to enemy/friendly proportion and how much they know about you
* Mood function moved to a separate file
* Resume function moved to main file
* added track album
* added track artist
* added track image
* Interval between tracks raised from 3 to 5 seconds
- I don't know why volume suffers steep oscillations whem volume is under 0.4 in Dynamic Fading
- Fixed a bug that was preventing track name and duration to be accessed when more than one pack is being used.
- Track repetition prevented in death scene
- Now stress level migrates between units on team switch
- fixed a mysterious bug preventing this addon to work
* playlist.sqf not needed anymore. Now moods are defined directly in config.cpp
* Music track repetition is now prevented
* Differently from 1.0 it doesn't wait 3 min to change music, now it awaits for the music to end before
playing another track, if no mood changes occur of course.
* "aware" and "danger" moods were merged
* "darkness" mood added to playlists for player's death scene
* I forgot to include a sample mission in version 1.0
- BI forums