Author Topic: Scripted Message Gauge v1.2  (Read 12812 times)

0 Members and 1 Guest are viewing this topic.

Offline Axem

  • 211
Re: Scripted Message Gauge v1.2
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.
« Last Edit: March 21, 2016, 08:15:18 pm by Axem »

 

Offline Lepanto

  • 210
  • Believes in Truth
    • Skype
Re: Scripted Message Gauge v1.2
Thanks. We'll fiddle with the current version for right now.
"We have now reached the point where every goon with a grievance, every bitter bigot, merely has to place the prefix, 'I know this is not politically correct, but...' in front of the usual string of insults in order to be not just safe from criticism, but actually a card, a lad, even a hero. Conversely, to talk about poverty and inequality, to draw attention to the reality that discrimination and injustice are still facts of life, is to commit the sin of political correctness. Anti-PC has become the latest cover for creeps. It is a godsend for every curmudgeon and crank, from fascists to the merely smug."
Finian O'Toole, The Irish Times, 5 May 1994

Blue Planet: The Battle Captains: Missions starring the Admirals of BP: WiH
Frontlines 2334+2335: T-V War campaign
GVB Ammit: Vasudan strike bomber
Player-Controlled Capship Modding Tutorial

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: Scripted Message Gauge v1.2
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.

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?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline Axem

  • 211
Re: Scripted Message Gauge v1.2
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.

 
Re: Scripted Message Gauge v1.2
Possibly you should put a very bright warning into the OP too then?