Author Topic: Setting music to specific maps?  (Read 10367 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10608
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: Setting music to specific maps?
« Reply #15 on: March 04, 2014, 03:57:30 pm »
I would absolutely love this. :)

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
    • Email
Re: Setting music to specific maps?
« Reply #16 on: March 09, 2014, 09:30:44 am »
Well, there have been a few minor changes in the end as to how the ruleset looks like, but the idea has been 'materialized' into code in the end: https://github.com/szabopeter/OpenXcom/tree/MusicRules
What I plan to do before submitting the pull request:
  • Compile a win32 version so that you don't have to compile if you want to give it a try
  • Testing with alternative rules
  • Code cleanup

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
    • Email
Re: Setting music to specific maps?
« Reply #17 on: March 09, 2014, 06:17:30 pm »
Test data (Music files from https://lorcan.freelanzer.com/)
Code: [Select]
# Lorcán - Cydonia's Fall OST
music:
  - type: GMDEFEND
    files: [ UFOCF-OST/Defend Base - Lorcan ]
  - type: GMENBASE
    files: [ UFOCF-OST/Lightning War - Lorcan ]
  - type: GMGEO1
    files: [ UFOCF-OST/Geoscape (Part I) - Lorcan ]
  - type: GMGEO
    files:
      - UFOCF-OST/Geoscape (Part I) - Lorcan
      - UFOCF-OST/Geoscape (Part II) - Lorcan
      - UFOCF-OST/UFOpedia - Lorcan
      - UFOCF-OST/Waiting - Lorcan
  - type: GMINTER
    files: [ UFOCF-OST/Interception - Lorcan ]
  - type: GMINTRO1
    files: [ UFOCF-OST/Intro (Part I) - Lorcan ]
  - type: GMINTRO2
    files: [ UFOCF-OST/Intro (Part II) - Lorcan ]
  - type: GMINTRO3
    files: [ UFOCF-OST/Intro (Part III) - Lorcan ]
  - type: GMLOSE
    files: [ UFOCF-OST/Lose Game - Lorcan ]
  - type: GMMARS
    files: [ UFOCF-OST/Debriefing - Lorcan ]
  - type: GMNEWMAR
    files: [ UFOCF-OST/Mars Briefing - Lorcan ]
  - type: GMSTORY
    files: [ UFOCF-OST/The Story - Lorcan ]
  - type: GMTACTIC
    terrain: [CULTA, DESERT, FOREST, JUNGLE, MOUNT, POLAR, UBASE, URBAN]
    files: [ UFOCF-OST/Tactical Battle - Lorcan ]
  - type: GMTACTIC
    terrain: [MARS, XBASE]
    files: [ UFOCF-OST/Far From Earth - Lorcan ]
  - type: GMWIN
    files: [ UFOCF-OST/Win Game - Lorcan ]
  - type: GMGRAVES
    files: [ UFOCF-OST/Nightbird Theme - Lorcan ]

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
    • Email
Re: Setting music to specific maps?
« Reply #18 on: March 10, 2014, 03:36:18 pm »
Here is the windows binary: https://bit.ly/1i0iOb8 (3.54MB)
« Last Edit: March 10, 2014, 04:25:12 pm by hszp »

Offline Fenyő

  • Colonel
  • ****
  • Posts: 423
    • View Profile
Re: Setting music to specific maps?
« Reply #19 on: March 10, 2014, 09:33:52 pm »
Nice job! :)

I assume all the file-items in the "files" part (in the ruleset file) are required to be exist in the file-system...

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
    • Email
Re: Setting music to specific maps?
« Reply #20 on: March 10, 2014, 10:30:06 pm »
Thanks, Fenyő!
Yes, the specified files are absolutely mandatory. If any of them are missing, you get a nice error message right after loading the rules. But if you override the standard rules, the original music files are not needed and not loaded.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10608
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: Setting music to specific maps?
« Reply #21 on: April 27, 2014, 02:29:18 pm »
Well, is there any chance that this feature is actually implemented?

I have so many ideas on what to do with this... :)

Offline hszp

  • Captain
  • ***
  • Posts: 64
    • View Profile
    • szabopeter@github
    • Email
Re: Setting music to specific maps?
« Reply #22 on: April 28, 2014, 02:37:56 pm »
It is implemented, there has also been a pull request (which I will have to update sometime), but it will probably not be merged any time soon.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10608
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: Setting music to specific maps?
« Reply #23 on: April 28, 2014, 02:48:14 pm »
It is implemented, there has also been a pull request (which I will have to update sometime), but it will probably not be merged any time soon.

Right of course, I meant merged. ;)

Seeing as the nightly build is updated several times a day, and that the new versions are actually useful, I don't really feel like experimenting with external exes. Especially if I have to compile them myself.