LISTINGS09 / ZEI

Zeus/Eden Interiors
8 stars 8 forks source link

fn_init.sqf breaks custom zeus scripts #11

Closed assaultboy closed 3 years ago

assaultboy commented 4 years ago

Due to fn_init and fn_zeus_addModules not handling the return of CuratorObjectRegistered event handler any subsequent attempts to script custom Zeus functionality is unreliable. This implementation seems to be due to the incorrect definition of the modules in cfgPatches as indicated by the comment in fn_init

In cfgPatches, the units[] definitions need to be in quotes

units[] = {
    "ZEI_ListBuildings",
    "ZEI_GarrisonBuilding",
    "ZEI_InteriorFill",
    "ZEI_ObjectSwitch",
    "ZEI_ObjectFill",
    "ZEI_FindBPos",
    "ZEI_GetBuildingScheme"
};

As opposed to the current definitions:

units[] = {
    ZEI_ListBuildings,
    ZEI_GarrisonBuilding,
    ZEI_InteriorFill,
    ZEI_ObjectSwitch,
    ZEI_ObjectFill,
    ZEI_FindBPos,
    ZEI_GetBuildingScheme
};

Fixing this would mean both fn_init and fn_zeus_addModules are not needed and can be removed completely.

Bluscream commented 4 years ago

Can you make a patch for that, please?

Also @shukari could maybe make it aswell?

shukari commented 4 years ago

Look while in game at the units definition... They should be strings... Arma make them... But you are right it's not the perfect way.

Edit: I will fix it when I find time this we

Bluscream commented 4 years ago

@shukari the problem that i have is ZEI disappearing every time after first time i open zeus. So:

1st time opening zeus (ZEI is there and i can fill buildings) closed zeus and reopened (ZEI is missing from Modules) all times after that (ZEI missing)

i have to restart the mission to get ZEI back

Maybe it's not related to the problem above? But i hoped so

shukari commented 4 years ago

My community uses https://github.com/ArmaAchilles/Achilles for better Zeus handling and we have no problems. What for mods du you use... Can you send your rpt log?

Bluscream commented 4 years ago

I tried all the different things:

But currently i am using achilles + enhanced zeus

Which one do you want? image

shukari commented 4 years ago

The last or all in a zip ^^

shukari commented 4 years ago

I'm currently only on my mobile... Can you try only Arma3 Vanilla + Achilles + ZEI BTW Ares is untouched for 4 years, don't try it ^^

Bluscream commented 4 years ago

Arma 3.zip

image

BTW Ares is untouched for 4 years, don't try it ^^

i tried it anyway, cause why not :woman_shrugging: :3

BTW: this gave me a idea for a sharex feature request :D

LISTINGS09 commented 4 years ago

v1.11 tries this suggested method and it didn't seem to be working for me in Zeus - The modules still don't load. I'll probably revert it back if I don't make progress.