Jump to content

[X:CE 0.34.2] Cannot mod loadouts.xml (SOLVED)


Policenaut

Recommended Posts

It is currently not possible to properly mod the loadouts.xml because the <Loadout> elements are missing the name="" attribute making it impossible to modmerge. Furthermore the xcesettings folder includes a loadouts.xml with a MODMERGE="replace" in the top <Loadouts> element which overwrites any other mods trying to edit the loadouts.xml. I've fixed this by adding unique name="" attributes to each of the loadouts in the loadouts.xml in the xce folder making it possible to modmerge and additionally made the loadouts.xml in the xcesettings folder properly use the modmerge system.

SOLVED: Use MODMERGECHILD and MODMERGECHILDCONTENT or MODMERGECONTENT to delete the parts you want to replace and then use the same method to insert them again.

Edited by Policenaut
Solved
Link to comment
Share on other sites

  • 2 weeks later...

This should get more attention, its a good fix.

 

Wouldnt it be possible to fix the sound.xml in the same way ? With

  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.75" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound1">sound/jetenter.ogg</Wave>
  </Sound>

?

I guess i will look into this later.

Link to comment
Share on other sites

Tested it and it looks to work. This is the code i used

  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.6" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound1">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound2">sound/AircombatBegins/AircombatBegins (2).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound3">sound/AircombatBegins/AircombatBegins (3).ogg</Wave>
  </Sound>

You just have to give individual names to the <Wave>. This can be a bit tiring when doing 400 sounds.

All 3 were playing at the start + the vanila jetenter.ogg too. 1/X propability is likely, where X is is the total number of sounds available.

Link to comment
Share on other sites

3 minutes ago, Charon said:

Tested it and it looks to work. This is the code i used


  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.6" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound1">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound2">sound/AircombatBegins/AircombatBegins (2).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound3">sound/AircombatBegins/AircombatBegins (3).ogg</Wave>
  </Sound>

You just have to give individual names to the <Wave>. This can be a bit tiring when doing 400 sounds.

All 3 were playing at the start + the vanila jetenter.ogg too. 1/X propability is likely, where X is is the total number of sounds available.

I just realised that the "name" has to be unique, but not the path directory. This way you can implement chances for the sound, for instance

  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.6" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound1">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound2">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
    <Wave MODMERGEATTRIBUTE="name" MODMERGE="insert" name="Sound3">sound/AircombatBegins/AircombatBegins (3).ogg</Wave>
  </Sound>

would give AircombatBegins (1).ogg a 50% chance, AircombatBegins (3).ogg a 25% and the vanilla jetenter.ogg another 25% chance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...