Can't replace doom keys with new ones

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
JUSSOMONE
Posts: 34
Joined: Fri Oct 07, 2022 8:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Can't replace doom keys with new ones

Post by JUSSOMONE »

As the title says, i've searched in the forums for a similar case but to no avail, I even tried looking at other mods like Nazis! by Wild Weasel to see how it was done, and I did exactly like his mod but for some reason it won't work...

Here are the codes:

The Lockdefs

Code: Select all

//Clearlocks

Lock 1 Doom
{
	WRedKey
	Message "\cjYou need a \cgred key\cj to open this door."
	RemoteMessage "\cjYou need a \cgred key\cj to activate this object"
	Mapcolor 255 0 0
}


Lock 2 Doom
{
	WBlueKey
	Message "\cjYou need a \chblue key\cj to open this door"
	RemoteMessage "\cjYou need a \chblue key\cj to activate this object"
	Mapcolor 0 0 255
}


Lock 3 Doom
{
	WGoldKey
	Message "\cjYou need a \cfgold key\cj to open this door"
	RemoteMessage "\cjYou need a \cfgold key\cj to activate this object"
	Mapcolor 252 180 0
}

Lock 4 Doom
{
	WRedPass
	Message "\cjYou need a \cgred swastika pass\cj to open this door"
	RemoteMessage "\cjYou need a \cgred swastika pass\cj to activate this object"
	Mapcolor 255 0 0
}

Lock 5 Doom
{
	WBluePass
	Message "\cjYou need a \chblue swastika pass\cj to open this door"
	RemoteMessage "\cjYou need a \chblue swastika pass\cj to activate this object"
	Mapcolor 0 0 255
}

Lock 6 Doom
{
	WGoldPass
	Message "\cjYou need a \cfgold swastika pass\cj to open this door"
	RemoteMessage "\cjYou need a \cfgold swastika pass\cj to activate this object"
	Mapcolor 252 180 0
}

The Custom new keys

Code: Select all

//--KEYS--//

Class WBlueKey : BlueCard Replaces BlueCard //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \chBlue Key!";
		  Inventory.Icon          "WKEYB";
	}
	States
	{
	Spawn:
		  WKEY A 15;
		  WKEY A 1 BRIGHT;
		  Loop;
	}
}

Class WGoldKey : YellowCard Replaces YellowCard //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \cfGold Key!";
		  Inventory.Icon          "WKEYY";
	}
	States
	{
	Spawn:
		  WKEY B 15;
		  WKEY B 1 BRIGHT;
		  Loop;
	}
}

Class WRedKey : RedCard Replaces RedCard //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \cgRed Key!";
		  Inventory.Icon          "WKEYR";
	}
	States
	{
	Spawn:
		  WKEY C 15;
		  WKEY C 1 BRIGHT;
		  Loop;
	}
}

// Skull Replaciments //

Class WRedPass : RedSkull Replaces RedSkull //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \chRed Swastika pass!";
		  Inventory.Icon          "WSYMR";
	}
	States
	{
	Spawn:
		  WPAS C 15;
		  WPAS C 1 BRIGHT;
		  Loop;
	}
}

Class WBluePass : BlueSkull Replaces BlueSkull //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \chBlue Swastika pass!";
		  Inventory.Icon          "WSYMB";
	}
	States
	{
	Spawn:
		  WPAS A 15;
		  WPAS A 1 BRIGHT;
		  Loop;
	}
}

Class WGoldPass : YellowSkull Replaces YellowSkull //INTERNAL CODE
{
    Default
	{
	      // PROPERTY
		  Inventory.PickupSound   "Items/Key_Get";
	          Inventory.PickupMessage "\cjpicked up the \cfGold Swastika pass!";
		  Inventory.Icon          "WSYMG";
	}
	States
	{
	Spawn:
		  WPAS B 15;
		  WPAS B 1 BRIGHT;
		  Loop;
	}
}

The New status bar

Code: Select all

	 
statusbar Normal // Standard Doom Status bar
{	 
	 //keys
	 Drawswitchableimage keyslot 2 && 5, "nullimage", "WKEYB", "WSYMB", "WKASB", 114, 172;
         Drawswitchableimage keyslot 3 && 6, "nullimage", "WKEYY", "WSYMY", "WKASY", 114, 180;
	 Drawswitchableimage keyslot 1 && 4, "nullimage", "WKEYR", "WSYMR", "WKASR", 114, 188;
	 
	 //REST OF THE CODE...
}
	 
Can someone give me a light on what I am doing wrong? like missing a Mapinfo.txt or Gameinfo.txt?
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Can't replace doom keys with new ones

Post by Blue Shadow »

Vanilla Doom uses locks #129 (red), #130 (blue) and #131 (yellow), so you want to redefine those, as well.
User avatar
JUSSOMONE
Posts: 34
Joined: Fri Oct 07, 2022 8:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)

Re: Can't replace doom keys with new ones

Post by JUSSOMONE »

Alright, Thanks for the answer!

Return to “Mapping”