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

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

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

by SAMIAMNOT » Post

Thanks guys. Trying to find out what make the Crafting mod crash in my game.
I test mines.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

Minor update: Added support for caped skins

Should be similar to the default model but there may be some slight differences.
Please let me know if there are any problems as I do not actually have a caped skin to test it with :-/

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

stu wrote:Minor update: Added support for caped skins

Should be similar to the default model but there may be some slight differences.
Please let me know if there are any problems as I do not actually have a caped skin to test it with :-/
There seems to be a problem with the model.
I am using minetest 4.10 stable on windows.

Before applying mod:
Image

With mod enabled:
Image
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

Esteban wrote: There seems to be a problem with the model.
I am using minetest 4.10 stable on windows.
Should be fixed now, thanks for reporting it.

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

Thanks.
Is almost accurate to actual cape:
Image
It only shows what is inside the box^
Image
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

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

by SAMIAMNOT » Post

Where do I put the textures? I want to make a texture but don't know where to put them.
I test mines.

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

SAMIAMNOT wrote:Where do I put the textures? I want to make a texture but don't know where to put them.
What textures? The armor textures? The skin? The cape?
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

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

by SAMIAMNOT » Post

Skins/player textures.
I test mines.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

Esteban wrote:Thanks.
Is almost accurate to actual cape:
Ok, I think I got it right this time ;-)
SAMIAMNOT wrote:Where do I put the textures? I want to make a texture but don't know where to put them.
You need to use a 'skins' mod, compatible ones are listed in the first post.

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

stu wrote:
Esteban wrote:Thanks.
Is almost accurate to actual cape:
Ok, I think I got it right this time ;-)
It works now! Thanks!
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
JPRuehmann
Member
Posts: 334
Joined: Fri Mar 21, 2014 21:40
Location: Germany
Contact:

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

by JPRuehmann » Post

stu wrote:
JPRuehmann wrote:Hello
I had this problem a time ago
and changed it by alter the mod and adding a setting for the inventorys
because I have to use inventory+ and modmenu for some mods such as specialties that cannot integrate with unified inventory and using unified inventory as default the Button for 3d_armor is not displayed in unified inventory but only in modmenu.
Is it Possible to change that?
I don´t know so much about github and programming.
but my changes should somewhere in the thread.
Thanks,
JPR

P.S. The Tip with the other u_skins mod has helped.
Officially, this mod supports either inventory_plus OR unified_inventory, otherwise I would be constantly spammed with weird bug reports

However, If you can post your full code changes somewhere like pastebin then I will look them over.
Hello
Here is my old Post including the source for the changed armor.lua and some descriptions.viewtopic.php?f=11&t=4654&p=138695&sid= ... ca#p138695

Here are the sources of my actual changed armor .lua and armor.conf.

Code: Select all

ARMOR_INIT_DELAY = 1
ARMOR_INIT_TIMES = 1
ARMOR_BONES_DELAY = 1
ARMOR_UPDATE_TIME = 1
ARMOR_DROP = minetest.get_modpath("bones") ~= nil
ARMOR_DESTROY = false
ARMOR_LEVEL_MULTIPLIER = 1
ARMOR_HEAL_MULTIPLIER = 1
INVENTORY = "unified_inventory"

local modpath = minetest.get_modpath(ARMOR_MOD_NAME)
local worldpath = minetest.get_worldpath()
local input = io.open(modpath.."/armor.conf", "r")
if input then
	dofile(modpath.."/armor.conf")
	input:close()
	input = nil
end
input = io.open(worldpath.."/armor.conf", "r")
if input then
	dofile(worldpath.."/armor.conf")
	input:close()
	input = nil
end

local time = 0

armor = {
	player_hp = {},
	elements = {"head", "torso", "legs", "feet"},
	physics = {"jump","speed","gravity"},
	formspec = "size[8,8.5]list[detached:player_name_armor;armor;0,1;2,3;]"
		.."image[2,0.75;2,4;armor_preview]"
    	.."list[current_player;main;0,4.5;8,4;]"
    	.."list[current_player;craft;4,1;3,3;]"
    	.."list[current_player;craftpreview;7,2;1,1;]",
	textures = {},
	default_skin = "character",
}

if  INVENTORY == "inventory_plus" then
	armor.formspec = "size[8,8.5]button[0,0;2,0.5;main;Back]"
		.."list[detached:player_name_armor;armor;0,1;2,3;]"
		.."image[2.5,0.75;2,4;armor_preview]"
		.."label[5,1;Level: armor_level]"
		.."label[5,1.5;Heal:  armor_heal]"
		.."list[current_player;main;0,4.5;8,4;]"
elseif    INVENTORY == "unified_inventory" then
	unified_inventory.register_button("armor", {
		type = "image",
		image = "inventory_plus_armor.png",
	})
	unified_inventory.register_page("armor", {
		get_formspec = function(player)
			local name = player:get_player_name()
			local formspec = "background[0.06,0.99;7.92,7.52;3d_armor_ui_form.png]"
				.."label[0,0;Armor]"
				.."list[detached:"..name.."_armor;armor;0,1;2,3;]"
				.."image[2.5,0.75;2,4;"..armor.textures[name].preview.."]"
				.."label[5,1;Level: "..armor.def[name].level.."]"
				.."label[5,1.5;Heal:  "..armor.def[name].heal.."]"
			return {formspec=formspec}
		end,
	})
end

armor.def = {
	state = 0,
	count = 0,
}

armor.update_player_visuals = function(self, player)
	if not player then
		return
	end
	local name = player:get_player_name()
	if self.textures[name] then
		default.player_set_textures(player, {
			self.textures[name].skin,
			self.textures[name].armor,
			self.textures[name].wielditem,
		})
	end
end

armor.set_player_armor = function(self, player)
	if not player then
		return
	end
	local name = player:get_player_name()
	local player_inv = player:get_inventory()
	if not name then
		minetest.log("error", "Failed to read player name")
		return
	elseif not player_inv then
		minetest.log("error", "Failed to read player inventory")
		return
	end
	local armor_texture = "3d_armor_trans.png"
	local armor_level = 0
	local armor_heal = 0
	local state = 0
	local items = 0
	local elements = {}
	local textures = {}
	local physics_o = {speed=1,gravity=1,jump=1}
	local material = {type=nil, count=1}
	local preview = armor:get_player_skin(name).."_preview.png"
	for _,v in ipairs(self.elements) do
		elements[v] = false
	end
	for i=1, 6 do
		local stack = player_inv:get_stack("armor", i)
		local item = stack:get_name()
		if stack:get_count() == 1 then
			local def = stack:get_definition()
			for k, v in pairs(elements) do
				if v == false then
					local level = def.groups["armor_"..k]
					if level then
						local texture = item:gsub("%:", "_")
						table.insert(textures, texture..".png")
						preview = preview.."^"..texture.."_preview.png"
						armor_level = armor_level + level
						state = state + stack:get_wear()
						items = items + 1
						local heal = def.groups["armor_heal"] or 0
						armor_heal = armor_heal + heal
						for kk,vv in ipairs(self.physics) do							
							local o_value = def.groups["physics_"..vv]
							if o_value then
								physics_o[vv] = physics_o[vv] + o_value
							end
						end
						local mat = string.match(item, "%:.+_(.+)$")
						if material.type then
							if material.type == mat then
								material.count = material.count + 1
							end
						else
							material.type = mat
						end
						elements[k] = true
					end
				end
			end
		end
	end
	if minetest.get_modpath("shields") then
		armor_level = armor_level * 0.9
	end
	if material.type and material.count == #self.elements then
		armor_level = armor_level * 1.1
	end
	armor_level = armor_level * ARMOR_LEVEL_MULTIPLIER
	armor_heal = armor_heal * ARMOR_HEAL_MULTIPLIER
	if #textures > 0 then
		armor_texture = table.concat(textures, "^")
	end
	local armor_groups = {fleshy=100}
	if armor_level > 0 then
		armor_groups.level = math.floor(armor_level / 20)
		armor_groups.fleshy = 100 - armor_level
	end
	player:set_armor_groups(armor_groups)
	player:set_physics_override(physics_o)
	self.textures[name].armor = armor_texture
	self.textures[name].preview = preview
	self.def[name].state = state
	self.def[name].count = items
	self.def[name].level = armor_level
	self.def[name].heal = armor_heal
	self.def[name].jump = physics_o.jump
	self.def[name].speed = physics_o.speed
	self.def[name].gravity = physics_o.gravity
	self:update_player_visuals(player)
end

armor.update_armor = function(self, player)
	if not player then
		return
	end
	local name = player:get_player_name()
	local hp = player:get_hp() or 0
	if hp == 0 or hp == self.player_hp[name] then
		return
	end
	if self.player_hp[name] > hp then
		local player_inv = player:get_inventory()
		local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
		if not player_inv then
			minetest.log("error", "Failed to read player inventory")
			return
		elseif not armor_inv then
			minetest.log("error", "Failed to read detached inventory")
			return
		end
		local heal_max = 0
		local state = 0
		local items = 0
		for i=1, 6 do
			local stack = player_inv:get_stack("armor", i)
			if stack:get_count() > 0 then
				local use = stack:get_definition().groups["armor_use"] or 0
				local heal = stack:get_definition().groups["armor_heal"] or 0
				local item = stack:get_name()
				stack:add_wear(use)
				armor_inv:set_stack("armor", i, stack)
				player_inv:set_stack("armor", i, stack)
				state = state + stack:get_wear()
				items = items + 1
				if stack:get_count() == 0 then
					local desc = minetest.registered_items[item].description
					if desc then
						minetest.chat_send_player(name, "Your "..desc.." got destroyed!")
					end
					self:set_player_armor(player)
					armor:update_inventory(player)
				end
				heal_max = heal_max + heal
			end
		end
		self.def[name].state = state
		self.def[name].count = items
		heal_max = heal_max * ARMOR_HEAL_MULTIPLIER
		if heal_max > math.random(100) then
			player:set_hp(self.player_hp[name])
			return
		end
	end
	self.player_hp[name] = hp
end

armor.get_player_skin = function(self, name)
	local skin = nil
	if skins then
		skin = skins.skins[name]
	elseif u_skins then
		skin = u_skins.u_skins[name]
	end
	return skin or armor.default_skin
end

armor.get_armor_formspec = function(self, name)
	local formspec = armor.formspec:gsub("player_name", name)
	formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
	formspec = formspec:gsub("armor_level", armor.def[name].level)
	return formspec:gsub("armor_heal", armor.def[name].heal)
end

armor.update_inventory = function(self, player)
   local name = player:get_player_name()
   if INVENTORY == "unified_inventory" then
      if unified_inventory.current_page[name] == "armor" then
         unified_inventory.set_inventory_formspec(player, "armor")
      end
   else
      local formspec = armor:get_armor_formspec(name)
      if INVENTORY == "inventory_plus" then
         local page = player:get_inventory_formspec()
         if page:find("detached:"..name.."_armor") then
            inventory_plus.set_inventory_formspec(player, formspec)
         end
      else
         player:set_inventory_formspec(formspec)
      end
   end
end

-- Register Player Model

default.player_register_model("3d_armor_character.x", {
	animation_speed = 30,
	textures = {
		armor.default_skin..".png",
		"3d_armor_trans.png",
		"3d_armor_trans.png",
	},
	animations = {
		stand = {x=0, y=79},
		lay = {x=162, y=166},
		walk = {x=168, y=187},
		mine = {x=189, y=198},
		walk_mine = {x=200, y=219},
		sit = {x=81, y=160},
	},
})

-- Register Callbacks

minetest.register_on_player_receive_fields(function(player, formname, fields)
	local name = player:get_player_name()
	if INVENTORY == "inventory_plus" and fields.armor then
		local formspec = armor:get_armor_formspec(name)
		inventory_plus.set_inventory_formspec(player, formspec)
		return
	end
	for field, _ in pairs(fields) do
		if string.find(field, "skins_set_") then
			minetest.after(0, function(player)
				local skin = armor:get_player_skin(name)
				armor.textures[name].skin = skin..".png"
				armor:set_player_armor(player)
			end, player)
		end
	end
end)

minetest.register_on_joinplayer(function(player)
	default.player_set_model(player, "3d_armor_character.x")
	local name = player:get_player_name()
	local player_inv = player:get_inventory()
	local armor_inv = minetest.create_detached_inventory(name.."_armor",{
		on_put = function(inv, listname, index, stack, player)
			player:get_inventory():set_stack(listname, index, stack)
			armor:set_player_armor(player)
			armor:update_inventory(player)
		end,
		on_take = function(inv, listname, index, stack, player)
			player:get_inventory():set_stack(listname, index, nil)
			armor:set_player_armor(player)
			armor:update_inventory(player)
		end,
		on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
			local plaver_inv = player:get_inventory()
			local stack = inv:get_stack(to_list, to_index)
			player_inv:set_stack(to_list, to_index, stack)
			player_inv:set_stack(from_list, from_index, nil)
			armor:set_player_armor(player)
			armor:update_inventory(player)
		end,
		allow_put = function(inv, listname, index, stack, player)
			return 1
		end,
		allow_take = function(inv, listname, index, stack, player)
			return stack:get_count()
		end,
		allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
			return count
		end,
	})
	if INVENTORY == "inventory_plus" then
		inventory_plus.register_button(player,"armor", "Armor")
	end
	armor_inv:set_size("armor", 6)
	player_inv:set_size("armor", 6)
	for i=1, 6 do
		local stack = player_inv:get_stack("armor", i)
		armor_inv:set_stack("armor", i, stack)
	end	

	-- Legacy support, import player's armor from old inventory format
	for _,v in pairs(armor.elements) do
		local list = "armor_"..v
		armor_inv:add_item("armor", player_inv:get_stack(list, 1))
		player_inv:set_stack(list, 1, nil)
	end

	armor.player_hp[name] = 0
	armor.def[name] = {
		state = 0,
		count = 0,
		level = 0,
		heal = 0,
		jump = 1,
		speed = 1,
		gravity = 1,
	}
	armor.textures[name] = {
		skin = armor.default_skin..".png",
		armor = "3d_armor_trans.png",
		wielditem = "3d_armor_trans.png",
		preview = armor.default_skin.."_preview.png",
	}
	if minetest.get_modpath("skins") then
		local skin = skins.skins[name]
		if skin and skins.get_type(skin) == skins.type.MODEL then
			armor.textures[name].skin = skin..".png"
		end
	elseif minetest.get_modpath("simple_skins") then
		local skin = skins.skins[name]
		if skin then
		    armor.textures[name].skin = skin..".png"
		end
	elseif minetest.get_modpath("u_skins") then
		local skin = u_skins.u_skins[name]
		if skin and u_skins.get_type(skin) == u_skins.type.MODEL then
			armor.textures[name].skin = skin..".png"
		end
	end
	if minetest.get_modpath("player_textures") then
		local filename = minetest.get_modpath("player_textures").."/textures/player_"..name
		local f = io.open(filename..".png")
		if f then
			f:close()
			armor.textures[name].skin = "player_"..name..".png"
		end
	end
	for i=1, ARMOR_INIT_TIMES do
		minetest.after(ARMOR_INIT_DELAY * i, function(player)
			armor:set_player_armor(player)
			if inventory_plus == nil and unified_inventory == nil then
				armor:update_inventory(player)
			end
		end, player)
	end
end)

if ARMOR_DROP == true or ARMOR_DESTROY == true then
	minetest.register_on_dieplayer(function(player)
		local name = player:get_player_name()
		local pos = player:getpos()
		if name and pos then
			local drop = {}
			local player_inv = player:get_inventory()
			local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
			for i=1, player_inv:get_size("armor") do
				local stack = armor_inv:get_stack("armor", i)
				if stack:get_count() > 0 then
					table.insert(drop, stack)
					armor_inv:set_stack("armor", i, nil)
					player_inv:set_stack("armor", i, nil)
				end
			end
			armor:set_player_armor(player)
			if unified_inventory then
				unified_inventory.set_inventory_formspec(player, "craft")
			elseif inventory_plus then
				local formspec = inventory_plus.get_formspec(player,"main")
				inventory_plus.set_inventory_formspec(player, formspec)
			else
				armor:update_inventory(player)
			end
			if ARMOR_DESTROY == false then
				if minetest.get_modpath("bones") then
					minetest.after(ARMOR_BONES_DELAY, function()
						pos = vector.round(pos)
						local node = minetest.get_node(pos)
						if node.name == "bones:bones" then
							local meta = minetest.get_meta(pos)
							local owner = meta:get_string("owner")
							local inv = meta:get_inventory()
							if name == owner then
								for _,stack in ipairs(drop) do
									if inv:room_for_item("main", stack) then
										inv:add_item("main", stack)
									end
								end
							end
						end
					end)
				else
					for _,stack in ipairs(drop) do
						local obj = minetest.add_item(pos, stack)
						if obj then
							local x = math.random(1, 5)
							if math.random(1,2) == 1 then
								x = -x
							end
							local z = math.random(1, 5)
							if math.random(1,2) == 1 then
								z = -z
							end
							obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z})
						end
					end
				end
			end
		end
	end)
end

minetest.register_globalstep(function(dtime)
	time = time + dtime
	if time > ARMOR_UPDATE_TIME then
		for _,player in ipairs(minetest.get_connected_players()) do
			armor:update_armor(player)
		end
		time = 0
	end
end)

Code: Select all

-- Armor Configuration (defaults)

-- Increase this if you get initialization glitches when a player first joins.
ARMOR_INIT_DELAY = 1

-- Number of initialization attempts.
-- Use in conjunction with ARMOR_INIT_DELAY if initialization problems persist.
ARMOR_INIT_TIMES = 1

-- Increase this if armor is not getting into bones due to server lag.
ARMOR_BONES_DELAY = 1

-- How often player armor/wield items are updated.
ARMOR_UPDATE_TIME = 1

-- Drop armor when a player dies.
-- Uses bones mod if present, otherwise items are dropped around the player.
ARMOR_DROP = true

-- Pulverise armor when a player dies, overrides ARMOR_DROP.
ARMOR_DESTROY = false

-- You can use this to increase or decrease overall armor effectiveness,
-- eg: ARMOR_LEVEL_MULTIPLIER = 0.5 will reduce armor level by half.
ARMOR_LEVEL_MULTIPLIER = 1

-- You can use this to increase or decrease overall armor healing,
-- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether.
ARMOR_HEAL_MULTIPLIER = 1

-- You can also use this file to execute arbitary lua code
-- eg: Dumb the armor down if using Simple Mobs
if minetest.get_modpath("mobs") then
	ARMOR_LEVEL_MULTIPLIER = 0.5
	ARMOR_HEAL_MULTIPLIER = 0

-- You can use this to change the used Inventory.
-- INVENTORY = "unified_inventory" will use the unified Inventory.
INVENTORY = "unified_inventory"
end
Would be lovely you could ad it.
The Mod then could work with
-unified_inventory or
-inventory_plus or
-unified_inventory & inventory_plus (compatibility mod for modmenu)
Thanks,
JPR

Ryuq
New member
Posts: 1
Joined: Wed Oct 15, 2014 15:45

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

by Ryuq » Post

anyway to make half-transparent parts of armor? i mean, i have diamond armor with blue 40% transparent visor but its completely transparent ingame, or if i change transparency of this part to 60% theres completely no transparency at all ingame...
Anyway to fix it?

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

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

by Achilles » Post

Ryuq wrote:anyway to make half-transparent parts of armor? i mean, i have diamond armor with blue 40% transparent visor but its completely transparent ingame, or if i change transparency of this part to 60% theres completely no transparency at all ingame...
Anyway to fix it?
There is a transparency feature in place for this armor mod? How does it work?
The Ironic Thing About Common Sense Is That It Isn't Very Common

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

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

by Esteban » Post

Achilles wrote:
Ryuq wrote:anyway to make half-transparent parts of armor? i mean, i have diamond armor with blue 40% transparent visor but its completely transparent ingame, or if i change transparency of this part to 60% theres completely no transparency at all ingame...
Anyway to fix it?
There is a transparency feature in place for this armor mod? How does it work?
I dont think there is a semi-transparency feature in this mod by default. To do so, I think you would have to edit the mod and add this parameter (I don't know where exactly) to the textures

Code: Select all

[makealpha:R,G,B 
Source
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

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

by Achilles » Post

Esteban wrote:
Achilles wrote:
Ryuq wrote:anyway to make half-transparent parts of armor? i mean, i have diamond armor with blue 40% transparent visor but its completely transparent ingame, or if i change transparency of this part to 60% theres completely no transparency at all ingame...
Anyway to fix it?
There is a transparency feature in place for this armor mod? How does it work?
I dont think there is a semi-transparency feature in this mod by default. To do so, I think you would have to edit the mod and add this parameter (I don't know where exactly) to the textures

Code: Select all

[makealpha:R,G,B 
Source
Ah OK, may check it out. Thanks
The Ironic Thing About Common Sense Is That It Isn't Very Common

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

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

by gumangel » Post

23:29:42: ERROR[main]: ServerError: ...t\minetest-0.4.10-64bit\bin\..\mods\armor\armor\init.lua:67: attempt to call field 'set_armor_groups' (a nil value)
23:29:42: ERROR[main]: stack traceback:
23:29:42: ERROR[main]: ...t\minetest-0.4.10-64bit\bin\..\mods\armor\armor\init.lua:67: in function <...t\minetest-0.4.10-64bit\bin\..\mods\armor\armor\init.lua:35>
23:29:42: ERROR[main]: ...t\minetest-0.4.10-64bit\bin\..\builtin\game\register.lua:348: in function <...t\minetest-0.4.10-64bit\bin\..\builtin\game\register.lua:336>
im not really sure what i have done...but the mod is not working anymore...

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Post

rename the mod's folder to : 3d_armor (not armor)

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

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

by gumangel » Post

Napiophelios wrote:rename the mod's folder to : 3d_armor (not armor)
12:48:03: ERROR[main]: ServerError: ...inetest-0.4.10-64bit\bin\..\mods\3d_armor\armor\init.lua:67: attempt to call field 'set_armor_groups' (a nil value)
12:48:03: ERROR[main]: stack traceback:
12:48:03: ERROR[main]: ...inetest-0.4.10-64bit\bin\..\mods\3d_armor\armor\init.lua:67: in function <...inetest-0.4.10-64bit\bin\..\mods\3d_armor\armor\init.lua:35>
12:48:03: ERROR[main]: ...t\minetest-0.4.10-64bit\bin\..\builtin\game\register.lua:348: in function <...t\minetest-0.4.10-64bit\bin\..\builtin\game\register.lua:336>
i still get this error....but still thank you!

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

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

by Napiophelios » Post

" armor\3d_armor "

"armor" is the modpack folder it can be named anything,
so long as it has a text file called "modpack.txt" in it.

the folder containing the init.lua needs to be named "3d_armor"

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

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

by gumangel » Post

Napiophelios wrote:" armor\3d_armor "

"armor" is the modpack folder it can be named anything,
so long as it has a text file called "modpack.txt" in it.

the folder containing the init.lua needs to be named "3d_armor"
thank you really much! idk why i had another folder called 3d_armor(beside the pack with shields)and i disbled the one with no shields. but thank you really much! u really helped me! u are an amazing guy! God bless all of u! the comunity is really nice!

dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

I'm trying to modify the blender model to expand options for character shapes and styles (eg adding various shapes of clothing, or changing character to a non-humanoid).
First problem: the blender file doesn't seem to have the UV-texturing correctly stored, and it references .pngs which don't exist in the download (armor.png, sword.png etc) and don't seem to be stored in the blender file.
If I ignore this and export to a .x file, the model is only 68kb vs 380k for original, and when displayed in minetest and viewed with F7 the faces closest to the camera are transparent, so you end up looking at the inside of the model. Nor does it contain any of the animation information (so it's essentially a statue) - which might explain the size. On a positive note, I do seem to be able to add shapes (like the ears/horns on the head/helmet) below...

Would there be any chance of a step-by-step instruction set for exporting the model. I'm using Blender 2.7, don't know what you used originally, happy to use the same version you did if necessary.

NB this is the view from the *back*
Image

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

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

by stu » Post

dgm5555 wrote: Would there be any chance of a step-by-step instruction set for exporting the model. I'm using Blender 2.7, don't know what you used originally, happy to use the same version you did if necessary.
Sorry, I can't help you there, directx export seems to be busted for me too in version 2.69.
I can only suggest you try a an older version but then maybe someone else has the answer.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

dgm5555 wrote: First problem: the blender file doesn't seem to have the UV-texturing correctly stored, and it references .pngs which don't exist in the download (armor.png, sword.png etc) and don't seem to be stored in the blender file.
If I ignore this and export to a .x file, the model is only 68kb vs 380k for original, and when displayed in minetest and viewed with F7 the faces closest to the camera are transparent, so you end up looking at the inside of the model.
I haven't exported to x for a while. But I seem to recall it necessary to flip normals with the export checkboxes. It would explain your textures seeming to be on the inside the model.

SneakySNGamer
Member
Posts: 13
Joined: Mon Jan 26, 2015 00:05

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

by SneakySNGamer » Post

Add support for More Ores!(or are they in the Modpack?)

SneakySNGamer
Member
Posts: 13
Joined: Mon Jan 26, 2015 00:05

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

by SneakySNGamer » Post

Add support for More Ores!(or are they in the Modpack?)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 49 guests