Page 1 of 1

Soft Depend

PostPosted: Thu Aug 30, 2012 17:06
by rubenwardy
A kind of depend, that if the mod that is depended is not found, then the mod load is still done.

If the mod is found, then it loads it first

Maybe in a preload.txt file

PostPosted: Fri Aug 31, 2012 10:08
by wokste
I think it could better be in depends.txt. Maybe:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
default
moreores optional

PostPosted: Fri Aug 31, 2012 11:15
by RabbiBob
Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?

PostPosted: Fri Aug 31, 2012 11:38
by cornernote
You can do this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.after(0, function()
    .. your code here will be run after the game starts ..
end)

PostPosted: Fri Aug 31, 2012 12:05
by rubenwardy
RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?


I want to load a mod before my mod, but not depend on it

cornernote wrote:You can do this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.after(0, function()
    .. your code here will be run after the game starts ..
end)


Thank you cornernote

PostPosted: Sat Sep 08, 2012 17:22
by ArchZombie
RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?

Sometimes if e.g., another mod has useful functionality that can be integrated with this mod, then you can load it first. But it may not be necessary for the mod to function.

PostPosted: Sun Sep 16, 2012 13:39
by rubenwardy
ArchZombie wrote:
RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?

Sometimes if e.g., another mod has useful functionality that can be integrated with this mod, then you can load it first. But it may not be necessary for the mod to function.


Like mesecons in the carts mod.