Jump to content

Recommended Posts

Is it possible to change a mod's priority in modmain? If so, how does one go about it?

 

According to a mod I checked("Always On Status" by kiopho), you just need to add this in the same area where "dont_starve_compatible = true" and the like are present  in modinfo.lua like so:

 

priority = X.X

I don't exactly know how the priority number works, but I presume since Always On Status had a value of 2.5, the closer to 1 "X" reaches, the higher its priority.

 

 

EDIT:fixed an error

Edited by goldfish911

im assuming the priority controls the load order of a mod so that for mods with conflicting assets the higher priority one has its file loaded instead of the lower priority one.

 

IN OTHER WORDS

 

By the time modmain is loading its too late. Priorities have already been checked and determined. At this point you're only changing the value of a variable that isnt gonna be used any more.

im assuming the priority controls the load order of a mod so that for mods with conflicting assets the higher priority one has its file loaded instead of the lower priority one.

 

IN OTHER WORDS

 

By the time modmain is loading its too late. Priorities have already been checked and determined. At this point you're only changing the value of a variable that isnt gonna be used any more.

 

But doesn't modmain load the prefabs and assets for the mod?

 

Also, I made an error, earlier, I meant MODINFO, NOT modmain

Thank you everyone for your replies.

I already know about the priority value in modinfo.lua. What I'm talking about is creating special priority cases within modmain.lua.

For example:

if <condition or modinfo config option> then

<whatever>.priority=-1

else

<whatever>.priority=99999999

end

Or alternatively, could I make the priority change occur within modinfo.lua based on a configuration option?

... is creating special priority cases within modmain.lua....

Or alternatively, could I make the priority change occur within modinfo.lua based on a configuration option?

If you're in modmain the mod is already loading and its too late.

 

I've seen other mods put executable code in their modinfo.lua files to do dynamic naming on the mod loading screen. So its possible but i dont recall what was required. 

If you're in modmain the mod is already loading and its too late.

 

I've seen other mods put executable code in their modinfo.lua files to do dynamic naming on the mod loading screen. So its possible but i dont recall what was required.

Yeah I was afraid it might be too late to set the priority but I was mostly checking to see if anyone had found a way to change a mod's priority based on a config option yet. Or in some other fashion that's easily accessible to the masses.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...