Text Detection
Mar 28 2010, 10:33 am
By: bobo  

Mar 28 2010, 10:33 am bobo Post #1



im trying to figure out text detection so far ive read this tut but i need more help http://z3.invisionfree.com/SCMSchool/index.php?showtopic=117

say for example im trying to detect this text
<From Bobo :> Bye2
so breaking it into 4letter increments wud be as follows
<Fro
m Bo
bo :
> By
e2
Now i get how to get the Hex codes for the letters but what hex is a Space Bar? Is the last line just 2 hex codes or does there need to be 4?



None.

Mar 28 2010, 1:32 pm poiuy_qwert Post #2

PyMS and ProTRG developer

Spaces are character 32 (0x20), and it always reads 4 bytes, you're just going to be reading past the end of the string. So the last 4 would be:
e2\x00_

\x00 is null (character 0), which is the end of the string, and the _ could be anything (whatever text was written there before the new message). To make it easy just align the string (including the null) to 4 bytes. Make it Bye2! so the last 4 would be:
e2!\x00




Mar 28 2010, 10:48 pm bobo Post #3



alright if u'd be so kinda and look over this to make sure i did this correctly, wud this be my initial hex values?
3C 46 72 6F
6D 20 42 6F
62 6F 20 3A
3E 20 42 79
65 32 21 00



None.

Mar 29 2010, 1:39 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!


You should really double check that that's the correct whisper format...

SC puts in a null at the beginning of the string if it's expired, which it was when I took this screenshot.

Half of the time you'll be detecting "<Fro", and the other half, you'll bet detecting "rom:" since there are 218 characters in each text, and that's not divisible by 4.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 29 2010, 2:21 am Kaias Post #5



Should be:
<From: Bobo> Bye2



None.

Mar 30 2010, 9:34 am bobo Post #6



i still cant get this to work ill break down wut i did maybe u guys can spot the error(s)

This is what im trying to detect:
<From: Bobo> Bye2!

Breaking it down into 4 letter increments:
<Fro
m: B
obo>
Bye
2!

Hex codes of the letters:
3C 46 72 6F
6D 3A 20 42
6F 62 6F 3E
20 42 79 65
32 21 00 00

Reversed:
6F 72 46 3C
42 20 3A 6D
3E 6F 62 6F
65 79 42 20
00 00 21 32

Hex into decimal:
1869760060
1109408365
1047487087
1702445600
8498

Triggers:
Conditions:
p3 has suffered exactly 1869760060 deaths of UnitID:27716
p4 has suffered exactly 1109408365 deaths of UnitID:27716
p5 has suffered exactly 1047487087 deaths of UnitID:27716
p6 has suffered exactly 1702445600 deaths of UnitID:27716
p7 has suffered exactly 8498 deaths of UnitID:27716

Actions:
Display ("Hey It worked")



None.

Mar 30 2010, 3:57 pm poiuy_qwert Post #7

PyMS and ProTRG developer

Quote from bobo
Breaking it down into 4 letter increments:
<Fro
m: B
obo>
Bye
2!

Hex codes of the letters:
3C 46 72 6F
6D 3A 20 42
6F 62 6F 3E
20 42 79 65
32 21 00 00

Reversed:
6F 72 46 3C
42 20 3A 6D
3E 6F 62 6F
65 79 42 20
00 00 21 32
Did you even read what i said/




Mar 30 2010, 5:15 pm rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

1869760060
1109408365
1047487087
1702453792

Don't detect non 4-byte integers. Use artmoney to check yourself. Sorry, I used "bye2!" instead of "Bye2!" so our numbers are off.

There are 13 total locations where this can show up, too, so you'll need a copy of this trigger for each location. Use the memory condition rather than the unitID method. I think you're reading the wrong location too, since you're reading 0x6cf024. You want to be reading:
00640B60 <- note that these start on a full byte, so you shouldn't detect the 2!
00640C3A <- note that these start on a half byte, so you shouldn't detect the <F
00640D14 <- note that these start on a full byte, so you shouldn't detect the 2!
00640DEE <- note that these start on a half byte, so you shouldn't detect the <F
etc...



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-5-25. : 9:22 am]
Zycorax -- :wob:
[2024-5-23. : 3:50 pm]
Ultraviolet -- :wob:
[2024-5-23. : 6:26 am]
UndeadStar -- :wob:
[2024-5-22. : 6:10 am]
Riney -- Somethings never change.
[2024-5-22. : 6:10 am]
Riney -- I come back after 4 months. Post wob. Make a crappy post in Null. Hit a 0 in magic boxes.
[2024-5-22. : 6:00 am]
Riney -- :wob:
[2024-5-20. : 3:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[2024-5-20. : 4:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[2024-5-20. : 4:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
Please log in to shout.


Members Online: Roy, jun3hong