Mapinfo/Gameinfo: CheatArmorType property
Moderator: GZDoom Developers
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Mapinfo/Gameinfo: CheatArmorType property
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 [wiki]GetArmorType[/wiki] 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.
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.
Re: Mapinfo/Gameinfo: CheatArmorType property
Should instead allow rewrite/addition of cheat codes.
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: Mapinfo/Gameinfo: CheatArmorType property
I suppose that, too, but I imagine that'd be less "safe" in the eyes of the devs.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Mapinfo/Gameinfo: CheatArmorType property
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.
-
- Posts: 34
- Joined: Mon May 01, 2017 1:33 pm
Re: Mapinfo/Gameinfo: CheatArmorType property
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).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Mapinfo/Gameinfo: CheatArmorType property
What part of "no" is unclear?
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: Mapinfo/Gameinfo: CheatArmorType property
Er...in regards to the original suggestion, or the modification of cheat codes?Graf Zahl wrote:What part of "no" is unclear?
Re: Mapinfo/Gameinfo: CheatArmorType property
He was referring to modifying the cheat codes.
- Kinsie
- Posts: 7401
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
- Contact:
Re: Mapinfo/Gameinfo: CheatArmorType property
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
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.
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 all
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;
}
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Mapinfo/Gameinfo: CheatArmorType property
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.
If not, it would require an engine change.