aliens

Author Topic: understanding custom music and musics.rul  (Read 2610 times)

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
understanding custom music and musics.rul
« on: October 26, 2020, 04:38:52 pm »
I have some questions with regard using custom music in the game.

Currently "musics.rul" says:
Code: [Select]
musics:
  - type: GMDEFEND
    catPos: 3
    normalization: 0.76
  - type: GMENBASE
    catPos: 6
    normalization: 0.83
  - type: GMGEO1
    catPos: 0
    normalization: 1.19
  - type: GMGEO2
    catPos: 18
    normalization: 1.0
  - type: GMGEO3
  - type: GMGEO4
  - type: GMGEO5
  - type: GMGEO6
  - type: GMGEO7
  - type: GMGEO8
  - type: GMGEO9
  - type: GMGEO10
  - type: GMINTER
    catPos: 2
    normalization: 0.74
  - type: GMINTRO1
    catPos: 19
    normalization: 0.8
  - type: GMINTRO2
    catPos: 20
    normalization: 0.8
  - type: GMINTRO3
    catPos: 21
    normalization: 0.8
  - type: GMLOSE
    catPos: 10
    normalization: 1.0
  - type: GMMARS
    catPos: 9
    normalization: 0.92
  - type: GMNEWMAR
    catPos: 8
    normalization: 0.81
  - type: GMSTORY
    catPos: 12
    normalization: 1.0
  - type: GMTACTIC
    catPos: 17
    normalization: 1.14
  - type: GMTACTIC1
  - type: GMTACTIC2
  - type: GMTACTIC3
  - type: GMTACTIC4
  - type: GMTACTIC5
  - type: GMTACTIC6
  - type: GMTACTIC7
  - type: GMTACTIC8
  - type: GMTACTIC9
  - type: GMTACTIC10
  - type: GMWIN
    catPos: 11
    normalization: 0.84

My understanding from this is one put the custom music file (say ogg) with the name to match one of the types above (e.g., "GMTACTIC9"). My questions are:

1. I put a track as say "GMTACTICS_custom1", the game will put it in the correct track? Sorted by name, I assume.

2. If I were to remove some soundtracks, that ought not to play from vanilla, one will use the delete command?

3. Related to 1 and 2. If I have a long sound track that I wanted to replace, say, the whole set of GMGE tracks, then I need to delete all as per 2, and then add my single track as per 1. Is this right?

4. If I were to delete any of the named tracks (e.g."GMDEFEND") then the game will go silent or the game will crash?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: understanding custom music and musics.rul
« Reply #1 on: October 26, 2020, 05:32:49 pm »
Instead of testing each case and giving you the answers, I'll just say that you can test each case and give us the answers.

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
Re: understanding custom music and musics.rul
« Reply #2 on: October 26, 2020, 06:03:32 pm »
Instead of testing each case and giving you the answers, I'll just say that you can test each case and give us the answers.

Yeah, indeed. I cannot wait to test my own cases once I arrive home. These were the questions to occur to me while I was drinking my morning coffee  :)

By the way, can we specify the game to play a certain track (say MY_TRACK.ogg) to a certain time stamp? I assume we can't and the only way is to split the music file into separate files.

Edit: Well, to answer myself:
Code: [Select]
extraStrings:
  - type: en-US
    strings:
      GMTACTIC_custom: "Awesome music from YouTube"
musics:
  - delete: GMTACTIC
  - delete: GMTACTIC1
  - delete: GMTACTIC2
  - delete: GMTACTIC3
  - delete: GMTACTIC4
  - delete: GMTACTIC5
  - delete: GMTACTIC6
  - delete: GMTACTIC7
  - delete: GMTACTIC8
  - delete: GMTACTIC9
  - delete: GMTACTIC10
  - type: GMTACTIC_custom
    normalization: 1.0
Appears to work.
As a bonus I realized that if the string is mentioned in the language, the soundtrack now has a name.
« Last Edit: October 27, 2020, 12:54:10 am by Alex_D »