You need a XXX card to open this door
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
You need a XXX card to open this door
By default, it seems that when you examine a locked door, it says "you need a blue/red/yellow card to activate this object / unlock this door etc. This is a problem, as firstly, my game doesn't use keycards and secondly, they aren't coloured. How can I change this? I can't seem to do anything to alter it.
Thanks in advance.
Thanks in advance.
Re: You need a XXX card to open this door
The simplest way is to just change the actual text lines. You will need to change lines in LANGUAGE to change this behavior.
Let's assume you use a carnival game dart as a key. Obviously step one is to replace the sprites of the red, blue or yellow card or skull; so let's assume the sprites for the red keycard are changed. Now in LANGUAGE, add these lines:
Now the red card is technically still a red card, but the game won't say that anymore. The only issue left is the color of the locked lines in the automap. To change that, you need to do a change in LOCKDEFS, like so:
Don't forget there are other lock types, like any red key and stuff. Either change those too or avoid those lock types.
Let's assume you use a carnival game dart as a key. Obviously step one is to replace the sprites of the red, blue or yellow card or skull; so let's assume the sprites for the red keycard are changed. Now in LANGUAGE, add these lines:
Code: Select all
GOTREDCARD = "You pick up a dart key.";
PD_REDC = "You need a dart key.";
PD_REDCO = "You need a dart key.";
Code: Select all
Lock 1 Doom
{
//$Title "Red Keycard"
RedCard
Message "$PD_REDC"
RemoteMessage "$PD_REDCO"
Mapcolor 255 0 0 // change this to the color you want to represent the dart key in RGB (not hex)
}
Last edited by Nevander on Wed Aug 02, 2017 4:17 pm, edited 1 time in total.
Re: You need a XXX card to open this door
You can go about this a few different ways
change the key related strings in [wiki]LANGUAGE[/wiki] or DEHACKED and replace the graphics with something more suitable.
or
create new keys and strings in [wiki]LOCKDEFS[/wiki]
change the key related strings in [wiki]LANGUAGE[/wiki] or DEHACKED and replace the graphics with something more suitable.
or
create new keys and strings in [wiki]LOCKDEFS[/wiki]
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: You need a XXX card to open this door
Thanks a ton, I'm working on this now. But on the Mapcolor line, what exactly is that and what do I do with it exactly? Also, just got this error when testing :
Here is my LANGUAGE lump code.
Here is my LANGUAGE lump code.
Code: Select all
GOTREDCARD = "It's a key with a question mark on the tag.";
PD_REDC = "It's locked. A question mark is etched under the keyhole.";
PD_REDCO = "It's locked. A question mark is etched under the keyhole.";
- Attachments
-
- error.png (7.24 KiB) Viewed 1742 times
- 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: You need a XXX card to open this door
If the player is using custom automap colors and has a certain option enabled, locked doors will be drawn on the automap in their Mapcolor. Supply it with a set of color numbers (ranged from 0 to 255, representing Red, Green, and Blue respectively) and that can be used to differentiate locks from each other on the map.Hidden Hands wrote:Thanks a ton, I'm working on this now. But on the Mapcolor line, what exactly is that and what do I do with it exactly?
Your Language lump has to specify at least one language that the strings are a part of. Simply add a line like this to the top:Also, just got this error when testing :
Here is my LANGUAGE lump code.
Code: Select all
GOTREDCARD = "It's a key with a question mark on the tag."; PD_REDC = "It's locked. A question mark is etched under the keyhole."; PD_REDCO = "It's locked. A question mark is etched under the keyhole.";
Code: Select all
[en default]
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: You need a XXX card to open this door
Excellent, that fixed it. Thanks so much. One final issue - when I pick up the key it still says "picked up a yellow/red/blue keycard" and not what I wanted it to say. Would I change this in DECORATE or...?
EDIT: Okay, it seems to only be happening with the yellow card. Its the yellow one that isn't working. All others are fine....?!
Also, on a seperate but somewhat related note, could I use the LANGUAGE lump to create examine messages? IE; You examine a book shelf and it says "its a bookshelf. nothing of interest" etc. ?
EDIT: Okay, it seems to only be happening with the yellow card. Its the yellow one that isn't working. All others are fine....?!
Also, on a seperate but somewhat related note, could I use the LANGUAGE lump to create examine messages? IE; You examine a book shelf and it says "its a bookshelf. nothing of interest" etc. ?
Re: You need a XXX card to open this door
There are separate lines for each key color, they will all need to be changed if you don't want any more key lines mentioning colors.Hidden Hands wrote:One final issue - when I pick up the key it still says "picked up a yellow/red/blue keycard" and not what I wanted it to say. Would I change this in DECORATE or...?
EDIT: Okay, it seems to only be happening with the yellow card. Its the yellow one that isn't working. All others are fine....?!
Sort of, you can write out strings in LANGUAGE and then reference them via ACS with Print and HudMessage to cut down on text duplication. So as an example, in LANGUAGE (I think you have to escape the single quote, so I did to be sure, if you get an error just remove the slash):Also, on a seperate but somewhat related note, could I use the LANGUAGE lump to create examine messages? IE; You examine a book shelf and it says "its a bookshelf. nothing of interest" etc. ?
Code: Select all
MSG_BOOKSHELF = "It\'s a bookshelf, nothing of interest.";
Code: Select all
HudMessage(l:"MSG_BOOKSHELF"; ... rest of parameters);
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: You need a XXX card to open this door
I'm alittle confused by the last part. Where do I make this ACS code please and what does rest of parameters mean? Sorry, I never dealt with this part of doom editing before.
- phantombeta
- Posts: 2169
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: You need a XXX card to open this door
You have to escape any double quotes (") inside the string. Single quotes (') are fine.
So this:
becomes this:
So this:
Code: Select all
This " string " uses " double " quotes
Code: Select all
DOUBLE_QUOTES_STRING = "This \" string \" uses \" double \" quotes";
Re: You need a XXX card to open this door
[wiki]HudMessage[/wiki] is just a function in ACS that can be used to print messages to the screen with your own coordinates and size, etc. That is used inside an ACS script like any other ACS function you might be used to. You can also just use [wiki]Print[/wiki] but you don't get hardly any options.Hidden Hands wrote:I'm alittle confused by the last part. Where do I make this ACS code please and what does rest of parameters mean? Sorry, I never dealt with this part of doom editing before.
Or... a better way might be to define a new lock in LOCKDEFS with the message you want (It's a bookshelf, nothing of interest) as the message you see when you don't posses the key for that lock. Then, just don't place any of the keys on the map and or don't even make a key for it. Attach it to a dummy script that does nothing (i.e. do ACS_LockedExecute and then just do a one tic delay). In fact, I bet that would work very well actually. I can test an example later if you can't get it working.
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: You need a XXX card to open this door
Code: Select all
Lock 1 Doom
{
//$Title "Red Keycard"
RedCard
Message "$PD_REDC"
RemoteMessage "$PD_REDCO"
Mapcolor 255 0 0 // change this to the color you want to represent the dart key in RGB (not hex)
}
Lock 2 Doom
{
//$Title "Blue Keycard"
BlueCard
Message "$PD_BLUEC"
RemoteMessage "$PD_BLUECO"
Mapcolor 255 0 0 // change this to the color you want to represent the dart key in RGB (not hex)
}
Lock 3 Doom
{
//$Title "Yellow Keycard"
YellowCard
Message "$PD_YELLOWC"
RemoteMessage "$PD_YELLOWCO"
Mapcolor 255 0 0 // change this to the color you want to represent the dart key in RGB (not hex)
}
Code: Select all
[en default]
GOTREDCARD = "It's a key with a question mark on the tag.";
PD_REDC = "It's locked. A question mark is etched under the keyhole.";
PD_REDCO = "It's locked. A question mark is etched under the keyhole.";
GOTBLUECARD = "It's a key with an exclamation mark on the tag.";
PD_BLUEC = "It's locked. An exclamation mark is etched under the keyhole.";
PD_BLUECO = "It's locked. An exclamation mark is etched under the keyhole.";
GOTYELLOWCARD = "It's a key with a full stop on the tag.";
PD_YELLOWC = "It's locked. A full stop is etched under the keyhole.";
PD_YELLOWCO = "It's locked. A full stop is etched under the keyhole.";
MSG_BOOKSHELF = "It\'s a bookshelf filled with books on the occult.";
MSG_PLANEPIC = "It's a painting of a spitfire. My Dad loved spitfires.";
MSG_NODOOR = "Nope. It won't budge.";
- Hidden Hands
- Posts: 1053
- Joined: Tue Sep 20, 2016 8:11 pm
- Location: London, England
- Contact:
Re: You need a XXX card to open this door
So when you say ACS do you mean as a lump in the WAD or in the MAP itself? I'd love to try this but I just don't get it.Nevander wrote:[wiki]HudMessage[/wiki] is just a function in ACS that can be used to print messages to the screen with your own coordinates and size, etc. That is used inside an ACS script like any other ACS function you might be used to. You can also just use [wiki]Print[/wiki] but you don't get hardly any options.Hidden Hands wrote:I'm alittle confused by the last part. Where do I make this ACS code please and what does rest of parameters mean? Sorry, I never dealt with this part of doom editing before.
Or... a better way might be to define a new lock in LOCKDEFS with the message you want (It's a bookshelf, nothing of interest) as the message you see when you don't posses the key for that lock. Then, just don't place any of the keys on the map and or don't even make a key for it. Attach it to a dummy script that does nothing (i.e. do ACS_LockedExecute and then just do a one tic delay). In fact, I bet that would work very well actually. I can test an example later if you can't get it working.
Re: You need a XXX card to open this door
ACS is just Doom's (technically Hexen's) way of adding more advanced semi-programming to the game. ACS scripts are put together through maps by using the Script Editor which is standard in Doom Builder since the first one I think. In the WAD it is SCRIPTS when uncompiled and BEHAVIOR when compiled.Hidden Hands wrote:So when you say ACS do you mean as a lump in the WAD or in the MAP itself? I'd love to try this but I just don't get it.