• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 28, 2024, 01:30:22 PM

News:

World Racing Series beta14 available! :)


How to use sprgen?

Started by Manu, February 29, 2016, 10:29:12 AM

Previous topic - Next topic

Manu

February 29, 2016, 10:29:12 AM Last Edit: February 29, 2016, 11:29:11 AM by Manu
Someone knows as used sprgen ? I would like to make custom displays for moto gp mod.

Thank you very much.

It's Easier to Fool People Than It Is to Convince Them That They Have Been Fooled.

doubledragoncc

I cant help you but just wanted to say sounds great.

Any idea on release of MotoGP set for beta 8 btw?

Keep up the fantastic work and thanks Manu

DD
GPBOC Live Streams: https://www.youtube.com/c/IASystemsComputerControls; i7 12700K 5.1GHz Z690 ASUS Strix Z690-A Mobo 32GB 3600MHz DDR4 RAM ASUS Strix RTX3080 OC 10GB DDR6X ASUS Ryujin 360 AOI Cooler ROG Thor 1200w PSU in ROG Helios Tower Case.

HornetMaX

That would be interesting for me too: is some situations I'd like to have a monospaced font for the plugins.
it would allow proper alignment of text in some widgets and something like rolling strings (e.g. with current standings, gaps etc).

Even a description of the internal format of a .fnt file would help (I'm not 100% sure but a long ago I think somebody explained it).

Manu

February 29, 2016, 12:51:22 PM #3 Last Edit: February 29, 2016, 12:59:36 PM by Manu
When I launch sprgen.exe following appears:

Usage: fontgen <configuration file> <output file>

Any idea? I not found documentation about this.
It's Easier to Fool People Than It Is to Convince Them That They Have Been Fooled.

h106frp

Dont know if it help, but is you unpack misc.pkz in the mxbikes folder it has a 'fonts' folder with a .cfg file a .tga and an .ini

The one i looked at was for MXB

gfx.cfg
chassis_number
{
   font = plate.tga
   fontstring = 0123456789
   spacing = 80
   posx = 8
   posy = 4
}
steer_number
{
   font = plate.tga
   fontstring = 0123456789
   spacing = 80
   posx = 8
   posy = 4
}


default.ini

[info]
name = Default

[data]
code = 0

plate.tga
is a graphic in number plate style of the numbers 0 to 9

ie 01234567890

If you work it out please post the result.

HornetMaX

Quote from: h106frp on February 29, 2016, 02:19:31 PM
Dont know if it help, but is you unpack misc.pkz in the mxbikes folder it has a 'fonts' folder with a .cfg file a .tga and an .ini
Does GPB have something similar ?
I'm sure it has at least one main.fnt somewhere (that's where I took it for use in my plugin), so maybe there's also a main.tga and some associated .cfg ...

I'll have a look tonight.

franco pizzagalli


PiBoSo

Quote from: franco pizzagalli on April 08, 2016, 07:36:09 AM
piboso why not help us?

Because time is scarce resource :(
There is a "Dash" section in the documentation waiting to be filled: http://docs.piboso.com/wiki/index.php/Main_Page
"La perfezione non è il nostro obiettivo, è la nostra tendenza".

Steven

I was hoping sprgen is used to make .spr files for the gauge and no fonts (is there a fontgen yet?).

Some bikes in beta6c (SBKs, Ducatis) apparently have this working (the gauge). So their creators might already know how to do it.

HornetMaX

Quote from: Steven on April 13, 2016, 11:15:20 PM
I was hoping sprgen is used to make .spr files for the gauge and no fonts (is there a fontgen yet?).
Don't even know ...

BTW, when you run sprgen it says:

SPR Generator 1.0

Usage: fontgen <configuration file> <output file>


h106frp

Fonts are just bitmaps, go to a font website, create the font and download the bitmap, declare the ASCII equivalent characters and pixel spacing in gfx.cfg

Steven

It seems to be more or less like this:

content of the configuration file (config.ini or .txt or ...)
[config]
numsprites=5
basefilename=base.tga
spritebasename=rpm


spritebasename - the prefix for the pictures with the steps of the revcounter (rpm01.tga; rpm02.tga; ...)
numsprites - the number of steps
basefilename - no idea but the file is needed, seems to be counted as the very first step, but it didn't show up for me

all pictures need to have the same size and their size should be the one of the texture for the dash (w_dash for example)

output file: just the name with or without ending for example "rpm.spr"

-> sprgen.exe config.ini rpm.spr

gfx.cfg (Varese as example)
rpm_graph
{
enable = 1
sprite = rpm.spr
min = 5000
max = 14000
split = 7000
splitpos = 0.16
}


min - rpm the base.tga would appear at as the very first step
max - rpm the last picture is shown at
only necessary when there are different "scales":
split - rpm where the new scale starts
splitpos - the number of steps the new scale starts at divided by the maximum of steps

HornetMaX

Quote from: h106frp on April 14, 2016, 01:03:21 AM
Fonts are just bitmaps, go to a font website, create the font and download the bitmap, declare the ASCII equivalent characters and pixel spacing in gfx.cfg
In a plugin, I have no gfx.cfg, I just have the .fnt file.

h106frp

OK, I had a look at 'connection.mnu' and i can see that they are differently to the in-game fonts.  :(

HornetMaX

Quote from: PiBoSo on April 08, 2016, 09:15:19 AM
Quote from: franco pizzagalli on April 08, 2016, 07:36:09 AM
piboso why not help us?

Because time is scarce resource :(
There is a "Dash" section in the documentation waiting to be filled: http://docs.piboso.com/wiki/index.php/Main_Page
OK, let's try something simpler then:  Is creating a .fnt as simple as having a .tga + the associated .cfg and use them with sprgen ? If yes, can we have a sample .cfg ?
(no explanations needed, just the .tga and the .cfg).