Page 1 of 1
Need a long string
Posted: Mon Jan 28, 2013 3:02 pm
by CaptainPoopface
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.
Re: Need a long string
Posted: Mon Jan 28, 2013 3:15 pm
by XZodia
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)
Re: Need a long string
Posted: Mon Jan 28, 2013 4:14 pm
by JacksonCougar
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)
Does halo 2 use the 128 table at all?
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?
Re: Need a long string
Posted: Mon Jan 28, 2013 5:21 pm
by XZodia
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...
Re: Need a long string
Posted: Mon Jan 28, 2013 6:42 pm
by CaptainPoopface
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.
Re: Need a long string
Posted: Mon Jan 28, 2013 7:00 pm
by OwnZ joO
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)
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.
Re: Need a long string
Posted: Mon Jan 28, 2013 7:10 pm
by Grimdoomer
JacksonCougar wrote: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)
Does halo 2 use the 128 table at all?
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?
The engine does not even read the string_id tables.
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.
Re: Need a long string
Posted: Mon Jan 28, 2013 8:47 pm
by troymac1ure
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.
Re: Need a long string
Posted: Tue Jan 29, 2013 2:05 am
by CaptainPoopface
What tiny text are you referring to?
Re: Need a long string
Posted: Tue Jan 29, 2013 1:21 pm
by troymac1ure
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