[clothing] Clothing Mod

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

Re: [clothing] Clothing Mod

by Inocudom » Mon Apr 28, 2014 21:09

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Mon Apr 28, 2014 21:17

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

Re: [clothing] Clothing Mod

by JPRuehmann » Tue Apr 29, 2014 08:02

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
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Tue Apr 29, 2014 15:31

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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Tue Apr 29, 2014 21:57

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Wed Apr 30, 2014 05:07

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: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [clothing] Clothing Mod

by Inocudom » Wed Apr 30, 2014 16:49

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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Wed Apr 30, 2014 21:43

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Wed Apr 30, 2014 22:57

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

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Sun May 04, 2014 15:26

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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Sun May 04, 2014 20:35

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: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [clothing] Clothing Mod

by Sokomine » Mon May 05, 2014 02:01

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Tue May 06, 2014 04:44

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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Tue May 06, 2014 17:50

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Wed May 07, 2014 02:07

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

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Wed May 07, 2014 02:49

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_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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Wed May 07, 2014 19:39

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.
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_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 ;-)
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Wed May 07, 2014 21:38

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: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: [clothing] Clothing Mod

by stu » Wed May 07, 2014 21:48

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)
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Sat May 17, 2014 03:00

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

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Sat Jun 07, 2014 03:31

Pushed an updatewith the changes. This build should work, but the transparency is broken.
 

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: [clothing] Clothing Mod

by Esteban » Sun Oct 26, 2014 19:15

.
Last edited by Esteban on Sat Mar 19, 2016 12:28, edited 1 time in total.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

Re: [clothing] Clothing Mod

by tinoesroho » Mon Oct 27, 2014 17:29

I advise you to fork it. I no longer have consistent internet access, so I'm not fit to maintain the project any longer.

If you do upload images, I can do merge requests. Github for Windows has come a long way and is now my preferred client. Give it a shot!

Thanks,
Austin "tinoesroho"
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron