Jump to content


Photo

Floaty text display height / time


  • Please log in to reply
5 replies to this topic

#1 scient

scient
  • Modder
  • 1010 posts

Posted 04 December 2008 - 11:39 AM

I was wondering if you have modded the display time for floaty text? While working on something else I inadvertently came across offset/function that handles how many lines of text can be displayed at the same time. I only tinkered with it slightly but if are interested I can post locations. I haven't played with WS mod enough to know how you handle this but it may be nice to increase it since there is enough room on higher resolutions.

floaty.png

Those interested in the classic TBS game Sid Meier's Alpha Centauri / Alien Crossover should check out the unofficial patch I work on here.


#2 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 04 December 2008 - 12:21 PM

That is a nice find scient. I had not tinkered with this, and yes I would definitely be interested to use it in the mod :) It's an offset I presume?

#3 scient

scient
  • Modder
  • 1010 posts

Posted 04 December 2008 - 12:33 PM

It's used in several places but I can give you a list of all offsets that apply to "TRMTFONT" floaty text function and height value. There are instances where height is set to -1 or 0 to disable text display which I ignore. The only one I've identified specifically is having to do with healing and hitpoint recovery so you'll have to tinker with the rest.

I'll put the list together when I get back in acouple hours after my last class for the day.

Those interested in the classic TBS game Sid Meier's Alpha Centauri / Alien Crossover should check out the unofficial patch I work on here.


#4 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 04 December 2008 - 12:40 PM

ok, and thanks!

#5 scient

scient
  • Modder
  • 1010 posts

Posted 04 December 2008 - 05:14 PM

Inside the 2cd version, here are all the offsets to push value:
0004DA9A
00052BF7
0005D21C
000B118C
000B1E46
000B42C0
000B43DF
000B7E8F
000B87F8
000B915E
000BD95F
000BE2C7
000BF8A3
000C98E1
000D2DAC
000D2ECD
000D30B5
000D31D4
000D3344
001C8EE9
001C95EE
001F3DCB
001F3F83
0037E28B
003DCC0C

The opcode you would be changing is "PUSH 0x34". If you're using something like olly or ida then it's just a matter of changing value there. If you're using a hex editor, the push is two bytes "0x6A 0x34" so you would want to change second byte to whatever value in hex you want for height (0x34 -> 52). In the screenshot I had doubled it by setting it to 0x68. If you find any that don't follow the 6A 34 sequence let me know and I'll get correct address.

For reference, the one I was using that outputs any kind of hp healing is at the following address: 2cd 0x000B87F8, 4cd 0x000B8838. I'm not sure what the rest do. If you're having trouble identifying a particular one I can have a look.

edit:
I forgot the 4cd offsets:
0004DADA
00052C37
0005D25C
000B11CC
000B1E86
000B4300
000B441F
000B7ECF
000B8838
000B919E
000BD99F
000BE307
000BF8E3
000C9921
000D2DEC
000D2F0D
000D30F5
000D3214
000D3384
001C90AE
001C97B3
001F3F8B
001F4143
0037E44B
003DCDCC

Edited by scient, 04 December 2008 - 05:26 PM.

Those interested in the classic TBS game Sid Meier's Alpha Centauri / Alien Crossover should check out the unofficial patch I work on here.


#6 ghostdog

ghostdog
  • Modder
  • 556 posts

Posted 04 December 2008 - 05:45 PM

Thanks again, I'll check them out.