Page 1 of 1

dependency request

Posted: Sun Dec 15, 2013 9:42 am
by Dysoch
is there anyway to loop dependencies?

i am in the process of splitting DyTech in 2 parts, 1 for Graphics and 1 for the Codes.

the only problem is that by adding this to both info.json:

DyTech's info.json:

Code: Select all

{
	"name":"DyTech",
	"author":"Dysoch",
	"version":"1.1.0",
	"title":"DyTech",
	"homepage":"https://forums.factorio.com/forum/viewtopic.php?f=14&t=1563",
	"description":"A mod that extends the game with more machine tiers, technology and new items!",
	"dependencies": ["base >= 0.8.0", "DyTech-Graphics >= 1.0.0"]
}
DyTech Graphics info.json:

Code: Select all

{
	"name":"DyTech-Graphics",
	"author":"Dysoch",
	"version":"1.0.0",
	"title":"DyTech-Graphics",
	"homepage":"https://forums.factorio.com/forum/viewtopic.php?f=14&t=1563",
	"description":"This is the DyTech Mod that adds all graphics for DyTech",
	"dependencies": ["base >= 0.8.0", "DyTech >= 1.1.0"]
}
it gives this:
Image

i want to have dependencies to both, so they disable at start when installed or updated incorrectly :P

Re: dependency request

Posted: Sun Dec 15, 2013 4:18 pm
by ficolas
Well ypu can remove the dependency on dytech graphics, because if it is only graphics, it can work on its own not doing anything.
The problem is that dependencies also specify the load order.

Why do you want to split dytech? Texturepacks??

Re: dependency request

Posted: Sun Dec 15, 2013 4:24 pm
by Dysoch
ficolas wrote:Well ypu can remove the dependency on dytech graphics, because if it is only graphics, it can work on its own not doing anything.
The problem is that dependencies also specify the load order.

Why do you want to split dytech? Texturepacks??
no, you have to download the same 140mb every time. and most of time when i update, i dont change my graphics. (i normally do that every few updates)

but its easier if i have dependencies on both, that way you wont forgot 1 (as the other then wont load)

Re: dependency request

Posted: Sun Dec 15, 2013 11:54 pm
by n9103
Drop the dependency from the graphics pack.
Using the graphics on their own won't break anything, while it *might* be useful with something other than your code pack (a branch from your mod for instance.)
But if someone tried to use your code without the graphics, it would crash.
No need for two-way dependency.

Re: dependency request

Posted: Mon Dec 16, 2013 7:07 am
by drs9999
I agree with the other comments, apart from that you can also add an interface to the "code-part" of your mod. You also have to add few lines of code to your graphics-pack which checks if the interface is available. If yes => everything is fine; if not then print a msg that the mod won't work because of the missing code-pack.