GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »



Edit2:
Edit2:
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

This brings up a good point. I PM'ed you two about this idea to make the whole forum in GTA2 font for special days, but doing it by Javascript is darn slow. And somehow it didn't get all the letters. It's probably better to just set for one day all messages end and start with this new [ t ] tag. :)

Here is my failed attempt:
testo-the-mayo.png
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »


Code: Select all

<img src="http://gtamp.com/text/gta2text.php?text={TEXT}" title="{TEXT}"/>
I am worried about this:

The BBCode you are trying to add seems to use a {TEXT} token inside a HTML attribute. This is a possible XSS security issue. Try using the more restrictive {SIMPLETEXT} or {INTTEXT} types instead. Only proceed if you understand the risks involved and you consider the use of {TEXT} absolutely unavoidable.

If I use those other text types then ? and " don't work.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

Cuban-Pete wrote:Here is my failed attempt:
It might be possible to fix this. But not without source code ;-)
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

I used very cheaply jquery and a replaceText script. [sm-11]

Here is the code:
frenzy-day.js
(94.41 KiB) Downloaded 688 times
And the images:
font.7z
(24.16 KiB) Downloaded 636 times
"Mmmm, your eyes are so beautiful."
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by BenMillard »

Feature request!

Would you adjust this tool so the maximum background area matches the space GTA2 uses, please? That would let me create the right amount of padding for all my text quite fast. And I wouldn't need to keep swapping the final character between full stops and underscore.

This should just be 3 lines:

Image

Why?
DISPLAY_BRIEF covers up the messages players type to each other in multiplayer. To get around with, I've been padding my .gxt text with lots of spaces and then a full stop, so GXT Editor 3.0.1 doesn't trim the spaces off.

This makes a 1-line mission message sit 2 lines off the bottom of the screen. It lets 2 players type messages at the same time underneath - very handy in the team games I am making a lot of these days.

However, the GTA2 font is not exactly monospace. Exclamation marks and narrow letters take up less space and uppercase letters take up more. This makes it hard to predict how much padding is needed. A full 3rd line of padding keeps the message on screen for about 30% longer than having a single character of padding on the 3rd line, so I try to minimise this.

At the moment, I generally count 47 characters per line. I use full stop (.) instead of underscore so I can see where the padding ends. I play through the level, taking a screenshot of each message. Then I review screenshots and adjust the text. Re-testing the adjustments is sometimes surprising due to the way spaces seem to collapse when the lines wrap around, so this process has to be repeated sometimes. And If I change any wording, it all starts again.

(EDIT) Also, please link to this topic from the tool so it's esy to send feedback.

Another feature request...please support the # character to start and end highlighting.

Msybe you could support the message avatar short codes as well?

That should keep you busy. ;)
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

I would also add "no overlapping text" to a GTA2 feature request topic. If we find text position memory address then you could put text anywhere with a custom script.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

BenMillard wrote:Would you adjust this tool so the maximum background area matches the space GTA2 uses, please?
I would need to know the exact maximum width in pixels to implement that. Find that out, and i'll implement it.
BenMillard wrote:Also, please link to this topic from the tool so it's esy to send feedback.
Yes. Should i make new topic so i am able to add the source to first post as well?
BenMillard wrote:Another feature request...please support the # character to start and end highlighting.
First i would need to see how it looks ingame. Your website doesnt tell much about the looks of it.
BenMillard wrote:Msybe you could support the message avatar short codes as well?
First i would need to see how it looks ingame. Give me screenshot of text with those heads with all possible settings, if it changes depending on line count.
BenMillard wrote:That should keep you busy. ;)
It should keep you busy! ;-) The source is open. (i just forgot where i released it, somewhere in this topic i guess?). Edit: oh here it is: gta2text121.7z [324.92 KiB]
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

@Ben. TM is the master coder for the php version, if he wants to, he should be able to fix it in the time of an invulnerability pill.

You could also try to find with CheatEngine the text string in gta2 and edit it on the fly to see if the text fits.

Sektor's idea sounds nice.
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

I made T.M. the author of the first post so he can edit it (easier than me figuring out how to give permissions for you to both edit the first post).
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

Sektor wrote:I made T.M. the author of the first post so he can edit it (easier than me figuring out how to give permissions for you to both edit the first post).
Will you change it back again eventually? I'm kinda proud of my txt2gta2 idea back in the days, even though the php version is now the flagship.
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

I edited the first post, had to remove one attachment (saved it on my computer first though), since 5 is the limit. (thats why i rather upload images on imageshack/minus.com rather than use attachments like Sektor prefers).

I'll get back to this later and make the changes next week (if i have time & remember to) if nobody else has made them yet.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

Cuban-Pete wrote:Will you change it back again eventually? I'm kinda proud of my txt2gta2 idea back in the days, even though the php version is now the flagship.
Yes, it's just a temporary change. Two topics might be better.
T.M. wrote:I edited the first post, had to remove one attachment (saved it on my computer first though), since 5 is the limit. (thats why i rather upload images on imageshack/minus.com rather than use attachments like Sektor prefers).
I don't mind externally hosted images, I just hate imageshack because they often block my IP. I increased the attachment limits.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by BenMillard »

T.M. wrote:I would need to know the exact maximum width in pixels to implement that.
Mission messages:
  • Uppercase R is 10x15 pixels including shadow in your tool.
  • GTA2 running at 640x480 displays uppercase R at 10x15 pixels. No scaling to GUI text at that resolution.
  • Russian Mafia avatar exported by Cuban Pete is 48x64 pixels. (All the gang heads are different sizes.)
  • Mission briefing text always starts 64 pixels from the left of the screen, whatever avatar is used.
  • This leaves 576 pixels for mission text but there might be padding on the far right. Hard to measure that.
  • There is always an avatar. The absence of a gang code makes it use the neutral gang head.
  • Briefings start at the bottom of the screen.
  • Word wrapping pushes the text upwards.
  • Top of uppercase R for word-wrapped lines, counting upwards from bottom of screen:
    1. 19 pixels.
    2. 44 pixels.
    3. 69 pixels.
  • Avatar is centred within the 64 pixels provided for it on the left.
  • Hyphenated words and phrases do not wrap at the hyphen. (Look for "Loo-Loo-Loony" in e.gxt.)
Player messages:
  • Never have an avatar.
  • Start very near the left edge.
  • Always use a single line, pushing leftwards off the screen to always show the rightmost characters.
[quote="quote="T.M."]
BenMillard wrote:Another feature request...please support the # character to start and end highlighting.
First i would need to see how it looks ingame.[/quote]
Err, play any single-player original map? This is a message entirely in the highlight colour:
Image

A message with normal and highlighted text, padded 2 lines up from the bottom and ending with invisible underscore (a fix Vike made in gta2.exe several versions back):
Image

[quote="quote="T.M."]Give me screenshot of text with those heads with all possible settings, if it changes depending on line count.[/quote]
Positions given above. Exported images can be grabbed from my web page, or Cuban Pete's graphics pack or viewed in the original .sty directly with STY Tool by JernejL/Delfi.

[quote="quote="T.M."]It should keep you busy! ;-)[/quote]
I might take a look but not very likely. My PHP skills are very limited.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

BenMillard wrote:Err, play any single-player original map? This is a message entirely in the highlight colour:
I dont play GTA much... Last time 3 years ago...? If i hear some GTA2 related phrases, its totally cryptic for me.

Looks like I am missing 1 color from the list. (which is #337788).

Added the color now:
http://gtamp.com/text/index.php?color=1 ... carbomb%2E

Doesnt work with # mark yet... Todo later.

Errr..... wtf:
Imagbgbve2.jpg
Imagbgbve2.jpg (10.49 KiB) Viewed 33684 times
The font spacing is different?

Edit: found weird bug in the text renderer: if you put a word between brackets like: "(something)" in the end of text, the last line wont get rendered. Feird.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by BenMillard »

The gap between some letters looks a bit different. Big T and small e is nice and tight in your tool but GTA2 seems to put 1px gap between the rectangle of each letter, even when that looks really 'gappy'. (There is no kerning.)

Thanks for looking into these enhancements!
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

I received an email:
Good time of the day, Sektor. I need to know something about GTA 2 text editor:
Is it possible to ask the author of this editor to add "+" symbol and some font size variety and to improve the capital "N" letter to make it look not the same as the lowercase (not like a big "n", but like 'N')?

Thank you in advance
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Cuban-Pete »

Wow, 3 years old already. Did (s)he mean the php version or my version?
Anyway, there is no original "+" sign. Maybe I can make one or does TM like to do this?
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by Sektor »

Probably means the php version

Another email...
Thank you. Meanwhile I've got one more idea — what if "I" and "J" letters didn't have serifs? That would be a good web font then. Also it would be nice if "Q" had a little more space from the right, just not to "grab" letters that follow it.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 Font Topic - TXT2GTA2 (Version 3 Released!)

Post by T.M. »

3 years... already, gone.

I dont think we should modify the fonts... its GTA2 font, not something someone else likes it to be
Post Reply