More music

v1.6
-add music for Future era
-reworked file structure and instalation. (Now it needs to run WoCInstaller.exe after every update of tha main mod, but Audio2DScripts.xml and AudioDefines.xml won't need to be overwriten, thus the sound files are always up to date)



Installation:
  1. Extract the file
  2. Copy the Assets folder to your Rise of Mankind - A new Dawn folder
  3. Say 'Yes' to overwrite files
  4. YOU MUST RUN WOCINSTALLER.EXE TO MAKE IT WORK (it's in Assets/Modules)
  5. Enjoy :)
 
Could WocInstaller be ran from command line ?
 
It would be better if the process could be automated, but i'll see what i can do. I will have much less time to code from now on :S
 
So, now new language support is included, i want to think about mods integration.

The simpliest way to add mod support is to add a new file inside modules/-the mod-/, named, for example, "modinfo.xml" which contains some information.
The question is, what informations are really needed to be inside this file besides mod name and mod version. I want to find an answer to this before to implement.

I have thought about two ways of doing it:
- Either the file contains a list of all the files included in the mod, so they can be "excluded" on update. That is quite easy to implement (i can quickly write an utility to generate that list, that's 2h of work). However, if the mod change an "official" file, which is updated, then this one won't be updated as it is in the excluded list. It can generate bugs.

- Either the mods in Modules/ that are not default are automatically recognized as mods by the launcher and excluded. Then, if the mod modify "official" files, these are reverted on update and wocinstaller is automatically called after each update to reinject modifications into the "updated official" file (Am i clear ?). That is also easy to implement and maybe cleaner than first method. "MLF_CIV4ModularLoadingControls.xml" can also be dynamically regenerated according to Modules/* folders.

About updates, i'm not sure if the launcher should focus about updating mods or not. Maybe a simple "add module / remove module" (for which you provide a simple "zip" file renamed as ".module" for example) would be enough because i don't want to add complexity (and i'm sure 45° thinks the same).
However, MCP could be fully handled by launcher as it is a large modmod and git allows to easily check for updates.

What do you think about it ?
 
As audio seems to be the only type that needs to be injected into main files, i've began to redevelop an audio XML injector for mods support. Basically, execute it will look for all audio xml files and check if tags are present in the main files, and reinject. This is what woc_installer.jar does but in C++.

The mod workflow will be:
- Check for mods (all folders in Modules/ except default)
- Exclude that mods
- Update the game
- Check for mod folder and regenerate MLF_ file
- Execute audio XML injector

That will be universal (you will still be able to use the injector without the launcher) and won't need java anymore to install mods. Thus, it will be fast (less than 2s).

This workflow has the benefits to require no intervention from modders, allows manual updating (just erase Modules/-mod- folder, replace and reinject audio xml) and from players (install your favorite module and all is automatically done).
 
@Sogroon: The release of mods support of the launcher is imminent (somewhere today).
From the previous implementation, i've tried to get a bug-proof approach :D

Now, the launcher has a menu Community > Modules, which displays installed mods and their version. The detection is based on the folder names in Modules, minus the default modules. All is configurable via xml so it's easy to add new default modules, rename them etc for the team. At this point, the launcher will display "Folder name, unknown version".

Then, the launcher looks for a file named "modInfo.xml" which contains mod name, version, and an "extrafiles" marker with "file" identifiers. It allows the modules menu to display "Mega Civ Pack, v1.3.6" (f.e.). The last one allows the launcher to know if the mod has a dependency outside the Modules/ folder. For example, MCP0.FPK or MCP_text files (for MegaCivPack).

Now, the fun part is that when the launcher starts, it does:
- An automatic generation of exclusions.mods.xml file, which contains the mod folder list and ALL the files listed in modInfo.xml. This will allow the updater not to remove mods files on update.
- An automatic regeneration of "MLF_CIV4ModularLoadingControls.xml" which lists mods name and enabled ones. No need to provide this one in your mods anymore. It was the cause of manual operation if there were many mods.
- An automatic injection of audio xml tags into the main audio files. This operation is launched in background 4s after the start so the launcher is not slowed down. The manual executable will still be provided so if one is reluctant to use the launcher, it can still be done manually (woc will be removed from the repo).

All of this is automatic. modInfo.xml is optionnal but it has advantages of giving infos to the player about the installed version. I already have included this in the MCP repo, check it out here.

During my tests, i also have done it for MoreMusic, check it out here. You still have to add the opening intro file in the list if you want.

Could you reupload your addons with the following file ? You could also remove the old "Addons_*.ini" files has they have no usefulness since ages.

Yet, the launcher does not install or remove mods, but i have the feeling that it isn't its role. However, i have added another file named "knownModules.xml" in Modules/ which contains a list of third-party known modules with URL (it contains Mega Civ Pack, More music and Dinosaurs). The menu "Community > Modules > Get modules" will list the mods in this file so it's also quick to add more known mods.

Finally, i will release a minimalistic console executable to install, update and remove MegaCivPack and maybe provide it with the main mod.
 
Fantastic! :goodjob:

I think I understand (almost) everything. If not, I'll ask...

I will do as you said with MoreMusic later, but at the momen I'm lazy/busy irl.

About Dinosours I don't want to do anything for the moment. (1) I'm waiting for the new hunting mechanics (2) I have some oter ideas too.
 
So... Should I put the modInfo.xml to \Assets\Modules\MoreMusic folder, right?

And all it should contain is:

Spoiler :
PHP:
<?xml version="1.0"?>
<root>
    <name>More music</name>
    <version>1.6.1</version>
    <extrafiles>
    <!-- Add here all the files located outsite the mod Modules/ folder which are part of the mod. This will allow mod uninstallation. The parameter "default" should 

be set to 1 if the listed file replace a default mod file (= can't remove it without causing bug). Set it to 0 if this is safe to remove it. -->
        <!--<file default="0">Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3</file>-->
    </extrafiles>
</root>
Right?
 
Yes ! Just increases the version number when you publish a new version.

If you want to make the introduction music a part of your mod, set:
<extrafiles>
<!-- Add here all the files located outsite the mod Modules/ folder which are part of the mod. This will allow mod uninstallation. The parameter "default" should

be set to 1 if the listed file replace a default mod file (= can't remove it without causing bug). Set it to 0 if this is safe to remove it. -->
<file default="1">Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3</file>
</extrafiles>

When the launcher will read mod files, it will find that the fact the file "Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3" is not the same than on the server is normal as it's a part of your mod and it will prevent its overwriting it during the update. You can set default="1" to indicate that it's a remplacement of a main file, but in fact, this parameter does nothing actually (nothing implemented).
 
THX

Just a note:
"Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3" is actually not a replacement file of anything.
There is no "ROM-AND/Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3" only "BTS/Assets/Sounds/Soundtrack/OpeningMenuCiv4.mp3". That is already a "modular structure" :)
 
Oh ok. I haven't noticed that :)
 
The "Wait ! Still one last turn..." syndrome :D
 
So I updated to the latest rev, downloaded a fresh version of the MoreMusic, dropped into the assets folder, cleared the cache...
The music works. But now the interface is only the default blue. It ignores whatever color scheme I tell it to change with the launcher.

I tried to "repair installation", and it went back to properly working, deleting the MoreMusic in the process.
Tried again with the MoreMusic, same result.

Note: there is no WoCinstaller.jar! (But the music works anyway)

Note 2: it does ask to rewrite a "Civ4ModularLoadingControls something something.xml" does this have anything to do with the interface color?


EDIT:

I went and had a look at MLF_CIV4ModularLoadingControls.xml in assets\modules\
There "Interface" for some reason was "0", so I changed it to "1", and now works!

This should probably get written in a readme, or the file that comes with the MoreMusic should be checked and edited as necessary.
 
I changed the mod system in recent rev. You might have excluded "MLF_CIV4ModularLoadingControls.xml" for mods previously but now it's regenerated automatically, so be sure it is not on the exclusion list. There might a bug in the process, i'll have a look.
Interface should be put on 1 by default.

woc_installer.jar was removed and replaced by civ4_audio_xml_injector.exe but the good news is that you won't have to use it as it is done silently at launcher startup.

EDIT: Ok, i understand what you've said. Sogroon had to fix the mod by removing "MLF_CIV4ModularLoadingControls.xml", "Addon_MoreMusic" and adding a "modInfo.xml". Then, there won't be problems.
 
Top Bottom