Page 53 of 121

Re: [Game] MineClone 2 [0.42.1]

Posted: Sun Dec 16, 2018 13:29
by Termos
jakab wrote:yeah i had to deal with the horse army too :D
here how i fixed it:
/minetest/games/MineClone2/mods/ENTITIES/mobs_mc/horse.lua
go to the bottom, and youll find this :
--Spawn Function

Code: Select all

mobs:spawn_specific("mobs_mc:horse", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 12, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max)

and rewrite the number '15000" (or other huge number in that area ...) and write in a a higher number. that will decrase the chance to spawn horses (this works with any mobs) i personally wrote "35000" :D
I don't think the chance parameter is very relevant, even if you decrease the chance you'll still get same results, just maybe a bit later.
I think this problem is because of a number of reasons:
- despawning is off
- mobs roaming randomly have trouble moving uphill, so they eventually end up in water.
- the code to get mobs out of water doesn't work.

This also causes the number of entities to eventually get to the point where the engine can't handle them.

To get the game to be playable again I did the following:

in games\MineClone2-037a833\mods\ENTITIES\mcl_mobs\api.lua
change
local remove_far = false
to
local remove_far = true

This takes care of the monsters, to get horses to despawn I added in in \mobs_mc\horse.lua:
local horse = {
type = "animal",
can_despawn = true,

If you want all animals despawning, it's probably better to edit the mobs:register_mob function in api.lua,
changing
can_despawn = false
to
can_despawn = true

As to getting out of the water, my theory is that find_node_near doesn't necessarily return a surface node (and nowhere it says it's supposed to), so a swimming mob looking for a solid node will usually find one in any random direction. It might be better if they were trying to avoid getting near water in the first place.

Re: [Game] MineClone 2 [0.43.0]

Posted: Mon Dec 17, 2018 00:05
by Chem871
Golden Leggings have the name 'Golden Leggins', and any time I mine wood, even with my bare hand, it sounds like I'm using an axe.

Re: [Game] MineClone 2 [0.43.0]

Posted: Mon Dec 17, 2018 22:45
by zargulthewizard
Chem871 wrote:Golden Leggings have the name 'Golden Leggins', and any time I mine wood, even with my bare hand, it sounds like I'm using an axe.
I d'no what yer gettin' yerself all worked up about with the leggin's, and the sound thayng is the saym as Minecrayft.

Re: [Game] MineClone 2 [0.43.0]

Posted: Wed Dec 19, 2018 02:52
by jordan4ibanez
You are doing such a good job

Re: [Game] MineClone 2 [0.43.0]

Posted: Wed Dec 19, 2018 20:04
by Termos
Anyone annoyed by water trampolining mobs?
A little quick fix I'm using, in entities\mcl_mobs\api.lua, function 'falling'

Code: Select all

	-- in water then float up
	if minetest.registered_nodes[node_ok(pos).name].groups.water then

		if self.floats == 1 then
			-- get top of the hitbox
			local pos_top = {x=pos.x, y=pos.y+self.collisionbox[5], z=pos.z}		-- top of the head			
			local pos_mid = {x=pos.x, y=pos.y+(self.collisionbox[5]*0.5), z=pos.z} 	-- part sticks above surface
			local yacc = 0
			
			if node_ok(pos_top).name == "air" then		-- it is partially submerged
				if node_ok(pos_mid).name == "air" then	-- but not enough to float 
					yacc = (v.y + 0.5) * -1 * 3				-- target sink velocity is 0.5
				else									-- now it is
					yacc= v.y * -1							-- equilibrium
				end
			else										-- fully submerged
				yacc=(v.y-1) * -1 * 3 						-- target emerge velocity is 1
			end
			
			self.object:setacceleration({
				x = 0,
	--	    y = -self.fall_speed / (max(1, v.y) ^ 2),		--deleted
				y=yacc,
				z = 0
			})
		end
	else ...
There's a side effect though, now most animals will drown in water, that's because mobs breathe with their feet ;)
but that's kinda a good thing, helps control population.

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Dec 20, 2018 22:43
by Wuzzy
Anyone annoyed by water trampolining mobs?
Heh. This is in MCL2 by design.

But I agree the population can get too high in MCL2 too fast, this desperately needs rework. :-(

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Dec 21, 2018 08:23
by Termos
Wuzzy wrote: Heh. This is in MCL2 by design.
Are you sure? Mobs are periodically ejected about 5 meters into the air when waterwalking.
Why such a design?

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Dec 21, 2018 23:29
by zargulthewizard
Bug: Iron Golems do not attack Endermen. I know for certain they do in Minecraft.

Unless, of course, my version of MineClone 2 is outdated :P

Re: [Game] MineClone 2 [0.43.0]

Posted: Sat Dec 22, 2018 13:33
by Wuzzy
Are you sure? Mobs are periodically ejected about 5 meters into the air when waterwalking.
OK, mobs are certainly not supposed to fly up that high into the sky.
As I said, mobs need reworking.
Bug: Iron Golems do not attack Endermen. I know for certain they do in Minecraft.
OK, I fixed this now (in dev) by changing how endermen work.

Re: [Game] MineClone 2 [0.43.0]

Posted: Sat Dec 22, 2018 14:40
by Termos
More about population control and related stuff.

First some context: there was a 1x2 puddle on the grassland. I noticed that if a water fearing animal would come near, it became trapped there, they would cross the puddle forth and back and never leave the area. That tells me some yaw calculations are off, and that's one of the reasons for overpopulation, because if animals are trapped on the shore, then they're not on the grasslands, and then on the grasslands aoc has no reason to limit new spawns.

Then what I did was:
- I rewrote all the homemade yaw calculations in mcl_mobs/api.lua with the api function minetest.dir_to_yaw. The result is, the animals now properly avoid water, and should they fail, they are are usually able to find dry land. They also stopped flipping (instant 180 and back)
- I removed the "when in air move forward" timer in do_jump altogether. It seemed redundant as it already assumed nonzero horizontal velocity, and potentially harmfull because after it fired mobs were left with nonzero horizontal acceleration.

Both changes made mob movement a lot cleaner, also they are distributed more evenly over dry land which gives the aoc limit a chance to work.

Personally, I would get rid of mob name related aoc parameter in spawn_specific, because you know, if there's a horde of horses and sheep in a spot, we don't need a new rabbit there, even if there's none.
Instead I'd set global limits, separate for animals and monsters, both probably less than 10 per abr (maybe even less, because aoc area is relative to mobs, and because they spawn away from the player, that means that usually objects on one side of them are inactive).

Another problem, I find the default active block range of 3 to be inadequate for v7 mapgen, which generates these large plains more than 10 blocks across.
Wuzzy wrote: As I said, mobs need reworking.
I found the mob api quite capable, if a little bit buggy, but it's amazing how much can be achieved with it with a few little quick fixes and tweaks.

Re: [Game] MineClone 2 [0.43.0]

Posted: Wed Dec 26, 2018 04:51
by zargulthewizard
Much grass on the endermen fix. Eagerly awaiting full functionality!

PS: Just remembered. Connecting a reversed daylight sensor to a command block for returning the time to day does not work. Will double check, but I think I am doing the command right.

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Dec 28, 2018 19:14
by meseking35
About Modding...
Some mods I would like to use depend on default, what do i do then?
Are Minecraft mods compatible?
Where do I put the mods?

Thanks, meseking

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Dec 28, 2018 19:36
by texmex
meseking35 wrote:About Modding...
Some mods I would like to use depend on default, what do i do then?
Are Minecraft mods compatible?
Where do I put the mods?

Thanks, meseking
Someone needs to adjust the mod’s code to work with MCL2.

No, and never will be.

In the regular mods folder, then load as per usual (Path depending on operating system). But there’s not many mods available for MCL2 yet.

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Dec 28, 2018 22:52
by GamingAssociation39
How would I make Ma & Pop's Furniture mod compatible with MCL2?

Re: [Game] MineClone 2 [0.43.0]

Posted: Sat Dec 29, 2018 04:57
by texmex
GamingAssociation39 wrote:How would I make Ma & Pop's Furniture mod compatible with MCL2?
You would need to find replacements for functions, recipes and other resources used in yout mod coming from default, fire, stairs, wool, xpanes which In your case seem to be fairly easy to do since those nodes all exist in MCL2 as well. The majority of work for this particular mod though I'd say is texture work. Since you don't seem too use the game's native textures for skinning nodes or texture modifyers as much but instead have broken off textures from MTG and manually modified it, you need to do the same thing over again but for MCL2. OR you could start using modifiers instead, modularizing texture handling for both games.

Re: [Game] MineClone 2 [0.43.0]

Posted: Mon Dec 31, 2018 13:15
by MysticTempest
Hey Wuzzy,


I have a fix for rain/snow falling through glass nodes & trapdoors. - https://git.minetest.land/Wuzzy/MineClo ... /issues/89
Well, technically I have 2 variations of this patch as I wasn't quite sure if a generalized fix was okay or if you preferred one more specific.


The first is specific to glass nodes & closed trapdoors(open trapdoors will let rain through); & keeps the light_level check for outdoors.

Specific Patch: -removed-


The 2nd alternate fix basically lets all walkable nodes block rain/snow & removes the light_level checks for outdoors.
This has the added bonus of fixing rain/snow falling through when the player only has a single node(anykind) above them.
Lastly, xpanes while walkable will let rain through(but full glass nodes will not); while trapdoors when closed block rain, but when open let it through.

Alternate Patch: -removed-

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Jan 03, 2019 11:52
by Wuzzy
@MysticTempest: I appreciate your efforts, but I don't like that you need to look at 256 nodes every time when is_outdoors is called.

Also, this is wrong:

Code: Select all

  		groups = {groups_closed=1,rainblocker=1}, 
That's not how groups work. There is no group called “groups_closed”.

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Jan 03, 2019 13:20
by MysticTempest
Wuzzy wrote:@MysticTempest: I appreciate your efforts, but I don't like that you need to look at 256 nodes every time when is_outdoors is called.

Also, this is wrong:

Code: Select all

  		groups = {groups_closed=1,rainblocker=1}, 
That's not how groups work. There is no group called “groups_closed”.
That's alright; thanks for checking it out at least.
Yea, I took it to the extreme with 256 nodes; mostly for the worst case scenario of a user at bedrock, with a single glass/trapdoor node far above them at the overworld's max height.
But yea, it's still a bit of a messy check.

And, whoops; sorry about that.

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Jan 03, 2019 20:12
by GamingAssociation39
Anyone know how to edit the signs code for multicolored signs?

Re: [Game] MineClone 2 [0.43.0]

Posted: Wed Jan 09, 2019 11:07
by WizardOz
I just had to say that me and my kids are loving this clone! Please continue the development if possible! :)
Great work!

Re: [Game] MineClone 2 [0.43.0]

Posted: Mon Jan 14, 2019 01:37
by mentalmage
I just tested your Game

Here are some things I noticed:
- Creepers blow up based on proximity even thru walls and even if they don't see you
- Creepers will blow instantly instead of ticking down TSSS
- Items thrown into a fire do not get destroyed
- There's no way to brew potions as the brewing stand is not implemented yet but it appears you have fermented eye which is created only using brewing mechanic (so is probably not available in survival)
- Undead mobs do not burn during daylight
- Zombies ignore Villagers (not sure if you find villagers naturally in the game)

Anyway pretty awesome mod nonthe less tons of fun . Hope you keep at it.

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Jan 17, 2019 00:04
by lonestar
Been playing this off and on far a while, it's made some good progress. One thing that really annoys me, is when you put two door side by side, both doors open to the left when one should open left and the other to the right. Most other issues don't effect me much, just the doors.

Re: [Game] MineClone 2 [0.43.0]

Posted: Thu Jan 17, 2019 17:59
by voxelproof
lonestar wrote:One thing that really annoys me, is when you put two door side by side, both doors open to the left when one should open left and the other to the right. Most other issues don't effect me much, just the doors.
Put left wing first and then (at least in MTG) the directions of both doors are correct.

Re: [Game] MineClone 2 [0.43.0]

Posted: Fri Jan 18, 2019 21:18
by leblu
Thank you very much for your awesome work on this game!

Things I noticed (don't know if already mentioned):
- Still get arrow damage, if though i'm inside a building (completely surrounded by blocks)
- On respawn, I got spawn on top of my bed, inside another block (ceiling) which caused damage till death. Repeated until I broke the block.

Re: [Game] MineClone 2 [0.43.0]

Posted: Sat Jan 19, 2019 03:37
by dawgdoc
leblu wrote: - On respawn, I got spawn on top of my bed, inside another block (ceiling) which caused damage till death. Repeated until I broke the block.
In the future, make the room 3 blocks in height instead of two. This will give you two air spaces above the bed and you will not spawn into the block.