Page 1 of 2

[Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Jul 23, 2014 12:17
by Krock
Unified Skins
This is an updated fork of dmonty's u_skins mod.

Image
Image
Image
BRAIIINS! -- turn into a monster whenever you want!

Some changes:
  • Removed 2D-skins
  • Code cleanups/rewrites
  • A .NET updater for Winblows users (source code also avalable)
  • Save the last visited page (already existed before, didn't work how it should)
  • Jump from last page to first and back - faster skin switch
  • Remove the skin preview generator, download them instead
  • Fixed some bugs when special letters were used in the meta
  • Eliminated minetest.deserialize() from the code (bad decision)

License: LGPLv2
Depends: unified_inventory, default
Download: GitHub master *.zip
View source: GitHub

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Jul 23, 2014 16:46
by Inocudom
Many nasty errors do I have to report:
12:30:58: ERROR[main]: ServerError: ...est_release\bin\..\games\carbone\mods\3d_armor/armor.lua:365: attempt to call field 'get_type' (a nil value)
12:30:59: ERROR[main]: stack traceback:
12:30:59: ERROR[main]: ...est_release\bin\..\games\carbone\mods\3d_armor/armor.lua:365: in function <...est_release\bin\..\games\carbone\mods\3d_armor/armor.lua:293>
12:45:37: ERROR[main]: Error loading mod "win32.NET": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
12:45:37: ERROR[main]: Server: Failed to load and run C:\gsmapper_minetest_release\bin\..\mods\u_skinsdb\win32.NET\init.lua
12:45:38: ERROR[main]: ModError: ModError: Failed to load and run C:\gsmapper_minetest_release\bin\..\mods\u_skinsdb\win32.NET\init.lua

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Jul 23, 2014 17:02
by Krock
Inocudom wrote:C:\gsmapper_minetest_release\bin\..\mods\u_skinsdb\win32.NET\init.lua
12:45:38: ERROR[main]: ModError: ModError: Failed to load and run C:\gsmapper_minetest_release\bin\..\mods\u_skinsdb\win32.NET\init.lua

Okay.
Fixed them.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Jul 23, 2014 18:01
by Inocudom
You were successful in fixing the errors, but I don't know how to get the extra skins.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Jul 23, 2014 18:19
by Krock
Inocudom wrote:You were successful in fixing the errors, but I don't know how to get the extra skins.


The README, you did not read wrote:To download the latest skins you need to run:
"./update_from_db.py" OR
the win32.NET client

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Tue Aug 05, 2014 14:18
by Inocudom
Calinou wrote:
Inocudom wrote:It looks like a new glitch has appeared concerning skins. When I change the skin that I am using ingame, the player model becomes a solid color and stays that way until the next play session. The mods I used are below:
https://github.com/minetest-technic/datastorage-datastorage
https://forum.minetest.net/viewtopic.php?f=11&t=3933-unified_inventory
https://forum.minetest.net/viewtopic.php?f=11&t=9807-u_skins
Yes, player_textures was removed from Carbone at the time.


3d_armor and wieldview probably don't support your skins mod.

Looks like there are mod conflicts here.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Thu Oct 02, 2014 20:44
by Inocudom
Krock, would you be able to post this mod in the forums of Freeminer? If you do, you will have to post a link to the unified_inventory mod.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Oct 05, 2014 10:24
by mgl
Minetestforfun's post in the old u_skins thread made me remember about this fix in the script "update_from_db.py": the base64 functions need bytes, not strings.
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
diff --git a/update_from_db.py b/update_from_db.py
index 123b200..2aefcf7 100755
--- a/update_from_db.py
+++ b/update_from_db.py
@@ -31,7 +31,7 @@ def addpage(page):
    pages = int(l["pages"])
    for s in l["skins"]:
       f = open(skinsdir + "character_" + str(i) + ".png", "wb")
-      f.write(base64.b64decode(s["img"]))
+      f.write(base64.b64decode(bytes(s["img"], 'utf-8')))
       f.close()
       f = open(metadir + "character_" + str(i) + ".txt", "w")
       f.write(str(s["name"]) + '\n')

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Oct 05, 2014 16:29
by Krock
mgl wrote:Minetestforfun's post in the old u_skins thread made me remember about this fix in the script "update_from_db.py": the base64 functions need bytes, not strings.

Thank you!
Fix error in update script [untested]

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Tue Oct 07, 2014 23:51
by Fritigern
You REALLY need to replace StandardError with something else, like Exception.
From http://www.diveintopython3.net/porting- ... ndarderror (but there are many many other sources for 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
In Python 2, StandardError was the base class for all built-in exceptions other than StopIteration, GeneratorExit, KeyboardInterrupt, and SystemExit. In Python 3, StandardError has been eliminated; use Exception instead.


However, even with that fix applied, I keep getting the following error at random moments in the download process:
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
Traceback (most recent call last):
  File "./update_from_db.py", line 58, in <module>
    addpage(p+2)
  File "./update_from_db.py", line 25, in addpage
    data = r.read().decode()
AttributeError: 'int' object has no attribute 'read'

I have never succesfully downloaded all the skins, it has ALWAYS exited with an error. Did nobody ever catch this?

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Wed Oct 08, 2014 10:23
by Krock
Fritigern wrote:<snip>

I have never succesfully downloaded all the skins, it has ALWAYS exited with an error. Did nobody ever catch this?

I never got this error when I tested it. (two months ago)
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
      except Exception:
         if r != 0:
            if r.status != 200:
               print("Error", r.status)
               exit(r.status)
      data = r.read()

Seems like r is 0 because all other would result in an error message.
I tried to fix it but can't test it right now.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Tue Oct 14, 2014 08:16
by Fritigern
This persistent failure to successfully download the skins has led to me writing a bash script of my own. And that one works flawlessly for me.
You have already added my script on Github, so if anyone has a similar issue, they should either update the mod, or download the archive and re-install. :-)

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Nov 23, 2014 18:57
by Krock
Added tooltips

Image

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Nov 23, 2014 19:37
by ExeterDad
+100!

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Nov 23, 2014 21:45
by Minetestforfun
good update, thank you !

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Nov 23, 2014 23:10
by mtmodder148
Cool thank you very much. I wasn't sure how difficult it would be but bam! done the next day simply awesome :)

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sun Dec 14, 2014 23:49
by Minetestforfun
Hi,

I am looking for christmas skins for my players...
Please, somebody can share his christmas/santa skins with us ? :D

(For the moment, you don't have christmas/santa skins in the DB of u_skins...)

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Fri Jan 02, 2015 19:28
by darkninja
Ive have tried to run it but it says folder meta not found. "Meta" Is very much there. please help.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sat Jan 03, 2015 17:57
by Krock
darkninja wrote:Ive have tried to run it but it says folder meta not found. "Meta" Is very much there. please help.

That directory must be called "meta", not "Meta". Windows can handle those but not Linux.
If renaming the directory does not solve the problem:
- Do you have the newest u_skins version?
- Which updater are you using?

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Fri Jan 09, 2015 16:39
by Lukester

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Mon Mar 02, 2015 15:27
by mahmutelmas06
Could be nice if we could use the mod with blockmen's caracter hand mod
viewtopic.php?f=9&t=7286

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Mon Mar 02, 2015 18:50
by Krock
mahmutelmas06 wrote:Could be nice if we could use the mod with blockmen's caracter hand mod
viewtopic.php?f=9&t=7286

BlockMen wrote:Notice: This only works for singleplayer, because you cant change the hand for each player...

Well I can't change that. A better soulation is using the model directly as hand.
Currently, it's just a texture which looks like a "hand".

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sat Apr 11, 2015 12:42
by Minetestforfun
I tried "simple_skins" with "u_skins" with and without the "erwin.maximilian => simple_skin-unified_invetory.patch.gz" but it doesn't work at all...

Somebody has already coded a compatibility code ? or a merged mod of this two mods ? or maybe can code it ?

In my server we need both mods because "u_skins" is a pretty good skin database but, it's a very bad mod if you want to add skins from players creation, the "u_skins" mod need many precautions and modifications to make this possible... (it's long and not very made for that, i supposed)
While, the "simple_skins" mod is just perfect for this weak point of "u_skins", with this mod we can easily add mods from players creation without touch the "u_skins" mod wich means we can update the "u_skins" without fear :)

"u_skins" mod link : viewtopic.php?t=9807
"simple_skins" mod link : viewtopic.php?f=11&t=9100

Thank you in advance for your answers !

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sat Apr 11, 2015 13:31
by Krock
Minetestforfun wrote:I tried "simple_skins" with "u_skins" with <snip>

Sorry but I can't do more than this:
https://github.com/SmallJoker/minetest- ... ommit/e762

There might be texture name conflicts, I can not solve them without renaming all player textures.

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sat Apr 11, 2015 20:30
by Minetestforfun
Thank you Krock, i think it will be a great solution, we are trying this solution right now.

For the name conflicts, don't worry, our "simple_skins" mod is empty because we fill it with players creation skins

(EDIT : Finally we code our own solution wich need only the mod "u_skins" https://github.com/Ombridride/minetest- ... 70786d298e it's an early release, so it's not over but, we are in the good way)

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Fri May 29, 2015 02:00
by Gon_17
Nice Mod

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Fri May 29, 2015 22:08
by Gon_17
How to istall?

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Sat May 30, 2015 09:55
by Krock
Gon_17 wrote:How to istall?

Image

See also: Helpful videos

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Thu Nov 17, 2016 04:23
by Minetest_Neko_
Hpw to i get the inventory you have? i ahve default inventory

Re: [Mod] Skins for unified_inventory [u_skins]

PostPosted: Fri Nov 18, 2016 17:50
by Krock
Minetest_Neko_ wrote:Hpw to i get the inventory you have? i ahve default inventory

It's called unified_inventory, which can be found here. By the way, that mod is required to be installed and activated to make u_skins work.