Modules

Freeform discussion about anything related to modding Transcendence.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

I like the idea, but I have to disagree with this:
digdug wrote:This would also resolve the necessity of modules.
Having modules would still serve the purpose of controlling load order in a sane way. For example, I remember when you were doing WE2, and looking for a way to allow other mods to hook into the ai-ship modification code. The problem was that you coulld not write a function and expect other mods to be able to use that function, so some hacks had to be used.

All of that would be solved if a mod could simply put

Code: Select all

<Module filename="WE2SharedFunctions.xml" />
at the top of a mod that wanted to use this function.

Perhaps I am trying to hard to think of modules as being able to handle this. Any other contruct that would let us determine load order would be fine.

.]
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

The problem was that you coulld not write a function and expect other mods to be able to use that function, so some hacks had to be used.
yeah, in that case, a order in which the XMLs are loaded would be useful. :)

BTW, I have a working hook with WE2, but I don't know how early I can call it without crashing :P
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

digdug wrote:BTW, I have a working hook with WE2, but I don't know how early I can call it without crashing :P
Are you referring to the one where you iterate over a series of functions appending an integer to their name? If so, you cannot call it and expect to catch all extensions using that hook until all extensions have been loaded. That means it cannot be called directly inside the <Globals> scope, but must be triggered in some event.

.]
Post Reply