[clothing] Clothing Mod

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

Mods which use modpack structures can still be called [Mod].

For example, Mesecons.

The guideline is, if the mods are similar then it can be counted as a single mod.

If you do decide to include 3d armor, then [Modpack] would be best.

I don't recommend including it, unless you have changed the source code.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

If smth can be in some state it doesn't mean it's necessary for that thing to be in that particular state...
When released, this mod's thread definitely should be renamed.Bot as long as it's here, we're arguing about nothing. So I'm quitting before this would go any further.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

Merged pull request from rubenwardy.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
Inocudom
Member
Posts: 3096
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [clothing] Clothing Mod

by Inocudom » Post

This mod has so much potential. Too bad the community forgot about it. Is it even worked on anymore?

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Not really. I did some tweaking here and there, but I have some work to do to get it up to speed with the latest 3d_armor updates. Unless I corner stu for a chit-chat, I'll be teaching myself code and then attempt to recode using the latest 3d_armor api.

EDIT:
Stu left a sixth slot in his armor mod, which could be used by a Capes mod. I don't have any unique textures or code, so I probably won't make that happen.

User avatar
Inocudom
Member
Posts: 3096
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [clothing] Clothing Mod

by Inocudom » Post

tinoesroho wrote:Not really. I did some tweaking here and there, but I have some work to do to get it up to speed with the latest 3d_armor updates. Unless I corner stu for a chit-chat, I'll be teaching myself code and then attempt to recode using the latest 3d_armor api.

EDIT:
Stu left a sixth slot in his armor mod, which could be used by a Capes mod. I don't have any unique textures or code, so I probably won't make that happen.
If only Sokomine or VanessaE took an interest in this mod, for they have proven to be skilled at making good mods. For example, Sokomine made the spraybooth and markers mods, and VanessaE made the homedecor, plantlife, and moretrees mods.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Inocudom wrote:
tinoesroho wrote:Not really. I did some tweaking here and there, but I have some work to do to get it up to speed with the latest 3d_armor updates. Unless I corner stu for a chit-chat, I'll be teaching myself code and then attempt to recode using the latest 3d_armor api.

EDIT:
Stu left a sixth slot in his armor mod, which could be used by a Capes mod. I don't have any unique textures or code, so I probably won't make that happen.
If only Sokomine or VanessaE took an interest in this mod, for they have proven to be skilled at making good mods. For example, Sokomine made the spraybooth and markers mods, and VanessaE made the homedecor, plantlife, and moretrees mods.
Indeed. If server-runners took an interest in this, we could probably get a much better codebase than the hacky mess I have, plus we'd get much better textures.

The textures, at least, can be picked up and done by the community. Heck, one can even propose new clothing or new features - at this point, this is just a rough outline.

User avatar
JPRuehmann
Member
Posts: 334
Joined: Fri Mar 21, 2014 21:40
Location: Germany
Contact:

Re: [clothing] Clothing Mod

by JPRuehmann » Post

Hello
I can´t find a mod named unified_skins do you mean u_skins?
Is it compatible with 3D Armour, Unified_inventory, Wield 3D and U_Skins.
I think would be great if the developers of the above mods create an API for Player customization, That could be merged in the main API then.
Thanks,
JPR

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Unified_skins used to be a part of the 3d_armor mod - it's since been removed from that modpack (I think).

The mod's in a bit of an unworkable state right now. I can dig around and see if I can get it to run on 0.4.9, then update with a temporary modpack download.

My plan is to fork off of the latest 3d_armor revision, and then re-release this as a mod. The latest 3d_armor is looking pretty cool at the moment, and it would be nice to integrate into it.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote:Unified_skins used to be a part of the 3d_armor mod - it's since been removed from that modpack (I think).

The mod's in a bit of an unworkable state right now. I can dig around and see if I can get it to run on 0.4.9, then update with a temporary modpack download.

My plan is to fork off of the latest 3d_armor revision, and then re-release this as a mod. The latest 3d_armor is looking pretty cool at the moment, and it would be nice to integrate into it.
unified_skins was originally a common base mod that allowed wieldview and 3d_armor to be used independently of each other.

I removed it thinking that nobody really used wieldview on its own and there is the alternative wield3d.
I can see now that it would have also been good for mods like this as you would only need to depend on unified_skins.
I could put something like that back under a different name if it would be any help to you.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Between me and you, I haven't really looked at any code today. Got sucked into playing on minetestguild - and really admired the newest version of 3d_armor. It's gorgeous!

It's probably more trouble than it's worth for me to try to maintain a fork of the old code. I'll probably fork the newest 3d_armor - 6 slots should be more than enough. There's a lot of potential to 3d_armor - so many cosmetic possibilties. If server admins considered the idea, they could scrap individual skins to make a much more customizable experience for players.

User avatar
Inocudom
Member
Posts: 3096
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [clothing] Clothing Mod

by Inocudom » Post

tinoesroho wrote:Between me and you, I haven't really looked at any code today. Got sucked into playing on minetestguild - and really admired the newest version of 3d_armor. It's gorgeous!

It's probably more trouble than it's worth for me to try to maintain a fork of the old code. I'll probably fork the newest 3d_armor - 6 slots should be more than enough. There's a lot of potential to 3d_armor - so many cosmetic possibilties. If server admins considered the idea, they could scrap individual skins to make a much more customizable experience for players.
Do be aware that clothing should be thinner than armor is, so that armor can be put over it should the need rise.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote:Between me and you, I haven't really looked at any code today. Got sucked into playing on minetestguild - and really admired the newest version of 3d_armor. It's gorgeous!

It's probably more trouble than it's worth for me to try to maintain a fork of the old code. I'll probably fork the newest 3d_armor - 6 slots should be more than enough. There's a lot of potential to 3d_armor - so many cosmetic possibilties. If server admins considered the idea, they could scrap individual skins to make a much more customizable experience for players.
I am currently working on some changes that will hopefully make your task easier, if you can hold off coding 'til the weekend it might save you some problems. In the meantime you could start making / sourcing some nice clothing textures ;-)
Inocudom wrote: Do be aware that clothing should be thinner than armor is, so that armor can be put over it should the need rise.
I have just added a third layer to the armor player model, this also includes a moving cape (not available yet)
Unfortunately this does make the x model a fair bit bigger. It does not affect fps since in those terms these models are tiny, however, server bandwidth and mesh downloading times may suffer slightly.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Much thanks, stu. To the drawing boards I go!

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote:Much thanks, stu. To the drawing boards I go!
I have added back a common framework similar to the old unified skins, this time called multiskin. This handles the multi-layer player model texturing which now includes support for a 'clothing' layer.

You will need to checkout the multiskin branch of 3d_armor for now, however, once fully tested I will push these changes to a new version.

Making a clothing mod is just a matter of copying armor.lua, removing all unnecessary stuff and renaming all references to armor as clothing. Since I pretty much had to do this already to test the new model you can download a prototype version (no longer available). You can use this as a base/reference for your own clothing mod as I do not have the time or inclination to create all the textures and craft recipes needed to make such a mod worthwhile.

\o/ it's captain hindsight
Image

Edit: there was a mistake in the hindsight cape uv texture and a missed reference to Armor in the unified inventory menu. re-download clothing.zip for fixes.
Last edited by stu on Wed May 07, 2014 19:47, edited 1 time in total.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

I have uploaded multiskin as a (temporary) standalone mod for the non git savvy wanting to try this out.
You too can experience the benefit of 20/20 hindsight =D

Note: not compatible with the current 3d_armor modpack, this will eventually be included as part of that.

Sokomine
Member
Posts: 4167
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [clothing] Clothing Mod

by Sokomine » Post

Very nice to hear that there's progress on that front. We do have so much wool in the game which could be turned into clothing and perhaps be sold by mobs. Clothing might also be decorative for wardrobes. Furthermore, clothing allows to change the character without having to use a new skin all the time. Hope someone does nice textures.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

stu wrote:
tinoesroho wrote:Much thanks, stu. To the drawing boards I go!
I have added back a common framework similar to the old unified skins, this time called multiskin. This handles the multi-layer player model texturing which now includes support for a 'clothing' layer.

You will need to checkout the multiskin branch of 3d_armor for now, however, once fully tested I will push these changes to a new version.
Stu, you magnificent maestro! I'll confess I don't have that many textures, but I can tinker with it over lunch (woo!) and fork 3d_armor again. I'm not sure if it's possible to use higher res textures, looks like I'll be finding out!

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote: I'm not sure if it's possible to use higher res textures, looks like I'll be finding out!
You can use higher resolution than the player skin provided all clothing is kept the same resolution, that is you can't mix say 128x64 based pants with a 64x32 based shirt, so you really need to decide from the outset what resolution to use. Personally I would try to stick with 64x32 as if offers a lot more scope for plagiarism ;-) after all, it can always be improved later on by offering a higher resolution texture pack.

I would only concentrate on adding some base clothing and recipes to begin with, once this is on github others may offer assistance with textures, etc. The nice thing about how clothing items (and armor) are registered is that other mods can easily include their own clothing by simply adding clothing=1 to groups and an image named after the item.

eg: othermod:fur_coat => othermod_fur_coat.png (note the colon is replaced by an underscore)

PS. While you are more than welcome to fork the armor repo, if you want this mod to remain compatible then I suggest that you just upload the clothing prototype I posted as a standalone mod which depends on the new multiskin mod. It makes no sense both our mods supplying the same player model and I have no idea what happens if modpacks add mods with duplicate names.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Ohhhh, you. Updated git, update readme, added a HUGE THANK YOU to ya. Stu, you're the best. Lemme buy you a pint sometime!

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Code: Select all

minetest.register_tool("clothing:pants_"..k, {
description = k.." pants",
inventory_image = "clothing_inv_pants_"..k.."_overlay.png^clothing_pants_inv_white.png",
texture = "clothing_pants_"..k.."_overlay.png^clothing_inv_pants_white.png",
groups = {clothing=1, no_preview=1},
})
Seems to be broken, it's not loading the overlay. The idea is for these overlays to get slapped on top of the base, because I'm too lazy to make a bunch of files every update. I don't remember the real reason.
"Could not load: "clothing_inv_pants_white.png"

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote:Seems to be broken, it's not loading the overlay. The idea is for these overlays to get slapped on top of the base, because I'm too lazy to make a bunch of files every update. I don't remember the real reason.
"Could not load: "clothing_inv_pants_white.png"
I am sorry, I have no idea what you are trying to acheive with those overlays but I can tell you that is not gonna work as you expect. For one thing there is no 'texture' in minetest item definition so setting that does precisely nothing, image files are derived from the item name (as described in my last post). You could overlay inventory images but I see no sense in that either as you will only ever see the topmost image.

Code: Select all

minetest.register_craft_item("clothing:pants_"..k, {
	description = k:gsub("%a", string.upper, 1).." Pants",
	inventory_image = "clothing_inv_pants_"..k..".png",
	groups = {clothing=1, no_preview=1},
})
Some other minor points:

minetest.register_craft_item is probably more appropriate than .register_tool unless you want clothing to wear out in some way. If so then you will need to add code to make that happen, registering as a tool is not enough on its own. I guess you could make clothing items wear slightly every time you change them, not sure how folks would like that.

Registering items in a loop like that is clever and saves some typing but (imo) if you want to encourage others to contribute, you may be better off writing them out in full. (less confusing to non-coders that may otherwise be great at making textures)

I appreciate you probably need to use the example images as a reference, I would prefer you took them out of the repo since I cannot supply a valid license for them. They are mostly my own making but parts were taken from a variety of different sources.

On a side note, I think the reason for the error you are getting is because in your code you have "clothing_pants_inv_white.png" while the image file is called "clothing_inv_pants_white.png" see the difference ;-)

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Gah! I can't believe I screwed that up!

PNG transparency, I'm not sure how that works in the latest minetest. If I reduce the opacity of the color overlays to 50%, I can do "pink" with red-on-white, or double the overlay to get red.

In the end, I'll probably go with all-new textures. Maybe higher-res textures (Scaling 4x will give me a little more room for detail).

Thanks, stu.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [clothing] Clothing Mod

by stu » Post

tinoesroho wrote:Gah! I can't believe I screwed that up!

PNG transparency, I'm not sure how that works in the latest minetest. If I reduce the opacity of the color overlays to 50%, I can do "pink" with red-on-white, or double the overlay to get red.

In the end, I'll probably go with all-new textures. Maybe higher-res textures (Scaling 4x will give me a little more room for detail).

Thanks, stu.
Ok, I can see how that might be useful but afaik alpha channel is not fully supported yet or behaviour may not be consistent with all clients? I will look into this more.

And you are welcome, a mod like this has real potential now that we have third person view (in-dev at least)

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [clothing] Clothing Mod

by tinoesroho » Post

Looks like Alpha channel doesn't work. PNG alpha transparency needs to be enabled, or so sayeth the logs. *grumble*

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 4 guests