Jump to content

Change a mod's priority from modmain?


mouse

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

... 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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...