[Mod] 3D Armor Painted Banners [painted_3d_armor]

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

[Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Wed Jul 26, 2017 10:16

YES YES YES!!! After hours and hours of trying to figure it out, I was successful!!! Wassup Beer you might ask! Well, it is a super hacky mod that glues together the old and super hacky painting mod and the banners mod with the 3d_armor modpack (3d_armor and shields). It basically puts the painting or banner you created with the painting mod/ banners mod on top of your armor and shield!!

Download: https://github.com/evrooije/painted_3d_ ... master.zip
Source: https://github.com/evrooije/painted_3d_armor
Depends: default, 3d_armor, shields?, painting?, banners?

To install, see the GitHub page for detailed instructions, but basically make sure you install both stu's 3d_armor (https://github.com/stujones11/minetest-3d_armor, viewtopic.php?f=11&t=4654) and then this copy of the painting mod that I have which offers a painting API (https://github.com/evrooije/painting, originally from viewtopic.php?f=11&t=2588 but do not use the download there), DoctorFool's banners mod (https://github.com/shamoanjac/banners-mod, viewtopic.php?f=9&t=15305) or both of them if you want to support both paintings and banners.

If you use Minetest 0.5 and want to use painting, then you can download my version of the painting mode from master: https://github.com/evrooije/painting. If however you are using Minetest 0.4.x, you have to use the 0.4 branch of this repository, i.e. https://github.com/evrooije/painting/tree/0.4 or https://github.com/evrooije/painting/archive/0.4.zip or clone the repository and do "git checkout 0.4" to switch to the 0.4 branch.

How to use? For painting, place the special Armor Canvas (a 6x6 canvas that fits on the armor textures) on the easel from the painting mod and use the different color brushes to make your painting:

Image

Dig the painting, put it in the (last remaining XD) armor slot:

Image

Et voila!!! XD The painting is now on BOTH the chest plate AND the shield:

Image

To place a banner from the banners mod on your armor, craft a wooden banner and from that craft a special armor banner sheet made out of paper in a shield shape and the wooden banner in the middle. The item looks like a banner sheet but called "Armor Banner"

Image

Left click (punch) in the air to start creating the banner as per usual with the banners mod

Image

Double click outside the banner creation window and place the resulting armor banner in an armor slot

Image
Image
Attachments
screenshot_20170726_195949.png
(448.22 KiB) Not downloaded yet
screenshot_20170726_195726.png
(392.74 KiB) Not downloaded yet
screenshot_20170726_112027.png
(380.69 KiB) Not downloaded yet
Last edited by Beerholder on Thu Aug 30, 2018 14:31, edited 4 times in total.
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384
 

User avatar
duane
Member
 
Posts: 1274
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by duane » Wed Jul 26, 2017 13:19

I like that interface.
Believe in people and you don't need to believe anything else.
 

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore
 

User avatar
maikerumine
Member
 
Posts: 1345
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Wed Jul 26, 2017 13:59

the_raven_262 wrote:This + Banners mod

FYI I wanted to initially base it on this exact banners mod actually, but ran into several problems... One is that afaik I cannot fit those banners on the player skin (there is only limited space :((( and probably it won't be nice to scale those banner images down. The other problem is that the Banners mod only supplies a predefined set of images that you can overlay.

If the banners mod would also leverage painting somehow, one would both have endless possibilities as far as banners are concerned and the possibility to place painted canvases on both the armor and the banner. I might actually have a look into that and see what is possible, maybe make a (configurable) bridge to that mod as well as part of this mod or make a separate one that glues everything together ...

But there's definitely more that will be done with this! :D

I fixed most issues right now and ready for first beta release so people can start trying it out. But need some coffee first, so it might be up on the GitHub in an hour or two, or somewhere in the evening CET time at the latest! :)
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Wed Jul 26, 2017 16:08

UPDATE: Download link and link to source code added. Detailed instructions can be found in the README.md and of course the source code ;)

Let me know in case of issues! I will install this on the Beerarchy server but really hope some more people can give this a good spin to flush out any problems. Thanks!
 

User avatar
Lone_Wolf
Member
 
Posts: 1984
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Wed Jul 26, 2017 18:53

Lol @Lone_Wolf XD Thanks all for the kind positive feedback! :D It's not the most polished solution though but should at least work! O_o

Minor update as well: You can now configure whether to show the banner on the player skin when not wearing a chest plate, or only show the banner when wearing a chest plate by setting overlayOnSkin to true or false in init.lua. In the repo it is set to true so if you absolutely do not want this, then you can change it in the code.
 

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

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by stu » Wed Jul 26, 2017 18:55

+1 Brilliant idea, also nice use of the new armor api :)
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Wed Jul 26, 2017 19:59

stu wrote:+1 Brilliant idea, also nice use of the new armor api :)

Thanks for the API and those events I could hook into stu! Powerful stuff XD
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by ThomasMonroe » Wed Jul 26, 2017 20:04

looks very cool and interesting Beerholder, this might show up in MM-Survival one day, you never know! XD
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
Lone_Wolf
Member
 
Posts: 1984
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Lone_Wolf » Wed Jul 26, 2017 20:23

Might wanna try redoing the screenshots without any filters on. It would look nicer then IMO
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Thu Jul 27, 2017 09:57

UPDATE: I was not sure if I could make this work, but I actually managed to add 12x12 and 24x24 banners!! This will allow for more detailed paintings on the armor than the blocky 6x6. This could also possibly be the solution to make this work with the Banners mod .......!!! (keep your fingers crossed!! XD)

Example of a 12x12 painting on my admin armor:

Image

In case you are interested, I was able to make this work by adding a ^[resize texture modifier before adding the banner image to the player skin. Effectively if you use the 12x12 the player skin is scaled by a factor of 2 on the fly before the banner is added. Using the 24x24, the skin is scaled by a factor of 4. Very hacky, but hey it works XD

Also on another note, you may have higher resolution textures for your 3D armor. That is why I added two new locals at the top of the init.lua for the armor texture size (standard size 64x32) and the armor preview (32x64). So if you have high res armor textures, just change these two variables to the appropriate texture sizes. If you mix low res and high res armor textures, this will not work properly however (and no intention to fix that, sorry). I have not tested this though, so in case of issues let me know!

Since there are now these higher resolution canvases, you may want to consider removing the 16x16, 32x32 and 64x64 painting canvases from the painting mod, since you might as well use the canvases supplied by this mod for both armor and normal paintings as well. To add a 48x48 canvas, you can copy the craft item and recipe code and register it with the painting mod.

Code pushed to GitHub, and in case you already installed the mod, just download the latest master zip or do a git pull, this version is compatible with the previous one.
Attachments
screenshot_20170727_113006.png
(501.83 KiB) Not downloaded yet
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Sat Jul 29, 2017 00:01

the_raven_262 wrote:This + Banners mod

Integration with [Mod] Banners Mod [1.0] [banners] !?!? Here you go!!!! XD But don't ask me how, this was terrible, again hours of work O_o Anyways the code is not stable yet, the texture keeps disappearing for some reason -_- so need to debug that before I unleash the beast... Once done I will push the update. Other things of note re. the version on my machine: painting mod and banners mod are optional now, both can be installed or just one of the two. Hope to have the new version online tomorrow!

Image
Attachments
screenshot_20170729_015250.png
(183.96 KiB) Not downloaded yet
 

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Sat Jul 29, 2017 10:08

the_raven_262 wrote:Dude thats epic! :D

Glad you like it! :D And I just pushed to code to GitHub so just git pull or download the zip (same link as before) to get the goodies.

Instructions:
  • Craft a wooden banner
  • Craft a special armor banner sheet made out of paper in a shield shape and the wooden banner in the middle. The item looks like a banner sheet but called "Armor Banner"
  • Left click (punch) in the air to start creating the banner as per usual with the banners mod
  • Double click outside the banner creation window and place the resulting armor banner in an armor slot

Image
Image
Image

Unfortunately it is not possible to place one of the banners from the banners mod (wooden banner, steel banner) straight into the armor slot since these two are registered as nodes and the armor *must* be either a tool or a craft item. If it is a node, then when you are punched by a mob the game crashes. Also, anything that was created with the wooden banner will not be transferred to the armor banner when you make a craft out of it. I might tweak this later e.g. replacing the banner node with a craft item on the fly when putting the banner in your armor slot and getting the node's metadata and putting it in the item on equip but so far I was not successful.

Of more importance though is that it seems that the painted armor disappears when switching wielded items, which might be related to the visible wielded item mod. This I most definitely need to fix straight away. Hope I can figure something out without touching the other mods (3d_armor, wieldview) though ....... But if I do have to change those, I will try to make it generic and ask stu to add this to his mod.

Scrap that, I did an override and pushed that to GitHub now as well, so this issue seems to be fixed. I still would like this to be fixed properly, so will wait and see what stu has to say :)

In any case, most likely still more changes to come later, but if you want to give this new version a spin already, have fun and let me know in case of any other issues!
Attachments
screenshot_20170729_114357.png
(210.14 KiB) Not downloaded yet
screenshot_20170729_114339.png
(203.83 KiB) Not downloaded yet
screenshot_20170729_114201.png
(161.69 KiB) Not downloaded yet
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
Stix
Member
 
Posts: 1304
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: nil
In-game: Stix [+alts]

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Stix » Fri Aug 04, 2017 22:12

OMG OMG this is insane :D
Hey, what can i say? I'm the bad guy.
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

User avatar
Diamond knight
Member
 
Posts: 442
Joined: Sun Apr 19, 2015 19:50
Location: stalker...
GitHub: Diamondknight
In-game: Ferrumprinceps

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Diamond knight » Fri Aug 24, 2018 01:19

This mod is underrated, I may use it in the future in my planned age of empires semianarchy server.
The IMPERIVM FERRVM shall once more blossom!
viewtopic.php?f=3&t=20851

My modding team:
https://github.com/Ferrumian-modding-team
https://discord.gg/FDjC2ah
 

User avatar
Isja Krass
Member
 
Posts: 25
Joined: Sat Aug 18, 2018 19:30
Location: Bavaria, Germany
In-game: isjakrass
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Mon Aug 27, 2018 05:19

Once I am back, this weekend, I will check compatibility with the latest versions of MT (0.4.17x and 0.5) as well as latest versions of 3d_armor, shields and MT game. I will also look into removing some of the code overriding 3d_armor, as it keeps me from moving this to mod releases.
 

User avatar
Beerholder
Member
 
Posts: 198
Joined: Wed Aug 03, 2016 20:23
GitHub: evrooije
In-game: Beerholder

Re: [Mod] 3D Armor Painted Banners [painted_3d_armor]

by Beerholder » Thu Aug 30, 2018 14:24

Hi all,

So I tested this and ran into various issues. First of all, seems I have a completely different painting mod from the one that is (currently) published in minetest-mods ..... The one I had offered a way to register canvases via a painting object API.

I cannot remember how or what I did to get this version ... But it needs this one with that has this API. So what I have done is to upload this version with the API that I have locally to Github: https://github.com/evrooije/painting

Another issue was the painting mod checking for the eye level:

Code: Select all
      --get player eye level
      --see player.h line 129
      local ppos = puncher:getpos()
      ppos.y = ppos.y + 1.625


Due to the 1 node player model offset in MT 0.5, this needed to be changed to (obviously):

Code: Select all
      --get player eye level
      --see player.h line 129
      local ppos = puncher:getpos()
      ppos.y = ppos.y + 2.625


In this copy of the painting mod on Github I have a version for 0.5 at master and a 0.4 branch in case you use 0.4.x, so you need to get the correct version of the mod.

In addition, the armor preview did not work with the latest 3d_armor. After some digging and trying out a couple of things, I was able to fix this. I also no longer need to override one of the wieldview mod's functions as stu had made a fix for this quite a while ago IIRC. I will update the first post with new instructions on how to get this to work with a link to my version of the painting mod!

This update was long overdue, seems 3d_armor is already at version 0.4.12 (while I was still at 0.4.8 compatibility).
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 3 guests