Need a long string
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Need a long string
I would like to display a long string or series of strings at the beginning of a game. The purpose is to provide some instruction about the mod. Is it feasible to replace the gametype text (e.g., SLAYER) with several lines? Alternately, I could make the weapon pickup strings very long, but I would rather use strings from other languages that I don't need. How can I point the "hold X to mount turret" string to the German string for "hold X to swap ally's weap"? And leave all the other strings in English, of course.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Need a long string
Unfortunately, pointing to different languages isn't that simple...
You'd need to increase the size of the English table to use the data from the other languages and then do some more stuff (can't think of the specifics without looking at a map)
You'd need to increase the size of the English table to use the data from the other languages and then do some more stuff (can't think of the specifics without looking at a map)
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: Need a long string
Does halo 2 use the 128 table at all?XZodia wrote:Unfortunately, pointing to different languages isn't that simple...
You'd need to increase the size of the English table to use the data from the other languages and then do some more stuff (can't think of the specifics without looking at a map)
If you just want to get it done without a program... it would be pretty difficult, because the string_index_table is built relative to the last string.length. What that means is if you edit the length of a string you need to recalculate all the string_index_table values after that string. Another difficulty is that the string_tables (which hold the values) are not contiguous, each one is proceeded by a string_index_table (used for lookups/loading I believe). Looks like the last strings in the tables are game_type ones: so using the last string and over-flowing the buffer is not a good option either.
tl;dr: use a bitmap?
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Need a long string
It would be a pretty cool program that could give the extra space to the English string table...
Any takers? I would if I had time...
On the other hand, you could just use one of the tutorial strings...
Any takers? I would if I had time...
On the other hand, you could just use one of the tutorial strings...
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: Need a long string
It's not worth any big investment of time. I will find a way with conventional methods. I was hoping it would be a simple offset change. Nbd.
- OwnZ joO
- Posts: 1197
- Joined: Sun Dec 09, 2007 4:46 pm
Re: Need a long string
You could probably update the unicode table indices to all point to english table and then use the extra space as needed, it would obviously make the map non international. Also I have been thinking that the unicode strings may be encoded as utf-8 and not the unicode16 encoding like the .Net string default. I may mess with unicode some time that I have free time, but we'll see if that happens.XZodia wrote:Unfortunately, pointing to different languages isn't that simple...
You'd need to increase the size of the English table to use the data from the other languages and then do some more stuff (can't think of the specifics without looking at a map)
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Need a long string
The engine does not even read the string_id tables.JacksonCougar wrote:Does halo 2 use the 128 table at all?XZodia wrote:Unfortunately, pointing to different languages isn't that simple...
You'd need to increase the size of the English table to use the data from the other languages and then do some more stuff (can't think of the specifics without looking at a map)
If you just want to get it done without a program... it would be pretty difficult, because the string_index_table is built relative to the last string.length. What that means is if you edit the length of a string you need to recalculate all the string_index_table values after that string. Another difficulty is that the string_tables (which hold the values) are not contiguous, each one is proceeded by a string_index_table (used for lookups/loading I believe). Looks like the last strings in the tables are game_type ones: so using the last string and over-flowing the buffer is not a good option either.
tl;dr: use a bitmap?
I was curious if there is a max length for unicode strings. Took a look around the halo 2 pc toolset and found they have a max length of 512 characters.
OwnZ joO is correct, they use utf8.
Don't snort the magic, we need it for the network.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Need a long string
Just use the tiny text that gets written the the screen (that you can't read, looks like dots being printed). They have some fairly long messages in there and won't be missed.
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: Need a long string
What tiny text are you referring to?
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Need a long string
Look at the picture of the Skull & flags (gametype in this case) in this post. In game there are little dots that come up beside the pictures. These are actually text, some of which are quite funny, if you could actually read them. There is a flag that sets "tiny typing text".
viewtopic.php?f=10&t=1325&start=775#p35565
viewtopic.php?f=10&t=1325&start=775#p35565