Subfolders for mod media

User avatar
Kenney
Member
 
Posts: 131
Joined: Fri Jan 02, 2015 12:12
In-game: Kenney

Subfolders for mod media

by Kenney » Fri Jan 16, 2015 10:18

For big mods it would be wise to allow subfolders for mod media, so that all textures/sounds don't have to be added to the /textures and /sounds folder but rather have a possible structure like 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
/textures/doors/
/textures/foliage/
/textures/ores/


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
/sounds/wood/
/sounds/metal/
/sounds/foley/


Usage sample:

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.register_node("default:grass", {
   description = "Grass",
   tiles = {"foliage/grass.png"}
})
Games:
Voxus | UFO Race
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Subfolders for mod media

by rubenwardy » Fri Jan 16, 2015 10:25

+1

Not sure about foliage/ though, what about texture packs? I guess they should use folders to, if this is the case.
I'd suggest just grass.png when refering to textures/foilage/..., in order to make it simpler for texture packs and other mods.

Some users use subfolders for alternative media, though.
Maybe Minetest should ignore directories which start with _ or .

Order of checking should be this:

  • Texture packs
  • textures/
  • textures/subfolders in alphabetical order.
 

User avatar
Kenney
Member
 
Posts: 131
Joined: Fri Jan 02, 2015 12:12
In-game: Kenney

Re: Subfolders for mod media

by Kenney » Fri Jan 16, 2015 11:27

Agreed!
Games:
Voxus | UFO Race
 

User avatar
TG-MyinaWD
Member
 
Posts: 355
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: Subfolders for mod media

by TG-MyinaWD » Sat Jan 17, 2015 03:53

Yeah and maybe a subfolder, for the models? But would the lua run an "/" and I think maybe possible we can have, the thing to check for ! since seems they don't work well. Also check the folder has "()" Unless already does. I know description doesn't since people do like "(Something)". But now I wonder is how many mods can Minetest load at any given time? Since I heard was limited.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

TriBlade9
Member
 
Posts: 89
Joined: Fri Sep 05, 2014 09:35

Re: Subfolders for mod media

by TriBlade9 » Sat Jan 17, 2015 04:33

I greatly like this idea. Perhaps if all media loading could be done somewhat recursively, that would be great.
Additionally, texture packs could have subfolders which could be organized per-mod or per-type, but with no real restriction on it.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: Subfolders for mod media

by Calinou » Sat Jan 17, 2015 08:40

If we had subfolders, we should probably settle on a standard to make it consistent. The subfolders could be per-mod, which is an objective criteria.
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: Subfolders for mod media

by Casimir » Sat Jan 17, 2015 10:01

Calinou wrote:The subfolders could be per-mod, which is an objective criteria.

I love standards! For texturepacks that is what should be done.

When you need subfolders for your mod, then maybe the mod is just to big. A better solution would be to split it up. That the minetest_game default mod contains so much stuff it a historic thing. In my subgame I don't add things to it any more. Everything has it's own small mod, when there are to many mods I'll organize them in modpacks.
With sub folders inside a mod you end up having the contents of foo distributed in foo.lua texures/foo/ sounds/foo/ and so on. Instead of having everything foo in one mod.
 

User avatar
afflatus
Member
 
Posts: 302
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

Re: Subfolders for mod media

by afflatus » Sat Jan 17, 2015 13:36

Casimir wrote:I love standards! For texturepacks that is what should be done.

When you need subfolders for your mod, then maybe the mod is just to big. A better solution would be to split it up. That the minetest_game default mod contains so much stuff it a historic thing. In my subgame I don't add things to it any more. Everything has it's own small mod, when there are to many mods I'll organize them in modpacks.
With sub folders inside a mod you end up having the contents of foo distributed in foo.lua texures/foo/ sounds/foo/ and so on. Instead of having everything foo in one mod.


+ 1 on Standards.
You shouldn't have to split up a mod in order to organise its contents more efficiently.
Grailtest is sleeping ...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 11 guests

cron