Raywalker Posted February 17, 2015 Share Posted February 17, 2015 Hi, Thanks to the community for help in getting me to try this I tweaked the singularity cannon to be different but I need opinions if what did was correct, any improvements I could do or I should try other things with it. The tweak I did is for myself and I did cut, paste and copy how other mods do this type of thing. So if anyone's code is used, I apologize as I was just using it to learn and see if I could change the largeMAG and aleniumexplosive effect to something else. Thanks in advance to any responses, criticisms or advice. Singularity Projectile Tweak.zip Singularity Projectile Tweak.zip Quote Link to comment Share on other sites More sharing options...
kabill Posted February 17, 2015 Share Posted February 17, 2015 If you're planning on publishing this, or want to use it with other mods that also change the singularity cannon, you should change how you merge the entry in weapons_gc. Currently you have set it to replace but it would be better to make it update instead. This is all you should need: <Weapons><Weapon MODMERGEATTRIBUTE="name" MODMERGE="update" name="weapon.particlebeam"> <Ammos> <Ammo MODMERGE="update" name="ammo.ballistic.particlebeam"> <Projectile spectre="projectiles/singularity/singularity" speed="800" showAfterDistance="0.0"/> <Impact spectre="particles/singularityexplosion/singularityexplosion" sound="Weapon Rocketlauncher Explosion"/> </Ammo> </Ammos></Weapon></Weapons> You could also remove the "speed", "showAfterDistance" and "sound" variables if you've not modded them. I wasn't sure though so I left them alone. EDIT: For clarity's sake, the problem with "replace" is that it overwrites the entire entry which makes it incompatible with other mods that affect the same item. Using update allows you to change only the bits that need changing so it can be used alongside other mods. Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted February 17, 2015 Share Posted February 17, 2015 Raywalker, as well as the documentation, you might find my guide useful. Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 17, 2015 Author Share Posted February 17, 2015 Alright, thank you for the advice. I will change it to Update and test how it runs. I was fiddling with the speed to see how the projectile moves (wanted it fast enough to "powerful" but not so fast I couldn't see it) I still need to find some sound, but I can remove the "showAfterDistance" (not sure what it does) and "sound" variables for now as I am guessing the update will just change what is different and anything the same is wasted resources the needs to update. Thanks Kabill Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks Max_Caine for the links. I've taken my first steps and was just happy that the changes didn't crash the game . Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks Max_Caine for the links. I've taken my first steps and was just happy that the changes didn't crash the game . Going to copy/paste that to a document to read when I don't have data Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 17, 2015 Author Share Posted February 17, 2015 If you're planning on publishing this, or want to use it with other mods that also change the singularity cannon, you should change how you merge the entry in weapons_gc. Currently you have set it to replace but it would be better to make it update instead. This is all you should need:<Weapons><Weapon MODMERGEATTRIBUTE="name" MODMERGE="update" name="weapon.particlebeam"> <Ammos> <Ammo MODMERGE="update" name="ammo.ballistic.particlebeam"> <Projectile spectre="projectiles/singularity/singularity" speed="800" showAfterDistance="0.0"/> <Impact spectre="particles/singularityexplosion/singularityexplosion" sound="Weapon Rocketlauncher Explosion"/> </Ammo> </Ammos></Weapon></Weapons> You could also remove the "speed", "showAfterDistance" and "sound" variables if you've not modded them. I wasn't sure though so I left them alone. EDIT: For clarity's sake, the problem with "replace" is that it overwrites the entire entry which makes it incompatible with other mods that affect the same item. Using update allows you to change only the bits that need changing so it can be used alongside other mods. Thanks Kabill, It works better than before Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 18, 2015 Author Share Posted February 18, 2015 Sorry again, I am trying to add a weapon sound on explosion impact but it is not working. The game runs, but the sound does not play. Sound_gc.xml<?xml version="1.0"?><Sounds> <Sound name="weapon singularity explosion" MODMERGEATTRIBUTE="name" group="1"> <Wave MODMERGE="insert"> audio/sfx/weapons/singularitycannon.ogg </Wave> </Sound> </Sounds>weapon_gc.mxl<Weapons> <Weapon MODMERGEATTRIBUTE="name" MODMERGE="update" name="weapon.particlebeam"> <Ammos> <Ammo MODMERGE="update" name="ammo.ballistic.particlebeam"> <Projectile spectre="projectiles/singularity/singularity" speed="750" showAfterDistance="0.0"/> <Impact spectre="particles/singularityexplosion/singularityexplosion" sound="weapon singularity explosion" /> </Ammo> </Ammos> </Weapon></Weapons>[/Code] singularitycannon.ogg is located in the folder : audio\sfx\weapons in the Singularity Projectile Tweak folder. [ATTACH]6146[/ATTACH] singularitycannon.zip singularitycannon.zip Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted February 18, 2015 Share Posted February 18, 2015 Did you remember to add the sound in sounds_gc.xml? Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 18, 2015 Author Share Posted February 18, 2015 Did you remember to add the sound in sounds_gc.xml? I think i know what is wrong I named sounds_gc.xml as sound_gc.xml . Going to test now. Quote Link to comment Share on other sites More sharing options...
kabill Posted February 18, 2015 Share Posted February 18, 2015 You should put MODMERGE="insert" in the <sound> element rather than the <wave> child element as otherwise the <sound> element you've specified doesn't exist to have the <wave> child element inserted. Quote Link to comment Share on other sites More sharing options...
Raywalker Posted February 18, 2015 Author Share Posted February 18, 2015 You should put MODMERGE="insert" in the <sound> element rather than the <wave> child element as otherwise the <sound> element you've specified doesn't exist to have the <wave> child element inserted. Thanks again Got it working eventually by looking at the original game files and filled in the information that I left out as I am not "updating" the sound_gc.xml file, so I need to maintain the structure of how it is written. Quote Link to comment Share on other sites More sharing options...
podbelski Posted February 19, 2015 Share Posted February 19, 2015 2 cents: "insertreplace" is a more robust version of the "insert" command. It does not result in error if the tag already exists Quote Link to comment Share on other sites More sharing options...
kabill Posted February 19, 2015 Share Posted February 19, 2015 That's true, although probably unlikely to matter in this instance. Quote Link to comment Share on other sites More sharing options...
podbelski Posted February 19, 2015 Share Posted February 19, 2015 yeah very unlikely, just a general tip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.