OpenXcom Forum

Modding => Work In Progress => Topic started by: x60mmx on October 27, 2014, 11:29:18 pm

Title: Removing firing mode in .rul
Post by: x60mmx on October 27, 2014, 11:29:18 pm
I am working on a mod to rebalance the weapons and need to know how to remove a firing mode from a weapon in the mod's .rul file.  Here is the Laser Pistol section from the default ruleset.  What would I need to do to remove the Pistol's Aim mode for example?  Thanks.

  - type: STR_LASER_PISTOL
    size: 0.1
    costSell: 20000
    weight: 7
    bigSprite: 5
    floorSprite: 5
    handSprite: 112
    bulletSprite: 5
    fireSound: 11
    hitSound: 19
    hitAnimation: 36
    power: 46
    damageType: 4
    accuracyAuto: 28
    accuracySnap: 40
    accuracyAimed: 68
    tuAuto: 25
    tuSnap: 20
    tuAimed: 55
    clipSize: -1
    battleType: 1
    invWidth: 1
    invHeight: 2 
Title: Re: Removing firing mode in .rul
Post by: Arthanor on October 27, 2014, 11:33:59 pm
just remove the lines that define it:
Code: [Select]
    accuracyAimed: 68
    tuAimed: 55

If it has neither of those attributes, the weapon doesn't have an aimed shot. If it has only one of them, things might get weird. Since they both default to 0, I assume you would get either a TU cost but 0% accuracy, or a free shot with whatever accuracy.
Title: Re: Removing firing mode in .rul
Post by: x60mmx on October 27, 2014, 11:49:31 pm
Tried simply deleting the lines but it doesn't do anything strangely.
Title: Re: Removing firing mode in .rul
Post by: Falko on October 27, 2014, 11:50:12 pm
just remove the lines that define it:
that will not work if you change an existing weapon like laser pistol that already has existing values in that position
setting the values to 0 should do the trick
Title: Re: Removing firing mode in .rul
Post by: x60mmx on October 28, 2014, 12:05:02 am
that will not work if you change an existing weapon like laser pistol that already has existing values in that position
setting the values to 0 should do the trick

We have a winner!  Thanks!
Title: Re: Removing firing mode in .rul
Post by: x60mmx on October 28, 2014, 12:36:34 am
New problem.  I changed the Accuracy of the Heavy Laser and ran into a strange problem.  The new Snap accuracy worked perfectly, but the Aimed Accuracy is not only incorrect ingame, it changes from soldier to soldier.  Any ideas?  :o  Also having this issue with Plasma weaponry, but not the Laser Pistol or Laser Rifle.
Title: Re: Removing firing mode in .rul
Post by: Warboy1982 on October 28, 2014, 12:47:54 am
https://www.ufopaedia.org/index.php?title=Firing_Accuracy (https://www.ufopaedia.org/index.php?title=Firing_Accuracy#Base_Chance_To_Hit)
Title: Re: Removing firing mode in .rul
Post by: x60mmx on October 28, 2014, 01:13:07 am
Whoops, it was my error  :P