[Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

User avatar
Nathan.S
Member
Posts: 1052
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by Nathan.S » Post

You need to depend on 3d_armor in your mods depends.txt or mod.conf
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
debiankaios
Member
Posts: 206
Joined: Thu Dec 03, 2020 12:48
In-game: debiankaios Nowe
Location: germany
Contact:

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by debiankaios » Post

Thank you, next question, how i fix the new texture:
Image

User avatar
Nathan.S
Member
Posts: 1052
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by Nathan.S » Post

3d_armor expect textures to use a specific naming scheme if you don't explicitly define the textures.

you can define textures in the registration like this,

Code: Select all

armor:register_armor('armor:ros_chestplate', {
   description = 'Rose Thennium Chestplate',
   texture = 'armor_chestplate_thennium.png',
   preview = 'armor_chestplate_thennium_pre.png',
   inventory_image = 'armor_chestplate_thennium_inv.png',
   groups = {armor_torso=1, armor_block=30, armor_use=100, armor_water=.3, armor_fire=.5, armor_heal=.3, physics_gravity=-.1, armor_dmg_resist=2},
   armor_groups = {fleshy=1},
   damage_groups = {cracky=2, snappy=1, level=5},
})
texture is the file that is used on the player model.
preview is the image shown in the inventory tab.
inventory_image is the image shown in inventory.

If you don't want to define all the textures you just need to follow the naming scheme as used in 3d_armor.
3d_armor_boots_admin.png
3d_armor_boots_admin_preview.png
3d_armor_inv_boots_admin.png

So your textures would be something like
alien_material_alienboots.png
alien_material_alienboots_preview.png
alien_material_inv_alienboots.png
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

debiankaios wrote:
Sat Dec 05, 2020 21:10
Thank you, next question, how i fix the new texture:
Image
NathanS got you covered but have a read of the api
https://github.com/minetest-mods/3d_arm ... /README.md

I just updated it to MD and would be very intrested if it's a bit more user friendly and udnerstandable, Doco can always use refinement :)

User avatar
debiankaios
Member
Posts: 206
Joined: Thu Dec 03, 2020 12:48
In-game: debiankaios Nowe
Location: germany
Contact:

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by debiankaios » Post

Thank you!

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

I'm not sure how best to reach people who might be intrested in this. I've proposed an enhancement to 3d_armor that splits the use/wear across multiple pieces when worn instead of all pieces recieveing the same use/wear when damaged. To try and provide another advantage or benefit from wearing multiple armor pieces.

Example (Although these were also my test cases):
One
Wearing just Wooden Chestplate - Recieved full 2000 use/damage

Two
Wearing Wooden Chestplate and Wooden Boots - Each Recieved 1000 use/damage

https://github.com/minetest-mods/3d_armor/issues/34

Code is in the above issue/suggestion /\

Happy to take feedback but I am trying to keep the enhancement/suggestion simple and to as fewer number of lines of code as possible to minimise risk of breakage or regressions.

Adnunano
Member
Posts: 37
Joined: Thu Feb 13, 2020 09:28

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by Adnunano » Post

Does the authors of 3d armor plan to add armors's effects to swimming? For example, wood makes you float easier, and heavy armor makes you sink to the bottom. The sink effect can be changed based on how heavy the material is. Gold is the heaviest, so it can be the winner.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

Adnunano wrote:
Sat Dec 19, 2020 07:05
Does the authors of 3d armor plan to add armors's effects to swimming? For example, wood makes you float easier, and heavy armor makes you sink to the bottom. The sink effect can be changed based on how heavy the material is. Gold is the heaviest, so it can be the winner.
I can't answer this as I'm not the owner but I do know that the minetest-mods team will accept changes etc. The above would be tricky as you would need to check if the player is in water, what armor they are wearing and then apply I think a gravity modifier if they are in water depending on what armor they are wearing. The only way I can see to do it would be to use globalstep. 3d_armor dosent currently use globalstep so it would make the mod overall less friendly to servers. So it might be better if this functionality was bundled into it's own mod so it was optional for servers to run it or not. Anyways Im only a code tinkerer someone with way more skill might be able to see a better solution.

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

While I have been poking around in the inner workings of 3d_armor I noticed that 3d_armor creates sets by deriving the material name from the registered item name eg "3d_armor:boots_wood".

Code: Select all

local item = stack:get_name() -- api line 244
local mat = string.match(item, "%:.+_(.+)$") -- api line 261
I'm not sure if this is a big issue or not? I dont remeber it being documented to make sure you include the material name at the end of the registered item name but an easy update.

I have been playing around with adding a new group for armor to indicate the material. Although I have to include the material in the group name as a flag to indicate its the armor material. At the moment I've been playing around with groups named armor_m_"materialname" eg armor_m_wood. The number is meaningless and its not possible to use the existing material groups otherwise for example you could use wood helmets to make wood sticks...

The more I've thought about this the more I'm not sure on the value if any this adds, it may simply be better to document the current behaviour well so it's clear how it works. It just seems more aligned to other minetest behaviour to use groups for materials although not sure on the benefit other than consistancy?

The main reason I was poking around in the above area was to allow the admin to set which armor items consistute a set when worn for the armor bonus, currently all items registered must be worn to make up a set which can cause issues so for example if you have none item specific items eg capes or decorations it becomes impossible for the player to wear a set.
The other thing I was looking at was the set armor bonus - currently this is hard coded to a multiplier of 1.1 again looking at adding it to settings so admin can increase/change or set to 1 (basically off).

Very happy to take thoughts

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

I've created a branch that simply documents the current behaviour and adds a set setting and set bonus setting. Also updates the Readme, although Im not happy with the wording inside the readme at the moment just reads confusing to me.

https://github.com/sirrobzeroone/3d_arm ... g/3d_armor

The above branch is based on the 3d_armor, master at this commit https://github.com/minetest-mods/3d_arm ... f89971d0e2 - basically the one from 9 hrs ago from this posts time.

I do have an older branch that includes the group material changes as well but that ones fairly stale and Im leaning away from doing the group/material changes anyways you can pick it up from the issue thread on git if your intrested:
https://github.com/minetest-mods/3d_armor/issues/35

Im still refining; for example I want to remove the logging of material error from the inside the armor.set_player_armor to somewhere were it will only report once not everytime someone puts on and takes off a piece of an armor with no material defined (ie inside the onreg armor)....and defined is very loose term basically just has "_something" at the end of the item reg name. I guess thats one disadvatnage of not using groups cant tell the difference between an "_material" at the end of the item reg name and an "_funkyword" at the end of the item reg name. But it's a pretty hefty change (ie downline impacts to any mod that registers armor is big) to allow error logging when the person configuring should be reading the readme.

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

I just finished testing the above branch (the lower impact upto date one) and created a pull request any concerns please do flag them:

https://github.com/minetest-mods/3d_armor/pull/41

User avatar
sirrobzeroone
Member
Posts: 269
Joined: Mon Jul 16, 2018 07:56

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by sirrobzeroone » Post

Not sure if anyone has time but if you could check out the branch and make sure no big bugs that would be great.

The PR: https://github.com/minetest-mods/3d_armor/pull/41

The Branch link: https://github.com/sirrobzeroone/3d_arm ... us_setting

Place any concerns on the PR so SmallJoker knows not to merge :).

User avatar
Miniontoby
Member
Posts: 454
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Modpack] 3D Armor [0.4.13] [minetest-3d_armor]

by Miniontoby » Post

might there be able to be an facemask added to this mod????
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell"

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests