[Mod] 3d visible wielded items [0.4.0] [wield3d]

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

[Mod] 3d visible wielded items [0.4.0] [wield3d]

by stu » Sat Jun 29, 2013 15:39

Tittle just about says it all.

Image

Now supports the 3d_armor modpack, note that when used in conjunction with the wieldview mod, wield3d will only be used for nodes/items that are not covered by wieldview.

Minetest version: 0.4.12 or later
Depends: default
Download: https://github.com/stujones11/wield3d/archive/master.zip
Github: https://github.com/stujones11/wield3d
License: WTFPL

Known Issues

Items occasionally disappear when viewing in 3rd person. This is a minetest engine bug and not the fault of the mod, turning 3rd person off then back on restores the view.
Last edited by stu on Sat Nov 26, 2016 20:54, edited 9 times in total.
 

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

by Inocudom » Sat Jun 29, 2013 15:50

stu wrote:Tittle just about says it all. Extremely hacky but it kinda works of a fashion.

Still very much a work in progress, some items don't look so good, like shovels and buckets for example.

Note: Currently not compatible with minetest-3d_armor or any other mod that changes the default character model.

Image

Minetest version: 0.4.5, 0.4.6, 0.4.7
Depends: default
Download: https://dl.dropboxusercontent.com/s/d0tw0tl0ebzlnra/wield3d.zip
License: WTFPL


Good work there, stu. This and being able to see your own player model by looking down will make Minetest more fun to play.
Recovering from the abomination I am. Clocking time for Garry's Mod I am too.
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

by prof-turbo » Sat Jun 29, 2013 18:54

AWESOME! SO COOL! + 12365498145231025645614635.2016 !
WOWOWOWOWOWOWO!

( Don't like it #joke )
You should take a look at http://www.xorhub.com
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

by prof-turbo » Sat Jun 29, 2013 18:54

Download it now!
You should take a look at http://www.xorhub.com
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sat Jun 29, 2013 20:49

This actually works reasonably well on my server. The only issue I see so far is sometimes a player's hand doesn't show the item they're holding. Then again, that player said that sometimes signs (which use entities for visible text) show random player skins (!), so his client may be glitchy.

Would you consider a variation of this mod that is combined with your "knees and elbows" player model?
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

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

by stu » Sat Jun 29, 2013 21:32

VanessaE wrote:This actually works reasonably well on my server. The only issue I see so far is sometimes a player's hand doesn't show the item they're holding. Then again, that player said that sometimes signs (which use entities for visible text) show random player skins (!), so his client may be glitchy.

It is difficult to test this properly by myself so I really apperiate any feedback from those running servers. Please let me know if you do discover the cause.

VanessaE wrote:Would you consider a variation of this mod that is combined with your "knees and elbows" player model?

Maybe, although I'd rather get to the root of the probem with bone attachment, otherwise I'd need to maintain multiple models everywhere. It is currently not clear whether Irrlicht is at fault or the blender directx exporter.

prof-turbo wrote:AWESOME! SO COOL! + 12365498145231025645614635.2016 !
WOWOWOWOWOWOWO!)


Glad you like it!

prof-turbo wrote:Download it now!


I do appreciate your enthusiasm, however, this mod is somewhat useless unless you run a server.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sun Jun 30, 2013 00:46

Another thing I've noticed is sometimes the item that should be in my hand is shown attached to a spot on the ground near where I'm standing. If I roll my mouse wheel to switch items, the item embedded into the ground changes to match. Its location on the ground seems to be where I spawned at least (e.g. at client sign-on). Probably related to the issue with the other player's wielded item not being visible.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

by prof-turbo » Sun Jun 30, 2013 10:18

stu wrote:
prof-turbo wrote:Download it now!


I do appreciate your enthusiasm, however, this mod is somewhat useless unless you run a server.


Yes... I thought to it after I downloaded it ;)
You should take a look at http://www.xorhub.com
 

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

by stu » Sun Jun 30, 2013 13:01

VanessaE wrote:Another thing I've noticed is sometimes the item that should be in my hand is shown attached to a spot on the ground near where I'm standing. If I roll my mouse wheel to switch items, the item embedded into the ground changes to match. Its location on the ground seems to be where I spawned at least (e.g. at client sign-on). Probably related to the issue with the other player's wielded item not being visible.

I have so far not been able to repproduce this locally, however, it soulds like the entity is not being attached to the player. I have added a half second delay in register_on_joinplayer to see if that helps. If it doesn't then you could try increasing the delay a little.

Thanks again for the update.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sun Jun 30, 2013 16:58

Can you put your code up on github? Makes it easier for the rest of us to grab updates. :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

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

by stu » Sun Jun 30, 2013 17:16

VanessaE wrote:Can you put your code up on github? Makes it easier for the rest of us to grab updates. :-)

I probaby will if it gets moved to release, although I am not sure whether to replace wieldview in the 3d_armor modpack with this.

I have just made some more updates as it goes, i corrected the rotations of default items that looked wrong.
This has been done by including a table of override rotations.
Code: Select all
wield3d_rotation = {
    ["default:torch"]=315,
    ["default:sapling"]=315,
    ["flowers:dandelion_white"]=315,
    ["flowers:dandelion_yellow"]=315,
    ["flowers:geranium"]=315,
    ["flowers:rose"]=315,
    ["flowers:tulip"]=315,
    ["flowers:viola"]=315,
    ["default:shovel_wood"]=270,
    ["default:shovel_stone"]=270,
    ["default:shovel_steel"]=270,
    ["default:shovel_bronze"]=270,
    ["default:shovel_mese"]=270,
    ["default:shovel_diamond"]=270,
    ["bucket:bucket_empty"]=270,
    ["bucket:bucket_water"]=270,
    ["bucket:bucket_lava"]=270,
    ["screwdriver:screwdriver"]=270,
    ["screwdriver:screwdriver1"]=270,
    ["screwdriver:screwdriver2"]=270,
    ["screwdriver:screwdriver3"]=270,
    ["screwdriver:screwdriver4"]=270,
}

Not exactly ideal but it's all I can think of for now. Server admins can extend this table to include any additional items not already covered. Alternatively modders could add rotational support for thier own items in code.
Code: Select all
    if minetest.get_modpath("wield3d") then
        wield3d_rotation["my_cool_mod:my_awesome_tool"]=270
    end
Last edited by stu on Sun Jun 30, 2013 17:18, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Jun 30, 2013 17:21

stu wrote: Alternatively modders could add rotational support for thier own items in code.
Code: Select all
    if minetest.get_modpath("wield3d") then
        wield3d_rotation["my_cool_mod:my_awesome_tool"]=270
    end

They have to put "wield3d?" in depends.txt too, so this mod is loaded first.
 

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

by stu » Sun Jun 30, 2013 17:33

PilzAdam wrote:
stu wrote: Alternatively modders could add rotational support for thier own items in code.
Code: Select all
    if minetest.get_modpath("wield3d") then
        wield3d_rotation["my_cool_mod:my_awesome_tool"]=270
    end

They have to put "wield3d?" in depends.txt too, so this mod is loaded first.

That is true, although they could wrap it in a minetest.after if they wanted to avoid dependency.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Jun 30, 2013 17:47

stu wrote:
PilzAdam wrote:
stu wrote: Alternatively modders could add rotational support for thier own items in code.
Code: Select all
    if minetest.get_modpath("wield3d") then
        wield3d_rotation["my_cool_mod:my_awesome_tool"]=270
    end

They have to put "wield3d?" in depends.txt too, so this mod is loaded first.

That is true, although they could wrap it in a minetest.after if they wanted to avoid dependency.

With the "?" at the end its an optional dependency, wich means that its not a real dependency, the mod just gets loaded first.
 

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

by stu » Sun Jun 30, 2013 17:51

PilzAdam wrote:
stu wrote:
PilzAdam wrote:They have to put "wield3d?" in depends.txt too, so this mod is loaded first.

That is true, although they could wrap it in a minetest.after if they wanted to avoid dependency.

With the "?" at the end its an optional dependency, wich means that its not a real dependency, the mod just gets loaded first.

Ah, I didn't know that, thanks!

Actually, I thought that was either a typo or that you were skitting the name 8)
Last edited by stu on Sun Jun 30, 2013 17:52, edited 1 time in total.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Sun Jun 30, 2013 18:43

By using a ? mark in depends.txt, the mod calling for wield3d (or whatever) will proceed without it if it's missing.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

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

by stu » Sun Jun 30, 2013 20:24

Now posted on github.

There have been a few minor changes since the last update. Entities now only detach/re-attach if the rotation has changed and the overrides have been moved to a separate file, rotation.lua.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Mon Jul 01, 2013 21:17

It seems to be working more reliably now.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

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

by stu » Mon Jul 01, 2013 21:30

VanessaE wrote:It seems to be working more reliably now.

I am pleased to hear that, looks like the delay is needed then maybe I'll extend it to 1 just to be sure.

I have just noticed though that the player skin in fact mirrored, this is a result of all the blender jiggery-pokery I had to do to get this thing to work. I will fix that as soon as I get a chance, it's quite a tedious exercise...
Last edited by stu on Mon Jul 01, 2013 21:32, edited 1 time in total.
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Mon Jul 01, 2013 21:55

when will this be able for use with your 3darmor mod?
 

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

by stu » Mon Jul 01, 2013 22:27

Mito551 wrote:when will this be able for use with your 3darmor mod?

I would like to eventually add support for this in 3d_armor but curremtly that would involve practically redoing the whole armor model.

Essentially I am exploiting a bug to make this work, when by rights it wouldn't work. Did I mention this was extremely hacky?

I am currently trying to find a better solution than this so I'm sorry, I can't give an exact timeframe.
Last edited by stu on Mon Jul 01, 2013 22:31, edited 1 time in total.
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Tue Jul 02, 2013 10:34

Oh alright. Take your time! I'm really excite about having better way to see what's in other people's hands.
 

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

by stu » Wed Jul 03, 2013 19:56

Mod updated.

Fixed the mirrored skins (I think) and fixed wielding an unkown object tile when joining 'empty handed'.
Also added better looking rotations for vessels.
Last edited by stu on Wed Jul 03, 2013 22:08, edited 1 time in total.
 

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

by stu » Mon Jul 08, 2013 19:54

VanessaE wrote:Would you consider a variation of this mod that is combined with your "knees and elbows" player model?

Not sure if you are still using this, however, I have now made a wield3d version of the split-limb model.
Download link in the "knees and elbows" topic.
 

User avatar
VanessaE
Moderator
 
Posts: 4315
Joined: Sun Apr 01, 2012 12:38
Location: Waynesville, NC
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE

by VanessaE » Mon Jul 08, 2013 23:02

Sweet - thanks!
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 6 guests