Robotic Parts

Robotic Parts

1M Downloads

Increasing Max Essence does not work.

Xydryhn opened this issue ยท 4 comments

commented

Any attempts at increasing max essence have not been working for me. While the game is running, the text saying what the default in the config file is vanishes and is changed to whatever I set the Max essence to when the game is closed.

commented

Is there a way to fix it on a preexisting world? I have quite a bit of time invested in my current world.

commented

Alright I did some poking around.

This does happen but only when the character existed before the config was changed. If you make a new world you'll notice the total tolerance has increased, I believe this is because of how tolerance is assigned at creation.

@SubscribeEvent
public void onEntityConstructed(EntityEvent.EntityConstructing event)
{
if (event.getEntity() instanceof EntityLivingBase)
{
EntityLivingBase living = (EntityLivingBase) event.getEntity();
living.getAttributeMap().registerAttribute(CyberwareAPI.TOLERANCE_ATTR);
}
}

Once it's set, it's never changed.

commented

Having made a new world, it does indeed change properly on a new world. I know back in the 1.10 version it could be changed mid game however.

commented

So as it turns out, increasing the max essence does in fact work.

The problem is that it gets overwritten by the stored value from when the entity was saved to disc as nbt data. It should be fixable if we can just set the value later. It'd be pretty simple to verify the total tolerance when activating the robosurgeon.