Page 1 of 2

[Mod] Batmod [batmod]

PostPosted: Sat Oct 11, 2014 22:14
by Don
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
  • + Bat Blocks

    Image
    Image
  • + Bat Cobble

    Image
+ Colored Blocks

Image
Solid colors are in textures/solid_colors. I you want solid then copy and paste them into textures folder.
Image
+ Bat Fence

Image
+ Bat Glass

Image
+ Ladders and Rope

Image
Image
+ Bat Tools

Image
Depends
default
Download
Download - batmod-master.zip - for 0.4.13-dev and above
Download - [url=https://github.com/DonBatman/batmod/archive/1.o.zip[/url]- for 0.4.13 and below
Github - [url=https://github.com/DonBatman/batmod.git]Code - batmod[/url]

Mesecons fork that works with batmod - mesecons fork

Licence = DWYWPL

Tested on Minetest 0.4.10

Re: Batmod

PostPosted: Sun Oct 12, 2014 15:21
by Wuzzy
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.

Re: Batmod

PostPosted: Mon Oct 13, 2014 00:04
by Don
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.

Re: Batmod

PostPosted: Mon Oct 13, 2014 16:42
by Krock
I would like to see more noise in those textures.
Right now, they look like 16-color images.

Re: Batmod

PostPosted: Mon Oct 13, 2014 17:54
by Don
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.

Re: Batmod

PostPosted: Mon Oct 13, 2014 20:58
by Esteban
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.

Re: Batmod

PostPosted: Mon Oct 13, 2014 21:21
by Don
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.

Re: Batmod

PostPosted: Tue Oct 14, 2014 04:11
by Inocudom
The white powder can't be dug up by any means.

Re: Batmod

PostPosted: Tue Oct 14, 2014 04:51
by Don
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

Re: Batmod

PostPosted: Fri Oct 17, 2014 15:38
by JPRuehmann
Hello
If I try to load the modpack I get the following errror.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

Re: Batmod

PostPosted: Fri Oct 17, 2014 18:30
by Don
JPRuehmann wrote:Hello
If I try to load the modpack I get the following errror.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
dofile(minetest.get_modpath("bat_blocks").."/doors.lua")

To comment out the line just put -- in front of it.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

Re: Batmod

PostPosted: Sat Oct 18, 2014 12:50
by JPRuehmann
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

Re: Batmod

PostPosted: Sat Oct 18, 2014 13:47
by Don
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.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mesecons
doors
bat_blocks?

Re: Batmod

PostPosted: Sat Oct 18, 2014 19:41
by JPRuehmann
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

Re: Batmod

PostPosted: Sat Oct 18, 2014 20:31
by Don
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.

Re: Batmod

PostPosted: Sun Oct 19, 2014 12:39
by JPRuehmann
Thanks
Looks Cool.
Only the Bat white Powder is only puttable but can´t be taken back.
how can I take it?
thanks,
JPR

Re: Batmod

PostPosted: Sun Oct 19, 2014 14:24
by Don
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

Re: [mod]Batmod[batmod]

PostPosted: Tue Oct 28, 2014 17:41
by Inocudom
I got the following error:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

Re: [mod]Batmod[batmod]

PostPosted: Tue Oct 28, 2014 18:58
by Don
Need to add bat_blocks? To the depends.text of mesecon_compatibility mod.
Include the ? Like this

bat_blocks?

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 04, 2014 14:19
by Hybrid Dog
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?

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 04, 2014 14:49
by Don
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

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 04, 2014 16:37
by Hybrid Dog
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

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 04, 2014 21:50
by Don
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.

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 25, 2014 17:17
by Inocudom
The mesecons api changed recently, so you might need to make some updates.

Re: [mod]Batmod[batmod]

PostPosted: Tue Nov 25, 2014 17:42
by Don
Inocudom wrote:The mesecons api changed recently, so you might need to make some updates.

Thanks. I will look into this.

Re: [mod]Batmod[batmod]

PostPosted: Mon Dec 15, 2014 23:28
by cornernote
Very cool mod. Batman is my favourite super-hero (he doesn't need super powers like the rest of those jerks).

I think I'll have to run this up and build myself a bat-cave.

I am the batman! lol

Re: [mod]Batmod[batmod]

PostPosted: Mon Dec 15, 2014 23:46
by Don
cornernote wrote:Very cool mod. Batman is my favourite super-hero (he doesn't need super powers like the rest of those jerks).

I think I'll have to run this up and build myself a bat-cave.

I am the batman! lol

Your too funny. If you make a batcave post a pic.
If you modify the mod I will add your changes.

Re: [mod]Batmod[batmod]

PostPosted: Sat Feb 27, 2016 20:32
by Don
Update - I changed the doors to work with the newest doors mod. This is for minetest 0.4.13-dev and above.

https://github.com/DonBatman/batmod/archive/master.zip

Re: [mod]Batmod[batmod]

PostPosted: Sat Feb 27, 2016 22:55
by npx
Image

What about this?

Re: [mod]Batmod[batmod]

PostPosted: Sat Feb 27, 2016 22:57
by Don
Those are light cubes