Jump to content

How does the whole modmerge thing work ?


Charon

Recommended Posts

7 hours ago, Solver said:

So you could post those files here and accelerate the process of me looking at them :)

Solver, can you look to the code and can say why melee weapon aliens (like reapers) don't attack vehicles. We need it if it's possible because vehicles are OP against melee ones. (I dont talk about zombify, our melee creatures does direct damage mostly)

Link to comment
Share on other sites

It's difficult to say. I might test it at some point - just letting them target vehicles wouldn't be a big issue, but I suspect it may cascade into a bunch of problems, primarily related to the fact that vehicles occupy many tiles.

Link to comment
Share on other sites

1 hour ago, Solver said:

It's difficult to say. I might test it at some point - just letting them target vehicles wouldn't be a big issue, but I suspect it may cascade into a bunch of problems, primarily related to the fact that vehicles occupy many tiles.

I fear that title problem too but it could give a try, because this game coding is really strange at some points..

For example, we did some tests about "secondary weapon" at enemy AI. They did not use it at their turn, but they used secondary weapon at reaction shots and used the sprites of the secondary weapon. It's like they got a side arm just for reaction shots.. :)

and do you work on XCE too by any chance?

Link to comment
Share on other sites

It's possible. If I do, I'll need to post a thread to discuss alien mission modding, as I have some half-finished stuff there, and there's some more unreleased work that has been done for a while, mostly by llunak.

Now let's get out of Charon's thread as he suggests :)

Link to comment
Share on other sites

  • 3 months later...

Im just throwing this out there but it looks like theres no way make a mod that adds actual sound content to existing ones.

<?xml version="1.0"?>
<Sounds>
  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.75" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGE="insert">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
  </Sound>
</Sounds>

produces a 

Wed Nov 16 19:46:44 2016: Xenonauts, version .
Wed Nov 16 19:46:44 2016: Pixel Shader Version: ffff0300
Wed Nov 16 19:46:56 2016: MOD ERROR: An element to insert already exists: Wave
Wed Nov 16 19:46:56 2016: MOD ERROR: Merging XML for sounds.xml from mod mods/x-division 0.99 beta/ failed.

error. Nona does the "Wave" already exist but thats what we want to insert.

I cant "insert" the "name" because it already exists ( name="AirCombatBegins" ). I cant "update" the "name" because then all <Wave> get overwritten as well.

 

Looks like its not working, does anybody have a different oppinion ?

Link to comment
Share on other sites

1 hour ago, Charon said:

Im just throwing this out there but it looks like theres no way make a mod that adds actual sound content to existing ones.


<?xml version="1.0"?>
<Sounds>
  <Sound MODMERGEATTRIBUTE="name" MODMERGE="update" name="AirCombatBegins" volume="0.75" group="1" comment="Played when the air combat begins.">
    <Wave MODMERGE="insert">sound/AircombatBegins/AircombatBegins (1).ogg</Wave>
  </Sound>
</Sounds>

produces a 


Wed Nov 16 19:46:44 2016: Xenonauts, version .
Wed Nov 16 19:46:44 2016: Pixel Shader Version: ffff0300
Wed Nov 16 19:46:56 2016: MOD ERROR: An element to insert already exists: Wave
Wed Nov 16 19:46:56 2016: MOD ERROR: Merging XML for sounds.xml from mod mods/x-division 0.99 beta/ failed.

error. Nona does the "Wave" already exist but thats what we want to insert.

I cant "insert" the "name" because it already exists ( name="AirCombatBegins" ). I cant "update" the "name" because then all <Wave> get overwritten as well.

 

Looks like its not working, does anybody have a different oppinion ?

Change the modmerge from update to replace and remove the modmerge inside the <wave> element. Then copy paste all the original <wave> elements and add your own as well. It will make your mod overwrite any other mods that edit the same sound though.

Edited by Policenaut
Link to comment
Share on other sites

2 minutes ago, Policenaut said:

Change the modmerge from update to replace and remove the modmerge inside the <wave> element. Then copy paste all the original <wave> elements and add your own as well. It will make your mod overwrite any other mods that edit the same sound though.

No shit, holmes. Thats what i stated.

1 hour ago, Charon said:

but it looks like theres no way make a mod that adds actual sound content to existing ones.

Its kind of contradicting to a modmerging system. But its ok, i believe llunak and solver have done their best and i can see the improvement over a 100% manual overwriting procedure. So props to @llunak and @Solver for designing this awesome system. Im just hitting the wall wherever i go, but thats ok.

Thx for the try :) @Policenaut

Link to comment
Share on other sites

Just now, 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.

Sot it IS possible, if you know how. You just need to give the desired code line a name="X" if you want to individually overwrite/update/insert/replace it.

Edited by Charon
Link to comment
Share on other sites

  • 3 years later...
On 11/17/2016 at 8:52 AM, Policenaut said:

Still lets you edit the entry without overwriting the original file so it's not exactly useless. Some files like loadout.xml don't even work with the modmerge system though, at least it's possible to edit sounds without overwriting the original files.

is there any way to implement one´s own loadouts at all? I even tried to overwrite the original loadout.xml and it still keeps the old one, when starting a new game. That´s weird.. Would a fresh game install and ovewriting the loadout.xml before the first game start help or is it somehow hard coded anyway and vanilla loadouts can´t ever be changed anyway?

edit: my new loadouts.xml was just missing the modmerge="replace" command and now everything is fine. please ignore the above questions

Edited by Casaubon
found the answer
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...