Jump to content
outlawled

Moduload — Save-Game Mod Initializer

Recommended Posts

Update - 16 February 2014 - Version 0.5.2 Released

Hey, guys. This is a small mod that adds a button to the bottom right of the Escape Menu which, when pressed, runs the initialization code for any addon that uses CBA's Extended Pre/Post-Init EventHandlers for its initialization, allowing players to reinitialize their mods after loading a save-game.

Notes:

- The button is only enabled when CBA-dependent mods are in need of initialization.

- While the mod is not CBA-dependent itself, it is intended to be used with mods that are CBA-dependent.

- In order for Moduload to work on a particular mission, it must be installed before starting that mission.

- Currently, the mod runs the init code for all mods that use CBA's Pre/Post-Init EHs. This can be a problem for mods that have their own system for initializing after loading a save-game as their mod will likely be initialized twice (once by their own system and once by Moduload). For now, addon makers may add "disableModuload = true;" to their mod's Pre/Post-Init EH config to exempt their mod from being initialized by Moduload. For example:

class Extended_PreInit_EventHandlers
{
class outlw_magRepack
{
	clientInit = "outlw_magRepack_Var = [] execVM 'outlw_magRepack\MagRepack_init.sqf'";
	disableModuload = true;
};
};

Depending on feedback from the community and other addon-makers, I may make it so that each mod has to explicitly allow Moduload rather than explicitly disallow it.

Changelog:

- 0.5.2
- Fixed: The reinitialization button did not appear when playing multiplayer.

- 0.5.1	
- Fixed: The reinitialization button did not appear in the correct position on screens with certain resolutions.

- 0.5
- Initial release.

Download:

- Version 0.5.2 - 16/02/14

- Version 0.5.1 - 11/02/14

- Version 0.5 - 08/02/14

Pictures:

cfE3LIbs.jpguwXt0Qxs.jpgFn7fJGCs.jpg

Video:

Coming soon. Probably.

Edited by Outlawled
Updated to v0.5.2
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Interesting, I can imagine double initialization to be a problem but would it cause something like 2 instances of a mod or simply overwrite the first initialization? Just don't know what the after affects could be...

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

You're a gentleman and a scholar! I'll give this one a try on the spot!

#edit: Tried it, works like a charme, loved it. I think this has to be the best mod of all. ;) If it would make any sense I would play without any mods but this. :D

Edited by Pergor

Share this post


Link to post
Share on other sites

Thank you VERY much OP.

This mod will save LOADS of people from LOADS of problems!

Share this post


Link to post
Share on other sites
Interesting, I can imagine double initialization to be a problem but would it cause something like 2 instances of a mod or simply overwrite the first initialization? Just don't know what the after affects could be...

It depends on the mod.

Initializing a mod twice just means that every line of code that would have been run once will now be run twice.

So if there's a line of code that tells the game to post a message in side chat, two messages will be posted in side chat.

If there's a line of code that starts a loop that runs until the player dies, there will now be two loops running until the player dies.

Global variables will be defined twice, so the second definition will overwrite the first (not a problem because they'll both be setting the variable to the same value), but any changes made to a global variable will happen twice...

So if you have "variableA = 2;" that will be run twice and the result will be that variableA = 2. But if you have a line later in your code that says "variableA = variableA + 5;" that will be run twice as well, so variableA will now equal 12 when it's supposed to equal 7.

So...I dunno. Some mods won't have any noticeable effects, some will.

But most mods don't have any reinitialization code, and those that do will hopefully hear about this mod and contact me so that we can work something out (whether that means they remove they're reinitialization code, add the config entry that makes my mod ignore theirs, or if they and the rest of the community come to a consensus that my mod should only affect mods that have explicitly allowed it to, then I can change my code to do just that).

You're a gentleman and a scholar! I'll give this one a try on the spot!

#edit: Tried it, works like a charme, loved it. I think this has to be the best mod of all. ;) If it would make any sense I would play without any mods but this. :D

Very useful mate. Thankyou!
Thank you VERY much OP.

This mod will save LOADS of people from LOADS of problems!

You are very welcome, sirs. Thank YOU for the kind words and such.

Share this post


Link to post
Share on other sites

I wonder: Would this work for Arma 2 as well?

Share this post


Link to post
Share on other sites

Some of the code would probably need to be edited, but it could definitely be made to work. Unfortunately, I don't have ArmA 2 installed anymore, so I can't test it.

Share this post


Link to post
Share on other sites

Hey Outlawled, loved your mod, but sometimes I can´t re-initialize the mods cus your reinitialize button is under the info stripe (or whatever is the name of that stripe whicht keeps toggling and informing all available addons =P) as you can see in this screenshot... -> http://forums.bistudio.com/showthread.php?170181-EricJ-Release-thread&p=2591478&viewfull=1#post2591478

Could you config it some pixels up, so we can press it (sometimes it works, but most of the time it gets under the stripe =/

cheers!

Share this post


Link to post
Share on other sites

Version 0.5.1 Released

Changelog:

- 0.5.1	
- Fixed: The reinitialization button did not appear in the correct position on screens with certain resolutions.[/spoiler]

Share this post


Link to post
Share on other sites
Guest

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hey Outlawled, the Moduload doesn´t work with MP? I play some SP mission in MP (LAN game, cus it is easier to find the missions, SP mode doesn´t have filters per island) and just figured out you addon isn´t available in MP missions... Is it possible to add this functionality or MP eventhandlers are incompactible with the functions you use to reinitialize the addons?

cheers!

Share this post


Link to post
Share on other sites

Hm. I'm not sure why it wouldn't work in multiplayer. I'll have a look-see when I get home sometime this weekend.

Share this post


Link to post
Share on other sites

Im using it while playing the campaign and after getting killed i try to use the button but by the time my mouse gets to it its greyed out. Quitting to the game menu and loading the same autosave allows u to click ur mods button.

Awesome work! You have made other peoples mods (ST_hud and hmm_Stance indicator to name a few) more useful they owe u a thanks.

Share this post


Link to post
Share on other sites

Version 0.5.2 Released

Changelog:

- 0.5.2
- Fixed: The reinitialization button did not appear when playing multiplayer.[/spoiler]

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

New mod or update v0.5.2 available at withSIX. Download now by clicking:

@outlw_moduload.png

@ Outlawled;

Soon you will be able to manage the promo pages of your content on our web platform and publish new content yourself.

To do so, please hit 'this is me' button on the page while logged in and you will get connected to your work.

For now you can send new content or releases our way through withsix.wetransfer.com or add your notification at getsatisfaction.withsix.com.

Share this post


Link to post
Share on other sites

Thanks, Foxhound and Sonsalt6!

Dose it work in Dedicated server?

I haven't tested it on a dedicated server, but it should work.

Share this post


Link to post
Share on other sites

After the last update this mod is not working for me as it did.

I was able to load up the addons and there for get TMR with the scope module to work after loading a save but now i can't.

Share this post


Link to post
Share on other sites

What exactly is the problem? Is the button not appearing or is just nothing happening when you press it? Or is it running (i.e. after pressing the button, the "Moduload Initializations" hint appears) but TMR doesn't work?

Are you using any other mods? If so, are they also not working?

Are you playing singleplayer or multiplayer?

Is Moduload the only mod that you've updated recently?

Are you on ArmA 3 Stable or Dev Branch?

Share this post


Link to post
Share on other sites

Sorry for the low details,

yeah the button is not showing up. Im using other addons ofc, and as far as i know they are working :

@bCombat, @blood_mist, @Jump, @outlw_magrepack, @TMR_alt, @TPW_MODS, @U100, @USMC_A3, @VTS_DuckHunt, @VTS_WeaponResting, @WW_AIMenu, @Sakumods and @SWWM

Im playing Singleplayer - I got your newest version installed 0.5.2 and the Arma is Stable ( everything fully updated )

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×