[Guide] Customize Weapon Mod Attributes

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

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

Post Reply
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

[Guide] Customize Weapon Mod Attributes

Post by Simoom » Sun, 3. Apr 16, 15:03

Was gonna post this in a question thread pertaining to the weapon modding system... but I figured people would find this useful, so putting this in a separate guide thread for now.

Please note that what I am about to teach you is an all-out cheat. :D But since the weapon mod crafting system is all but useless at the moment... for those of you who actually dumped time and rare crafting materials into this thing, might as well get something back for it eh?

Understanding Weapon Mod Attributes

Weapon mods, when viewed within the game's library scripts, looks something like this:

Code: Select all

    <weapon macro="weapon_player_[...]_macro" weight="3">
      <damage min="1.05" max="1.1" weight="6"/>
      <cooling min="0.52" max="5.33" weight="20"/>
      <reload min="0.74" max="1.03" weight="1"/>
      <speed min="0.4" max="1.1" weight="3"/>
      <lifetime min="1.05" max="2.0" weight="14"/>
      <sticktime min="0.8" max="1.2" weight="6"/>
      <amount min="1" max="8" weight="2"/>
      <chargetime min="1.18" max="0.82" weight="6"/>
      <beamlength min="0.8" max="2.0" weight="14"/>
      <mining min="0.8" max="2.0" weight="6"/>
  • weapon macro="[...]" specifies what weapon the mod applies to.
  • weight="[...]" specifies how likely a mod or attribute is likely to spawn (in the example above, you can see that the "cooling" bonus is far more likely to appear on the mod than the "damage" bonus).
  • damage min="[...]" max="[...]" adjusts the weapon's base damage. The exact bonus provided will be randomly placed somewhere between the "min" and "max" values specified by the library script. The value translates into percentages, with 1 = 100% (so damage="1.05" translates into a 5% damage bonus. Note that all values can be negative; damage="0.75" means the mod will give your weapon a 25% damage penalty.
  • cooling min="[...]" max="[...]" adjusts the cooling bonus of your weapon.
  • reload min="[...]" max="[...]" adjusts the firing rate of your weapon (a value greater than 1 means it's firing faster; less than 1 means it fires slower). Note this can rapidly increase heat generation!!!.
  • speed min="[...]" max="[...]" adjusts the projectile speed of your weapon. Note that this increases your effective weapon range.
  • lifetime min="[...]" max="[...]" adjusts the projectile lifetime of your weapon. Note that this increases your effective weapon range.
  • sticktime min="[...]" max="[...]" is an unique attributes which only applies to Pulse Maser Mk3, and affects how long the projectiles stick to the target (affects damage-over-time).
  • amount min="[...]" max="[...]" is an unique attribute that affects Inertial Hammer only. It determines how many bonus projectiles are launched.
  • chargetime min="[...]" max="[...]" adjusts the how quickly the weapon reaches full charge (affects Plasma Cannon Mk3 and Railgun only). Note that in order to provide an actual bonus, the value of this attribute needs to be LESS THAN 1! A value greater than 1 means your weapons is actually taking LONGER to charge!
  • beamlength min="[...]" max="[...]" only applies to Mining Laser, Heavy Laser, and Railgun. Determines weapons range (since these weapons are instant-hit, they can't have a "projectile speed" value).
  • mining min="[...]" max="[...]" determines mining speed. Only applies to Mining Laser and Heavy Laser.
Below is a list of weapon mods by weapon type (weapon Mk tier generally has no effect on possible mod attributes).
  • Laser

    Code: Select all

        <weapon macro="weapon_player_mining_mk1_macro" weight="10">
          <damage min="1.05" max="1.1" weight="2"/>
          <cooling min="0.72" max="1.28" weight="2"/>
          <beamlength min="0.8" max="2.0" weight="4"/>
          <mining min="0.9" max="2.0" weight="18"/>
  • Railgun

    Code: Select all

        <weapon macro="weapon_player_railgun_mk1_macro" weight="3">
          <damage min="0.97" max="1.3" weight="20"/>
          <cooling min="1.06" max="1.13" weight="6"/>
          <reload min="0.77" max="1.03" weight="1"/>
          <beamlength min="1.05" max="2.0" weight="14"/>
          <chargetime min="1.18" max="0.82" weight="6"/>
  • Pulsed Maser

    Code: Select all

        <weapon macro="weapon_player_impulse_mk1_macro" weight="10">
          <damage min="1.05" max="1.1" weight="18"/>
          <cooling min="0.92" max="1.77" weight="2"/>
          <reload min="0.6" max="1.04" weight="13"/>
          <speed min="0.4" max="1.1" weight="3"/>
          <lifetime min="1.05" max="2.0" weight="14"/>
          <sticktime min="0.8" max="1.2" weight="6"/> (Mk3 only)
  • Plasma Cannon

    Code: Select all

        <weapon macro="weapon_player_plasma_mk1_macro" weight="10">
          <damage min="0.97" max="1.3" weight="2"/>
          <cooling min="0.61" max="1.04" weight="13"/>
          <reload min="1.14" max="1.35" weight="18"/>
          <speed min="1.05" max="2.0" weight="14"/>
          <lifetime min="0.4" max="1.1" weight="3"/>
          <chargetime min="1.18" max="0.82" weight="6"/> (Mk3 only)
  • Particle Repeater

    Code: Select all

        <weapon macro="weapon_player_machinegun_mk1_macro" weight="10">
          <damage min="0.77" max="1.03" weight="13"/>
          <cooling min="1.1" max="1.24" weight="18"/>
          <reload min="0.5" max="5.51" weight="2"/>
          <speed min="1.05" max="2.0" weight="14"/>
          <lifetime min="0.4" max="1.1" weight="3"/>
  • Intertial Hammer

    Code: Select all

        <weapon macro="weapon_player_shotgun_mk1_macro" weight="10">
          <damage min="0.88" max="1.01" weight="13"/>
          <cooling min="1.03" max="1.06" weight="18"/>
          <reload min="1.06" max="1.16" weight="18"/>
          <speed min="0.4" max="1.1" weight="3"/>
          <lifetime min="1.05" max="2.0" weight="14"/>
          <amount min="1" max="8" weight="2"/>
Modders can obviously modify these values specified in the library to produce more powerful spawned mods. But until that comes along, there's something the average player can do manually... :)

Customizing Weapon Mod Attributes

First, make sure you have a weapon mod installed on all your weapons (you can manually add them in the save file if you don't have any... but that's a much more complex route as you need to locate all of your weapons in the save game file, then splice in a line of code after each one).

Now, use a XML editor (such as Notepad++) to open up your save game file. Now do a search for "<modification name=". Assuming all your weapon slots are occupied, and all weapons have a mod installed, you should see 5 entries exactly. They will be formatted in this manner (NOTE: Example below is an already-customized part from my save game)

Code: Select all

<modification name="VA-XP1" ware="inv_weaponmod_t3" macro="weapon_player_plasma_charging_mk1_macro" damage="1.5" cooling="1.75" reload="1.1" speed="2" lifetime="1.5" chargetime="0.75"/>
The modification name="[...]" is a string of alphabets randomly-generated as the mod's name. This can be customized to anything you want, though for safety I would stick with the game's naming format ("XX-XXX").

As for the attribute values... you can enter anything you want. There's no negative effect for exceeding the "max" value specified in the library scripts I mentioned earlier. If you want a weapon to do 500% damage, just enter "5" in the damage field.

Be careful about overdoing certain things, though... I am not sure how the game will behave if you give your particle repeater 5000% firing rate or 100km range. It may crash if you do something that ridiculous. Be "reasonably" cheaty, may be. :D

Ezarkal
Posts: 1610
Joined: Wed, 22. Apr 15, 02:27
x4

Post by Ezarkal » Mon, 4. Apr 16, 22:30

Thanks! I might end up using this if I don't get anything else than a +450% fire rate for the particle repeated MK3 in the next few days.
... talk about a way to make a machine gun useless.
Humans are deuterostomes, which means that when they develop in the womb the first opening they develop is the anus.
This means that at one point you were nothing but an asshole.

Some people never develop beyond this stage.

Post Reply

Return to “X Rebirth - Scripts and Modding”