Jump to content

[QUESTION] Was any modder able to gain access on the Energy Systems on Entities?


Laserzwei

Recommended Posts

The title says it.

 

Has anyone been able to read:

-the current energy Production

-the current energy consumption

-Energy consumption by components

 

or change:

-the current energy consumption

-energy consumption by components

of an Entity?

 

I was able to change the current energy production via "addMultiplyableBias(int type, float value)".

And most Entities seem to have a component called "EnergySystem".

But that is the furthest I have come.

 

I am talking about these Values:

FwMYARL.png

 

Link to comment
Share on other sites

I found this in one of the module mods, that seems to apply to energy consumption.

function getEnergy(seed, rarity)

    local num = getMechanics(seed, rarity) + getEngineers(seed, rarity)
    return num * 150 * 1000 * 1000 / 2 * (1.1 ^ rarity.value)
end

Link to comment
Share on other sites

Actually it's pretty simple. Let's look at an example:

 

function getEnergy(seed, rarity)
    if rarity == Rarity(RarityType.Legendary) then
        return 1
    else
        return 0
    end
end

 

In this example getEnergy will force the system module to require 1 W of energy if legendary, 0 if anything else. So you can see that return--> (your variable) will be the required energy consumption.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...