Cyberdemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > swapping out the "key" word
 
Author
All times are GMT. The time now is 08:02. Post New Thread    Post A Reply
Soundblock
Junior Member


Posts: 231
Registered: 12-08


I'm looking to change the text output for the "key" readouts pertaining to doors in Doom. E.g. instead of the text reading "you need a blue key to activate this object", I'd like to be able to swap in something like "you need a floppy disc to activate this opbject". I've already changed the key graphics to reflect this, and the default text output does the trick, but the icing on the cake would be to have the text match the replacement graphics exactly. Can this be done the way of MAPINFO, and if so, what is the name of the variable(s)?

Old Post 05-12-14 19:55 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
plums
Senior Member


Posts: 2011
Registered: 08-13


This is ZDoom right?

I don't entirely understand the question, but maybe taking a look at the LOCKDEFS page on the wiki will help you?
http://zdoom.org/wiki/LOCKDEFS

As an example, here's a section of LOCKDEFS from a thing I was working on:
code:
Lock 1 Doom { RedPrismKey Message "You need a red prism to open this door." RemoteMessage "You need a red prism to activate this object." Mapcolor 255 0 0 }

There's a similar definition for Lock 129 which is "any red key".
code:
Lock 129 Doom { Any { RedPrismKey RedSphereKey KeyGreen } Message "$PD_REDK" RemoteMessage "$PD_REDO" Mapcolor 255 0 0 }


And then in my DECORATE code, I define the Prism key like this:
code:
ACTOR RedPrismKey : RedCard replaces RedCard { Inventory.PickupMessage "RED PRISM KEY" States { Spawn: RKYY ABCDEFGHIJ 3 Bright loop } }

Where RKYY is the name of the sprite. (It's based on a rotating Heretic key, which is why it's so many frames. If you just want a floppy disk, one frame is probably fine.)

In my case I have this key replacing the red keycard, but that's not even necessary - you can have as many key objects as you want.

Hopefully that answers your question or at least points you in the right direction.

edit: several hours later your post makes perfect sense. I blame being tired. Anyhow, between my post and scifista's you've got several options on how to do it.

Last edited by plums on 05-13-14 at 04:14

Old Post 05-12-14 20:08 #
plums is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
scifista42
Senior Member


Posts: 2335
Registered: 05-12


No, changing texts is not done via MAPINFO, it's done by LANGUAGE. Put a LANGUAGE lump in your wad. Similarly to MAPINFO, it's text based and the format is:
code:
[enu default] PD_BLUEO = "you need a floppy disc to activate this object"

More precisely:
code:
[enu default] // header to tell the engine to replace a text string for english / default language PD_BLUEO = "you need a floppy disc to activate this object" // A respective keyword referring to the text = your new text string

The keywords for keys are:
PD_BLUEO, PD_REDO, PD_YELLOWO - "you need a ... key to activate this object"
PD_BLUEK, PD_BLUEK, PD_YELLOWK - "you need a ... key to open this door"
PD_BLUEC, PD_REDC, PD_YELLOWC - "you need a ... card to activate this object"
PD_BLUES, PD_BLUES, PD_YELLOWS - "you need a ... skull to open this door"

This can be also done via DEHACKED.


EDIT: Actually, both my and plums's solutions are useable, if I understand it correctly. Plums's advice is more directly tied to keys (therefore it's "better" from coder's point of view), mine can be used on any strings which you're replacing or adding. But if you're having an altered DECORATE entry for your key, LOCKDEFS should be your preferred solution.

Last edited by scifista42 on 05-12-14 at 20:26

Old Post 05-12-14 20:18 #
scifista42 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Soundblock
Junior Member


Posts: 231
Registered: 12-08


/having arrived at his destination, the elephant nervously eyed the entry to the glass house.

plums: aye, I'm using ZDOOM (ZMAPINFO) at the moment, but was thinking to do a Boom version of my wad after I got everything working there. I suppose I shouldn't expect all the ZMAPINFO stuff to just automatically work in Boom, huh? I'm a bit clumsy with code (read: slightly dyslectic - which in turn is a reason why my posts are so frequently either mis-spelled or EDIT'ed), so all the feature bells and special whistles I'm adding to my wad after default doom2/clean port content are strictly copy/paste from other places - bar brand new maps and graphics. Still, "if it works..." I tell myself. Might end up a ZDOOM-only house-of-cards in the end, if its ever done (Par.wad). Working with ZDOOM I miss the recording of a long demo ability for finished maps, but I seem able to squash the telltale leak-lines pretty efficiently and the large floor texture capacity is _really_ nice.

scifista42: At first glance, your solution looks like the safest bet for a man of my meager string-plucking skills.

Last edited by Soundblock on 05-13-14 at 15:58

Old Post 05-13-14 15:42 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Obsidian
Forum Staple


Posts: 2642
Registered: 05-12


DeHackEd works too. :) Go to the Strings table and you can alter the key messages to your heart's content.

Old Post 05-13-14 22:31 #
Obsidian is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
scifista42
Senior Member


Posts: 2335
Registered: 05-12


Lumps like MAPINFO, ZMAPINFO, LOCKDEFS, LANGUAGE, DECORATE are of course ZDoom-specific and Boom disregards them. DEHACKED is definitely your best bet if you want an universal compatibility. But if you'll be targeting specifically ZDoom for sure, then using DEHACKED (at all) would be unnecessarily obsolete, because these special lumps (MAPINFO etc.) were developed to be far better in features and flexibility. ;)

Old Post 05-13-14 23:02 #
scifista42 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Soundblock
Junior Member


Posts: 231
Registered: 12-08


universal compatibility for the ultimate win

Old Post 05-13-14 23:30 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 08:02. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > swapping out the "key" word

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.