OpenXcom Forum

Modding => Released Mods => Topic started by: NastyKhan on June 14, 2021, 12:15:25 am

Title: [WEAPON] New Heavy Weapons
Post by: NastyKhan on June 14, 2021, 12:15:25 am
Hi,

I'm new. Please check my first mod ever :) Tested several times on OXCE, so should be fine.

https://openxcom.mod.io/new-heavy-weapons

• Auto-cannon and Heavy Cannon removed
• Sniper Rifle added. Piercing ammo only.
• Granade Launcher added. Explosive, incendiary and smoke ammo available.
• Light Machine Gun added. Piercing ammo only.

Best regards
Title: Re: [WEAPON] New Heavy Weapons
Post by: The Martian on June 14, 2021, 05:04:52 am
Excellent sprite work NastyKhan! (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
(https://openxcom.org/forum/index.php?action=dlattach;topic=9742.0;attach=54219)
Title: Re: [WEAPON] New Heavy Weapons
Post by: NastyKhan on June 14, 2021, 09:35:02 am
Thanks, Colonel :)

Wait until you hear the sounds!

Best regards
Title: Re: [WEAPON] New Heavy Weapons
Post by: gaffer on June 23, 2021, 08:22:58 pm
Great looking work! Looking forward go trying this.
Title: Re: [WEAPON] New Heavy Weapons
Post by: x-com_player on January 03, 2022, 09:13:48 pm
Hi, using your mod with OXCE 7.3.
1. I may suggest adding new HW to starting base. Changed 'startingBase' rul file. see in attchment.

2. I added 2 new fire mods to Light Machine Gun, so now its 3 types of fire:
 - Auto snap shot: 3 rounds, low accurancy
 - Auto aimed shot: 3 rounds, high accurancy
 - Rapid shot: 5 rounds, lowest accurancy and low cost

Currently cant fix description strings in Ufopedia.
Title: Re: [WEAPON] New Heavy Weapons
Post by: Dioxine on January 08, 2022, 05:55:35 am
Code: [Select]
  STR_SHOT_TYPE_AUTO: " Auto (x{0})"
  STR_SHOT_TYPE_SNAP: " Snap (x{0})"
  STR_SHOT_TYPE_AIMED: " Aimed (x{0})"

Modifying language file like this will make the Pedia display correct number of shots for all firing modes. However, it won't display custom name for firing modes, there's no such option.
Title: Re: [WEAPON] New Heavy Weapons
Post by: Meridian on January 08, 2022, 10:40:44 am
I will look into this.
Maybe there's something we can do...
Title: Re: [WEAPON] New Heavy Weapons
Post by: The Reaver of Darkness on January 09, 2022, 10:08:39 am
Currently cant fix description strings in Ufopedia.

Add this to your language files:
Code: [Select]
  STR_SHOT_TYPE_SNAP: "Snap (x{0})"
  STR_SHOT_TYPE_AIMED: "Aimed (x{0})"

edit: oh nvm Dioxine already had the answer! :P
Title: Re: [WEAPON] New Heavy Weapons
Post by: NastyKhan on January 09, 2022, 02:06:37 pm
I would just like to say, that this gun has custom sound and custom bullet sprite to emulate short burst per shot.
That means 5 "shots" are actually 5 short bursts.
Title: Re: [WEAPON] New Heavy Weapons
Post by: x-com_player on January 12, 2022, 12:36:08 pm
Thatnk you for help!

I would just like to say, that this gun has custom sound and custom bullet sprite to emulate short burst per shot.
That means 5 "shots" are actually 5 short bursts.
That is totally ok. 5 shots sould like 5 bursts, same as 3 shots sound like 3 bursts.

Also, game supports arc shots so granage launcher also may have 2 mods: linear shot and ark shot.
Title: Re: [WEAPON] New Heavy Weapons
Post by: NastyKhan on January 12, 2022, 02:35:13 pm
Quote from: x-com_player
Also, game supports arc shots so granage launcher also may have 2 mods: linear shot and ark shot.

That's true. I was thinking about ark shot initially as I found it more intuitive, but I quickly learned that ark shots and explosives don't really like each other. Especially indoor.
Title: Re: [WEAPON] New Heavy Weapons
Post by: Meridian on January 15, 2022, 12:13:49 pm
Currently cant fix description strings in Ufopedia.

I've added new fields for custom short names in the ufopedia.

Example:

Code: [Select]
items:
  - type: STR_RIFLE
    confAimed:
      shots: 4
      name: STR_BIG_BOOM
      shortName: STR_BIG_BOOM_SHORT
    confSnap:
      name: STR_SMALL_BOOM
      shortName: STR_SMALL_BOOM_SHORT
    confAuto:
      shots: 2
      name: STR_SMALL_BOOM_X2
      shortName: STR_SMALL_BOOM_X2_SHORT

Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_BIG_BOOM: "Big boom"
      STR_BIG_BOOM_SHORT: "Big (x{0})"
      STR_SMALL_BOOM: "Small boom"
      STR_SMALL_BOOM_SHORT: "Small"
      STR_SMALL_BOOM_X2: "Double boom"
      STR_SMALL_BOOM_X2_SHORT: "Small (x{0})"

Feature will be available in OXCE 7.4.1
Title: Re: [WEAPON] New Heavy Weapons
Post by: x-com_player on January 16, 2022, 02:48:31 pm
Thank you, Meridian! Much appreciated.
Title: Re: [WEAPON] New Heavy Weapons
Post by: The Reaver of Darkness on January 25, 2022, 03:40:54 pm
Yes, thank you! I also wanted this!
Title: Re: [WEAPON] New Heavy Weapons
Post by: TBeholder on December 12, 2022, 05:01:28 pm
(commented on mod portal)

If we are talking customized firing modes, it would require OXCE already, right?
In which case, adding sprayWaypoints (for LMG) and fine-tuning kneelBonus and oneHandedPenalty values (for all) would make it even better.

Thatnk you for help!
That is totally ok. 5 shots sould like 5 bursts, same as 3 shots sound like 3 bursts.
As in,
Code: [Select]
    confSnap:
      shots: 5
? But… the engine plays sound as many times as shots are fired anyway. So this works, but requires use of "shotgun pellets" to treat as one “shot”. This removes bullet sprite among the other things.
So more like
Code: [Select]
  - type: STR_LMG

    confSnap:
      spendPerShot: 5
    confAuto:
      spendPerShot: 5
    confAimed:
      spendPerShot: 5

  - type: STR_LMG_AMMO

    clipSize: 100
    shotgunPellets: 5
Then the number of shots is number of rounds ×5/5, which is the least counter-intuitive, right?

Quote
Also, game supports arc shots so granage launcher also may have 2 mods: linear shot and ark shot.
That would be weird.
Besides, one problem with guns that shoot HE is that it makes Rocket Launcher more and more obsolete. Unless countered by buffing armor a lot, especially on some units likely to be encountered before Heavy Plasma is available.
Not having aimed shot on GL already looks like an obvious nerf aimed at this.
Making GL more versatile is only going to make this problem worse.

As to the arcing shots… they are pseudo-throwing, with variable strength (try arcing shot over a barn), not ballistic parables with fixed strength.
It’s fun, but not appropriate for realistic believable GL.

On the other hand, modding mini-coilgun mortars (that can be used only when kneeling and maybe only with aimed shot) could be fun. But that’s for another mod, where all open air maps would be made extra-tall (https://openxcom.org/forum/index.php/topic,5316.0.html).  ;D
Title: Re: [WEAPON] New Heavy Weapons
Post by: zee_ra on March 30, 2023, 05:16:12 am
I've added new fields for custom short names in the ufopedia.

Example:

Code: [Select]
items:
  - type: STR_RIFLE
    confAimed:
      shots: 4
      name: STR_BIG_BOOM
      shortName: STR_BIG_BOOM_SHORT
    confSnap:
      name: STR_SMALL_BOOM
      shortName: STR_SMALL_BOOM_SHORT
    confAuto:
      shots: 2
      name: STR_SMALL_BOOM_X2
      shortName: STR_SMALL_BOOM_X2_SHORT

Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_BIG_BOOM: "Big boom"
      STR_BIG_BOOM_SHORT: "Big (x{0})"
      STR_SMALL_BOOM: "Small boom"
      STR_SMALL_BOOM_SHORT: "Small"
      STR_SMALL_BOOM_X2: "Double boom"
      STR_SMALL_BOOM_X2_SHORT: "Small (x{0})"

Feature will be available in OXCE 7.4.1

I wonder if it is possible to provide kneeling and custom aiming bonuses to the specific shot configurations?

That is, is something like this possible:
Code: [Select]
confAimed:
  name: STR_LAUNCH_GRENADE
  kneelBonus: 300
  arcing: true
  accuracyMultiplier:
    firing: 0.5
    psiStrength: 0.5



Title: Re: [WEAPON] New Heavy Weapons
Post by: Yankes on March 30, 2023, 11:43:30 am
all properties like `accuracyMultiplier` have option to be overridden by specific script where you can add any conditions you like:
Code: [Select]
accuracyMultiplier: |
  # custom code
or put it in global script tho share it between multiple items (and this will be controlled by script tags).
Title: Re: [WEAPON] New Heavy Weapons
Post by: x-com_player on July 28, 2023, 07:18:15 pm
Then the number of shots is number of rounds ×5/5, which is the least counter-intuitive, right?
 That would be weird.

Actually I have not touched that topic for time. If it's still relevant, my current config:
Code: [Select]
  - type: STR_LMG
    size: 0.3
    costBuy: 13500
    costSell: 10125
    weight: 19
    bigSprite: 211
    floorSprite: 211
    handSprite: 211
    bulletSprite: 20
    fireSound: 211
    compatibleAmmo:
      - STR_LMG_AMMO
    confAimed:
      shots: 1
      name: STR_AUTO_AIMED_SHOT
      shortName: STR_AUTO_AIMED_SHOT_SHORT
    confSnap:
      shots: 1
      name: STR_AUTO_SNAP_SHOT
      shortName: STR_AUTO_SNAP_SHOT_SHORT
    confAuto:
      shots: 2
      name: STR_AUTO_RAPID_SHOT
      shortName: STR_AUTO_RAPID_SHOT_SHORT
    accuracyAimed: 80
    accuracySnap: 35
    accuracyAuto: 25
    tuAimed: 70
    tuSnap: 25
    tuAuto: 30
    battleType: 1
    twoHanded: true
    invWidth: 2
    invHeight: 3

From where do you see that arcing shot depends on strength? Seems no.