Advanced Search

Author Topic: MM8BDM v5 - Altfires and Charge weapons  (Read 9650 times)

0 Members and 1 Guest are viewing this topic.

June 16, 2016, 02:09:39 PM
Read 9650 times

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
MM8BDM v5 - Altfires and Charge weapons
« on: June 16, 2016, 02:09:39 PM »
A long time ago we had a discussion on this forum about a feature that someone (maybe me?) was considering adding to the game, but it got pruned so I'd like to have it once again.

Charge weapons in this game (Atomic Fire, Proto Buster, Laser Buster etc) can fire their regular shots by mashing the Fire button (mouse1 by default). This can be used strategically to whittle down opponents with low health or finish someone off after a charge shot as hit them. However, I don't know about you but absolutely hate mashing my mouse button. Setting up an additional button or alias for this is not very intuitive either.

Here is my suggestion to fix this. Adding Altfires to charge weapons. When used it will simply fire the non-charge version repeatedly while held down.

I know a lot of people are against this, but I'd like to list some reasons why I think it's about time we added this feature:

    Comfort. - The big reason. Mashing the mouse button is NOT comfortable in any kind of video game (especially my vertical mouse). It's bad for your wrist. We aren't going to save lives or anything with MM8BDM but if we can make playing the game more comfortable for players at little cost, we should consider it.
    We aren't ever going to use Altfire for anything else in the core game. - Fact. I considered it at the very start of MM8BDM but we're never going to use altfires. Modders can still use them for anything they wish. Right now it's an optional feature that isn't getting used.
    Players can achieve the same effect through aliases. - You can easily set up an alias to have the fire button mashed for you. This is not intuitive for players who aren't aware of aliases or know how to set them up however. Having the option through a keybind in the options (and possibly explained in game at some point) would be nice.

We will even make it so non-charge weapons fire their regular shot when pressing altfire so the button isn't completely dead when switching weapons.

I would like the community's consent before adding this though, in case I'm not seeing an important reason not to do this. Let me know what you think.

June 16, 2016, 02:58:41 PM
Reply #1

Offline BiscuitSlash

  • MM8BDM Extender
  • *
  • Date Registered: November 20, 2010, 12:49:25 PM

    • View Profile
Now we can do surprise laser shots!
« Reply #1 on: June 16, 2016, 02:58:41 PM »
As much as I love the whole "No Altfires in the core game" thing, those uncharged shots on chargeable weapons really need some love! I haven't done it enough because button mashing with a mouse feels really off.

Vote_Up for this new feature.

June 16, 2016, 03:31:23 PM
Reply #2

Offline Laggy Blazko

  • MM8BDM Extender

  • Unf
  • **
  • Date Registered: April 01, 2011, 02:08:23 AM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #2 on: June 16, 2016, 03:31:23 PM »
Quote from: "CutmanMike"
However, I don't know about you but absolutely hate mashing my mouse button.
lol ur a casul

Actually, I don't see why not adding something like this. As long as I can still smash my button if I want to. =P
Vote_Up

June 16, 2016, 03:35:32 PM
Reply #3

Offline JaxOf7

  • MM8BDM Extender
  • *****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #3 on: June 16, 2016, 03:35:32 PM »
Glad we're on the same page of rapid firing by holding a button and being willing to modify vanilla weapon code
But I'm guessing your current methodology is this, which would cause quite a bit of code bloat:
(click to show/hide)

So I am making an alternate suggestion: http://www.best-ever.org/download?file=anotherturbobuttontest.pk3 (only atomic fire works)
Have the jump cancel script that checks your controls check for altfire/userbutton press, and then give/take a turbo toggle based on that.
And then just modify charge weapons like so
(click to show/hide)
A change that affects just charge weapon coding, AND mods that already use altfire for their weapons can have players use the userbutton to utilize turbo as well.

June 16, 2016, 04:28:44 PM
Reply #4

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #4 on: June 16, 2016, 04:28:44 PM »
Quote from: "JaxOf7"
But I'm guessing your current methodology is this, which would cause quite a bit of code bloat

I believe all the weapons currently inherit a base weapon? Something like this should work:

Code: [Select]
Altfire:
Fire:
...

without having to edit every single weapon.

June 17, 2016, 01:50:38 AM
Reply #5

Offline JaxOf7

  • MM8BDM Extender
  • *****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #5 on: June 17, 2016, 01:50:38 AM »
That actually just does the BaseWeapon's Altfire on inherited weapons.
(click to show/hide)

You can indeed do this though
(click to show/hide)
But that is prone to desync online...
And doesn't change the fact that you have to define weapon.ammotype2 and Weapon.AmmoUse2 for each weapon if you want A_JumpIfNoAmmo and A_FireCustomMissile(,0,1 to work.

June 17, 2016, 01:59:25 AM
Reply #6

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #6 on: June 17, 2016, 01:59:25 AM »
If one was willing to wait for version 3.0 to make this change, simply employing the following flags on the base weapon would suffice:

+WEAPON.ALT_USES_BOTH - Altfire now makes use of Ammo1 and the defined Ammo2 [if any]
+WEAPON.ALT_AMMO_OPTIONAL - Ammo is no longer required to enter the Altfire state.


I'm personally not fond of your method because it's roundabout and takes up the user1 button.

June 17, 2016, 03:44:13 AM
Reply #7

Offline JaxOf7

  • MM8BDM Extender
  • *****
  • Date Registered: March 23, 2011, 03:56:13 AM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #7 on: June 17, 2016, 03:44:13 AM »
Quote from: "Lego"
If one was willing to wait for version 3.0 to make this change, simply employing the following flags on the base weapon would suffice:

+WEAPON.ALT_USES_BOTH - Altfire now makes use of Ammo1 and the defined Ammo2 [if any]
+WEAPON.ALT_AMMO_OPTIONAL - Ammo is no longer required to enter the Altfire state.
Tested, you are completely correct.

Baseweapon would just need this
(click to show/hide)

As for the altfire jump desync, it seems 3.0 actually fixes that. (Though I just remembered that desync issue could be sidestepped in current version with an inventory jump like so)
(click to show/hide)

Welp, I'm satisfied. Altfire = rapid sounds good to me.
I'll just keep that turbo toggle code around for mods that decide they want to have a +user1 toggle rapid fire for main/alt.

June 19, 2016, 12:13:12 AM
Reply #8

Offline Superjustinbros

  • MM8BDM MM9 Contributor

  • Something
  • *
  • Date Registered: October 29, 2012, 03:32:09 AM

    • View Profile
    • http://superjustintheblog.blogspot.com
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #8 on: June 19, 2016, 12:13:12 AM »
Up-voted.

June 19, 2016, 03:53:57 AM
Reply #9

Offline Hallan Parva

  • MM8BDM MM8 Contributor

  • drifting absently across an endless sea
  • *
  • Date Registered: September 23, 2010, 10:32:40 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #9 on: June 19, 2016, 03:53:57 AM »
Quote from: "CutmanMike"
We will even make it so non-charge weapons fire their regular shot when pressing altfire so the button isn't completely dead when switching weapons.
upvoted entirely because of this
consistency and clarity saves lives

+support

June 19, 2016, 05:17:03 AM
Reply #10

Offline fortegigasgospel

  • MM8BDM Extender
  • **
  • Date Registered: July 31, 2011, 09:55:05 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #10 on: June 19, 2016, 05:17:03 AM »
But then custom weapons. Sure like all of them have to be updated anyway, how much more work will that mean for them?

June 20, 2016, 09:50:51 AM
Reply #11

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #11 on: June 20, 2016, 09:50:51 AM »
That depends entirely on if this is placed into 5a or whatever version we release to patch this game up for Zandronum 3.0.

If it goes in for v5a, that's +2 lines of code for each weapon:
Code: [Select]
weapon.ammotype2 "ammo"
weapon.ammouse2 ammouse
where the string "ammo" and the integer ammouse vary from weapon to weapon.


However, if this change is applied whenever we patch for Zandronum 3.0, all the new code would be placed on the actor BaseWeapon, which would handle all the functionality for us. This means that the only thing the people making their custom weapons need to bother with is inheriting from BaseWeapon instead of MegaBuster.

June 24, 2016, 06:41:34 PM
Reply #12

Offline GameAndWatcher

  • Standard Member

  • Gosh!
  • Date Registered: April 03, 2011, 05:44:04 AM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #12 on: June 24, 2016, 06:41:34 PM »
Although it's technically not a charge weapon, could you guys also apply this to the Treble Boost? I'm sure there are situations where you wouldn't want to use the "boost" immediately.

June 24, 2016, 09:06:38 PM
Reply #13

Offline Gumballtoid

  • MM8BDM Extender

  • Recipe for Success
  • *******
  • Date Registered: July 13, 2011, 10:27:00 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #13 on: June 24, 2016, 09:06:38 PM »
That's not a bad idea, actually. Using altfire would just fire a single shot and not trigger flight, as though you were out of ammo.

June 28, 2016, 02:22:09 PM
Reply #14

Offline Russel

  • MM8BDM Extender

  • Doc Croc
  • ***********
  • Date Registered: December 17, 2010, 11:11:25 PM

    • View Profile
Re: MM8BDM v5 - Altfires and Charge weapons
« Reply #14 on: June 28, 2016, 02:22:09 PM »
I'm down for putting this into play, but I'd prefer to wait until Zandronum 3.0 to put it in if only because it wouldn't require as much on the side of creation and maintenance of custom weapon sets.

If it's required, I'll do it. Though I would rather not because it would set a new standard for the weapon bases that would look redundant and be nullified in a few versions incoming... it'd be work for me and potentially others to put in that would just become obsolete as soon as Zandro updates.


I want to see this in action, but I also don't want to update 80-someodd text files again, especially in a manner that would just get undone for another version incoming.