Battery System

This system is completely different from the previous version.

This system is completely different from the previous version. As in the lite version, Quasar Smartphone PRO also has an incredible battery system, this time much more advanced than in its previous version. In this version we will use metadata instead of a json file so that it is more accurate and dynamic when used.

This system will interact with our dynamic island when it reaches 20% and 10%.

Can I disable the battery system?

In the PRO version we will not be able to disable the battery system, what we can do is lower the consumption by default and eliminate the applications in the Config.Battery list so that there is no battery consumption.

How do I change the charging speed of powerbank item?

You can manipulate the loading speed by making use of Config.PowebankSpeed and lowering its level.

Can I recharge another player's battery with commands?

Of course, the administrative command is /chargePhone id.


General battery configuration

The battery has a very simple configuration where we can enable the interval system, which we do not recommend touching. You can use the default consumption by changing the default option and add applications that will consume more or less according to your personal criteria. If you create custom applications you can add them to this list.

Config.Battery = {
    enabled = true,
    interval = 1000,
    default = 0.001,
    apps = {
        -- More battery is drained if these apps are open.
        ['phone'] = 0.002,
        ['whatsapp'] = 0.002,
        ['twitter'] = 0.002,
        ['settings'] = 0.002,
        ['mail'] = 0.002,
        ['state'] = 0.002,
        ['weather'] = 0.002,
        ['spotify'] = 0.002,
        ['gallery'] = 0.002,
        ['camera'] = 0.002,
        ['notes'] = 0.002,
        ['calculator'] = 0.002,
        ['youtube'] = 0.002,
        ['store'] = 0.002,
        ['crypto'] = 0.002,
        ['bank'] = 0.002,
        ['help'] = 0.002,
        ['messages'] = 0.002,
        ['tinder'] = 0.002,
        ['clock'] = 0.002,
        ['houses'] = 0.002,
        ['yellowpages'] = 0.002,
        ['rentel'] = 0.002,
        ['tetris'] = 0.002,
        ['uber'] = 0.002,
        ['darkweb'] = 0.002,
        ['racing'] = 0.002,
        ['darkchat'] = 0.002,
        ['uberRider'] = 0.002,
        ['tiktok'] = 0.002,
        ['market'] = 0.002
    }
}

Battery recharging via Powerbank

You can use the powerbank item that we created in the Installation section, this item can be used and will allow us to choose which phone we want to recharge if we have more than one. It will start charging your phone up to 100%.


Recharge via charging spot

You can charge the phone using the charger spots that you will find on your map, these are found in the same config.lua in the Config.ChargeCoords configuration. You can create infinite charging spots for players, where their phone will be taken away and the level of charge their phone contains will be shown until it reaches 100%.

Config.ChargeCoords = {
    {
        coords = vec3(1431.4039306641, -2009.6640625, 61.349201202393),
        isAvailable = true,
        chargeSpeed = 3.0 -- 3 second later +3 charge
    }
    -- You can add more here
}

Administrator command

We can use the administrative command which will charge the player's battery to 100% using /chargePhone id.

Last updated