Author Topic: Make Gamemode_ making not a pain in the ass  (Read 1590 times)

I'm tired of rebooting my server a zillion times because there's an add-on which uses ForceRequiredAddon.
What I'm asking is, before stopping the server, make a list of add-ons that use ForceRequiredAddon and which add-on they're forcing. This will reduce the amount of times I need to reboot the server because of a missing addon and the amount of times I need to reboot Blockland because of a typo I made when updating the gamemode.txt

Also, if possible, have the ForceRequiredAddon not actually require the add-on to load the server because mods like Brick_PoleAdapters use this function to make sure that an add-on (Brick_Pole) ISN'T enabled.

Also, if possible, have the ForceRequiredAddon not actually require the add-on to load the server because mods like Brick_PoleAdapters use this function to make sure that an add-on (Brick_Pole) ISN'T enabled.

That's just plain stupid of the author. Since 90% of all addons use ForceRequiredAddon for its intended purpose, I suggest you manually edit the line out instead.

Also, the 90% of addons that use ForceRequiredAddon properly probably do require the addon that is forced as a required addon. In fact, it would make your life harder not knowing what addons are necessary for that pack of events that won't load because of an unknown addon not loaded.

didn't zeblote or someone make a gamemode creator application

That's just plain stupid of the author. Since 90% of all addons use ForceRequiredAddon for its intended purpose, I suggest you manually edit the line out instead.

Also, the 90% of addons that use ForceRequiredAddon properly probably do require the addon that is forced as a required addon. In fact, it would make your life harder not knowing what addons are necessary for that pack of events that won't load because of an unknown addon not loaded.
That's the whole point. Load the gamemode anyways and make a text file stating which addons force-require what addons so you can add them to gamemode.txt or, in the case of Brick_PoleAdapters, ignore it.

That's the whole point. Load the gamemode anyways and make a text file stating which addons force-require what addons so you can add them to gamemode.txt or, in the case of Brick_PoleAdapters, ignore it.

While gamemode loading doesn't state all the addons required, I still think this shouldn't be made just because of the silly decision of someone. If someone wants to use hacky methods they should first make sure it's practical.

While gamemode loading doesn't state all the addons required, I still think this shouldn't be made just because of the silly decision of someone. If someone wants to use hacky methods they should first make sure it's practical.
You're missing the point.

You're making a new gamemode and enable 20 add-ons.

13 of those 20 add-ons use ForceRequireAdd-on.

Are you patient enough to reboot the gamemode 13 times until the gamemode stops interrupting the load?

What if add-on 4 uses the silly method I mentioned previously? Are you patient enough to check every loving addon you enabled until you find what the problem is?

My suggestion is, instead of interrupting the load on the first missing add-on, save in a text file the add-ons required by which add-on. Say, Weapon_Guns_Akimbo require Weapon_Gun. Have the load output to a text file
Code: [Select]
Weapon_Gun required by Weapon_Guns_Akimboand continue loading until the last add-on selected is loaded and THEN interrupt the load.

My suggestion is, instead of interrupting the load on the first missing add-on, save in a text file the add-ons required by which add-on. Say, Weapon_Guns_Akimbo require Weapon_Gun. Have the load output to a text file
Code: [Select]
Weapon_Gun required by Weapon_Guns_Akimboand continue loading until the last add-on selected is loaded and THEN interrupt the load.

This is precisely what I was looking for. Though you did say "load the gamemode anyway" earlier...

you can't package forceRequiredAddon so i'm not sure how viable this would be.

How about packaging when the gamemode interrupts the load?

How about packaging when the gamemode interrupts the load?
Not really. LoadRequiredAddOn contains all the detection, so if it spits out an error it seems to force disconnect you. It's pretty stupid to do this but new modders have to adapt to this method I guess. To get around this, the modder has to write a method by checking if the gamemode is custom. If it's not custom then don't attempt to require the add-on, and if the mod really needs the add-on then it can return the code entirely. It's really simple but this method is pretty stupid, especially for people who can't really open a text file and know how the gamemode system works.
« Last Edit: February 22, 2017, 12:37:02 AM by Kyuande »