FreeSpace Releases > Scripting Releases

Scripted Message Gauge v1.2

<< < (5/5)

Axem:
How long of a message exactly? How many characters?

The length of time a message stays up is dependent on the "Length" parameter in the config file included (axmessage.cfg). The exact equation is "length parameter * number of characters in message" or 2 seconds, whichever is larger. Looking at my own personal config files, I seem to have found the default of 0.07 too short and changed it to 0.12. Play with it I guess and see what works for you.

EDIT: I also have a slightly untested beta version for... 1.3 I guess. If you guys are interested. It's better at drawing in low fps conditions and things like empty secondary warnings now get displayed.

Lepanto:
Thanks. We'll fiddle with the current version for right now.

Mobius:

--- Quote from: Axem on March 21, 2016, 07:56:06 pm ---The length of time a message stays up is dependent on the "Length" parameter in the config file included (axmessage.cfg). The exact equation is "length parameter * number of characters in message" or 2 seconds, whichever is larger. Looking at my own personal config files, I seem to have found the default of 0.07 too short and changed it to 0.12. Play with it I guess and see what works for you.

--- End quote ---

I don't know if this is the right place where to post the following suggestion, so in case it isn't, just disregard this post and ignore my necrothreadaging.

We were having a discussion on the private FSCRP channel concerning this script. It's extremely useful, but seems to cut some of the longer messages. I wonder if there could be a way to adapt font size to message length, and do so dynamically, so that one liners would appear on a bigger font compared to long messages with lots of descriptions.

Judging from Axem's post, the game does in fact keep track of the number of characters per message, and does it for purposes other than the one I'm talking about. Could a dynamic font size be possible?

Axem:
Just an FYI here, my github will have the latest up to date scripts, so treat this thread as an "archive" of the older version.

But to your question...

So the answer is... sort of. You can't have completely dynamic fonts, each font needs to have its own fonts table entry. That's why in version 1.3beta (in the github right now), it's set up for multiple resolution ranges with some specified font. So you could make something where it sees it has just one line and picks the "larger font".

Might be a good first project for someone to tinker with. :) gr.drawString will return the number of lines, so you could have the script start trying fonts and figure out how best they would fit.

Nightmare:
Possibly you should put a very bright warning into the OP too then?

Navigation

[0] Message Index

[*] Previous page

Go to full version