[Collection] All the tiny mods

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

check the doc!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Collection] All the tiny mods

by Linuxdirk » Post

Set maximum stack size to 100 for all registered things that have max stack size set to 99.

Code: Select all

local all_objects = {}

for _,what in pairs({'items', 'nodes', 'craftitems', 'tools'}) do
    for name,definition in pairs(minetest['registered_'..what]) do
        if definition.stack_max == 99 then table.insert(all_objects, name) end
    end
end

for _,name in pairs(all_objects) do
    minetest.override_item(name, { stack_max = 100 })
end
Make sure to run this mod last by (opt-)depending it on all your other mods.

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Collection] All the tiny mods

by jas » Post

azekill_DIABLO wrote:Check the doc!

Code: Select all

    --  ^ Whether to run the LBM's action every time a block gets loaded,
    --    and not just for blocks that were saved last time before LBMs were
    --    introduced to the world.
Now I'm downright dumbfounded!

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

which means?

LBM are just ABM that happen when a chunk is generated.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Collection] All the tiny mods

by orwell » Post

azekill_DIABLO wrote:ABM run continuously, LBM run on_generate only.
Or, every time a block is loaded, when you specify this. (run_at/on_every_load), which is what you want here.
Else, this is a CPU waste, because every water source is checked all over the time
Actually, most of the code does not need to be changed, only register_abm->lbm() and add a name and the run_at/on_every_load=true
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [Collection] All the tiny mods

by Chem871 » Post

Here's a really tiny mod, just adds 1 decorative block, called cracked stone, it looks very nice:viewtopic.php?f=11&t=9727
What is SCP-055?

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

Re: [Collection] All the tiny mods

by cx384 » Post

Linuxdirk wrote:Set maximum stack size to 100 for all registered things that have max stack size set to 99.

Code: Select all

local all_objects = {}

for _,what in pairs({'items', 'nodes', 'craftitems', 'tools'}) do
    for name,definition in pairs(minetest['registered_'..what]) do
        if definition.stack_max == 99 then table.insert(all_objects, name) end
    end
end

for _,name in pairs(all_objects) do
    minetest.override_item(name, { stack_max = 100 })
end
Make sure to run this mod last by (opt-)depending it on all your other mods.
I prefer this:
viewtopic.php?f=21&t=14252#p211526
Can your read this?

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Collection] All the tiny mods

by jas » Post

Re: LBM

If the lowering of the liquid source node is only done once - whenever the block is loaded - then the liquid won't drop more than one node. (Video demonstration: https://www.youtube.com/watch?v=YGyBALrcWL0)

(I'm not disputing the inefficiency of checking every liquid source near air every second.)

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Collection] All the tiny mods

by Linuxdirk » Post

cx384 wrote:I prefer this:
viewtopic.php?f=21&t=14252#p211526
I prefer not modifying files that come with the packages because it makes it harder to update them.

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Collection] All the tiny mods

by orwell » Post

jas wrote:Re: LBM

If the lowering of the liquid source node is only done once - whenever the block is loaded - then the liquid won't drop more than one node. (Video demonstration: https://www.youtube.com/watch?v=YGyBALrcWL0)

(I'm not disputing the inefficiency of checking every liquid source near air every second.)
No, AFAIK when flowing liquid flows it keeps flowing until it can't flow anymore...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

The what liquid usually does. Imagine if water ceased flowing in the middle of the river. Sailing would be fun.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
jas
Member
Posts: 593
Joined: Mon Jul 24, 2017 18:15
IRC: Freenode
Location: IRC

Re: [Collection] All the tiny mods

by jas » Post

This ABM doesn't set flowing liquid nodes, it moves source liquid nodes down one vertically.
Ps. Only if there isn't already a source liquid node below.

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Collection] All the tiny mods

by v-rob » Post

Tiny mod that... well, see for yourself. Don't throw up.

This mod will be reversed when you disable it, so don't worry and go ahead and use it in any world you want.
Attachments
whatintheworld.zip
(1.92 KiB) Downloaded 60 times
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
sorcerykid
Member
Posts: 1847
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Collection] All the tiny mods

by sorcerykid » Post

azekill_DIABLO wrote:which means?

LBM are just ABM that happen when a chunk is generated.
Actually, it's not that simple. LBMs are proven to be unreliable, as there is no guarantee the functionwill execute every time that a block with matching nodes is loaded.

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

it also deosn't work with already loaded chunks that existed before the mod was actvied. I just wanted to do a simple explanation :)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
sorcerykid
Member
Posts: 1847
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Collection] All the tiny mods

by sorcerykid » Post

True, but that's a documented feature. I was just warning about the undocumented behavior (or bug) in case anybody wasn't aware. :D

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Collection] All the tiny mods

by TechNolaByte » Post

Casimir wrote:Number of items.
Shows the total number of registered items after the game started.
Nodetest: 488*
Minetest NeXt: 302
Nodetopia: 65
license: GLPv3 or later
depends: nothing

*Without stairsplus there are 198. I think I need to do something about this imbalance.
skyfactory v2.4

320982
or about 321k items
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

Games support it? What is the loading time for a server?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Collection] All the tiny mods

by TechNolaByte » Post

azekill_DIABLO wrote:Games support it? What is the loading time for a server?
for skyfactory? haven't tested with multiplayer but single player takes about 15-20 mins to load with my new computer
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

LOL, you should find a better way to register node then!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Collection] All the tiny mods

by TechNolaByte » Post

the modpack is about 450 mg so there isn't much I can do
except rewrite it all from scratch(which I am doing)
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

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

Re: [Collection] All the tiny mods

by azekill_DIABLO » Post

Good luck, I hope you have caffeine!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [Collection] All the tiny mods

by TechNolaByte » Post

azekill_DIABLO wrote:Good luck, I hope you have caffeine!
lol thanks!
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Collection] All the tiny mods

by Codesound » Post

Hybrid Dog wrote:[Mod] hydroculture reworked [hydro]

I edited the version of the hydroculture mod I found at a mod mirror web page. I didn't find out the original license yet, maybe it's WTFPL.

Depends: default
License: unknown
Download: zip, tar.gz
github: hydro

Image
+1

thanks...

R

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

Re: [Collection] All the tiny mods

by acidzebra » Post

I can't code myself out of a wet paper bag and I know this could be made much more elegant and efficient with loops and using tables, concatenation, etc. effectively and have better presentation, but it works for my purposes. Reports on humidity, heat, current and nearby biomes every second in chat. I'm currently trying to better align a mix of biomes and this helps me understand what's going on ingame by showing me :)

I've switched to Minetest 0.5 dev so no idea if this works on 0.4.x
Code based on viewtopic.php?p=309472#p309472

Code: Select all

local function biomefinder ()
  for _,player in ipairs(minetest.get_connected_players()) do
    local pos = player:getpos()
		pos.x = math.floor(pos.x)
		pos.y = math.floor(pos.y)
		pos.z = math.floor(pos.z)
	local biome_data = minetest.get_biome_data(pos)
	local report = "Heat:" ..math.floor(minetest.get_heat(pos))
	report = report ..", humidity:" ..math.floor(minetest.get_humidity(pos))
	report = report ..", in biome:" ..minetest.get_biome_name(biome_data.biome)
	report = report ..", at location: (" ..pos.x
	report = report .."," ..pos.y
	report = report .."," ..pos.z
	report = report .."). nearby biomes: "
    pos.x = pos.x + 50
	local biome_data2 = minetest.get_biome_data(pos)
	pos.x = pos.x -100
	local biome_data3 = minetest.get_biome_data(pos)
	pos.x = pos.x + 50
	pos.z = pos.z + 50
	local biome_data4 = minetest.get_biome_data(pos)
	pos.z = pos.z - 100 
	local biome_data5 = minetest.get_biome_data(pos)
	pos.z = pos.z + 50
	pos.y = pos.y + 10
	local biome_data6 = minetest.get_biome_data(pos)
	pos.y = pos.y - 20
	local biome_data7 = minetest.get_biome_data(pos)
	pos.y = pos.y + 10
	report = report ..minetest.get_biome_name(biome_data2.biome) ..","
	report = report ..minetest.get_biome_name(biome_data3.biome) ..","
	report = report ..minetest.get_biome_name(biome_data4.biome) ..","
	report = report ..minetest.get_biome_name(biome_data5.biome) ..","
	report = report ..minetest.get_biome_name(biome_data6.biome) ..","
	report = report ..minetest.get_biome_name(biome_data7.biome) ..","
	minetest.chat_send_player(player:get_player_name(), report)
  end
  minetest.after(1, biomefinder)
end

minetest.after(1, biomefinder)

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests