[Mod] Placeable ingots [1.2] [ingots]

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

[Mod] Placeable ingots [1.2] [ingots]

by Skamiz Kazzarch » Wed Nov 28, 2018 14:59

This mod adds the abillity to place ingots in the world and stack them up to 64 per node.
Image
Download 1.1: https://www.dropbox.com/sh/a6ay0xkcdxurkwf/AAAvDpUuERjrEtN5QZ1itPCMa?dl=0
License is LGPL-2.1 for code and CC-BY-SA-4.0 for models/textures.
dependencies: none
optional dependencies: default, moreores

Rightclick to place in the world and increase the stack.
You can take ingots from the stacks by punching with the same type of ingot or an empty hand. Alternatively break the node with a pick to retrieve all of your ingots.
Rotate with a screwdriver for humble wall decorations.

Since adding ingot types is trivialy easy, feel free to make requests on which mods you would like to see supported.

From now on, for those who think size maters, I present:
+ Spoiler


To do:
full compatibility with 'creative' - Done!
compatibility with protection mods - once i figure out how they work
optimize node count - there doesn't seem to be a way to do it without compromising estetics
more detailed textures for big ingots - unless someone wants to make them for me?

Known issues:
wiered lighting in corners - FIXED thanks 'Nathan.S'
copper and bronze textures appear to be switched when compared to the 'default' textures - they are not, I took my color pallete directly from photos of those metals and can only speculate how the 'default' textures were made, seeing that this issue changes from texturepack to texturepack I see no need to conform
if you look realy realy close, you can see that the uv mapping looks a little bit off - that's presumably because I didn't triangulate faces on export, but since I'm not reexporting 64 meshes anytime soon, tough luck
Last edited by Skamiz Kazzarch on Fri Nov 30, 2018 11:33, edited 6 times in total.
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.0] [ingots]

by puzzlecube » Wed Nov 28, 2018 20:39

Ooh neat idea! Makes me want to build a giant vault! Why not consider making it as an API so that ingot blocks for any mods metals could be done easily. In the meantime it would be great to have technic and moreores support. It will register a ton of nodes though.
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.0] [ingots]

by Skamiz Kazzarch » Wed Nov 28, 2018 21:39

It already is kind of an api? I mean, I don't know what is necesary to make my functions accesible to other mods, but if a global table in 'init' containing it is enough, I am set.
As I said, it's trivialy easy. Here is the front end:
Code: Select all
if minetest.registered_items["default:stone"] then
      ingots.register_ingots("default:copper_ingot", "ingot_copper.png")
      ingots.register_ingots("default:tin_ingot", "ingot_tin.png")
      ingots.register_ingots("default:bronze_ingot", "ingot_bronze.png")
      ingots.register_ingots("default:steel_ingot", "ingot_steel.png")
      ingots.register_ingots("default:gold_ingot", "ingot_gold.png")
end

everything else is taken care of. The only other thing you have to wory about is providing the texture.

When I have a bit more time I am going to take a look at sofars' 'Frame' mod. That will hopefully help me reduce the node count.
By the way, can anyone confirm that the download link works correctly? First time I am sharing something trough dropbox.
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.0] [ingots]

by puzzlecube » Thu Nov 29, 2018 00:43

Oops my bad. Thats what I get for skimming over things. I see it now. The download link works too by the way.

Massive edit: upon actually reading the init.lua all the way through I would suggess replacing line 98 with
Code: Select all
if minetest.get_modpath("default") then
     -- register all the ingots
end

That way it will register them no matter what if default is enabled.
Better still would be to add something like this to the beginning of your ingots.register_ingot() function
Code: Select all
if not minetest.registered_items[ingot_item] then
     minetest.log("warning", ingot_item.." is not registered. Skipping ingot registration")
    return
end

That way the mod is compatible with pre default:tin versions of Minetest Game and derivatives that are based on old versions.
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

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

Re: [Mod] Placeable ingots [1.0] [ingots]

by Nathan.S » Thu Nov 29, 2018 02:53

Finally a good use for all the extra ores, and a much more impressive way to store it than just tossing it into chests.

if you add the following code to the node registration it should fix the lighting problem.
Code: Select all
paramtype = 'light',
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.0] [ingots]

by Skamiz Kazzarch » Thu Nov 29, 2018 09:58

Thank you both for your input.Update 1.1 implementets both of your sugestions.
Further it adds support for 'moreores' and I managed to find a more elegant solution to the special case of a 1 ingot stack. Also there are coments now.
edit:
Some digging in in Sofars 'Frame' modturned out that I basicly already do what he did, so that was no help.
The only other avenue of attack I can think of is the useof a color parmtype2, which I realy realy don't want to do. For one, it would mean that all ingots would be sharing the same texture and have an uniform tint to them, which has no nuance, for the other, it just wouldn't work for some ingots like the mixed metal of 'technic'.
Last edited by Skamiz Kazzarch on Thu Nov 29, 2018 10:35, edited 1 time in total.
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Placeable ingots [1.0] [ingots]

by texmex » Thu Nov 29, 2018 10:17

I really like this concept for some reason. I guess it's nice to have more of the items the player owns manifested in-world.

i hope there is a way to sqeeze it down to 64 total

Check out hardware coloring, I believe it should be of help.

The only thing I find to criticize is a way for placing the whole wielded stack at once. Perhaps that can happen on Sneak+Right click?
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.1] [ingots]

by Skamiz Kazzarch » Thu Nov 29, 2018 10:44

ninjad, see the edit to my previous post
Not neccesarily a fan of overloading shift + rightclick with another fuction, but since the curent impementation already makes it imposible to begin placing a new stack aginst a non full stack of the same type I might do it.
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.1] [ingots]

by puzzlecube » Thu Nov 29, 2018 17:43

Personally I think there are times when shift + rightclick being overridden would be a good idea (until we can somehow have an on_middleclick function) Also I've found how you might be able to fix the stacks being taken away in creative mode! Its a bit of a newer way of doing it but its a minor inconvenience when stacks go away in creative anyways. Thank you Hume2 for posting that in the topic for sponges. Try this on for size around init.luaa lines 48 and 51.
Code: Select all
if not (creative and creative.is_enabled_for and creative.is_enabled_for(player_name)) then
   itemstack:take_item()
end

If it were added to line 87 replacing itemstack:take_item() with what is currently line 87 it could also keep the stack from growing more when you take off an ingot in creative mode. At least it seemed to work for sponges.
Also I never thought I would be the one to do this (unitl I learned git) but I am going to be that turd guy who asks why not put it on git? Trust me it's so much better once you've learned how.
Meanwhile I'm gonna go build that vault wandering in my imagination.
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.1] [ingots]

by Skamiz Kazzarch » Thu Nov 29, 2018 18:14

Big ingot version out now. What do you all think? Should I offer them as separate mods or one mod with a configuration option?

I think I made a git acount once upon a time? I never used it and promtly forgot the password, so...
I gues I will take a look into it, but it might take quite a while so don't get your hopes up.
 

User avatar
texmex
Member
 
Posts: 1062
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Placeable ingots [1.1] [ingots]

by texmex » Thu Nov 29, 2018 19:00

Do a password reset and get that Github account going, yes! One mod with configs, yes!
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.1] [ingots]

by puzzlecube » Thu Nov 29, 2018 19:40

I'd say configurable as one mod with the option to have both as well as either big or little. Best of luck figuring out git!
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.2] [ingots]

by Skamiz Kazzarch » Fri Nov 30, 2018 12:01

Version 1.2
-suport for stainless steel and mixed metal of technic
-added compatibility with 'creative'
-merged big ingots variant
-fixed a bug which allowed to overwrite blocks next to full stacks

There is a minor snag with the creative support as it doesn't give you an ingot if you take it form the stack with an empty hand, but it seems like to much effort on something so minor. The main reason why I wanted to support creative is that you can't take more than one item from the creative inventory at a time which is exeedingly annoying when you want to build big impressive piles.

The merge in-to one mod caused the id of the ingot nodes to change, so if you are already using big ingots and want to update, pick them up first!
But from now on they should stay stable.

When I begun on technic support I didn't expect there to be quite so many ingots. I will probably add them gradualy.
Also it opens up a new problem, how do I make all the ingots distingushable? Specificaly all the irons and steels, does carbon steel look any diferedn to 'regular' steel? How do I distingush silver and chromium?
I am aiming at a realistic/rustic style and don't realy want to use the discoloration used in the craftitem texture. If you know your way around pixel graphics and know how to expres the subtle differences in look i would welcome your help.

Do you want me to maintain a changelog, in the style I used in this post, in the first post? Or do you not care for such things?

Puzzlecube, how do you immagine it to work with big and small at the same time? I can't realy see an intuitive way to choose what to place, not to mention that that would be adding yet annother dozens of nodes.
With the current implementaition it would be prety easy to make the choice individual per ingot, if that's something that would interest you.
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.2] [ingots]

by puzzlecube » Fri Nov 30, 2018 22:42

Yeah, you're right about the big and small ingots both being enabled being kind of useless effort. While technically possible it would be adding 70 nodes per metal type instead of 8 or 64, The real problem would come when it comes time to distinguish between rather to place big or small ingots and having them both in the same node would fill up 4096 node registrations really fast. Didn't even think about that massive snag for a small bit of creative convenience.
Secondly as for the difference in coloration between the irons and silver and chromium; wrought iron is just the normal gray and cast iron is a deep kind of gray baby blue, carbon steel has kind of a faded sky blue hue, stainless steel is a very light gray but not quite white gray, chromium appears whiter than silver and stainless steel. SIlver also seems to have slightly decreased contrast. I'll explain more once I have time to sit with GIMP and all of the textures side by side if you wish.
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.2] [ingots]

by Skamiz Kazzarch » Fri Nov 30, 2018 23:35

That would be welcome. My art process until now basicly consisted of copying a few pixels directly from an image of the metal and then pushing them around until I was satisfied with the result. I have a basic idea of what impresion it should make, but to little experience and art knowledge to express it and capture all the nuances.
 

puzzlecube
Member
 
Posts: 15
Joined: Fri Oct 19, 2018 14:49
GitHub: puzzlecube
IRC: puzzlecube
In-game: puzzlecube KluppingOnion

Re: [Mod] Placeable ingots [1.2] [ingots]

by puzzlecube » Sat Dec 01, 2018 17:59

I have put all the irons and steels plus chromium and silver textures together into one labeled pallet for your enlightenment on the extremely subtle differences in texture and apparently my own enlightenment as well. Nothing will be able to tell you the subtle differences in texture better than having them all next to each other unaffected by ingame lighting and shaders. I never even noticed just how close in color wrought iron and stainless steel are and how close chromium and silver are even. I can help with some textures too but I figured I'd share this since it was such an eye opener for me.

Also i think that copy paste tweak method for 100% matching a textures style and scheme is kind of the best way to do it if you can. It stinks when you can't because then you have to tweak and tweak and tweak before you can even get to the tweak phase if you know what I mean. The difficult part is getting the subtle low-res discolorations that happen throughout blocks right. Just takes practice.
Attachments
Metals.png
Side by side comparison pallet of metals labeled above and below for the top and bottom rows respectively.
(4.71 KiB) Not downloaded yet
Would you believe this came from an autistic guy with low vision? Believe it.
Check this out![url]https:github.com/puzzlecube[/url]
I also make models for 3d printing!
 

Xudo
Member
 
Posts: 122
Joined: Wed Nov 09, 2016 16:43
GitHub: akryukov92
In-game: Xudo

Re: [Mod] Placeable ingots [1.2] [ingots]

by Xudo » Sat Dec 01, 2018 18:16

Maybe you should label ingots somehow? Different type of metal with different labels.
Look how gold bars are usually labelled IRL.
+ "gold bar from wikipedia"
 

Skamiz Kazzarch
Member
 
Posts: 29
Joined: Fri Mar 09, 2018 20:34
Location: la lojbaugag.
In-game: Skamiz

Re: [Mod] Placeable ingots [1.2] [ingots]

by Skamiz Kazzarch » Sun Dec 02, 2018 10:37

Aaand you missed my point. I specificaly don't want to use the colors used by 'technic' because I think that they aren't realistic.
The problem I have is that when i search for these materials most results are finished products which have thier surface treated in various ways or straight up painted over. And when I specificaly search for a 'texture', most results are hand made or computer generated. And then, when I find something, which looks like a good reference, I have to wory whether what I found is actualy the material I searched for or if the picture is misslabeled, which is hard to tell as I myself don't know yet the difference.
My point being: Never have I ever seen cast iron so blue as it is depicted in 'technic', so I'm not going to put much stock in the acuracy of thier other textures.
Mind you, there are some textures which seem genuine and usefull. But they are mostly gray and the low resolution of the texture doesn't allow me to easily capture the details which distingush them, so I will have to fiddle around a bit, which may take a while.

Xodo: I was considering putting labels on them, but, on the small ingot at least, there isn't enough space to write anything meanigfull. I am thinking of just putting distinct patern on them.
 

User avatar
Lord_Vlad
Member
 
Posts: 112
Joined: Thu Jul 20, 2017 07:58

Re: [Mod] Placeable ingots [1.2] [ingots]

by Lord_Vlad » Sun Dec 02, 2018 19:31

If that can help, I worked in metals before. I'm fairly used to see real life aluminum, iron, stainless steel, copper and some surface treatment called 'galvanisation' in french.

Like actually iron has a black carbon-like layer on top when you buy it from the high furnace factory.

Anyways, I could be a pretty good judge of the texture for these metals.

Also a suggestion. xtraores has a few ingots, maybe worth a look.
 

sirrobzeroone
Member
 
Posts: 24
Joined: Mon Jul 16, 2018 07:56

Re: [Mod] Placeable ingots [1.2] [ingots]

by sirrobzeroone » Mon Dec 03, 2018 11:28

I really like the mod and I feel your pain on the metal texture coloring selection

I'm working on some textures and had to rebase the metal palettes so not sure if it's useful but heres my metals palette attached. If its useful feel free to use or not, they are very linear palettes, just trying to be a little helpful I mean no offense and I based them on polished metals so they may not be helpful.

Image

G = Gold
S = Silver
C = Copper
T = Tin
B = Bronze
E = Steel
M = Mithril
A = Adamantine
I = Iron (Rusty)
Attachments
Metal palette.png
(841 Bytes) Not downloaded yet
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 5 guests