ConsoleCommand discussion

General discussion of the port and Doom-related chat.
User avatar
AlexMax
Forum Regular
Posts: 244
Joined: Tue May 29, 2012 10:14 pm
Contact:

RE: Need modders input (Account system data ACS)

#21

Post by AlexMax » Sun Feb 10, 2013 8:21 pm

I agree with the anti-ConsoleCommand sentiments expressed in this thread. ACS and DECORATE is already a difficult-enough thing to to keep consistent between versions, the existence of ConsoleCommand now means that the console language, cvar/ccmd names, cvar/ccmd behavior, must remain consistent between versions as well.

And this console language that must remain consistent between versions in order to keep compatibility with ConsoleCommand...I've managed to crash Zandronum through futzing around with various string escaping corner-cases. And anybody who knows computer security knows that where there is a crash, there is also probably a security flaw. But fixing the problem would break ConsoleCommand compatibility, by definition.
Ijon Tichy wrote: Remove ConsoleCommand and I will abandon Zandronum. It's literally the only reason I stay here.
Tough talk. Where would you go, ZDoom? GZDoom? Odamex? ZDaemon? Eternity Engine? None of those ports offer "ConsoleCommand" either.
Last edited by AlexMax on Sun Feb 10, 2013 8:22 pm, edited 1 time in total.
The only limit to my freedom is the inevitable closure of the
universe, as inevitable as your own last breath. And yet,
there remains time to create, to create, and escape.

Escape will make me God.

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Need modders input (Account system data ACS)

#22

Post by Ijon Tichy » Sun Feb 10, 2013 8:52 pm

AlexMax wrote:
Ijon Tichy wrote: Remove ConsoleCommand and I will abandon Zandronum. It's literally the only reason I stay here.
Tough talk. Where would you go, ZDoom? GZDoom? Odamex? ZDaemon? Eternity Engine? None of those ports offer "ConsoleCommand" either.
I'd probably go and do independent game and application development. Removing the functionality ConsoleCommand gives would cripple many of the mods I've made (every mod in my signature would be crippled), and if that happens, why stay? Plus, you can't put Doom mods on a resume, anyway.

edit: http://zandronum.com/tracker/view.php?id=1070#c5987
Last edited by Ijon Tichy on Sun Feb 10, 2013 9:05 pm, edited 1 time in total.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: ConsoleCommand discussion

#23

Post by Watermelon » Mon Feb 11, 2013 6:19 am

I think the features it's used for should be added to ACS (like get/setCVar) which can be controlled to prevent flooding of the hard drive, among anything else.

jwaffe
Forum Regular
Posts: 219
Joined: Sun Jun 03, 2012 11:45 pm
Location: Just beyond the line horizon

RE: ConsoleCommand discussion

#24

Post by jwaffe » Mon Feb 11, 2013 9:55 pm

Can you start endless logfiles with ConsoleCommand()? If so, that's one to be added to the list.

OFF:
EDIT - got a strange database error on the forum when I edited this post, I wasn't able to reproduce it. (something involving "out of disk space")

EDIT2- apparently I'm not the only one the forum is bugging out for, either, there were some posts in the BE topic that seemed to indicate strange behavior
Last edited by jwaffe on Mon Feb 11, 2013 10:03 pm, edited 1 time in total.
Image

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: ConsoleCommand discussion

#25

Post by ibm5155 » Mon Feb 11, 2013 11:19 pm

I never used consolecommand and I don´t see a real use of it, should be fov?
can I have a good example of what I couldn´t do in acs/decorate that I only can do with consolecommand?

In the worst case It could be limited only offline the consolecommand...
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: ConsoleCommand discussion

#26

Post by Catastrophe » Mon Feb 11, 2013 11:50 pm

ibm5155 wrote: I never used consolecommand and I don´t see a real use of it, should be fov?
can I have a good example of what I couldn´t do in acs/decorate that I only can do with consolecommand?

In the worst case It could be limited only offline the consolecommand...
I see you haven't read anything on this thread. Also, saving variables.

User avatar
-Jes-
Frequent Poster Miles card holder
Posts: 975
Joined: Fri Aug 03, 2012 9:55 am
Location: Void Zone

RE: ConsoleCommand discussion

#27

Post by -Jes- » Tue Feb 12, 2013 12:38 am

I have to agree, ConsoleCommand is far too necessary for many mods to pull it without having any form of (secure) replacement for it.
Last edited by -Jes- on Tue Feb 12, 2013 12:41 am, edited 1 time in total.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: ConsoleCommand discussion

#28

Post by Watermelon » Tue Feb 12, 2013 4:32 am

So far I think we should list all the things people use ConsoleCommand for, and see if each can have a viable ACS counterpart substitution.
Off the top of my head:
- Puking clientside scripts always (equivalent of "puke -123")
- Saving data to a CVar (SetCvar(str name, int value);)
- Get String and float (GetCVarString(str cvar); GetCVarFloat(str cvar);) where getCVarFloat returns a fixed point approximate value

User avatar
Ænima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: ConsoleCommand discussion

#29

Post by Ænima » Tue Feb 12, 2013 1:14 pm

Watermelon wrote: So far I think we should list all the things people use ConsoleCommand for, and see if each can have a viable ACS counterpart substitution.
Off the top of my head:
- Puking clientside scripts always (equivalent of "puke -123")
- Saving data to a CVar (SetCvar(str name, int value);)
- Get String and float (GetCVarString(str cvar); GetCVarFloat(str cvar);) where getCVarFloat returns a fixed point approximate value
-forcing hud_scale 0 or 1 on a client for that particular session, whichever the mod requires
-forcing compat_clientssendfullbuttoninfo on, on the server side (Mercenaries requires it to be enabled, otherwise the buy menu won't work)
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

one_Two
Addicted to Zandronum
Posts: 1753
Joined: Thu Jun 07, 2012 4:47 pm

RE: ConsoleCommand discussion

#30

Post by one_Two » Tue Feb 12, 2013 1:25 pm

Forcing aspect ratio?I dunno. Also some wads use cc say and team say in cutscenes, I think jumpmaze does, I'm not sure.

Konar6
Retired Staff / Community Team Member
Posts: 455
Joined: Sun May 27, 2012 9:38 am

RE: ConsoleCommand discussion

#31

Post by Konar6 » Tue Feb 12, 2013 2:39 pm

Are we listing just any use of ConsoleCommand, or only that for which there is no obvious replacement. Like forcing compat_clientssendfullbuttoninfo on, on the server can be done simply in text file for the wad - "note: this mod needs compat_clientssendfullbuttoninfo on", and say in cutscenes can be replaced by hudmessage, I guess? I would like to see the list of what ConsoleCommand is REALLY necessary for, so we could then request viable and safe ACS replacement.
Ijon Tichy wrote:I like how your first responses to concerns being raised was to start insulting people, accusing random people on the Internet of being Shadowfox, and digging up irrelevant shit from the past. It really inspires confidence in me that you guys are level-headed and rational folks.


<BlueCool> you guys IQ is the same as my IP, Dynamic

Catastrophe
Retired Staff / Community Team Member
Posts: 2571
Joined: Sat Jun 02, 2012 2:44 am

RE: ConsoleCommand discussion

#32

Post by Catastrophe » Tue Feb 12, 2013 3:02 pm

It'd be nice if there was a setdmflags, or setcompatflags options or something.

User avatar
Ænima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: ConsoleCommand discussion

#33

Post by Ænima » Tue Feb 12, 2013 3:05 pm

Konar6 wrote: Are we listing just any use of ConsoleCommand, or only that for which there is no obvious replacement. Like forcing compat_clientssendfullbuttoninfo on, on the server can be done simply in text file for the wad - "note: this mod needs compat_clientssendfullbuttoninfo on"
I'd rather have it be as automatic as possible.
Catastrophe wrote: It'd be nice if there was a setdmflags, or setcompatflags options or something.
Something like this^ would help.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: ConsoleCommand discussion

#34

Post by Ijon Tichy » Tue Feb 12, 2013 8:12 pm

Konar6 wrote: Are we listing just any use of ConsoleCommand, or only that for which there is no obvious replacement. Like forcing compat_clientssendfullbuttoninfo on, on the server can be done simply in text file for the wad - "note: this mod needs compat_clientssendfullbuttoninfo on", and say in cutscenes can be replaced by hudmessage, I guess? I would like to see the list of what ConsoleCommand is REALLY necessary for, so we could then request viable and safe ACS replacement.
A. Determining what ConsoleCommand is used for has been happening on the bugtracker entry
B. WADs gotten through WADseeker/GetWAD do not come with text files, and places like BE don't even have a place for the READMEs
C. Only one in maybe fifty people ever actually read the README anyway
D. as AEnima said, it's a lot more convenient to have it done automatically for you
Last edited by Ijon Tichy on Tue Feb 12, 2013 8:13 pm, edited 1 time in total.

Konar6
Retired Staff / Community Team Member
Posts: 455
Joined: Sun May 27, 2012 9:38 am

RE: ConsoleCommand discussion

#35

Post by Konar6 » Tue Feb 12, 2013 8:56 pm

Just a correction on B, Ijon: wads (zips) gotten from Wadseeker and GetWAD do come with text files. But the file must be properly packed for wad tools to extract them. The zip file, the wad and the txt file inside must all have the exact same name.

C: ok? Those who don't read it, do read the project forum thread. And if neither - well they'll notice that their config is not right when it's not working, just like you notice it when you run AOW as Survival.
Ijon Tichy wrote:I like how your first responses to concerns being raised was to start insulting people, accusing random people on the Internet of being Shadowfox, and digging up irrelevant shit from the past. It really inspires confidence in me that you guys are level-headed and rational folks.


<BlueCool> you guys IQ is the same as my IP, Dynamic

Theshooter7
Forum Regular
Posts: 262
Joined: Wed Jun 06, 2012 2:15 am

RE: ConsoleCommand discussion

#36

Post by Theshooter7 » Tue Feb 12, 2013 9:29 pm

Code: Select all

Script 408 Open
{
	if(GetCVar("wdi_disable_autoconfig") == True) Terminate;
	While(1)
	{
		if(getcvar("sv_respawnsuper") == False) Consolecommand("sv_respawnsuper true");
		if(getcvar("sv_coop_loseammo") == False) Consolecommand("sv_coop_loseammo true");
		if(getcvar("sv_coop_losepowerups") == False) Consolecommand("sv_coop_losepowerups true");
		if(getcvar("sv_coop_losearmor") == False) Consolecommand("sv_coop_losearmor true");
		if(getcvar("sv_coop_loseweapons") == False) Consolecommand("sv_coop_loseweapons true");
		if(getcvar("sv_coop_losekeys") == False) Consolecommand("sv_coop_losekeys true");
		if(getcvar("sv_coop_loseinventory") == False) Consolecommand("sv_coop_loseinventory true");
		if(getcvar("sv_forcegldefaults") == False) Consolecommand("sv_forcegldefaults true");
		if(getcvar("sv_disallowspying") == False) Consolecommand("sv_disallowspying true");
		if(getcvar("sv_disallowsuicide") == False) Consolecommand("sv_disallowsuicide true");
		if(getcvar("sv_noautomapallies") == False) Consolecommand("sv_noautomapallies true");
		if(getcvar("sv_noidentifytarget") == False) Consolecommand("sv_noidentifytarget true");
		if(getcvar("sv_randomcoopstarts") == False) Consolecommand("sv_randomcoopstarts true");
		if(getcvar("sv_nocoopinfo") == False) Consolecommand("sv_nocoopinfo true");
		if(getcvar("sv_weapondrop") == True) Consolecommand("sv_weapondrop false");
		
		if(getcvar("sv_applylmsspectatorsettings") == False && WDI_GameState() != GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings true");
		else if(getcvar("sv_applylmsspectatorsettings") == True && WDI_GameState() == GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings false");
		
		if(getcvar("compat_limited_airmovement") == False) Consolecommand("compat_limited_airmovement true");
		if(getcvar("compat_nocrosshair") == False) Consolecommand("compat_nocrosshair true");
		
		Delay(1);
	}
	Delay(1);
}
This code automatically sets up appropriate DMFlags etc for the server in WDI. As you can see, it's not NECESSARY (in fact, the server owner can even disable it with a custom cvar), but it's nice to have.

One thing that is necessary, and extremely useful, however, are these two lines from the above code:

Code: Select all

	if(getcvar("sv_applylmsspectatorsettings") == False && WDI_GameState() != GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings true");
		else if(getcvar("sv_applylmsspectatorsettings") == True && WDI_GameState() == GAMESTATE_GAMEOVER) Consolecommand("sv_applylmsspectatorsettings false");
These lines automatically allow players to talk to eachother after a round ends (during the tally board). Without it, dead players can't talk to players still alive. I received a lot of positive feedback when I implemented this, and it would be a shame to see it go. If there were an alternative to handle this, that would be greatly welcome!

(I'll also post this on the bug tracker to add to the discussion there)
Image

User avatar
AlexMax
Forum Regular
Posts: 244
Joined: Tue May 29, 2012 10:14 pm
Contact:

RE: ConsoleCommand discussion

#37

Post by AlexMax » Tue Feb 12, 2013 11:13 pm

One thing that Konar6 uses ConsoleCommand for is the DUEL32 shoot map. It is used to turn on respawning items for that particular map, and then subsequently turn it off again once the map is done.

I am also against hardcoding such settings under any conditions, however. Ideally, such a thing would be handled through server configuration. You can't overload addmap either, since DUEL32 doesn't use a maplist. How about the following new console commands:

allmapexec <command string to execute>
Always execute the given command string upon switching maps.

addmapexec <map lump> <command string to execute>
Execute the given command string upon switching to the given map. If a map has a command string already, it's overwritten.

defaultmapexec <command string to execute>
Execute the command string upon switching to a map without a command string.

clearmapexecs
Clear all mapexec's.


Points of clarification:
  • Any latched cvars (i.e. cvars that normally require a restart) apply to the switched-to map.
  • For a given map switch, the command string for allmapexec is always executed if it exists, and is always executed first. The addmapexec or defaultmapexec command strings, if they exist, are executed second.
Last edited by AlexMax on Tue Feb 12, 2013 11:15 pm, edited 1 time in total.
The only limit to my freedom is the inevitable closure of the
universe, as inevitable as your own last breath. And yet,
there remains time to create, to create, and escape.

Escape will make me God.

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: ConsoleCommand discussion

#38

Post by Torr Samaho » Wed Feb 13, 2013 9:04 pm

AlexMax wrote: One thing that Konar6 uses ConsoleCommand for is the DUEL32 shoot map. It is used to turn on respawning items for that particular map, and then subsequently turn it off again once the map is done.

I am also against hardcoding such settings under any conditions, however. Ideally, such a thing would be handled through server configuration. You can't overload addmap either, since DUEL32 doesn't use a maplist. How about the following new console commands:
Wouldn't it be better to handle this via MAPINFO?

User avatar
AlexMax
Forum Regular
Posts: 244
Joined: Tue May 29, 2012 10:14 pm
Contact:

RE: ConsoleCommand discussion

#39

Post by AlexMax » Thu Feb 14, 2013 12:43 am

Torr Samaho wrote: Wouldn't it be better to handle this via MAPINFO?
The reason I don't enforce settings in DUEL32 is because some server administrators and players might have different opinions than me on what settings should be used. I would rather server admins be opinionated than me as a map author.

The only problem with my approach is that some maps might realistically support more than one set of settings (i.e. what if I wanted Greenwar MAP20 to support both OS and NS settings), but I'm not really sure how to expose that in a friendly way, either from a configuration POV or from a player selection POV. But this is something that is already an open problem, and I'd rather it be handled through server configuration than...say...having players press a button on the START map to toggle between skill levels, or toggle between different configurations of a map.
Last edited by AlexMax on Thu Feb 14, 2013 12:44 am, edited 1 time in total.
The only limit to my freedom is the inevitable closure of the
universe, as inevitable as your own last breath. And yet,
there remains time to create, to create, and escape.

Escape will make me God.

NeuralStunner
 
Posts: 42
Joined: Mon Jun 04, 2012 6:14 pm
Location: Plain Sight
Contact:

RE: ConsoleCommand discussion

#40

Post by NeuralStunner » Thu Mar 07, 2013 5:04 pm

It is also my opinion that the function should be replaced with more specific dedicated function for its desired uses. This would also more cleanly weed out bad uses (as they wouldn't be implemented or usable).

Settings (DMFlags/renderer/&c.) which a map requires to work properly should be added to MapInfo.

While I to would like mod data persistence, I can see why it's a sticky problem. Ideally, saving such data is always instigated by the user, servers could use it to back up player stats and such periodically. (I imagine a scripted, "automated" version would still require user confirmation.)

On the subject of data saving and abuse, is it possible to call Autosave every tick and thrash the user's drive? Or is there a safety on this function already?
Blzut3 wrote:Only in the Doom community does one find something so obviously broken and then claim it's a feature.

Post Reply