Jump to content

Singularity Cannon tweaked, but would appreciate advice


Raywalker

Recommended Posts

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

Singularity Projectile Tweak.zip

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 :):)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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