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

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

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

by stu » Post

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

by Inocudom » Post

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/d0t ... ield3d.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.

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

by prof-turbo » Post

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: 516
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

by prof-turbo » Post

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

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

by VanessaE » Post

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 (64-512px)

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

by stu » Post

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: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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 (64-512px)

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

by prof-turbo » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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 (64-512px)

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

by stu » Post

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
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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 (64-512px)

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

by stu » Post

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: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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

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

by stu » Post

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 » Post

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

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

by stu » Post

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 » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

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: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests