Page 1 of 1

[Mod] fort_spikes

PostPosted: Sat May 07, 2016 12:53
by xeranas
Improve your base defense with wood and iron spikes around.

This mod adds two types of spikes which can be placed for defence purpose. Iron spikes has less chance to broke and spikes from wood is cheaper to build.

Mod dependencies: default
Download and details on: https://github.com/xeranas/fort_spikes
Licensing:
- Code: MIT
Tested on: Minetest 0.4.13

Image

Re: [Mod] fort_spikes

PostPosted: Sat May 07, 2016 13:47
by azekill_DIABLO
i don't want to walk on them :)

Re: [Mod] fort_spikes

PostPosted: Sat May 07, 2016 14:02
by vitalie
Nice. Would it be possible to attach them to wall and ceiling, not just floor, and have them rotate accordingly (i.e. point horizontally, or downwards)?

Re: [Mod] fort_spikes

PostPosted: Sat May 07, 2016 14:06
by azekill_DIABLO
yeah nice idea, maybe with slabs API.....

Re: [Mod] fort_spikes

PostPosted: Sat May 07, 2016 19:16
by xeranas
vitalie wrote:Nice. Would it be possible to attach them to wall and ceiling, not just floor, and have them rotate accordingly (i.e. point horizontally, or downwards)?

I guess attaching spikes with different angles would be doable (I will give some time to investigate mentioned slaps api or existing mods how they implementing it). However the main problem would be with collision detection. Currently get_objects_inside_radius is used which is not actual collision check but rather if objects position is in range (at least what I learn from testing locally). So player which is around 2 block height would not trigger spike if spike is 1 block above ground because player position is at foot level. This functionality could be workaround by calculating offsets, but then it would misbehave for entities which are different size.

It would be simpler if I could just use damage_per_second on node, but it seems only working for players so I use punch instead.

Re: [Mod] fort_spikes

PostPosted: Sat May 07, 2016 19:56
by sofar
There's some work by me to make the player get hurt even if head is inside the node, so I'd encourage you to use `damage_per_second` as that will be the final solution.

If you make your nodes `paramtype2 = "wallmounted" then they can be placed on walls, ceiling and floor. "facedir" also works.

Re: [Mod] fort_spikes

PostPosted: Sun May 08, 2016 06:41
by xeranas
sofar wrote:There's some work by me to make the player get hurt even if head is inside the node, so I'd encourage you to use `damage_per_second` as that will be the final solution.

Thanks, I will keep in mind. If `damage_per_second` will also work for mobs I would gladly replace punch mechanism.

Re: [Mod] fort_spikes

PostPosted: Thu Jul 28, 2016 12:34
by nirasa
I created a different texture for iron spike. Can you put it on the ceiling, wall and floor. Other textures are original.

Image

Texture for game: fort_spikes_iron_spikes.png

Sorry, for my english :(

Re: [Mod] fort_spikes

PostPosted: Thu Jul 28, 2016 13:01
by azekill_DIABLO
tey rae funny! but they looks more like blades than spixes :)

Re: [Mod] fort_spikes

PostPosted: Fri Jul 29, 2016 11:29
by nirasa
azekill_DIABLO wrote:tey rae funny! but they looks more like blades than spixes :)


:) Yes. I killing hostile mobs with this spikes = mob trap. I get some interesting things.

Re: [Mod] fort_spikes

PostPosted: Fri Jul 29, 2016 20:41
by TailsTheFoxDoes MT
nirasa wrote:
azekill_DIABLO wrote:tey rae funny! but they looks more like blades than spixes :)


:) Yes. I killing hostile mobs with this spikes = mob trap. I get some interesting things.

Wait, they kill mobs? Do they? Then i'm downloadin' dis! :)

Re: [Mod] fort_spikes

PostPosted: Sat Jul 30, 2016 18:40
by xeranas
Hi, nirasa
Thanks for trying mod and feedback! Currently fort spikes are designed to work only placed on ground because it's easiest way to calculate collisions. Last time I checked `damage_per_second` does not worked for mobs so I stick with punch mechanism. I plan to update once MT `damage_per_second` will be improved.

I also intentionally restricted placing it to one on another for damage balance reason. I trying keep default textures which meets Minetest default texture theme. Your textures are good, but as other mentioned it would better fit other trap type.

If default mod texture does not meet your world theme I would recommend override textures (put together with your custom texture pack). Do not forget that even iron spikes sometimes broke, so you need also broken spike texture variation.

Re: [Mod] fort_spikes

PostPosted: Wed Aug 03, 2016 16:23
by nirasa
Hi, xeranas,

xeranas wrote:Hi, nirasa
Thanks for trying mod and feedback!

:-)
xeranas wrote:If default mod texture does not meet your world theme I would recommend override textures (put together with your custom texture pack). Do not forget that even iron spikes sometimes broke, so you need also broken spike texture variation.

Ok, broken spike texture could look like this (???):

Image

I agree with your idea - combination of these two textures - yours and mine.

Re: [Mod] fort_spikes

PostPosted: Thu Aug 04, 2016 09:45
by azekill_DIABLO
they look great!
can you crunch them a bit on the top?

Re: [Mod] fort_spikes

PostPosted: Mon Aug 08, 2016 10:39
by nirasa
azekill_DIABLO wrote:they look great!
can you crunch them a bit on the top?


My old computer broke down (8 years old) and I have made new. I continue to textures for fort_spikes :-)

??crunch?? I am not so good at english what do you mean? On all sides? Ok.

Re: [Mod] fort_spikes

PostPosted: Mon Aug 08, 2016 11:10
by azekill_DIABLO
Broke them a bit vertically i mean to make them look sharpier.

Image

EDIT: like this!

Re: [Mod] fort_spikes

PostPosted: Mon Aug 08, 2016 13:41
by nirasa
azekill_DIABLO wrote:Broke them a bit vertically i mean to make them look sharpier.


Aha. OK. I make textures on 32px, but Minetest is 16px, it is problem... Yes? I can make it fix.

Re: [Mod] fort_spikes

PostPosted: Mon Aug 08, 2016 15:43
by azekill_DIABLO
no it's not a problem :D

Image

You can use them if you want, just mention that i modified them.

Re: [Mod] fort_spikes

PostPosted: Mon Aug 22, 2016 12:55
by nirasa
My video - Mobtrap.

https://www.youtube.com/watch?v=XIlvz1G8Ysw

I was inspired in Minecraft. It's just an idea.

Mobs Redo API - https://github.com/tenplus1/mobs_redo
Farm Animals - https://github.com/tenplus1/mobs_animal
Monsters - https://github.com/tenplus1/mobs_monster
with zombie - https://github.com/maikerumine/mobs_mc
Mobf core - https://github.com/sapier/mobf_core
Carbone mobs - https://github.com/PilzAdam/mobs
Pyramids - https://github.com/BlockMen/pyramids
Spawners - https://bitbucket.org/minetest_gamers/spawners
Mobspawn - https://github.com/HeroOfTheWinds/mobspawn/
Fake fire - viewtopic.php?id=6145
Pipeworks - https://github.com/minetest-mods/pipeworks/tree/master
Fort spikes - viewtopic.php?f=9&t=14574&p=226828#p226828

Fort spikes = autor Xeranas. Mod in the video is edited. I adjusted this mod to my needs, but if the author edit this mode, you can then download it.

Drop, spawner:
Bunny: meat raw,
Cow: leather, beef raw,
Chicken: feather, chicken raw,
Kitten: string,
Pumba (Warthog): pork_raw,
Sheep: mutton (meat), wool,
Villager: apple,
Wolf: meat,
Dirt monster: dirt,
Dungeon monster: mese_crystal, mese_crystal_fragment, diamond, mese_crystal, diamondblock,
Lava flan: lava_orb,
Mese monster: mese_crystal, mese_crystal_fragment,
Mummy (from pyramids mod): papyrus,
Oerkki monster: obsidian,
Rhino: steel_ingot,
Sand monster: desert sand,
Skeleton: arrow, bow_wood, bone, skeleton head,
Spider: string, meat raw, spider head, crystal_spike,
Stone monster: stone, torch, iron_lump, coal_lump,
Tree monster: sapling, junglesapling, apple,
Trooper: trooper,
Zombie: rotten flesh, steel ingot, shovel steel, sword steel, carrot, potato, zombie head,

It doesn't spawner:
Enderman: obsidian, diamond, enderman head,
Ghast: lava_source, diamond, ghast head,
Creeper: gunpowder, flint and steel, creeper_head, jdukebox:disc 1-6,
Horse: meat,
Pig: pork raw,
Rat: rat,
Slimes: glue, grass,
Zombiepig: rotten_flesh, gold_ingot, sword_gold, sword_mese, zombiepig_head,