Click Wall Object, Display Text

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Click Wall Object, Display Text

Post by ebeneezergude »

I'm sure this is very simple to do but I can't make it work.

In game, I want to be able to click a wall object, and have it display text in the text are below the viewport. I have been fiddling with triggers and TXT tiles, but to no avail. I can make it work once, but then I end up with a floor TXT tile which is turned on permanently and then displays text when the party walks on the tile, which obviously I don't want to happen.

Does anyone know a good way to acheive this effect? Thanks :)
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Click Wall Object, Display Text

Post by Seriously Unserious »

I've done things like this quite a bit in developing the techniques for my dungeon, and this is actually quite simple to do, once you know the method.

If you want a wall object to display a text message in the message area below the main dungeon view you need at least 2. 1st, you need the wall object itself, make sure you can set it up as a trigger, or that it can activate an action on click, using an object that can be a trigger, such as a button for example is best as it's the simplest to execute. 2nd, you need the wallitem, Speech, which can be found in the wall mechanics tab. Set up the speech item to display whatever text you want it to display. Finally, go back to your trigger item and set up the speech item you just did as its target and set up it up to Activate. Whenever you rigger that item by clicking on it, it will then activate the speech which will be displayed in the message area in the bottom. If you look at my Lynchgate demo, you will see that I use this quite a bit, mostly activated by floor triggers, but in Camp Lynchgate I do this by using the Guards in the barracks as the clickables.

To set this up with an object that can't act directly as a trigger is a bit more complex, but not by much. You need to first clone the Relay wall mechanic and give it a uniqu name. Then you clone the object you want to use as the trigger, go to the convert tab and then the click 1 tab, then set up an action on click to Action_Object_Activate, and target 1 to the cloned relay you just made. You may need to also set up a convert as well, either to convert the object to something else, possibly the standard version if you want to disable it after one use. If you're having trouble getting the click action to work, you may need to set it up to swap the object out with the same object to get it working. The next step is to add your unique cloned relay to the dungeon, and set it up to "Activate", I usually use a level reserved for such dungeon mechanics for this. Next add the speech item as before. Finally, you go back to the Relay and set up it's target to your speech item. Using this method involves a bit more work but you can make a trigger out of just about anything even items that normally can't be used as triggers.

One final thing about speech, you can also use the substitution strings shown in the DMwiki to add variables to the text too if you want.
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Re: Click Wall Object, Display Text

Post by ebeneezergude »

SU, thanks alot, that's exactly what I needed. (Somehow I hadn't seen the Speech Wall Item before...! :lol: )
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Click Wall Object, Display Text

Post by Seriously Unserious »

No worries, I've missed things like that before.

While I'm posing here I'll leave you with a screenshot and idea of another way to get speech out as well, an alternative for it you want the player to have as much time as needed or you have a lot of text to push out.

Image
This is a bitmap with dialogue on it for use with the wallitem_infoscreen object found in the wall mechanics section. This is a dialogue out of my Castle Lynchgate project, and I've linked several of these up, using relays on delay 1 to get them to display in sequence. This is the first page of a multi screen speech made by an NPC character, Gothmog, who is speaking to the party. To create something like this you need a decent art program, I'd recoment GIMP. Start a new project, with dimensions of 640x400 pixels. Use the program's text tool to type in the speech, you can also add in any graphics, illustrations or other artwork you want to these screens as well. When done, make sure you save the image as a 24 bit bitmap file (.bmp). If you're using GIMP, you will need to choose the option File->export give it a file name, click the export button, and in the next box that pops up choose, under advanced options, the 24 bit option (that's the one that's compatible with RTC). If using GIMP you should also save it as a GIMP project in case you need to edit the text later.

Now that you have your speech bmp, open up the RTC editor, go to the section to add/replace graphics, to to the large 1 scaling and select add new, browse for your new speech bmp and leave all other settings there alone, no need to worry about sizing, or offsets in this case.

Now add the trigger item like before. Once that's in place add to a wall tile the wall mechanic called "info screen" set the speech bitmap you just imported to the background image and make sure the info screen is set to close on click. If you only need the one info screen now all you have to do is go back to your trigger and set it up to target your info screen object and set it's action up to activate. Whenever this trigger is activated by the party it will display that info screen until the user clicks the mouse.

If you're using a non-trigger object, you need to set up a unique relay as described in my last post, just target an info screen object instead of a speech object.

If you need to have more then one activate in sequence, just use relays to activate each info screen. Have your triggering object activate a relay instead of directly activating the info screen, then have that relay activate the first info screen you want to display and 2nd relay that activates the 2nd info screen. the 2nd relay must have a delay of at least 1, otherwise the info screens skip to the last one in your sequence (possibly because of an RTC bug), that relay activates the 2nd info screen and can activate a 3rd relay if you have another info screen to activate. You can repeat this process as many times as you need to create a sequence of info screens to tell a story or show a series of pictures, such as to intro your dungeon or include dialogues from characters your party meets in game.

You can also use the above method for speech objects, just set the following relays up to a longer delay so the user has enough time to read the text before it scrolls off. The same method of relays activating other objects, such as a localized sound, teleporters, holders or anything else, to create all kinds of effects or events that happen in a specific sequence.

Hopefully this give you additional info to make some really interesting things happen. As you experiment and gain experience I'm sure you will start coming up with ideas of your own on how to do things no one else has thought of.
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Re: Click Wall Object, Display Text

Post by ebeneezergude »

SU, that is a fantastic explanation, thank you, much appreciated :D . I checked out the first 5/10 mins of your Lynchgate demo and can see exactly why this is a useful feature, especially for telling the story, expanding plot and characters, etc. Am assuming .PNG files are also compatible? Thanks again.
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Click Wall Object, Display Text

Post by Seriously Unserious »

Yes, I believe so. jpegs are not though, I've already tried them.

And thank you for trying my demo out, if you have any ideas or comments on it I'd love to read them over in it's thread. That's part of why I released that demo, to get early feedback to help me know what the players want out of it so I can make it be as fun as possible.
User avatar
ebeneezergude
Expert
Posts: 345
Joined: Mon Jan 21, 2013 10:58 pm
Location: I see walls stretching off into the darkness...

Re: Click Wall Object, Display Text

Post by ebeneezergude »

Off topic, but hope to give your demo another go this weekend to check it out some more. How far are you along since the version on the link on the first post of that thread? Did I read somewhere you're working with Chaos Shaman on some fandango artificial intelligence for it?
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Click Wall Object, Display Text

Post by Seriously Unserious »

I am, Chaos has been developing a set of mechanisms that can create a variety of monster behaviors that go way beyond what anyone had in mind for these sort of games.
In Castle Lynchgate I' really only scratching the surface of what Chaos-Shaman has been working on. Claudius_one and C-S have also both been helping me out with graphics as well.

He's got a discussion on it in: http://www.dungeon-master.com/forum/vie ... =2&t=29741

I haven't gotten very far past that point yet as I got bogged down for a while with interruptions right in the middle of working on some rather intricate sets of triggers and relays, which made it hard for me to get going again and figure out what I was doing with the ones I already had in place and what I wanted the next sets to do. I'm finally past that point now so I expect progress to pick back up again.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Click Wall Object, Display Text

Post by Chaos-Shaman »

very detailed explanation SU, step by step.

ebeneezergude, it's not as hard as it appears, it seems like a million steps, but the GUI makes it easier to envision and not so tedious.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Click Wall Object, Display Text

Post by Seriously Unserious »

Also, if you have several of these to set up, once you have the first set done, Copy+Paste really is your friend, :) I use it regularly in my dungeon to speed up development ;)
Post Reply