Jump to content
DaveP

Implementing SetPlateNumber in addon

Recommended Posts

Heyo,

 

Loving the latest release on Dev Branch. Was just wondering if the mechanism for SetPlateNumber was accessible for community addons? Is it simply a case of a particularly named hidden selection?

 

Cheers

Share this post


Link to post
Share on other sites
11 hours ago, DaveP said:

Heyo,

 

Loving the latest release on Dev Branch. Was just wondering if the mechanism for SetPlateNumber was accessible for community addons? Is it simply a case of a particularly named hidden selection?

 

Cheers

 

If you are inheriting from class Car then you most likely inherit following parameters

            class PlateInfos
            {
                name = "spz";
                color[] = {0, 0, 0, 0.75};
            };

name is obviously name of selection, where plate numbers are generated and color is Red, Green, Blue, Alpha array. In order to have it working, don't forget to put that selection to sections[] array in model.cfg. Max string limit is 15 characters. Plate numbers are not rendered beyond ~25m  (not sure atm)

Font used for plate numbers is global parameter located in core config - for fun you can try changing and see how it works
 

fontPlate = "LucidaConsoleB";

 

Plate number scheme is located in world cfg and can be changed per island with following parameters


 

        class DefaultWorld
        {
            plateFormat = "$$$  ## - ##";
            plateLetters = "ABCDEFHIKLMOPRSTVXYZ";

$ - wildcard for letters

# - wildcard for numbers

  • Like 1

Share this post


Link to post
Share on other sites

I'm wondering if it's possible to generate a new line character because there are some platenumbers where a simple line isn't feasible.
I mean something like this vehicle:
 

Spoiler

66a6b59d8900ea76bf7a1464334468a9.jpg

 

If I set a "\n" character it results in no effect:
 

Spoiler

7445cb9105a831522a9fdc0c00887ad4.png

 

Share this post


Link to post
Share on other sites
53 minutes ago, Mickyleitor said:

 

I'm wondering if it's possible to generate a new line character because there are some platenumbers where a simple line isn't feasible.

 

It's not possible now and I cannot tell now if something like that will be ever implemented in the future

  • Thanks 1

Share this post


Link to post
Share on other sites
On 9.1.2018 at 9:58 AM, reyhard said:

ps. string limit might be increased to 64 characters soon

Seems to be 63 characters in the current version (1.81.144059)

 

I experiemented a bit and with this addition, you can make signs that can be edited by a player.

f.e. custom place name signs, server rules signs, commercial signs...(without having to create a texture for everything)

The size of the font seems to be directly dependant to the size of the selection.

jT57WSf.jpg

Gc72fYT.jpg

 

So this adds quite some possibilities for modders and I am looking forward to it in stable!

 

Share this post


Link to post
Share on other sites
On 06.12.2017 at 11:39 AM, reyhard said:

 

Plate number scheme is located in world cfg and can be changed per island with following parameters


 


        class DefaultWorld
        {
            plateFormat = "$$$  ## - ##";
            plateLetters = "ABCDEFHIKLMOPRSTVXYZ";

$ - wildcard for letters

# - wildcard for numbers

 

Does that mean, the plate number format cannot be set per vehicle but per map? Usually military vehicles follow different plateformats than other vehicles. If the format is set per map, how to achieve custom plates for a specific vehicle type  then?

  • Sad 1

Share this post


Link to post
Share on other sites
14 hours ago, Devastator_cm said:

 

Does that mean, the plate number format cannot be set per vehicle but per map? Usually military vehicles follow different plateformats than other vehicles. If the format is set per map, how to achieve custom plates for a specific vehicle type  then?

 

Most likely using the Cfg init with a custom function and setPlateNumber.

 

Cheers

Share this post


Link to post
Share on other sites
21 hours ago, Devastator_cm said:

 

Does that mean, the plate number format cannot be set per vehicle but per map? Usually military vehicles follow different plateformats than other vehicles. If the format is set per map, how to achieve custom plates for a specific vehicle type  then?

https://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidelines#Plate_Numbers

see following section - it was later updated with new parameters

  • Like 2

Share this post


Link to post
Share on other sites
22 minutes ago, reyhard said:

https://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidelines#Plate_Numbers

see following section - it was later updated with new parameters

 

Neat, didn't see that.

For completions sake:

Quote

In case you don't want to use island plate randomization because i.e. you are doing some military vehicle, you can override those settings inside PlateInfos class


class cfgVehicles
{
	class YourVehicle
	{
		class PlateInfos
		{
		    // name of section where plate number should generated
		     name = "spz";
		     // color used for plate number in (r,g,b,a) format
		     color[] = {1.00,0.00,1.00,1};
		     plateFont        = "RobotoCondensedLight";
		     // "#" represent number & "$" represents letter
		     plateFormat        = "# BUY ARMA $";
		     // Required even if you don't use any letters in plateFormat
		     plateLetters    = "ABCDEFHIKLMOPRSTVXYZ";
		};
	};	
};

 

 

Cheers

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×