New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an armor stand #48
Comments
+1 Good idea. There is already a mod called 'armor_stand' but I do not think it works like that. I did actually suggest something similar to the mod's author https://forum.minetest.net/viewtopic.php?f=9&t=11967#p180912 Definitely added to the to-do list. |
👍 yes! My players have been hassling for this for ages. |
I am in the process of doing the blender/gimp part. I would like to know how the mechanics of equipping armor from the stand should work before I start coding it, so ideas are welcomed. Fun fact: I have never actually played Minecraft. |
Cool video, it's making me wonder whether I should have used an entity for this rather than a mesh-node but that will have to be another day as I have almost completed the model. |
You'll be forced to use an entity because many combination of textures are possible. |
I have not got round to texturing yet and can't really disagree since I have never tried multiple materials with meshnodes before, however, I cannot see any reason why it would be any different. |
Also about taking the armor from the stand, it depends from where you click on the armor stand in MC. I think it's possible in MT as well, but a formspec would be simpler. And I repeat : an entity is necessary since you can have e.g. a diamond helmet, a golden chestplate and steel boots. If you go with meshnode you'd be forced to register hundreds of nodes to cover all combinations possible. |
Indeed, though I could pinch the 'line-of-sight' code from my shooter mod, I think that would be overkill for this. A formspec it shall be.
You may well be right but if that turns out to be true then I will file an issue. |
I'm 100% sure to be right. Meshnode only supports pre-defined texturing. You need dynamic texturing of your meshes with the armor stand. |
Yeah, okay, I see what you're getting at, nodes don't support dynamic texturing which is a shame because entities just suck. I think the solution will be to use a meshnode for the stand itself but the armor will have to be an entity. |
@kilbith you have some experience with meshnodes, right? Any idea why my model would show up black yet the inventory and wielded image are correctly textured? This is starting to drive me nuts... |
Did you add Give me your current work into a .zip and I can give a look. |
I did not add paramtype = "light" which if I am not mistaken was the right thing to do? Here is a zip of my current .blend: 3d_armor_stand_6.blend.zip The test case is the existing 'armor_stand' mod with the node converted into a mesh. |
Duh, I did try the paramtype but did not dig/replace, thank you for your assistance. I realize the model still needs some tweaking but this just had me a bit stuck. |
That's because the light information is stored internally per node by the engine. So when it's placed, the light information of the node doesn't change if not destructed. |
I guess that makes sense but I still don't understand why the 'regular' node I replaced worked fine without it, probably I should re-read the doc's :-) |
I have just pushed a feature branch for testing, if anyone would like to try and break it :D https://github.com/stujones11/minetest-3d_armor/tree/armor_stand It is probably nothing like the minecraft version but I am sure it can always be improved. |
👍 Great work. Two remarks :
|
Yes, that was an oversight, see the latest commits.
I will lower the models more so that the boot are touching the base but maybe not tonight, I have had my fill of blender for one weekend ;-) Thank you for your prompt response. |
I also noticed the upper part of the helmet does not touch the summit of the armor stand. |
Noted, thanks, I will take care of that when I re-adjust the models. |
I can't say I've attempted to break it, but I like the way it works and agree with kilbith's comments above. I'm feeling strongly to give this some live testing - I have several hyperactive players who will find any breaking points really quickly. |
The models have now been lowered so that boots rest on the base and the helmet appears to sit on the top (as close as I can approximate with full pixels). I have also narrowed the entity collisionbox so that it is now possible to walk between stands but not directly through them. |
OK that's better. I don't like how the lower part of the helmet goes inside the chestplate. Also why the formspec list has 6 slots instead of 4 ? If you fix that, I don't see anything preventing to push the armor stand in the master branch. |
Yes, that is just a consequence of using the armor model as a base for this. I also just noticed that the boots need to be moved slightly closer together. Again, the formspec was more copy-pasta from the armor mod but you are quite correct, it only needs 4 slots. I will be sure to address these issues before merging, thank you once again for testing, I value your opinion. |
I have had a closer look in-game and I think that shifting the back of the helm up by one pixel should clear it from the chestplate. That is a lot of textures to change so a job for another day, meanwhile I have reduced the formspec to 4 slots, being meta-based this will only be the case for newly placed stands. |
I have done a little live testing of this and so far no breakages, no negative comments and no-one has asked how it's supposed to work. So with the proposed changes I'd agree that it's good to go. |
@0-afflatus Thank you for testing this on your server, unfortunately the recent inventory changes mean that existing stands will no longer work properly so I hope this does not inconvenience you. |
@stujones11 not a problem I knew it was WIP. |
Cool, well here goes... |
* Add setting to disable armor visuals on player model
Hello @stujones11.
So the idea is to add a Minecraft-like armor stand from whose we could hold our equipment.
Some proof-of-concept to achieve that :
.obj
(static).You would need to check the wielded item when the player right-clicks on the armor stand then apply accordingly a texture overlay to your entity.
The text was updated successfully, but these errors were encountered: