help with editing weapons

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

help with editing weapons

Post by xrook » Sun, 2. Aug 15, 13:39

im trying to change the shotgun into a sniper but so far some of the changes doesnt seem to work in game

the shotgun still kept its reload rate, speed*, range, (heat?*)
only the damage changed

*speed, lifetime & heat went to exaggerating amounts because i wanted to see if i actually changed something

Code: Select all

<diff>
	<replace sel="/macros/macro[@name='bullet_player_shotgun_mk2_macro']/properties/bullet">
		<bullet speed="12400" lifetime="7" range="7000" amount="12" barrelamount="1" icon="player_weapons_primary_shotgun" angle="0" maxhits="12" ricochet="0.25" restitution="0.5" scale="0" attach="0" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_shotgun_mk2_macro']/properties/heat">
		<heat value="2500" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_shotgun_mk2_macro']/properties/reload">
		<reload rate="0.2" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_shotgun_mk2_macro']/properties/damage">
		<damage value="2500" repair="0" />
	</replace>
</diff>

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13937
Joined: Sun, 20. Nov 05, 23:45
x4

Post by UniTrader » Sun, 2. Aug 15, 14:10

i think that you have to edit 2 macros for changing a weapon. the Weapon Macro itself and also its related Bullet - your Code seems to be for the bullet only, but fire rate and heat* are in the Weapon macro, not the bullet

*heat is partially in the bullet - the amount of heat each Bullet generates i think, but the cooldown is defined in the weapon macro (and is imo the more interesting part)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Sun, 2. Aug 15, 15:02

assets\fx\weaponfx\macros\bullet_player_shotgun_mk2_macro? theres many of these??

if im correct bullet_player_shotgun_mk2_macro's heat is heat generated per shot
while weapon_player_shotgun_mk2_macro is its amount of heat before overheating, cooldown etc.

Edit:
i found this line inside 'weapon macro'

<reload />

but its blank unlike whats inside the 'bullet macro' which has a value

Edit 2:
i stand corrected even the damage did not change, realized it after checking the damages online

Edit 3:
REPEAT AFTER ME!! I AM THE BIGGEST IDIOT IN THE ENTIRE WORLD!!!!

without realizing it the one i kept editing was the one inside the backup folder and not inside the extension... :evil:

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Sun, 16. Aug 15, 11:34

how do you make a weapon deal extra hull damage or shield damage?

ex.
dealing 3k dps and does 50% more on hulls

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13937
Joined: Sun, 20. Nov 05, 23:45
x4

Post by UniTrader » Sun, 16. Aug 15, 11:50

here a <damage/> node from an unused weapon which probably contains these definitions:

<damage min="1" max="500" value="500" hull="500" shield="0" delay="0" rate="0" />

note that the related macro ( <macro name="shotgun_macro" class="bullet"> ) is unused in Vanilla, so you have to try out if these actuall work..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 16. Aug 15, 11:53

From bullet_player_beam_v2_macro:

Code: Select all

<damage value="10000" hull="1000" repair="0">
not sure if that's what causes it to bypass shields by doing direct damage to hull regardless of shielding. Dug a little bit, but haven't yet found documentation on additional attributes for <damage ... />

edit: Could be fun to play with these:

maxhits="2" ricochet="0.3"

Have shotgun pellets indefinitely knock around, potentially damaging whole squadrons?

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Sun, 16. Aug 15, 12:09

so hull="1000" = 1000% damage?
w.evans wrote:From bullet_player_beam_v2_macro:

Code: Select all

<damage value="10000" hull="1000" repair="0">
not sure if that's what causes it to bypass shields by doing direct damage to hull regardless of shielding. Dug a little bit, but haven't yet found documentation on additional attributes for <damage ... />

edit: Could be fun to play with these:

maxhits="2" ricochet="0.3"

Have shotgun pellets indefinitely knock around, potentially damaging whole squadrons?
remember that shotgun turned into a sniper, i dunno what line made it like this but somehow it has the ability to pierce through the capital ship and straight into what my aim assist is targeting (ex. one of its turrets)

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Sun, 16. Aug 15, 12:38

xrook wrote:so hull="1000" = 1000% damage?
not sure, but would guess 1000 points, in addition to base damage.
xrook wrote:remember that shotgun turned into a sniper, i dunno what line made it like this but somehow it has the ability to pierce through the capital ship and straight into what my aim assist is targeting (ex. one of its turrets)
Armor piercing projectiles! Sounds like fun!

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Sun, 16. Aug 15, 13:14

tested... hull="??" gives an addition hull damage that ignores shield

Code: Select all

<damage value="196" hull="150" repair="0" />
dealth both damage to shield and hull when i fought a plutarc squad

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Sun, 16. Aug 15, 17:13

what about splash damage?

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Fri, 21. Aug 15, 14:23

can i ask what gives a weapon its AoE damage? i tried giving the players plasma cannon something similar to capital ships plasma cannon but no luck

i tested it against a capital ship with turrets thats too close to each other


players plasma cannon

Code: Select all

<diff>
	<replace sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties/bullet">
		<bullet speed="1700" lifetime="2.4" range="4080" amount="1" barrelamount="1" icon="player_weapons_primary_plasma" angle="0.05" maxhits="1" ricochet="0" scale="0" attach="0" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties/heat">
		<heat value="3929" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties/reload">
		<reload rate="1.4" />
	</replace>
	<replace sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties/damage">
		<damage value="9324" repair="0" />
	</replace>	
	<add sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties">
		<areadamage value="1800" />
	</add>
	<replace sel="/macros/macro[@name='bullet_player_plasma_mk1_macro']/properties/effects/impact">
		<impact ref="plasmaemitter_impact_02" inside="plasmaemitter_impact_inside"/>
	</replace>	
</diff>
a ships plasma cannon

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!--Exported by: 192.168.3.113 (192.168.3.113) at 13.03.2013_17-47-31-->
<macros>
  <macro name="bullet_turret_medium_pe_mk1_macro" class="bullet">
    <component ref="plasmaemitter_bullet_02" />
    <properties>
      <ammunition />
      <bullet speed="440" lifetime="6" range="2600" amount="1" barrelamount="1" timediff="0.1" angle="0.15" maxhits="1" ricochet="0" scale="0" attach="0" />
      <energy value="100" />
      <reload rate="0.8" />
      <areadamage value="4000" />
      <damage value="8000" repair="0" />
      <effects>
        <impact ref="plasmaemitter_impact_02" inside="plasmaemitter_impact_inside" />
        <launch ref="plasmaemitter_muzzle_02" />
      </effects>
    </properties>
  </macro>
</macros>

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Fri, 21. Aug 15, 18:14

Heh. That was like playing Where's Waldo. Have you tried adding this?

timediff="0.1"

No idea what it does.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13937
Joined: Sun, 20. Nov 05, 23:45
x4

Post by UniTrader » Fri, 21. Aug 15, 18:22

also if you want to experiment it greatly helps to replace the whole File instead of just changing some parts so you can see everything at once ;)

Code: Select all

<replace sel="/*">
<macros>
   .......
</macros>
</replace>
note that this is no good method for a released Mod, but it certainly helps if you want to understand how to achieve something ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Fri, 21. Aug 15, 18:57

Code: Select all

<impact ref="plasmaemitter_impact_02" inside="plasmaemitter_impact_inside" /> 
this one gave my plasma that visual explosion on impact

Code: Select all

<launch ref="plasmaemitter_muzzle_02" /> 
muzzle effect

Code: Select all

<component ref="plasmaemitter_bullet_02" />
and changing this one changes the weapons projectile... xenon canons, lol shooting projectiles thats bigger than the skunk

"scale= , i changed this thinking it would make the projectile smaller or bigger but it doesnt

im gonna give timediff a bigger number see if does something

EDIT:
timediff creates a delay before the weapon reaches its max reload speed
-can turn a weapon into a minigun

Clownmug
Posts: 256
Joined: Wed, 11. Dec 13, 03:39
x4

Post by Clownmug » Fri, 21. Aug 15, 21:04

I think the impact effect may be more than just visual. If you look in the libraries/effects.xml file, under the "plasmaemitter_impact_02" effect, there's an element node that seems to affect the range of the area damage.

Code: Select all

      <!-- Area Damage -->
      <element id="3" ref="effect_dummy_macro" forkeffect="none" duration="1.0" forkmaterial="none" forklod="none">
        <areadamage range="50" falloff="1.0" duration="1.0" delay="0"/>
      </element>

Post Reply

Return to “X Rebirth - Scripts and Modding”