[0.4.4] [Duke] Redundant Option

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [0.4.4] [Duke] Redundant Option

Re: [0.4.4] [Duke] Redundant Option

by Graf Zahl » Fri Feb 14, 2020 7:40 am

Yes, that's a first grade hack feature - designed to get quick results, but inevitably becoming a serious liabilty.

Re: [0.4.4] [Duke] Redundant Option

by Kinsie » Fri Feb 14, 2020 7:33 am

Gammli wrote:And there's also a way to rename the controls in the eduke32 menu, though I presently cannot find this in the wiki.
definegamefuncname to rename 'em, undefinegamefunc to remove 'em. Some real world examples from Ion Fury:

Code: Select all

definegamefuncname      gamefunc_Weapon_1               Electrifryer
definegamefuncname      gamefunc_Weapon_2               Loverboy
definegamefuncname      gamefunc_Weapon_3               Disperser
definegamefuncname      gamefunc_Weapon_4               Penetrator
definegamefuncname      gamefunc_Weapon_5               Chaingun
definegamefuncname      gamefunc_Weapon_6               Bowling_Bombs
definegamefuncname      gamefunc_Weapon_7               Disperser_Grenades
definegamefuncname      gamefunc_Weapon_8               Ion_Bow
definegamefuncname      gamefunc_Weapon_9               Clusterpuck

undefinegamefunc        gamefunc_Weapon_10
undefinegamefunc        gamefunc_Inventory
undefinegamefunc        gamefunc_Inventory_Left
undefinegamefunc        gamefunc_Inventory_Right
undefinegamefunc        gamefunc_Holo_Duke
undefinegamefunc        gamefunc_Jetpack

// definegamefuncname      gamefunc_TurnAround             SECRET_DEBUG_MENU!

Re: [0.4.4] [Duke] Redundant Option

by Gammli » Fri Feb 14, 2020 7:20 am

Well there are several ways. One is to utilize the creatively named 'bits' and 'extbits' bitmaps:
https://wiki.eduke32.com/wiki/Bits
https://wiki.eduke32.com/wiki/Extbits

Another is the events which are the ones listed on the right-hand side here: https://wiki.eduke32.com/wiki/Event_list

And there's also a way to rename the controls in the eduke32 menu, though I presently cannot find this in the wiki. I only know how this works on a superficial level but not in terms of engine code though.

Re: [0.4.4] [Duke] Redundant Option

by Gez » Fri Feb 14, 2020 7:12 am

Would it be possible to duplicate the whole weapon selection code, so there's an oldpath that uses the current horrible mess, and a newpath that uses some cleaner, abstracted and extendable setup, and mods can opt-in for the new path?

Re: [0.4.4] [Duke] Redundant Option

by Graf Zahl » Fri Feb 14, 2020 5:46 am

WTF? I already remapped several of the more obscure existing keybinds from the existing system to direct CCMD toggles or CVAR setters and removed the binding points afterward. Great way to lock oneself so deeply into bad design that there's no way out anymore. I always knew that the event system is a ticking time bomb, but this confirms my worst suspicions about it and will most certainly require some rethinking about Raze's goals.

EDIT: looking at the code, most of those never filter down to the playsim. Am I guessing correctly that these mods hijack the button states that actually do get filled into the player.input field? Because that is available to scripts - the raw input is not.

Re: [0.4.4] [Duke] Redundant Option

by Gammli » Fri Feb 14, 2020 5:22 am

Nash wrote:What's the difference between Alt Weapon and Secondary Fire though?
Alt Weapon switches between Pipebomb and Detonator, and between the Shrinker and Expander.

Note that in eduke32 it is currently not possible to define new bindable actions in the control menu (or reorder them for that matter), therefore most mods essentially hijack existing, redundant keys through use of the event system to define their own custom keybinds. This is why even redundant controls that people will likely never use need to remain in the menu for the time being, until a new system for binding controls is put in place. (though that would break backwards compatibility)

Re: [0.4.4] [Duke] Redundant Option

by Nash » Fri Feb 14, 2020 4:42 am

What's the difference between Alt Weapon and Secondary Fire though?

Re: [0.4.4] [Duke] Redundant Option

by Graf Zahl » Fri Feb 14, 2020 3:13 am

It's just like the Strife popups. Some Doom mods use them so the options need to be present.

Re: [0.4.4] [Duke] Redundant Option

by PlayerLin » Fri Feb 14, 2020 2:45 am

lowskill. wrote:Hm, alright, I didn't know this was actually left with a purpose, thought it was just a leftover.
Some EDuke32 mods needed this so it's not redundant at all, it just needed the mod to use that feature. :wink:

Re: [0.4.4] [Duke] Redundant Option

by sinisterseed » Thu Feb 13, 2020 12:43 pm

Hm, alright, I didn't know this was actually left with a purpose, thought it was just a leftover.

Re: [0.4.4] [Duke] Redundant Option

by Rachael » Thu Feb 13, 2020 12:24 pm

This is the same story as GZDoom, really.

The vanilla games (except Blood) have no use for this option, same with the original games GZDoom supported way back when. Just because it's in the menu and does nothing does not mean it is a useless option.

Re: [0.4.4] [Duke] Redundant Option

by Gammli » Thu Feb 13, 2020 12:11 pm

This function exists for Ion Fury and is exposed to CON through EVENT_ALTFIRE, meaning that mods (such as Alien Armageddon iirc) may make use of it.

[0.4.4] [Duke] Redundant Option

by sinisterseed » Thu Feb 13, 2020 7:30 am

Old but it still exists.

Duke still has a redundant/extra "Secondary Fire" option that can be bound to any key under Controls. However it does nothing (and probably never did), the "Alternative Weapon" options does its job instead.

Top