Page 34 of 35

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

Posted: Tue Mar 31, 2020 17:08
by nolombic
davidthecreator wrote:
nolombic wrote:
davidthecreator wrote:Each point of heal gives 1% chance to completely block damage...

Full diamond armor has 60 heal...

So there's 60% chance you'll completely block any kind of damage while wearing full diamond armor.
Further investigation on 5.0.0 and 5.0.1 showed me that damage only starts to show up at a minimum height of 200-250 (diamond).
However I thought this would just decrease the damage dealt or increase the maximum health or something like this.
As it seems that it just gives you a chance to maybe block the dealt damage I would like to reccomend a setting:
  • A toggle to either have the armor block damage with a predefined chance (as in the current system) or a decrease in the damage dealt by the amount of heal (60% for diamond for example) - if this is within the realm of possibility

Armor "level" decreases damage intake... Only if the player is attacked though... Falling, drowning and DPS blocks dosen't count...

But heal does work with any kind of damage...
But then shouldn't fall damage be reduced too?
I get why drowning isn't reduced, but falling?
Shouldn't fall damage be reduced too?

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

Posted: Tue Mar 31, 2020 18:35
by davidthecreator
MineTest handles attack ("punch") and non-attack damage a bit differently...

Basically, damage done by other players and in most cases, damage done by entities is dealt by "punching" the player and when player gets damage from a "punch", player's "fleshy" armor group changes the taken damage value to the same percentage as the value of your "fleshy" armor group, which is 100 by default, so you take 100% of the damage you get from a punch. But wearing armor reduces that percentage, for example, full diamond set has 85 protection levels, so it reduces your fleshy armor group by 85 points to 15 points, so with the armor, you only take 15% of that punch damage...

But falling, drowning and being damaged by blocks does not count as being punched, thus your "fleshy" armor value has no effect on it, thus for the armor to protect from those, damage reduction should be handled in a similar way as "heal"... But of course, for that to happen, the maker of this mod would have to apply some changes to the code...

And the maker of this mod seems to have been gone for a while... So IDK if this will happen...

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

Posted: Tue Mar 31, 2020 19:22
by nolombic
davidthecreator wrote:MineTest handles attack ("punch") and non-attack damage a bit differently...

Basically, damage done by other players and in most cases, damage done by entities is dealt by "punching" the player and when player gets damage from a "punch", player's "fleshy" armor group changes the taken damage value to the same percentage as the value of your "fleshy" armor group, which is 100 by default, so you take 100% of the damage you get from a punch. But wearing armor reduces that percentage, for example, full diamond set has 85 protection levels, so it reduces your fleshy armor group by 85 points to 15 points, so with the armor, you only take 15% of that punch damage...

But falling, drowning and being damaged by blocks does not count as being punched, thus your "fleshy" armor value has no effect on it, thus for the armor to protect from those, damage reduction should be handled in a similar way as "heal"... But of course, for that to happen, the maker of this mod would have to apply some changes to the code...

And the maker of this mod seems to have been gone for a while... So IDK if this will happen...
Ah I see. I was wondering what the "fleshy" value was for.
Now I see why it handles the damage in the way that it does right now.
I still hope that the dev can somehow make it respect fall damage too if the dev even considers making such a change.

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

Posted: Tue Mar 31, 2020 19:58
by Lone_Wolf
If you fall off a cliff in full armor you'd probably take a ton more damage if anything

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

Posted: Fri May 01, 2020 16:41
by Krock
Good news!


Stu seems to be busy, thus 3d_armor hasn't seen any update for a year (not good news). Luckily the unofficial mt-mods team continued the development. This repository has now been moved to an official minetest-mods repository to ease contributions due to the larger team.

Please feel free to report bugs and submit Pull Requests to maintain this mod - and resulting from that - to keep it popular.

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

Posted: Fri May 01, 2020 18:29
by acidzebra
Oh sweet, and the textures look amazing!

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

Posted: Thu Jul 02, 2020 13:37
by Miniontoby
I have translated this mod to dutch myself and if you want the translation plz contact me. :-)

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

Posted: Wed Jul 22, 2020 16:17
by AFCM
Hi every one,
I want to create a mod who need to know if a player is wearing a special part of armor.
Do you know if it's possible ?

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

Posted: Wed Jul 22, 2020 19:03
by Nathan.S
Armor has an equip and unquip callback, you should be able to use those to achieve what you want.

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

Posted: Sat Sep 12, 2020 17:47
by thunderdog1138
Where are the textures for the actual armor stand entities held? The texture folder in the 3d_armor_stand mod only includes textures for the armor slots.

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

Posted: Sat Sep 12, 2020 18:24
by BuckarooBanzay
thunderdog1138 wrote:
Sat Sep 12, 2020 17:47
Where are the textures for the actual armor stand entities held? The texture folder in the 3d_armor_stand mod only includes textures for the armor slots.
They are in the "models" folder: https://github.com/minetest-mods/3d_arm ... and/models

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

Posted: Sat Sep 12, 2020 18:34
by thunderdog1138
BuckarooBanzay wrote:
Sat Sep 12, 2020 18:24
thunderdog1138 wrote:
Sat Sep 12, 2020 17:47
Where are the textures for the actual armor stand entities held? The texture folder in the 3d_armor_stand mod only includes textures for the armor slots.
They are in the "models" folder: https://github.com/minetest-mods/3d_arm ... and/models
Thanks!

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

Posted: Mon Nov 09, 2020 07:14
by sirrobzeroone
Tried track this down myself but no luck, not sure if the armor mod has changed or its just me...probably me

Just trying to access the players equiped inventory armor - I tried the below listed froma reply of Stu's from 2018, at the moment I'm just sending the output to the chat window. however all I get with the below is 6x nothing (I did equip some armour :)):

Code: Select all

local inv = player:get_inventory()
	for i = 1, 6 do
		local stack = inv:get_stack("armor", i)
		minetest.chat_send_all("item "..tostring(stack:get_name()))
	end
As a test of my code I thought i'd try getting the names of the 1st 6 item names from "main" which using the below code works as expected and I get output.

Code: Select all

local inv = player:get_inventory()
	for i = 1, 6 do
		local stack = inv:get_stack("main", i)
		minetest.chat_send_all("item "..tostring(stack:get_name()))
	end
Any help as to whats wrong? Checking over the 3d_armor code it all looks correct and like the armor inv is still called "armor" so im stumped - help much appreciated.

Edit: I found a handy get list command and ran it against inv:get_lists() and no sign of armor in there....either I have some odd conflict or armor has moved or stored somewhere odd in singleplayer?

Code: Select all

2020-11-09 19:00:46: [Server]: thirsty_hydro table: 0x49d7cbd8
2020-11-09 19:00:46: [Server]: main table: 0x49d7be48
2020-11-09 19:00:46: [Server]: craftpreview table: 0x49d7ca78
2020-11-09 19:00:46: [Server]: craft table: 0x49d7c7a0
2020-11-09 19:00:46: [Server]: craftresult table: 0x49d7cb40

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

Posted: Mon Nov 09, 2020 19:15
by BuckarooBanzay
sirrobzeroone wrote:
Mon Nov 09, 2020 07:14
Tried track this down myself but no luck, not sure if the armor mod has changed or its just me...probably me

Just trying to access the players equiped inventory armor - I tried the below listed froma reply of Stu's from 2018, at the moment I'm just sending the output to the chat window. however all I get with the below is 6x nothing (I did equip some armour :)):

Code: Select all

local inv = player:get_inventory()
	for i = 1, 6 do
		local stack = inv:get_stack("armor", i)
		minetest.chat_send_all("item "..tostring(stack:get_name()))
	end
As a test of my code I thought i'd try getting the names of the 1st 6 item names from "main" which using the below code works as expected and I get output.

Code: Select all

local inv = player:get_inventory()
	for i = 1, 6 do
		local stack = inv:get_stack("main", i)
		minetest.chat_send_all("item "..tostring(stack:get_name()))
	end
Any help as to whats wrong? Checking over the 3d_armor code it all looks correct and like the armor inv is still called "armor" so im stumped - help much appreciated.

Edit: I found a handy get list command and ran it against inv:get_lists() and no sign of armor in there....either I have some odd conflict or armor has moved or stored somewhere odd in singleplayer?

Code: Select all

2020-11-09 19:00:46: [Server]: thirsty_hydro table: 0x49d7cbd8
2020-11-09 19:00:46: [Server]: main table: 0x49d7be48
2020-11-09 19:00:46: [Server]: craftpreview table: 0x49d7ca78
2020-11-09 19:00:46: [Server]: craft table: 0x49d7c7a0
2020-11-09 19:00:46: [Server]: craftresult table: 0x49d7cb40
Looks like the 3d_armor inventory is in a detached inventory now and can be accessed with:

Code: Select all

local _, armor_inv = armor:get_valid_player(player, "[modname]")
See: https://github.com/minetest-mods/3d_arm ... i.lua#L599

This isn't documented yet, PR's welcome ;)

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

Posted: Mon Nov 09, 2020 21:16
by sirrobzeroone
Thanks BuckarooBanzay

I'll see if I can add something meaningful to the 3d_armor/README.txt and submit a pull request.

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

Posted: Sun Nov 15, 2020 16:55
by daret
Hi,

is it possible to activate armor damage, so player can loose/break their armor?

Or is there any mod fort this?

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

Posted: Sun Nov 15, 2020 19:16
by Nathan.S
Daret, armor should already take damage, mobs, players, and I think environment damage should all effect the armor. If you're not seeing the armor take damage, make sure that you have damage enabled on the world.

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

Posted: Sun Nov 15, 2020 21:20
by daret
May be I'm missing something.
I tested it with Minetest Game. Installed mods hbarmor+hudbars to see armor bar.

I added mobs + mobs_monster and let attacking me.

I only lost some health, but armor info was intact. No change in the hudbar, no info on armor icon. Level and Heal remains the same.

Damage is enabled and armor_punch_damage is enabled in the setting as well (default).

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

Posted: Mon Nov 16, 2020 08:11
by daret
It looks like there is a local variable "damage" sometimes set to false.
I changed this on line 358 in api.lua and it started to work (just a test, not a solution).

Code: Select all

			if damage == true and tool_capabilities then
				local damage_groups = def.damage_groups or default_groups
				local level = damage_groups.level or 0
				local groupcaps = tool_capabilities.groupcaps or {}
				local uses = 0
				damage = true --original was damage = false

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

Posted: Mon Nov 16, 2020 09:50
by daret
The mob has no groupcaps, so it can not enter the next code and damage stays false.

Like oerkki groupcaps:

Code: Select all

{
	max_drop_level = 1,
	groupcaps = {
		
	},
	damage_groups = {
		fleshy = 4
	},
	full_punch_interval = 1,
	punch_attack_uses = 0
}

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

Posted: Sat Dec 05, 2020 16:02
by debiankaios
How i can register a new armor?

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

Posted: Sat Dec 05, 2020 19:31
by BuckarooBanzay
debiankaios wrote:
Sat Dec 05, 2020 16:02
How i can register a new armor?
With

Code: Select all

armor:register_armor
Some examples:

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

Posted: Sat Dec 05, 2020 20:43
by debiankaios
BuckarooBanzay wrote:
Sat Dec 05, 2020 19:31
debiankaios wrote:
Sat Dec 05, 2020 16:02
How i can register a new armor?
With

Code: Select all

armor:register_armor
Some examples:
It work not:

Code: Select all

armor:register_armor("3d_armor:boots_alien", {
  description = S("Wood Boots"),
  inventory_image = "3d_armor_inv_boots_alien.png",
  armor_groups = {fleshy=5},
  damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
  groups = {armor_feet=1, armor_heal=0, armor_use=2000, flammable=1},
})

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

Posted: Sat Dec 05, 2020 20:51
by debiankaios
BuckarooBanzay wrote:
Sat Dec 05, 2020 19:31
debiankaios wrote:
Sat Dec 05, 2020 16:02
How i can register a new armor?
With

Code: Select all

armor:register_armor
Some examples:
The error:

Code: Select all

ModError: Failed to load and run script from /home/example/.minetest/mods/alien_material/init.lua:
/home/example/.minetest/mods/alien_material/armor.lua:1: attempt to index global 'armor' (a nil value)
stack traceback:
	/home/example/.minetest/mods/alien_material/armor.lua:1: in main chunk
	[C]: in function 'dofile'
	/home/example/.minetest/mods/alien_material/init.lua:10: in main chunk
Siehe debug.txt für Details.

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

Posted: Sat Dec 05, 2020 21:01
by debiankaios
New sourcecode:

Code: Select all

armor:register_armor("alien_material:alienboots", {
	description = S("Alien Boots"),
	inventory_image = "3d_armor_inv_boots_alien.png",
  groups = {armor_feet=1,
		armor_heal=100, armor_fire=4, armor_use=10000,
		physics_jump=2.2, physics_speed=1.25, physics_gravity=0},
	armor_groups = {fleshy=100, radiation=250},
	damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1},
})