3d Armor - need help!

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

3d Armor - need help!

by 4aiman » Fri Jan 11, 2013 21:05

Just a couple of minutes ago I tried to make this:
Image

And here's a video of a player in 3d armor: http://youtu.be/98rZ1P8PdF0

I named this prototype of a mod "capes". Don't ask why, though, 'cause I don't know either ;)


What type of help do I need:
  • a piece of code to synchronize the armour mesh with it's "wearer" (maybe get_player_at_pos would do to find which one is wearer);
  • an Idea how to take off that armour (I have an idea of wardrobe node, but I don't like the idea of using additional nodes)

Here is how I done what I have:
Code: Select all
local ar = {
    physical = true,
    collisionbox = {-0.5,-1,-0.5, 0.5,1,0.6},
    visual = "mesh",
    mesh = "test2.x",
    textures = {"ar.png"},
    visual_size = {x=1.3, y=1.1, z = 1.3},
    driver = nil,
    v = 0,
}


function ar:on_rightclick(clicker)
    if not clicker or not clicker:is_player() then
        return
    end
    if self.driver and clicker == self.driver then
        self.driver = nil
        clicker:set_detach()
    elseif not self.driver then
        self.driver = clicker
        self.object:set_attach(clicker, "", {x=0,y=0,z=0}, {x=0,y=0,z=0})
        self.object:setyaw(clicker:get_look_yaw())
    end
end

minetest.register_entity("capes:ar", ar)


minetest.register_craftitem("capes:ar", {
    description = "Cape",
    inventory_image = "ar.png",
    wield_image = "ar.png",
    wield_scale = {x=2, y=2, z=1},
    liquids_pointable = true,
   
    on_place = function(itemstack, placer, pointed_thing)
        if pointed_thing.type ~= "node" then
            return
        end
        minetest.env:add_entity(pointed_thing.above, "capes:ar")
        itemstack:take_item()
        return itemstack
    end,
})



How to "put on" that "armor":
  • Press "T"
    input "/giveme capes:ar"
  • place that on the ground using the right click
  • right click on the "armor" entity.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:09

I LOVE YOU MAN SO MUCH. WE HAVE ARMOR!!!!!!
+100000000
:-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-) :-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-):-)
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:09

also can you make armor using moreores mod
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

LorenzoVulcan
Member
 
Posts: 445
Joined: Mon Mar 12, 2012 06:46
GitHub: aegroto

by LorenzoVulcan » Fri Jan 11, 2013 21:15

+1,This should become a good API.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 11, 2013 21:16

That's only a prototype. Crafting is a piece of cake, but the animation isn't. At least for me at least for now.
I'll be trying to find a way by myself, but I really need some help.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:17

my suggestion is to make the hat more like a helmet
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

LorenzoVulcan
Member
 
Posts: 445
Joined: Mon Mar 12, 2012 06:46
GitHub: aegroto

by LorenzoVulcan » Fri Jan 11, 2013 21:18

4aiman wrote:That's only a prototype. Crafting is a piece of cake, but the animation isn't. At least for me at least for now.
I'll be trying to find a way by myself, but I really need some help.

I think you can't get best animations with LUA api.Anyway,you don't need it.It's a cubic game,graphics are not so important.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:19

so it looks silly to have a person wearing something and making him move in and out of it
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

LorenzoVulcan
Member
 
Posts: 445
Joined: Mon Mar 12, 2012 06:46
GitHub: aegroto

by LorenzoVulcan » Fri Jan 11, 2013 21:21

jojoa1997 wrote:so it looks silly to have a person wearing something and making him move in and out of it

This also happens with the UFO mod.I think it's a c++ core problem.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 11, 2013 21:22

I think you can't get best animations with LUA api.Anyway,you don't need it.It's a cubic game,graphics are not so important.
I do not want "best" animations, I only want to make this armor fit a player. Basically the mesh for this armour is the character.x model without some parts. So, the animations is the same, I only need to sync them.
Last edited by 4aiman on Fri Jan 11, 2013 21:23, edited 1 time in total.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:23

make pants shoes and a helmet like in the armor mod
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 11, 2013 21:25

I would, but the core is much more important
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 21:26

ok well just make it the chestplate then
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

lord_james
Member
 
Posts: 51
Joined: Sun Mar 11, 2012 22:06

by lord_james » Fri Jan 11, 2013 22:46

It's just my opinion but I think could be more efficient remade a player's model with pieces of armor and switch player's model when he wears the armor.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 11, 2013 22:52

+100! That's work! How is that I never have thought of that? >_<
Will make some models then ^__________^
 

User avatar
Chinchow
Member
 
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Fri Jan 11, 2013 23:12

Wait but what if I have a different skin than default what would the armor look like?
Also what if I only have a chestplate on or a hat and boots would you make a model for every combination?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Fri Jan 11, 2013 23:43

maybe have the armor model overlap the skin model
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by tinoesroho » Fri Jan 11, 2013 23:53

I believe there's a lua command you can use to attach the armor to an object (or player). Or vice-versa. Read the /doc/api.txt for more info
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Fri Jan 11, 2013 23:57

tinoesroho wrote:I believe there's a lua command you can use to attach the armor to an object (or player). Or vice-versa. Read the /doc/api.txt for more info

Read the topic, please ;)

Chinchow wrote:Wait but what if I have a different skin than default what would the armor look like?

I know a workaround :
Code: Select all
    tiles = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},

Does that ring a bell? ;)
Chinchow wrote:Also what if I only have a chestplate on or a hat and boots would you make a model for every combination?

I'm in no need of "making" combinations :)
I can do a full-set and then delete&save.
Last edited by 4aiman on Sat Jan 12, 2013 00:03, edited 1 time in total.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Sat Jan 12, 2013 00:03

4aiman wrote:I'm in no need of "making" combinations :)
I can do a full-set and then delete&save.

Do you mean that you will be making one model for each item. One for chestplate. onr for helmet. ect....
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sat Jan 12, 2013 00:09

Is there any other opportunity? One model at a time. So, I need to create
char + boots+pants+chest+helmet model and then saving it in different combinations.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Sat Jan 12, 2013 00:22

with overlapping images i was thinking that you have a GUI like this mod http://minetest.net/forum/viewtopic.php?id=3099 but have you open it with a letter "u". then when you put armor into a slot the image gets overlapped with the player image.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
Chinchow
Member
 
Posts: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Jan 12, 2013 02:03

Alright well good luck
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Sat Jan 12, 2013 02:14

Awesome! We have 3D armor. Watch out minecraft! minetest is growing fast.
 

lord_james
Member
 
Posts: 51
Joined: Sun Mar 11, 2012 22:06

by lord_james » Sat Jan 12, 2013 03:11

4aiman wrote:Is there any other opportunity? One model at a time. So, I need to create
char + boots+pants+chest+helmet model and then saving it in different combinations.


Uhm... Another suggestion: Alpha texture. One model, differents combinations of armors.

http://minetest.net/forum/viewtopic.php?pid=53712#p53712
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: runs and 7 guests