Jump to content
Ghost Recon.net Forums

Find duplicates in effects.xml's

Recommended Posts

 For several months we have used six mods plus the original game at the same time when we play.
    This has caused several sound issues because GR does not like duplicates to exist in the effects.xml's across the mods being used.
    Most annoying was no "wading in water" sound being replaced with a bird like sound and occasionally weapon sounds would not play.

How I have solved the issue but I'm sure there are other ways and probably quicker.
    -Compile the effects.xml's (6 mods in my case + the 3 from the original game) to be checked for duplicates into one text file.
    -Strip the names of the .wav files out using Notepad++
    -Save as input.txt
    -Paste this code in Powershell:
      get-content .\input.txt | group-object | where { $_.count -ne 1 } | format-table -auto -prop name,count
    - press enter
    The code in Powershell will output a list of duplicates and how many times they are duplicated.
    This list can be highlighted and copied from Powershell.
    Then it is a matter of searching the the compiled effects.xml(six mods in my case) using the list of duplicates generated by Powershell.
    This can be made as a effects.xml for several mods. I leave the effects.xml for Origmiss, DS and IT out of the compiled xml, only the six mods.

    Place the compiled effects.xml in one of the mods having renamed the other six effects.xml_original.    
    In the future if a mod is to be used alone the effects_original.xml can be named to what it was, effects.xml  
    We tried this yesterday and so far it has worked. We had the correct wading sounds when in water and all of our weapon sounds worked.
    Are there other methods? I found some other methods but they were not explained well enough for me to use. 😀

Edited by wombat50
  • Like 1
Link to post
Share on other sites

Don’t know about Notepad++, but a good text editor should be able to strip duplicate  lines from selected text. I use BBEdit (free, Mac-only) for that, which also offers full grep and regex support, as well as syntax highlighting and tons of other stuff that comes in handy when modding.

  • Like 1
Link to post
Share on other sites
Posted (edited)

I think Notepad++ will strip duplicate lines but I'm not sure the entire line in a effects.xml would be a duplicate. The file name may be a duplicate but the length, min, max and rolloff could differ. Is the filename the only thing that should not be duplicated or if the filenames match but other parameters in the line being different not make it a conflict?

To me conflicts with effects.xml's are the most notable but what are other potential conflicts when running more then one mod?
Asking because I can't think of any offhand.

Edited by wombat50
Link to post
Share on other sites

Any file can cause conflicts, with textures, sounds, and gun files probably being the most common ones, e.g. there may be several m4.gun, crate.rsb, or ambient.wav files, all with different contents. While the last mod in the list will overwrite all previous files, some dependencies may break, e.g. in missions.

  • Thanks 1
Link to post
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.

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...