[Mod] Batmod [batmod]

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

[Mod] Batmod [batmod]

by Don » Post

Batmod by Batman

This is a large mod pack that adds many blocks and tools to the game. I am learning how to make mods and this is the project that I made for learning. It is installed on a couple servers and I have been asked by many to release it on the forums so here it is. Feel free to comment on the code and how it can be improved. Any help to better my code skills will be appreciated.

The mod was tested on Minetest 0.4.10. The doors and tools may not work on previous versions.

If you are using mesecons, mesecons_compatability/depends.txt will need "bat_blocks?" added to it. This is to make bat_blocks load before mesecons so it will work right.

Batmod
  • Spoiler
    • Black with Bat
    • Bat Block
    • Bat Bounce
    • Bat No Bounce
    • Bat Brick
    • Bat Brick Small
    • Bat Checker
    • Bat Checker Small
    • Bat Checker White
    • Bat Checker White Small
    • Checker Plate
    • Checker Plate Block
    • Diagonal
    • Pavers
    • Tile
    • Bat X
    Image
    Image
  • Spoiler
    • Black Cobble
    • White Cobble
    • Tan Cobble
    • Black Cobble/Bat Brick Corner
    • Black Cobble/Tan Cobble Corner
    Image
Spoiler
  • Tan
  • Black
  • Blue
  • Green
  • Orange
  • Red
  • White
  • Yellow
Image
Solid colors are in textures/solid_colors. I you want solid then copy and paste them into textures folder.
Image
Spoiler
  • Tan
  • Black
  • Blue
  • Green
  • Orange
  • Red
  • White
  • Yellow
Image
Spoiler
  • Bat Glass
  • Bat Glass Mesh
  • Black
  • White
  • Yellow
  • Framed Black
  • Framed White
  • Framed Yellow
  • Framed Bat
  • Glass Pane
Image
Spoiler
  • 3d Black Ladder
  • Bat Ladder
  • Bat Rope
  • Bat Rope Box
Image
Spoiler
  • Walkable Lava
  • Non Walkable Lava
    Bat Lava is just blocks that look like Lava. They will not hurt you.
Image
Spoiler
  • Lantern
  • Lantern Small
  • Bat Light
  • Sewer Light
  • Lamp Post
  • Traffic Light - Lights change like real Traffic lights
  • Light Cube Blue
  • Light Cube Green
  • Light Cube Orange
  • Light Cube Red
  • Light Cube White
  • Light Cube Yellow
Image
Image
Spoiler
  • Hoe
  • Axe
  • Pick
  • Shovel
  • Sword
  • Bat_tle Axe
Image
Depends
default
Download
Download - batmod-master.zip - for 0.4.13-dev and above
Download - - for 0.4.13 and below
Github - [url=https://github.com/DonBatman/batmod.git]Code - batmod


Mesecons fork that works with batmod - mesecons fork

Licence = DWYWPL

Tested on Minetest 0.4.10
Last edited by Don on Wed Mar 23, 2016 21:48, edited 15 times in total.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Batmod

by Wuzzy » Post

This mod pack seems to be very nice for creativity purposes. Could be great to create dark/neon-like places.

And this mod pack seems to be pretty polished to me. There are just a few issues.

First of all, your post should list all dependencies of all mods together, also optional ones.

The fences could use a better inventory image. Compare it to the default fence’s inventory image.
Also, shading for fences does not work at all for me:
https://i.imgur.com/SIAUE4T.png

Oddly, the normal colored blocks are shaded. I have shaders disabled in the options, but as far I know this does not disable shading entirely, flat shading is still used theoretically. I am not sure if the fence problem is your fault or Minetest’s fault.


The glass blocks really could use a sound. The default mod has a glass sound, check it out.

There is a bug!
The trapdoor can’t be opened. These error messages appear in console:
17:06:34: ERROR[ServerThread]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "bat_blocks:bat_trapdoor" at (391,33,-125) (block (24,2,-8))
17:06:34: ERROR[main]: Map::setNode(): Not allowing to place CONTENT_IGNORE while trying to replace "bat_blocks:bat_trapdoor" at (391,33,-125) (block (24,2,-8))


Lastly, I have a few ideas: Some kind of “bat-signal” as in Batman comics. Or simply a light source with some bat pattern. Like on those doors.
A simple bat “emblem” as item which can be placed at walls would be nice to decorate walls.



I upload a copy of batmod.zip here as attachment for those who have problems with the Dropbox website.
Attachments
batmod.zip
(73.08 KiB) Downloaded 310 times

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

Edit: I added my edit in bold. My download has been updated.
Thank you for your comments.
I will list dependencies very soon. Sorry for not doing that. - default only dependency. OP updated
I see what you are saying about the fence shaders. I will look into that. - The shaders works for me. Not sure why it doesn't for you. I turned off shaders but it still worked
I will check all blocks and make sure they have sound. - set sounds to default
I will see what is wrong with the trap door. - fixed trap door. punch to open and close

I like the idea of the bat signal. I will think about that once I have the issues corrected with the mod.

Again I really appreciate your comments. This is a great help.

EDIT: I have set up a github account so now it should be no problem for people to download. Thanks for adding the download link.
Last edited by Don on Mon Oct 13, 2014 21:24, edited 1 time in total.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Batmod

by Krock » Post

I would like to see more noise in those textures.
Right now, they look like 16-color images.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

Krock wrote:I would like to see more noise in those textures.
Right now, they look like 16-color images.
Is there a reason for noise? There are lots of mods with noise in the textures. I was going for something different. If there is a good reason for adding noise then I will do it. Please let me know if theres a reason or if this is just your preference.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: Batmod

by Esteban » Post

Don wrote:
Krock wrote:I would like to see more noise in those textures.
Right now, they look like 16-color images.
Is there a reason for noise? There are lots of mods with noise in the textures. I was going for something different. If there is a good reason for adding noise then I will do it. Please let me know if theres a reason or if this is just your preference.
The textures of your mood look nice, but noise gives the textures more depth and fit better with the default textures. Anyways, your mod is awesome! Do you have plans to make more stuff from the batman series? Like blocks from the villains or Bat armor.
Scan avatar or click here to read a Message of Hope (PDF)

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

Esteban wrote:
Don wrote:
Krock wrote:I would like to see more noise in those textures.
Right now, they look like 16-color images.
Is there a reason for noise? There are lots of mods with noise in the textures. I was going for something different. If there is a good reason for adding noise then I will do it. Please let me know if theres a reason or if this is just your preference.
The textures of your mood look nice, but noise gives the textures more depth and fit better with the default textures. Anyways, your mod is awesome! Do you have plans to make more stuff from the batman series? Like blocks from the villains or Bat armor.
I will update the textures. Only because you asked. Should be done by tomorrow.

I have a number of things on the go. You can see some of the stuff on minetestville server. Bat armor, bat chests and a few other goodies. I hope to make this into a bat everything mod. Just need more play time and more studying lua.

If anyone has suggestions please feel free to leave a comment. I also except constructive critisism.

Edit
Added noise to solid colors. This will effect the colored blocks and fence.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Batmod

by Inocudom » Post

The white powder can't be dug up by any means.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

Inocudom wrote:The white powder can't be dug up by any means.
Sorry about that. I changed white powder from a node to a craft item.
Thanks for letting me know
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: Batmod

by JPRuehmann » Post

Hello
If I try to load the modpack I get the following errror.

Code: Select all

17:32:36: ERROR[main]: ========== ERROR FROM LUA ===========
17:32:36: ERROR[main]: Failed to load and run script from 
17:32:36: ERROR[main]: /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua:
17:32:36: ERROR[main]: .../.minetest/mods/mesecons/mesecons_compatibility/init.lua:20: attempt to index local 'def' (a nil value)
17:32:36: ERROR[main]: ======= END OF ERROR FROM LUA ========
17:32:36: ERROR[main]: Server: Failed to load and run /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua
17:32:36: ERROR[main]: ERROR: An unhandled exception occurred: ModError: Failed to load and run /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua
How can I make it work?
Thanks,
JPR

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

JPRuehmann wrote:Hello
If I try to load the modpack I get the following errror.

Code: Select all

17:32:36: ERROR[main]: ========== ERROR FROM LUA ===========
17:32:36: ERROR[main]: Failed to load and run script from 
17:32:36: ERROR[main]: /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua:
17:32:36: ERROR[main]: .../.minetest/mods/mesecons/mesecons_compatibility/init.lua:20: attempt to index local 'def' (a nil value)
17:32:36: ERROR[main]: ======= END OF ERROR FROM LUA ========
17:32:36: ERROR[main]: Server: Failed to load and run /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua
17:32:36: ERROR[main]: ERROR: An unhandled exception occurred: ModError: Failed to load and run /home/minetest/.minetest/mods/batmod/bat_blocks/init.lua
How can I make it work?
Thanks,
JPR
What version of mintest are you using? The mode may not work on anything under 0.4.10. If you can not upgrade then go into batmod/bat_blocks and edit the init.lua file. Either comment out the do file for doors or delete the line.

Code: Select all

dofile(minetest.get_modpath("bat_blocks").."/doors.lua")
To comment out the line just put -- in front of it.

Code: Select all

--dofile(minetest.get_modpath("bat_blocks").."/doors.lua")
As for you mesecons_compatibility, I had the same issue so I removed that folder from the mesecons modpack.

Hope this helps.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: Batmod

by JPRuehmann » Post

Hello
I am using 0.4.10 newest git Build.
I do not think it is a good idea to change other mods to circumvent problems, because of possible sideeffects to othe mods.
I will try to comment out the Line in your mod but then the function will not work anymore right?
so I hope a future version will fix it.
Thanks,
JPR

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

JPRuehmann wrote:Hello
I am using 0.4.10 newest git Build.
I do not think it is a good idea to change other mods to circumvent problems, because of possible sideeffects to othe mods.
I will try to comment out the Line in your mod but then the function will not work anymore right?
so I hope a future version will fix it.
Thanks,
JPR
Sorry. I jumped the gun on my reply. The mesecons compatability isn't working because bat blocks needs added to the depends file of mesecons.
in mesecons_compatabilty folder open the depends.txt file and add bat_blocks? line to it. bat_blocks needs to be loaded before mesecons. I do not know of a way to get batmod to load before mesecons besides editing the mesecons depends.txt. If anyone knows of a different way please let me know.
The mesecons_compatability/depends.txt should look like this. please include the ? because it will allow you to run mesecons without bat_blocks.

Code: Select all

mesecons
doors
bat_blocks?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: Batmod

by JPRuehmann » Post

Hello
That´s fine but you should contact the Developers of mesecons so that thay ad your mod to theyr depends.txt.
By the Way what´s with te secondary outcommented entry in the init.lua of bat_blocks?
Thanks,
JPR

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

JPRuehmann wrote:Hello
That´s fine but you should contact the Developers of mesecons so that thay ad your mod to theyr depends.txt.
By the Way what´s with te secondary outcommented entry in the init.lua of bat_blocks?
Thanks,
JPR
I commented out the cobble extras. They are included so you can uncomment them. I left it commented out because it adds a bunch of blocks that most would not use. It would be great if you give them a try and give your opinion.

As for mesecons. I am going to see if it can be added. Also I am hoping that preloads.txt gets approved so I can add it to my mod. Preload.txt is the opposite of depends. That way mod developers do no have to get other developers to do anything.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: Batmod

by JPRuehmann » Post

Thanks
Looks Cool.
Only the Bat white Powder is only puttable but can´t be taken back.
how can I take it?
thanks,
JPR

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Batmod

by Don » Post

JPRuehmann wrote:Thanks
Looks Cool.
Only the Bat white Powder is only puttable but can´t be taken back.
how can I take it?
thanks,
JPR
Sorry about that. I had fixed the wrong file. The white powder is now a craft item instead of a node. Please update.

Also I have added the Ultimate Bat Tool. It is not in the inventory. You will need to use /giveme.
I set up easy aliases
ubt = admin tool that deletes the blocks. Nothing goes to inventory.
ubtd = admin tool that adds the blocks to inventory

/giveme ubt
/giveme ubtd
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [mod]Batmod[batmod]

by Inocudom » Post

I got the following error:

Code: Select all

13:23:53: ERROR[main]: ========== ERROR FROM LUA ===========
13:23:53: ERROR[main]: Failed to load and run script from 
13:23:53: ERROR[main]: /home/derek/.freeminer/mods/batmod-master/bat_blocks/init.lua:
13:23:53: ERROR[main]: ...test-mod-mesecons-master/mesecons_compatibility/init.lua:20: attempt to index local 'def' (a nil value)
13:23:53: ERROR[main]: stack traceback:
13:23:53: ERROR[main]: 	...test-mod-mesecons-master/mesecons_compatibility/init.lua:20: in function 'register_door'
13:23:53: ERROR[main]: 	...derek/.freeminer/mods/batmod-master/bat_blocks/doors.lua:9: in main chunk
13:23:53: ERROR[main]: 	[C]: in function 'dofile'
13:23:53: ERROR[main]: 	.../derek/.freeminer/mods/batmod-master/bat_blocks/init.lua:11: in main chunk
13:23:53: ERROR[main]: ======= END OF ERROR FROM LUA ========
13:23:53: ERROR[main]: Server: Failed to load and run /home/derek/.freeminer/mods/batmod-master/bat_blocks/init.lua
13:23:53: ERROR[main]: ModError: ModError: Failed to load and run /home/derek/.freeminer/mods/batmod-master/bat_blocks/init.lua

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [mod]Batmod[batmod]

by Don » Post

Need to add bat_blocks? To the depends.text of mesecon_compatibility mod.
Include the ? Like this

bat_blocks?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [mod]Batmod[batmod]

by Hybrid Dog » Post

Don wrote:Need to add bat_blocks? To the depends.text of mesecon_compatibility mod.
Include the ? Like this

bat_blocks?
Would adding "mesecons_compatibility!" to the bat_blocks' depends.txt work too?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [mod]Batmod[batmod]

by Don » Post

No it won't. The depends.txt tells minetest what mods must load before that mod. Bat_blocks must load before mesecons_compatibility.

There has been talk about a preload.txt being added to minetest but has not happened yet. I have left a message with the mesecons developers asking if they will add bat_blocks? to their depends.txt. I will let people know if that happens.

EDIT: I forked the mesecons mod and added bat_blocks to the depends.txt. Nothing else has changed in the mesecons mod. A download link has been added to the first post and I am adding a link here.
Mesecons fork
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [mod]Batmod[batmod]

by Hybrid Dog » Post

I thought that adding ? after the name makes it optional but it needs to be loaded first and adding ! makes it optional too and it needs to be loaded after this mod

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [mod]Batmod[batmod]

by Don » Post

The ? Makes it so the batmod doesn't have to be added to the world. If you leave it out you won't be able tovuse mesecons without batmod.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [mod]Batmod[batmod]

by Inocudom » Post

The mesecons api changed recently, so you might need to make some updates.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [mod]Batmod[batmod]

by Don » Post

Inocudom wrote:The mesecons api changed recently, so you might need to make some updates.
Thanks. I will look into this.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests