Jump to content

Eye of Terror health code


Serpens
  • Fixed

Hello,

I'm the author of "Automatic Health Adjust" mod: https://steamcommunity.com/sharedfiles/filedetails/?id=764204839
This mod automatically adjusts the health (TUNING and current/max health component) based on the current player number.

Unfortunately your new eyeofterror.lua script uses alot of local variables that are filled directly at gamestart (EYE_DATA, TWIN1_DATA,TWIN2_DATA) which can not be altered at runtime. This makes my mod unable to change the health of Eye of Terror / the twins based on current player number (without heavy "hacking"/overwriting big parts of the script), since changes to eg. "TUNING.EYEOFTERROR_HEALTH" at runtime, do not affect EYE_DATA and other local variables.

Of course you can design your code as you want, but it would be much more modding friendly to use another design without local variables, so mods work better.
Giving the twins a health value independent of EYEOFTERROR_HEALTH would also be better, but is a minor detail.

Serp


Steps to Reproduce

Change TUNING.EYEOFTERROR_HEALTH at runtime and see that it won't affect Eye of Terror, even if a new entity of it is spawned.

  • Like 2



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
On 11/24/2021 at 8:20 PM, ScottHansen said:

Changed Status to Fixed

thank you very much, looks much better now :)

But I'm not sure if it is intended to keep the following local variable outside of functions:

local HEALTH_PER_DAY = TUNING.EYEOFTERROR_HEALTHPCT_PERDAY*TUNING.EYEOFTERROR_HEALTH

1) The problem with mods remain for this local variable (same for local MAX_GAIN_DAYS)
2) This HEALTH_PER_DAY seems to be also used for the twins, while it based on the health of eyeofterror -> not sure if this is wanted, but I doubt?!

Will open a new bugreport in few days if I receive no response here, to make sure it is seen.

Share this comment


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...