Mapinfo/Gameinfo: CheatArmorType property

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Mapinfo/Gameinfo: CheatArmorType property

Postby wildweasel » Wed Jun 21, 2017 11:09 pm

Depending on the situation, a mod author may decide to modify the armor types available in the game, and it may be problematic for the player to still have "access" to the original "Doom" armor. I've messed around with GetArmorType in efforts to kludge my way around this, as my current project handles armor very differently from the standard Doom armor (it does not absorb damage, but is instead used as a "counter" with its own special effects). Simply put, if the player types IDFA or GIVE ALL, they get the standard Doom armor instead, which only does the basic damage resistance, and does not have any of the other effects provided by Cola3's Arms Barrier items.

Therefore, my suggestion is this: I'd like to be able to set what specific type of armor is given when the player types the equivalent of a Give All cheat. In my case, I'd be setting CheatArmorType to "ArmsChunk100" so that the necessary checks are working for the game's unusual armor mechanics.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby ZzZombo » Fri Jun 23, 2017 9:50 am

Should instead allow rewrite/addition of cheat codes.
ZzZombo
 
Joined: 16 Jul 2012

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby wildweasel » Fri Jun 23, 2017 10:06 am

I suppose that, too, but I imagine that'd be less "safe" in the eyes of the devs.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Graf Zahl » Fri Jun 23, 2017 11:43 am

ZzZombo wrote:Should instead allow rewrite/addition of cheat codes.



Changing cheat codes was never implemented for Dehacked due to popular request. Nothing about that has changed in all those years. New cheat codes won't happen. Use the console.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Wuerfel_21 » Fri Jun 23, 2017 12:53 pm

The raven games (+Strife) change the cheatcodes already. Thats why allcheats exists. I don't see a reason to not allow big projects like TCs and standalone stuff to have their own (which can be overridden by allcheats, like heretics idkfa).
Wuerfel_21
 
Joined: 01 May 2017
Discord: Wuerfel_21#4233

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Graf Zahl » Fri Jun 23, 2017 1:20 pm

What part of "no" is unclear?
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby wildweasel » Fri Jun 23, 2017 7:54 pm

Graf Zahl wrote:What part of "no" is unclear?

Er...in regards to the original suggestion, or the modification of cheat codes?
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Rachael » Fri Jun 23, 2017 7:58 pm

He was referring to modifying the cheat codes.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Kinsie » Sat Jun 24, 2017 3:10 am

Changing the cheat commands (IDDQD etc.) is one of those things that just isn't gonna happen, and requesting it here is also kind of hijacking this feature request. Adding new cheat console commands can be done using ACS, KEYCONF aliases and a little ingenuity.

Anyway, back to the point: Weasel, the "give" cheat's method of handling armor can be found in gzdoom.pk3/zscript/shared/player_cheat.txt

Code: Select allExpand view
if (giveall || name ~== "armor")
{
   if (gameinfo.gametype != GAME_Hexen)
   {
      let armoritem = BasicArmorPickup(Spawn("BasicArmorPickup"));
      armoritem.SaveAmount = 100*deh.BlueAC;
      armoritem.SavePercent = gameinfo.Armor2Percent > 0 ? gameinfo.Armor2Percent * 100 : 50;
      if (!armoritem.CallTryPickup (self))
      {
         armoritem.Destroy ();
      }
   }
   else
   {
      for (i = 0; i < 4; ++i)
      {
         let armoritem = Inventory(Spawn("HexenArmor"));
         armoritem.health = i;
         armoritem.Amount = 0;
         if (!armoritem.CallTryPickup (self))
         {
            armoritem.Destroy ();
         }
      }
   }

   if (!giveall)
      return;
}
I'm not sure how this would be overridden for your needs without busting something else, though. Could a developer or ZScript guru weigh in on this?

Alternatively, you could use my gross old pre-ZScript hack: Define a new "weapon" (I typically just use a copy of the Pistol) that has a weaponslot so that it's given by the Give cheats, then have a looping ACS script that detects such a weapon and does what you want (in this case, stripping the cheat armor and giving the player the armor you want) before taking the weapon away.
User avatar
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Mapinfo/Gameinfo: CheatArmorType property

Postby Graf Zahl » Sat Jun 24, 2017 3:27 am

What can be done here depends on the setup. If the mod replaces the original player class it can just override the function and handle the 'armor' case itself.
If not, it would require an engine change.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest