• Welcome to AtomicTorch Studio Forums.
 

Is there ass IMCache.GretValue and IMCache.SetValue?

Started by ninekorn, February 03, 2018, 06:13:03 AM

ninekorn

discontinued 2023 july 29th . by ninekorn

Lurler

Just to make sure - did you add all required dependencies for all of those functions/classes?

ninekorn

#2
discontinued 2023 july 29th . by ninekorn

ai_enabled

IMCache is done on purpose in such way to build the "ship stats cache".

The cache re-calculation is expensive should not happen too often (ideally it should happen only once for every NPC ship - on spawn or savegame reload).

Basically, it's the "stats" parameters of the ship which are populated with by the scripts (with AddValue and MulValue methods) and then combined with other caches (such as weapons/equipment cache) and finalized. You should never use it in any other cases. I'm not even sure if you can override/extend it and use in other scripts (I mean it could break the code from CalculateShip.js).

Alas, VE was made in a big rush years ago (with 99% of these scripts written by a member of the team who left even before the release) and now it's all legacy code and incomplete documentation...