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

User avatar
j0j0n4th4n
Member
Posts: 251
Joined: Tue Jan 26, 2021 06:45

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

by j0j0n4th4n » Post

How do I take off the armor?
cdb_894a100ddd76

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

j0j0n4th4n wrote:
Wed Aug 03, 2022 15:03
How do I take off the armor?
Approximately the opposite of how you put it on.

-- Assuming PC use, Android phone/tablet use may be different
  • Open Inventory
  • Select 3d_armor tab at the top
  • Click on armor item and drag it back to your inventory

User avatar
j0j0n4th4n
Member
Posts: 251
Joined: Tue Jan 26, 2021 06:45

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

by j0j0n4th4n » Post

*facepalm*

I didn't had '3d_armor_ui' on, that is why I couldn't take it off. with just '3d_armor' you don't get that tab on the top of Inventory, but if you left click while holding an armor item it will equip it but there is no way to unequip it.
cdb_894a100ddd76

User avatar
kristovish
Member
Posts: 39
Joined: Tue Jul 19, 2022 00:42
GitHub: kristovish
In-game: kristovish

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

by kristovish » Post

hey! how to get the gloves?

User avatar
Nathan.S
Member
Posts: 1147
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

Gloves aren't part of this mod, you're probably looking for this mod: viewtopic.php?f=9&t=25665&hilit=gloves
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Pixels
Member
Posts: 20
Joined: Tue Oct 04, 2022 08:27

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

by Pixels » Post

Hey there, thanks for this amazing mod,

However, since we installed it, we encountered some issues:
3d_armor is blocking moreblocks from auto making pieces for xtraores.
we have the latest version for these mods installed (all dependencies are up to date too) we are just stuck and for now our only solution implies a lot of coding.

Fresh install of moreblocks, xtraores and 3d_armor. Moreblocks makes pieces from xtraores without additional coding but when 3d_armor is added to server, moreblocks stops talking to xtraores unless I disable xtraores' armor page. The dependencies are correct. My choices are lose the xtraores armor or manually add 48 items to moreblocks.

Anyone has a clue/solution for this that doesn't involves hours of coding?

Thanks a lot for your kind help

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

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

by Neuromancer » Post

I'm trying to put this modpack inside of my modpack "Asuna Plus". But you can't have a modpack inside of a modpack, so I just put all of the individual mods of 3d_armor in my modpack folder, added them to the depends of my modpack.conf and renamed armor.conf.example to armor.conf in the 3d_armor mod folder. But now when creating a new world, the first time you start the game on the Armor Tab in your inventory, it will say "Armor not initialized". But if you "Exit to Menu" and go back in then the Armor tab works and there is no error. The code is here if anyone wants to check it out: https://github.com/Neuromancer56/AsunaPlus https://content.minetest.net/packages/N ... suna_plus/
Here's the depends in my modpack.conf: depends = ambience, dmobs, goblins, mobs, mobs_monster, nativevillages, people, tsm_pyramids, 3d_armor, 3d_armor_ip,3d_armor_sfinv,3d_armor_stand, 3d_armor_ui, armor_admin, armor_bronze, armor_cactus, armor_crystal, armor_diamond, armor_gold, armor_mithril, armor_nether, armor_steel, armor_wood, shields, wieldview, mobs_ghost_redo, mobs_skeletons, tsm_railcorridors

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

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

by Neuromancer » Post

It looks like if you add up all the armor_heal values for each piece of armor you are wearking , that is the percentage chance that hitpoint damage will be reduced to 0 when hit. But since wood armor always has an armor_heal=0 it looks like it won't help you there. A wood chestplate also has armor_groups = {fleshy=10} but can anyone explain how this protects you in game? I just want to understand the tangible benefit that wooden armor gives you.

User avatar
Blockhead
Member
Posts: 1685
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Neuromancer wrote:
Sun Apr 30, 2023 17:23
It looks like if you add up all the armor_heal values for each piece of armor you are wearking , that is the percentage chance that hitpoint damage will be reduced to 0 when hit. But since wood armor always has an armor_heal=0 it looks like it won't help you there. A wood chestplate also has armor_groups = {fleshy=10} but can anyone explain how this protects you in game? I just want to understand the tangible benefit that wooden armor gives you.
There are two mechanics at play here, percentage chance to negate all damage and percentage chance to negate damage from a particular damage type.

3D Armor has its own armor_heal mechanic which as you know adds a percentage chance to negate all damage. Armour with this stat is usually quite desirable in case of very large incoming damage.

Minetest as an engine also has its own entity damage mechanic, which affects players and mobs alike. It is on the same percentage scale as armor_heal (ref). When damage is caused by a weapon or some other Lua damage source, and the and entity/player is wearing armour that matches the same damage group, the incoming damage is mitigated x% where x is the armour value associated with that entity's armour, which in case of 3D armour includes all of the pieces of armour that a player is wearing.

So wooden armour provides a flat 10% damage mitigation with no chance of complete mitigation.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

UnknownOutrider
New member
Posts: 9
Joined: Thu Dec 03, 2020 14:04

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

by UnknownOutrider » Post

Blockhead wrote:
Sun Apr 30, 2023 23:34
Neuromancer wrote:
Sun Apr 30, 2023 17:23
It looks like if you add up all the armor_heal values for each piece of armor you are wearking , that is the percentage chance that hitpoint damage will be reduced to 0 when hit. But since wood armor always has an armor_heal=0 it looks like it won't help you there. A wood chestplate also has armor_groups = {fleshy=10} but can anyone explain how this protects you in game? I just want to understand the tangible benefit that wooden armor gives you.
There are two mechanics at play here, percentage chance to negate all damage and percentage chance to negate damage from a particular damage type.

3D Armor has its own armor_heal mechanic which as you know adds a percentage chance to negate all damage. Armour with this stat is usually quite desirable in case of very large incoming damage.

Minetest as an engine also has its own entity damage mechanic, which affects players and mobs alike. It is on the same percentage scale as armor_heal (ref). When damage is caused by a weapon or some other Lua damage source, and the and entity/player is wearing armour that matches the same damage group, the incoming damage is mitigated x% where x is the armour value associated with that entity's armour, which in case of 3D armour includes all of the pieces of armour that a player is wearing.

So wooden armour provides a flat 10% damage mitigation with no chance of complete mitigation.
Thank you for this! I've been trying to understand how the armor numbers worked. This clears up 1 question.

My second question is what does groups = {armor_head=1, do? I've seen in MOAR! ARMOURS! the armor_head, armor_torso, armor_legs, armor_feet, & armor_shield get values different (higher) than 1. Is this also a percentage absorption of damage, or a set number of damage points absorbed?

My third question is what do these do? damage_groups = {cracky=2, snappy=1, choppy=1, level=3},

Thanks for any help!
cdb_84dbdd67d37f

User avatar
Blockhead
Member
Posts: 1685
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

UnknownOutrider wrote:
Thu May 25, 2023 03:46
My second question is what does groups = {armor_head=1, do? I've seen in MOAR! ARMOURS! the armor_head, armor_torso, armor_legs, armor_feet, & armor_shield get values different (higher) than 1. Is this also a percentage absorption of damage, or a set number of damage points absorbed?
These are called "Elements". They refer basically to the body part that you equip the armour to. This is what makes it so you can't equip 6 chestplates or 6 helmets or something at once. You also get a multiplier to the total armour for a complete set made out of the same material, which you don't get if you wear multiples or different kinds. See the docs for more info. on elements

The more interesting question is why they sometimes have numbers >1 - I did some digging. As for why MOAR! ARMOURS! uses them - I can't really explain it. I *think* that the author intends for the groups to mean "this much armour to this part of the body", but that's not how 3D Armor works, or at least I can't find it in the docs. - different elements just add to the same player total.

So I suspected the damage numbers for that particular mod are not as intended. But Technic Armor uses the same groups and I think I've actually used that one on Pandorabox and it works properly there. So I thought "maybe it's a deprecated form of the API?" - I haven't solved that question conclusively but..

Armour has a calculated "level". This calculation is redone for each player each time they equip or remove some armour. The recalculation applies to them at the engine level, but seems to also come up with a flat figure. The armor_<element> (armor_head etc) groups add to this level. This seems to factor into the damage calculation as a flat damage mitigation that reduces damage taken after the normal calculation, so an armour level of 1 would reduce damage to 99% of normal damage. I'm not sure, I haven't spent the time to look into it. Anyway, most people do like to think of armour as just providing one flat resistance, and it does make it easier as a mod author.
UnknownOutrider wrote:
Thu May 25, 2023 03:46
My third question is what do these do? damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
Damage is dealt in groups that match the armour groups. For each group, the number or "level" of the group specified in the damage_groups table is taken, then factored/multiplied against the full_punch_interval (how far the weapon is through its "cooldown" between punches), then the % mitigation from armour groups is applied with another multiplication. The result of each group is taken and added to a total. The reference with the exact formula lives here.

This has two interesting implications:

If your armour doesn't have mitigation against a specific damage type, you'll take 100% of the damage from that type, plus any other damage. This means if you hypothetically had 100% armour against fleshy but an enemy dealt chaos damage or something, the chaos damage would apply 100%. If it were only chaos damage dealt by the enemy and no other types at the same time, that's the same as ignoring armour. I'm not sure how to reconcile this with the idea of damage level - I think if the armour has no heal and no armour_<element> groups then this would be true, but I think the armour applied as a flat armour will reduce all forms of damage.

A weapon that deals a lot of damage in one group is weak against armour that mitigates that group well, and armours that mitigate a variety of damage types are good in general but weaker against certain enemies than armours that deal a lot of one kind of damage but few types. Hypothetically, if a fire elemental deals 80% fire damage 20% fleshy, then fire resistance gear with less fleshy armour is way more useful than normal armour. This kind of 'resistances' gear is common in some RPG games like Diablo, Path of Exile and WoW Classic.

UnknownOutrider wrote:
Thu May 25, 2023 03:46
Thanks for any help!
You're quite welcome. I'm no expert at 3D Armor by the way. This information is definitely already out there, but in some interesting places - inside the minetest Lua API docs and inside the README files of the 3D Armor modpack. When looking for info on a mod, looking for a README in the game files is a good place to start.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

How to I use the API to get the currently equipped armor?

The documentation readme says I should use this code to get the inventory.

Code: Select all

local _, armor_inv = armor:get_valid_player(player, "3d_armor")
But when I’m doing so, armor_inv is nil.

Using the generated APi documentation I find this:

Code: Select all

armor:get_weared_armor_elements (player)
But it also returns nil.

The player variable is a valid player.

Conclusion:

For this code …

Code: Select all

if armor then
    print(dump(minetest.is_player(player)))                             
    local ar = armor:get_weared_armor_elements(player)
    print(dump(ar))
end
… I get this:

Code: Select all

true
2023-07-09 09:45:45: WARNING[Server]: 3d_armor[get_weared_armor]: Detached armor inventory is nil
nil
And for this code, taken from the API documentation readme …

Code: Select all

print(dump(minetest.is_player(player)))
local a,b = armor:get_valid_player(player, "3d_armor")
print(dump(a))
print(dump(b)) 
… I get this …

Code: Select all

true
2023-07-09 09:48:49: WARNING[Server]: 3d_armor3d_armor: Detached armor inventory is nil
nil
nil
The user in question is equipped like this:

2023-07-09-095012_470x381_scrot.png
2023-07-09-095012_470x381_scrot.png (4.68 KiB) Viewed 3568 times

So the armor inventory is clearly not nil.

Mod was installed using Git.

Code: Select all

$ git remote -v
origin	https://github.com/minetest-mods/3d_armor.git (fetch)
origin	https://github.com/minetest-mods/3d_armor.git (push)

$ git rev-parse HEAD
1d8509e75b23331072ec1fd9eef82d595d2a0ae7

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
Any ideas?

User avatar
TenPlus1
Member
Posts: 3722
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

This snippet from 3d_armor gets the player's armor inventory so it can drop each item on death:

https://github.com/minetest-mods/3d_arm ... t.lua#L355

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

TenPlus1 wrote:
Sun Jul 09, 2023 13:37
This snippet from 3d_armor gets the player's armor inventory so it can drop each item on death:
Still nil.

Here’s minimal (not) working example that pretty much resemples what my mod does (hence the “complex”) setup for getting the information and writing it in a global table. In the context of my mod this all makes sense.

Code: Select all

armor_test = {}

local test_for_armor = function ()
    local players = minetest.get_connected_players()
    armor_test.players = {}

    for _,player in pairs(players) do
        local name = player:get_player_name()
        armor_test.players[name] = {}

        if armor then

            -- From the example
            local ex_a,ex_b = armor:get_valid_player(player, "3d_armor")

            -- From the link
            local d_a,d_b = armor:get_valid_player(player, "[on_dieplayer]")

            armor_test.players[name].armor = {
                debug = true,
                ex_a = ex_a,
                ex_b = ex_b,
                d_a = d_a,
                d_b = d_b
            }
        end
    end
end


minetest.register_on_joinplayer(test_for_armor)


minetest.after(3, function ()
    print(dump(armor_test))
end)
When I enable this mod and 3d_armor and then connect to the server with my account, this is the result:

Code: Select all

{
    players = {
        dirk = {
            armor = {
                debug = true
            }
        }
    }
}
So the innermost part of the fors and ifs is entered.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

I did some more testing.

And here’s a fun thing to think about. When I use the posted minimal (not) working example it does not fill the table as expected, buuuuuut: When I wrap the test_for_armor function like so:

Code: Select all

minetest.register_on_joinplayer(function ()
    minetest.after(0, test_for_armor)                                           
end)
… and leaving everything else as it is, the table now gets filled with the expected values.

Code: Select all

{
	players = {
		dirk = {
			armor = {
				d_a = "dirk",
				d_b = userdata: 0x7f075008bfc8,
				ex_a = "dirk",
				ex_b = userdata: 0x7f075008bf08,
				debug = true
			}
		}
	}
}
And I have no idea, why ...

What’s the actual difference between having the function directly in minetest.register_on_joinplayer versus wrapping it in a minetest.after with zero seconds delay?

The Minetest API (and mods using it) surprises me every day :)

User avatar
Mantar
Member
Posts: 590
Joined: Thu Oct 05, 2017 18:46
Contact:

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

by Mantar » Post

As a stab in the dark, I would guess that your on_joinplayer code is getting run before the 3D Armor mod's on_joinplayer that sets all that stuff up. By wrapping it in a minetest.after() you're delaying it until 3D Armor has filled those values. Basically order of mod execution. But that's just a guess.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

Mantar wrote:
Sat Jul 15, 2023 21:31
As a stab in the dark, I would guess that your on_joinplayer code is getting run before the 3D Armor mod's on_joinplayer that sets all that stuff up. By wrapping it in a minetest.after() you're delaying it until 3D Armor has filled those values. Basically order of mod execution. But that's just a guess.
I think that’s the case, yes. Still funny that a 0 seconds delay makes such a difference (so maybe the function as a whole gets executed later). But I can work with this since it is 100% reliable like that.

I did quite a lot of tests with this, and under no circumstances the return value of armor:get_valid_player was nil but always was what I expect it to be. So I don’t think it’s race conditions.

Lord_Narkissos
Member
Posts: 109
Joined: Tue Jun 06, 2023 01:02
In-game: Alexander_Jones
Location: Liverpool, England
Contact:

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

by Lord_Narkissos » Post

Why not add silver armor to 3d armor? It would be silly to have just mithril armor with no silver armor... I mean, with the moreores mod, there should be silver armor. Can you also add mese armor?
I know no one cares, so I just take matters into my own hands....

User avatar
Blockhead
Member
Posts: 1685
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Lord_Narkissos wrote:
Tue Dec 05, 2023 01:07
Why not add silver armor to 3d armor? It would be silly to have just mithril armor with no silver armor... I mean, with the moreores mod, there should be silver armor. Can you also add mese armor?
For silver, lead and technic metals, there is Technic Armor. There is also the Moarmor fork of Armor Addon which contains something called "Mese Hero Armor". I'm not sure what makes it hero(ic?) but it must be made of mese; I haven't tried it though.

Registering armours with the API should be relatively straightforward, the real problem is game balance for the stats of the armour and art assets.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Podo
Member
Posts: 29
Joined: Mon Jul 12, 2021 08:02

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

by Podo » Post

Hello,
Is it possible to connect this mod with the XP_Redo mod? So that armor can only be worn at certain levels.
e.g.: Diamond armor from LVL 5 when you have reached 10000 XP.Hello,
Is it possible to connect this mod with the XP_Redo mod? So that armor can only be worn at certain levels.
e.g.: Diamond armor can only be worn from LVL 5 once you have reached 10,000 XP.
cdb_2049351dc8e7

User avatar
TenPlus1
Member
Posts: 3722
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

You could always try to override armor items and use the on_equip function to check for xp levels beforehand.

https://github.com/minetest-mods/3d_arm ... r/3d_armor

Tbhtysonreal
New member
Posts: 2
Joined: Thu Dec 07, 2023 00:31
In-game: Tbhtysonreal

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

by Tbhtysonreal » Post

how do i put armor into my mod

User avatar
Blockhead
Member
Posts: 1685
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Tbhtysonreal wrote:
Sat Dec 09, 2023 16:55
how do i put armor into my mod
Start with the README, it has a lot of modding documentation.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests