WorldPower Unity Plugin

A new update is now available, introducing seasons and more!
Latest hotfix: 0.8.0.1 (2024-12-20)
  • WorldPower


    Version 1

    • Added battery and solar prefabs
    • coded the panels to produce power
    • coded the battery's to store power
    • coded the lights to use stored power from battery's
    • Added onscreen battery capacity info and amount of banks

    Version 1.1

    • Added a way to delete the Solar Panels and Battery's, goto the battery or solar panel and walk to it with your crosshair on it, the on screen info at the top will display the id and grid name, then open the chat and use the command /Delete Battery or /Delete SolarPanel They should vanish for all players

    Version 1.2

    • Added in game time plus local time and other info
    • Added rename grids, this means a player can rename a grid to have unlimited grids, to rename the grid goto the light, solarpanel or battery and type into chat

    /Change Light GridName new grid name here    or /Change SolarPanel GridName new grid name here  or /Change Battery GridName new grid name here

            

    • Apart from that i have fixed a number of bugs.

    Version 1.3

    • Added Solar and battery preview, type in chat /preview battery   or  /preview solarpanel once you have the hardware in place type /battery or /solar to place it as before.
    • Added sound effect when looking at battery's, also added an effect change to the top of the battery, this will be updated/upgraded soon,
    • Added solo battery charge level info, just look at the battery to see this info, it shows up on the, top left side of the screen

    Version 1.4

    • Added new way to place the Hardware, left Shift + S starts the solar panel preview - Right Mouse Button To Place It Down, for the battery Left Shift + B starts the Battery preview - Right Mouse Button To Place It Down

    Version 1.5

    • Added more sound effects
    • Fixed battery not updating effect when placing new batterys
    • Added new top effect, when looking at the battery if the battery % = more than half the top will glow green, if under half the top will glow red


    To place a solar panel type in chat /solar to place a battery type /battery

    the Solar panels and battery's are set to the same user grid, to add lights to the grid, you can turn on and off your current lights or place a new light


    The solar panels are effected by night and weather, so on a heavy snow day the panels will produce less power, on sunny days they produce more power.


    once all power in the batterys are used up all the lights will go out


       TODO

    • Add a way to remove the solar panels and battery's
    • Add a way to change the grid name, so players can have more than one power grid
    • Add a wireless power coil, this will be the way we transmit the power, coils will need to be placed near lights for them to work
    • Add more solar panel and battery types, bigger size's
    • Add a way to make users buy the panels and battery's or build them -- ive not made my mind up about this


    Credit sharkbitefischer ( for testing, for his idea's, and overall help ) he has spent many hours helping me, Thanks sharkbitefischer


    Note this is still in experimental stage, try at your own risk, all feedback welcome







    Files

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • Very nice yahgiggle


    Does the current time/weather effect the charge rate? That would be awesome 8)

    yes the weather and time effects the power the panels produce,


    if (Weather.name.equals("Default")){WeatherEffect = (float) 1.2;}

    if (Weather.name.equals("Clear")){WeatherEffect = (float) 0.8;}

    if (Weather.name.equals("Breeze")){WeatherEffect = (float) 1.2;}

    if (Weather.name.equals("Overcast")){WeatherEffect = (float) 2.0;}

    if (Weather.name.equals("Rain")){WeatherEffect = (float) 5.0;}

    if (Weather.name.equals("HeavyRain")){WeatherEffect = (float) 7.0;}

    if (Weather.name.equals("LightSnow")){WeatherEffect = (float) 9.0;}

    if (Weather.name.equals("Snow")){WeatherEffect = (float) 9.0;}

    if (Weather.name.equals("HeavySnow")){WeatherEffect = (float) 10.0;}

    if (Weather.name.equals("Storm")){WeatherEffect = (float) 10.0;}

    if (Weather.name.equals("Cold")){WeatherEffect = (float) 4.0;}

    if (Weather.name.equals("Fog")){WeatherEffect = (float) 12.0;}

    if (Weather.name.equals("DenseFog")){WeatherEffect = (float) 15.0;}



    if (Hour == 0){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 1){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 2){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 3){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 4){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 5){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 6){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 7){SolarGen = (float) 5.5 / WeatherEffect;}

    if (Hour == 8){SolarGen = (float) 10.0 / WeatherEffect;}

    if (Hour == 9){SolarGen = (float) 20.0 / WeatherEffect;}

    if (Hour == 10){SolarGen = (float) 40.0 / WeatherEffect;}

    if (Hour == 11){SolarGen = (float) 60.0 / WeatherEffect;}

    if (Hour == 12){SolarGen = (float) 80.0 / WeatherEffect;}

    if (Hour == 13){SolarGen = (float) 110.0 / WeatherEffect;}

    if (Hour == 14){SolarGen = (float) 80.0 / WeatherEffect;}

    if (Hour == 15){SolarGen = (float) 60.0 / WeatherEffect;}

    if (Hour == 16){SolarGen = (float) 40.0 / WeatherEffect;}

    if (Hour == 17){SolarGen = (float) 20.0 / WeatherEffect;}

    if (Hour == 18){SolarGen = (float) 10.0 / WeatherEffect;}

    if (Hour == 19){SolarGen = (float) 5.5 / WeatherEffect;}

    if (Hour == 20){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 21){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 22){SolarGen = (float) 0.0 / WeatherEffect;}

    if (Hour == 23){SolarGen = (float) 0.0 / WeatherEffect;}


    i think you will understand that ^^

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • Love it mate. That's really cool.

  • Table (part) "weather" from RisingWorld\_New Version\Data\StreamingAssets\definitions.db

    ... It's not all columns


    name fogattenuation rainintensity snowintensity sunvolumetrics clouddensity
    Default 2500 0.0 0.0 8 0.6
    Clear 7500 0.0 0.0 6 0.15
    Breeze 1000 0.0 0.0 4 0.6
    Overcast 1000 0.0 0.0 8 0.75
    Storm 500 0.0 0.0 2 0.6
    Fog 100 0.0 0.0 16 0.6
    DenseFog 20 0.0 0.0 16 0.6
    Rain 500 0.4 0.0 8 0.6
    HeavyRain 100 1.0 0.0 8 0.6
    Cold 1000 0.0 0.0 4 0.15
    LightSnow 1000 0.0 0.035 4 0.4
    Snow 100 0.0 0.35 4 0.5
    HeavySnow 20 0.0 1.0 4 1.0


    Maybe you can use that too

    Es wird alles gut :) früher oder später :D meistens später :nerd: ... ich wandle Kaffee in Quelltext um.

    Und besucht die Rising World Wiki

  • Table (part) "weather" from RisingWorld\_New Version\Data\StreamingAssets\definitions.db

    ... It's not all columns


    name fogattenuation rainintensity snowintensity sunvolumetrics clouddensity
    Default 2500 0.0 0.0 8 0.6
    Clear 7500 0.0 0.0 6 0.15
    Breeze 1000 0.0 0.0 4 0.6
    Overcast 1000 0.0 0.0 8 0.75
    Storm 500 0.0 0.0 2 0.6
    Fog 100 0.0 0.0 16 0.6
    DenseFog 20 0.0 0.0 16 0.6
    Rain 500 0.4 0.0 8 0.6
    HeavyRain 100 1.0 0.0 8 0.6
    Cold 1000 0.0 0.0 4 0.15
    LightSnow 1000 0.0 0.035 4 0.4
    Snow 100 0.0 0.35 4 0.5
    HeavySnow 20 0.0 1.0 4 1.0


    Maybe you can use that too

    Yes I knew about this but atm i wanted to keep it simple, I may include things like cloud density later on, but thanks for the help anyway 😁

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!