SRL Archive - OSR Help

Finding text/ detecting text/ reading text in old school


Spartan 117

2013-03-09 15:41:10

I have the p07 include and everything set up correctly. I am able to use getuptext with success. I was wondering if there is anyway to detect text on the main screen that is not up text and if there is a way to read text where the text is.

Example:
I would like to read how much of a type of pickaxe there is in the pickaxe shop. I would need for it to read the yellow text on the left top corner of that items icon. Idk how to do that.

Another Example (perhaps more important):
When i click on the pickaxe I want to be able to read and return how much the pickaxe costs.

Any help, points, and sample code would be greatly appreciated! thanks!

speedster

2013-03-09 17:16:22

You would have to identify the font and make use of the function GetTextAtExWrap

Spartan 117

2013-03-09 17:21:20

How would i identify the font?

speedster

2013-03-09 17:23:26

From: grahambr
How would i identify the font?


Well, usually each font pack has it's own name and you can identify them by name which represents the area of the game where they are being used.

At the moment I also have no idea where I can get my hands on other fonts from 2007 except the uptext :) . If someone would be kind enough to share the pack, that would be awesome.

rj

2013-03-11 17:41:35

The unofficial Rs include does not have NPC font but you can choose option text via:

P07_ChooseOptionMulti(['ithdraw All','thdraw All']);

i_liek2feesh

2013-03-12 06:12:00

From: speedster
You would have to identify the font and make use of the function GetTextAtExWrap


Sorry to highjack the thread, but I was having a similar problem. I'm now using the function you suggested but it's only spitting out the number 8 even if there is no 8 for it to grab. I'm totally at a loss as to what the parameters even mean, and the documentation doesn't exactly help. Any help would be appreciated.

rj

2013-03-12 06:39:40

From: i_liek2feesh
Sorry to highjack the thread, but I was having a similar problem. I'm now using the function you suggested but it's only spitting out the number 8 even if there is no 8 for it to grab. I'm totally at a loss as to what the parameters even mean, and the documentation doesn't exactly help. Any help would be appreciated.


Pretty much you have to make your own font, look at @DannyRS 2007 and 2006 includes, he might be able to help you

DannyRS

2013-03-12 09:24:03

One of the TextTPA functions in Simba returns a position, the others are mostly just for reading what the text say's and getting it in a string, so you can do things based on text on screen, you need to find the font's in simba/archives and then use that in the parameters