Text Detection Application
The concept of detecting in-game text by players using EUDs is nothing new, however I've yet to see a single map to actually use it in any non-trivial way. This is probably mostly due to how vastly inefficient it is to produce these triggers manually. However, with a program I coded and much, much help from ProTRG, making text detection triggers regardless of player name length can be done in a matter of minutes.
There are two detection methods with both their pros and cons. The first method just detects certain text and can be from any player. It can be good in situations where you would want this, and best of all it will not desync if you use an otherwise desyncing action because all players would run it (only in most cases, because if one person is spammed with messages and a person types in a command he might not receive it and desync. Of course, with single-player maps this is not a problem at all.)
The second method utilizes the fact that only your own text is green while the other players' are blue. The triggers can detect the green color byte and therefore only run for the player that typed it, however it is limited to only run actions that are local, such as Play WAV, Center View, Display Text, etc. Still pretty useful.
There are a few minor catches, though. For it to work properly, certain text need to be appended with a certain number of pre-determined characters as padding. The characters can be just spaces (which is what I chose for my test map), and the max you need to append is 3. So, for simplicity you could just always append 3 spaces to the end of your text. Also, the screen must be flushed with a large text display that covers all lines on the screen immediately after it detects text, or else it might not function properly.
The test map detects two text inputs from any of the players: "-music off" and "-music on" without the quotes. Obviously it gives the player the option to toggle in-game music by just typing one of those options. Remember to append 3 spaces after the text.
I'd also like to know what ideas you guys have as to what this can be applied to. Keep in mind most of the potential would be for single-player maps because majority of the actions will desync in multiplayer with the second method.
So far I thought of these:
Center view toggling (for an rpg or something)
"Yes" or "No" in an NPC dialog
This post was edited 3 times, last edit by yoonkwun: Jun 11 2010, 2:45 am.
I don't see how this is awesome for you, unless he releases his method, gives an explanation, or provides a tutorial for producing text-based triggers super-efficiently, you won't be doing that. He could do that, yes. Text-detection isn't complicated, a week ago I didn't even know what an EUD was yet yesterday I could have told you exactly how to do this, all the numbers you would need, etc. The two tutorials I got most of my information from are dated pretty far back, and when I couldn't get the provided memory addresses to work, Heinermann was able to give me them in less than 5 minutes.
Like yoon said, text detection isn't new. The thing that is new, the reason he made this thread, was to showcase that he has a method to efficiently make these triggers in a matter of minutes. Why there is not enough information provided to reproduce his method makes it rather useless though, unless you specifically want "-music on " and "-music off " in your map, in which case, congratulations because you can copy the triggers from that map to do it.
So yeah, unless some additional information is provided here, I don't see why anyone would be excited or think this is helpful to them. It's the exact same information people already knew about five years ago + some sort of secret process that no one knows how to reproduce. Even if you just want to change "-music on " to "-cast fireball " in the provided triggers, you would need to know his method to be able to do that efficiently, otherwise you're right back to where you were before you read this thread.
Yoon, I think it would be pretty awesome if you would give a quick run-through of how you can make these triggers in a matter of minutes, along with whatever tools you use, so that other people can use text in their maps as well.
Also, you don't need to flush the screen with text for this to work, though it'd make the triggers a bit more complicated.
I've had help from you, Farty, Jack, Heinermann, poison, the list goes on. I've been talking about this heavily in the shoutbox over the last week, and explained exactly how to do it in Op SEN just a few days ago. We'll just say the timing of this is coincidental and leave it at that.
This post was edited 3 times, last edit by Azrael.Wrath: Jun 11 2010, 4:37 pm.
From the start this thread was originally meant for the discussion of what text detection can be applied to, hence "Text Detection Application" (not a computer application, if that caused any confusion). I did not think that someone would show interest to implement it in their own maps which is why I didn't bother with an explanation of how it's made. That said, my work was pretty much for independent purposes (and for the guy who originally asked for the map).Attachments:
I'd be more than willing to release the tools used and a brief explanation. You can download the necessary files attached to this post. Note that I'm respecting the author of ProTRG's wishes to not provide a compiled version of ProTRG that supports the *fixed* Memory condition, which is required for this process. However, if he hasn't already updated it, I don't think he has a problem with me releasing the updated source that I've included, and you can compile it yourself.
From here it's pretty straightforward. First you edit in.txt to the string you want to detect. If you want local detection, it must start with byte of 0x7 (green color byte), then a space, followed by the actual text. If your desired text is less than 3 characters, pad spaces until it isn't. Run TextConv.exe once and out.txt will be updated. Replace the first four lines of TextTrig.protrg to the contents of out.txt. In the fifth line change the variable 'shared' to 0 or 1 depending on what you want, and after running it through ProTRG you're done.
As you probably know the text data still exists even after it disappears from the screen. So in a case such as my map, if "-music off" and "-music on" were entered fast enough then it would toggle between both very quickly in an undesirable manner. I can't conceptualize a reliable system of preventing this using death counters to store which line the text was in, but do elaborate if what you were thinking is plausible.
Skin to bone, steel to rust, ash to ashes, dust to dust.
One good application of this would be being able to type -load 2471682 or something, and it loads your current map progress, Xuru RPG style.
Another would be ingame dialog handled by typing -yes or -no etc.
I have mostly left SEN except for the Temple Siege 2 forum (hidden to most of you). I am available via PM still, and Skype as JackRCDF.
If it is important to you, you will find a way. Otherwise, you will find an excuse. -Unknown
Perhaps you shouldn't be on SEN as much, too...
Better than the iPad!
+karma, you're awesome, this will help people out a lot
I think it would work if you incorporated the address for the next line number, 0x00640B58, and used death counts to keep track of the current line. For instance, if they type "- music on", you can set a DC to not use that line again until the address for the line number has returned back to its original value.
Just a theory though, I haven't had the means to actually implement multi-line text detection until now xD Thanks again for the reply.
I didn't know about that address, and I could probably come up with a mostly reliable system with it that doesn't need the text flush. This is only if the other three bytes are constant zeros and it won't work if two people typed something before a cycle could detect it.
For now, however, there's a bug that makes it not work with certain length usernames and I have no idea where it's coming from. I'll update it once I figure it out, if I do.
Yeah that's what I'm not sure of, is just how reliable that could be made to be. It should work 99% of the time, but it'd become problematic if someone spams faster than the triggers cycle. I think it could be designed to detect when a line's been skipped (if it goes directly from line 2 to line 4 on the next cycle), and be made to take that into account and correct itself.
That's unfortunate about the issue with username length though, please update with any information you uncover about it
And by the way, more +karma because the information you've provided is worth at least 2x what any post I've given +karma to before was. I mean you've circumvented the number one issue with using text detection, the ridiculous amount of labor involved in doing so, and you could have very easily kept it to yourself. I would even go as far as saying most people would have.
So for that, I commend you
This post was edited 1 time, last edit by Azrael.Wrath: Jun 12 2010, 3:19 am.
Fixed the previous bug as well as others.Attachments:
Now there's three detection methods: specific (text from one user only), local (text from current player only), shared (text from any player), and now it utilizes Azrael.Wrath's address so the screen doesn't have to be cleared of text after detecting commands anymore.
EDIT: Just found out that even with shared detection, you can't reliably use shared actions such as create unit in multiplayer. Probably has something to do with the difference in time when text is sent and received.
EDIT2: Bugfix. Updated attachment.
This post was edited 2 times, last edit by yoonkwun: Jun 13 2010, 7:00 pm.
Try reading readme.txt.
Just to let you know the current system is flawed pretty badly in multiplayer maps (perhaps to the point of unusability in some cases). In single-player it is flawless. I devised a system a while back that would fix the flaws in multiplayer, but it requires ~3k triggers. Good thing is that they're not needed for each command, just once. I'm not sure if I want to bother with this task, because I already know it's possible and I don't want to spend a lot more effort on something I probably won't even use. If there's enough requests then maybe.
Excuse the double post. I made a map that uses text detection to allow a player to drop other players by just typing in "-drop 2 ", "-drop 3 ", etc. This is one of the few useful applications that has each command only needing to be executed once, which is why it would work in multiplayer. The triggers should be directly copy and pastable to any map, as long as the death counter "Cantina" and Switch 1 is undisturbed (both of which can be adjusted in the protrg script).Attachments:
It uses 2011 triggers, however it can be significantly reduced if less players are made to be droppable. Player 1 cannot be dropped. It's not possible to enforce player 1 to only be able to drop a certain group of players (such as a team). If a player squelches player 1 before he tries to drop him, he will not be dropped. A non-player 1 can drop another non-player 1, however they will both be dropped. Dropping privileges and droppable players can be adjusted in the protrg script.
Note that there should be three spaces after the "-drop 2", SEN doesn't allow three consecutive spaces to be displayed.
[EUD] Text Dropping System
This post was edited 2 times, last edit by yoonkwun: Jun 17 2010, 11:50 pm.
Post #19 Leeroy_Jenkins Jun 18 2010, 8:51 pm
I don't know what to write yet :/
Good work! Very useful stuff.
★★★★★ The Saddest Map on SC----------★★★★★ Escape Hell RPG----------★★★★★ NHL 2013 vBETA
★★★★★ Middle of the Ocean RPG---------★★★★★ 2-D Mario DEMO -Soon to be completed!
★★★★★ Middle of the Ocean 2 RPG-------★★★★★ Rescue Team RPG
0 members in this topic (italic members are currently writing a reply): None
lil-Inferno -- R.I.P. Kame
Oh_Man -- Brings whole new meaning to the phrase "flat-lining".
RIVE -- lol
jjf28 -- ... uh oh
jjf28 -- are you literally dead yet?
Fire_Kame -- azrael I am literally dying while I wait for you to draw something