We have created a few instances where we use Objects in System.ocg which is bad for people wanting to create their own Object packs without using our objects. Examples:
We can solve the first error by either checking if CreateLight is available by checking for C4Id("Fx_Light")(C4Id is gone, but an alternative like Global.Fx_Light is imaginable) or by overloading the ExplosionEffect function in the Fx_Light object. I prefer the first one, any opinions alternatives?
Any preferred solutions for the second one?
Also we have a lot of libraries depending on even more objects, I can see a lot of pack using our libraries, so there we should try to be more precise by telling at the start of a library which other objects are needed for it to function.
ERROR: unknown identifier: CreateLight (in ExplosionEffect, planet\System.ocg\Explode.c:250:22)
ERROR: unknown identifier: GUI_MenuDeco (in MessageWindow, planet\System.ocg\Player.c:106:95)
We can solve the first error by either checking if CreateLight is available by checking for C4Id("Fx_Light")(C4Id is gone, but an alternative like Global.Fx_Light is imaginable) or by overloading the ExplosionEffect function in the Fx_Light object. I prefer the first one, any opinions alternatives?
Any preferred solutions for the second one?
Also we have a lot of libraries depending on even more objects, I can see a lot of pack using our libraries, so there we should try to be more precise by telling at the start of a library which other objects are needed for it to function.

global func CreateLight(...) {}
static GUI_MenuDeco;
CreateLight should be pretty save. I'm not sure if static GUI_MenuDeco causes any issues compiling or in savegames.
Another option for menu deco is that usage could be outsourced into a global function that is overloaded. In fact, having global func GetMenuDeco() which is overloaded in the GUI_MenuDeco definition might be nice because it would allow scenario designers to overload it to introduce their own deco.

Objects.ocd/Effects.ocd/System.ocg
, for example. Then it would only be loaded if Objects.ocd is loaded. We could also create an Objects.ocd/System.ocg
folder for that reason
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill