Page 1 of 1

Dynamic autocomplete similar to id Tech 3 onwards and VGUI2

Posted: Tue Jun 12, 2018 1:58 am
by StroggVorbis
In the Steam version of Half-Life or RtCW, Quake 3 & 4, Doom 3 and some Quake 1 engines/source ports, hitting tab after typing a CCMD lists possible combinations in alphabetical order. For example, typing 'map map' and hitting enter would show map01 through 32 or if you type 'summon s' it would show shell, shellbox, shotgun, shotgunguy or supershotgun. Or typing 'teleport item_ammo' and hitting tab would list item_ammo_pistol_small or item_ammo_machinegun_large.

Any interest in implementing this? It would make executing commands a whole lot faster and intuitive.

Re: Dynamic autocomplete similar to id Tech 3 onwards and VG

Posted: Tue Jun 12, 2018 2:16 am
by Graf Zahl
You'd have to give each single CCMD some intelligence to know what kinds of parameters it can take. That's entirely out of scope for GZDoom's CCMD system.

Re: Dynamic autocomplete similar to id Tech 3 onwards and VG

Posted: Tue Jun 12, 2018 3:03 am
by StroggVorbis
Excuse me if it's frowned upon to reply in the closed suggestions thread, but the commands I meant already sort of support this, like monster, items, countitems, actorlist, printinv, and all variants of list-. Basically everything that prints out a list if it's not handed any arguments. To be precise, 'monster' already lists all monsters in the map from A to Z, and if I want to list all instances of 'DoomImp', I have to type that out fully. I just wanted something context-sensitive like hitting tab or enter after 'monster d' would list every monster beginning with D instead of returning 'D is not an actor class.' Sorry that adding this seems to be more of a hassle than a convenience in the long run.

P.S. I'm not at home right now, or else I would have recorded a video to clearly demonstrate what I meant.

Re: Dynamic autocomplete similar to id Tech 3 onwards and VG

Posted: Tue Jun 12, 2018 3:17 am
by Graf Zahl
Like I said, you will have to add some info to each CCMD to filter the list down to usable matches. Some want actors, others want inventory items, even others only weapons and some CCMDs even non-actors. And the tab completion needs to know for every single CCMD what types it can take.