Page 1 of 1
[Mod] Hook V9.1 (survive tools) [hook]

Posted:
Mon Nov 23, 2015 21:26
by AiTechEye
This is a really simple but a must have in survival servers.
Hook:
hit on a edge to climb up.
Upgraded hook:
use with double hight
Rope:
place on a edge to climb, or throw it.
Locked rope:
only you can take it, or throw it.
Slingshot:
throw junk far away and hurt your enemies
place it to change side to use
Mouth breather assembly:
use outside water/vaccum to refill with air, use in water/vaccum to refill your breath (max 10 times))
Work rbot:
Place the controler to change between 8 modes.
Pchest:
portable chest, the stuff is stored inside the chest/tool, and not in a ghost inventory.
Licenses: code LGPL 2.1 media CC BY-SA 3.0
Depends: none
Re: [Mod] hook (with short rope)

Posted:
Mon Nov 23, 2015 21:59
by Diamond knight
kinda reminds me of batman
Re: [Mod] hook (with short rope)

Posted:
Mon Nov 23, 2015 22:43
by KCoombes
Awesome idea, but you might want to rename it "Grapple", for accuracy.
Re: [Mod] hook (with short rope)

Posted:
Tue Nov 24, 2015 10:40
by firefox
oh cool! =(0.0)=
can you also shoot it horizontally to get over canyons?
Re: [Mod] Hook V2 (and/with rope)

Posted:
Tue Nov 24, 2015 15:35
by AiTechEye
hanging bridge... but it will look weird.. better to build a bridge :-)
Re: [Mod] Hook V3 (and/with rope)

Posted:
Wed Nov 25, 2015 11:52
by AiTechEye
+V3 craft a rope with a steel ingot to make it locked
Re: [Mod] Hook V3 (and/with rope)

Posted:
Wed Nov 25, 2015 18:07
by Napiophelios
Can you bump up the reach/range of the actual hook
If you want a safe way to get down into a hole its fine but
with just a range of 2 its pretty useless as a means of getting out of a hole.
also when it attaches it looks like its floating 1 node away from the surface its attached to (kinda just in mid-air),
seems it might be better if its attached to the bottom of the node surface you are trying to hook to.
Re: [Mod] Hook V3 (and/with rope)

Posted:
Wed Nov 25, 2015 21:33
by AiTechEye
ok, i will add an upgrade tomorrow it will have 5 range and 8 hight :-)
I working on a udate for pollution mod too (1 new barrel) and error fixes
Re: [Mod] Hook V5 (and/with rope)

Posted:
Sat Nov 28, 2015 11:21
by prof-turbo
Nice mod ! I like this idea !
Don't you have any Github account ?
Re: [Mod] Hook V5 (and/with rope)

Posted:
Sat Nov 28, 2015 13:02
by AiTechEye
i tryed it 3 times but just messup -_-
Re: [Mod] Hook V6 (and/with rope)

Posted:
Sun Dec 20, 2015 07:45
by izzyb
I'm loving this mod! :)
There's a bug with the sling shot though. Crashes when when I hit some things but not others. Seems to be consistent on what crashes it and what doesn't. Hitting protected blocks seem to crash it consistently. Some mobs seem to crash it too. Not sure how consistently, but one produced this warning which may be helpful. I hit a zombie that was walking away after the first hit (correction - even without the second hit it crashes after the zombie starts walking away. Added more of the log from a single hit below)
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
00:21:58: WARNING: Undeclared global variable "pos" accessed at /usr/share/games/minetest/mods/hook/init.lua:88
2015-12-20 00:21:59: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-12-20 00:21:59: ERROR[main]: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
2015-12-20 00:21:59: ERROR[main]: stack traceback:
2015-12-20 00:21:59: ERROR[main]: [C]: in function 'punch'
2015-12-20 00:21:59: ERROR[main]: /usr/share/games/minetest/mods/cme/creatures/functions.lua:426: in function 'on_step'
2015-12-20 00:21:59: ERROR[main]: /usr/share/games/minetest/mods/cme/creatures/register.lua:208: in function </usr/share/games/minetest/mods/cme/creatures/register.lua:203>
In thread 7f669a8fe780:
/tmp/buildd/minetest-0.4.13+repack/src/server.cpp:511: void Server::step(float): A fatal error occurred: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
stack traceback:
[C]: in function 'punch'
/usr/share/games/minetest/mods/cme/creatures/functions.lua:426: in function 'on_step'
/usr/share/games/minetest/mods/cme/creatures/register.lua:208: in function </usr/share/games/minetest/mods/cme/creatures/register.lua:203>
I haven't looked too hard at this, but here's the output from hitting a protected block I believe. Hopefully it will have more meaning to you then it does to me.
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
2015-12-19 23:37:40: ACTION[ServerThread]: izzyb uses hook:slingshot, pointing at [nothing]
2015-12-19 23:37:41: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-12-19 23:37:41: ERROR[main]: Runtime error from mod '*builtin*' in callback environment_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
2015-12-19 23:37:41: ERROR[main]: stack traceback:
2015-12-19 23:37:41: ERROR[main]: [C]: in function 'punch'
2015-12-19 23:37:41: ERROR[main]: /usr/share/games/minetest/mods/hook/init.lua:81: in function </usr/share/games/minetest/mods/hook/init.lua:70>
2015-12-19 23:37:41: ERROR[main]: /usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>
In thread 7f6c3d4f0780:
/tmp/buildd/minetest-0.4.13+repack/src/server.cpp:511: void Server::step(float): A fatal error occurred: Runtime error from mod '*builtin*' in callback environment_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
stack traceback:
[C]: in function 'punch'
/usr/share/games/minetest/mods/hook/init.lua:81: in function </usr/share/games/minetest/mods/hook/init.lua:70>
/usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>
Debug stacks:
DEBUG STACK FOR THREAD 7f6c05fec700:
#0 virtual void* UpdateThread::Thread()
DEBUG STACK FOR THREAD 7f6c077fe700:
#0 virtual void* EmergeThread::Thread()
(Leftover data: #1 MapBlock* ServerMap::loadBlock(v3s16))
(Leftover data: #2 void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
(Leftover data: #3 void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7f6c07fff700:
#0 virtual void* UpdateThread::Thread()
DEBUG STACK FOR THREAD 7f6c25cee700:
#0 virtual void* ServerThread::Thread()
#1 void Server::Receive()
(Leftover data: #2 virtual void ServerEnvironment::step(float))
(Leftover data: #3 void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector<PrioritySortedBlockTransfer>&))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)
(Leftover data: #5 bool getCraftingResult(Inventory*, ItemStack&, std::vector<ItemStack>&, bool, IGameDef*))
DEBUG STACK FOR THREAD 7f6c3d4f0780:
#0 int main(int, char**)
#1 void Server::step(float)
(Leftover data: #2 virtual void ClientEnvironment::step(float))
(Leftover data: #3 void Client::Receive())
(Leftover data: #4 void Client::ProcessData(NetworkPacket*))
(Leftover data: #5 void ItemStack::deSerialize(std::istream&, IItemDefManager*))
Aborted
Hope it helps.
Re: [Mod] Hook V7.1 (and/with rope)

Posted:
Sun Dec 20, 2015 12:17
by AiTechEye
Fixed!
It called a function from another mod that i using much sourches.
And fixed that items will disaper after 10 secunds, ther age will be changed instand of set a timer.
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Tue Dec 22, 2015 18:26
by izzyb
Now I'm getting this error when hitting some objects. Including underwater sand which is odd because sand above water doesn't crash 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
2015-12-22 02:24:55: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-12-22 02:24:55: ERROR[main]: Runtime error from mod '*builtin*' in callback environment_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
2015-12-22 02:24:55: ERROR[main]: stack traceback:
2015-12-22 02:24:55: ERROR[main]: [C]: in function 'punch'
2015-12-22 02:24:55: ERROR[main]: /usr/share/games/minetest/mods/hook/init.lua:85: in function </usr/share/games/minetest/mods/hook/init.lua:74>
2015-12-22 02:24:55: ERROR[main]: /usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>
In thread 7fe73601a780:
/tmp/buildd/minetest-0.4.13+repack/src/server.cpp:511: void Server::step(float): A fatal error occurred: Runtime error from mod '*builtin*' in callback environment_Step(): Double fault error from mod '*builtin*' in callback luaentity_Punch(): error in error handling
stack traceback:
[C]: in function 'punch'
/usr/share/games/minetest/mods/hook/init.lua:85: in function </usr/share/games/minetest/mods/hook/init.lua:74>
/usr/share/games/minetest/builtin/game/register.lua:355: in function </usr/share/games/minetest/builtin/game/register.lua:335>
Debug stacks:
DEBUG STACK FOR THREAD 7fe6fa7ed700:
#0 virtual void* UpdateThread::Thread()
DEBUG STACK FOR THREAD 7fe6fbfff700:
#0 virtual void* EmergeThread::Thread()
(Leftover data: #1 MapBlock* ServerMap::loadBlock(v3s16))
(Leftover data: #2 void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
(Leftover data: #3 void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7fe704fe2700:
#0 virtual void* UpdateThread::Thread()
DEBUG STACK FOR THREAD 7fe71e8a7700:
#0 virtual void* ServerThread::Thread()
#1 void Server::Receive()
(Leftover data: #2 virtual void ServerEnvironment::step(float))
(Leftover data: #3 void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector<PrioritySortedBlockTransfer>&))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)
(Leftover data: #5 bool getCraftingResult(Inventory*, ItemStack&, std::vector<ItemStack>&, bool, IGameDef*))
DEBUG STACK FOR THREAD 7fe73601a780:
#0 int main(int, char**)
#1 void Server::step(float)
(Leftover data: #2 virtual void ClientEnvironment::step(float))
(Leftover data: #3 void Client::Receive())
(Leftover data: #4 void Client::ProcessData(NetworkPacket*))
(Leftover data: #5 void ItemStack::deSerialize(std::istream&, IItemDefManager*))
Aborted
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Tue Dec 22, 2015 21:05
by AiTechEye
I think i got it, it was a weird misatake that i added: punsh a block that not is air (minetest.get_node(t.ob:getpos()).name~="air") ...
there was no reason to add it :-)
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Wed Dec 23, 2015 01:20
by Neuromancer
Nice mod. I by mistake took the grappling hook plus rope and shot it with the slingshot. I thought that was how to make the rope hang down. It would be cool if that animation could be used however when you place the grappling hook with rope, like you are throwing the hook and then the rope drops down. It would look like you are really throwing the grappling hook up a wall.
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Wed Dec 23, 2015 06:59
by izzyb
UjEdwin wrote:I think i got it, it was a weird misatake that i added: punsh a block that not is air (minetest.get_node(t.ob:getpos()).name~="air") ...
there was no reason to add it :-)
Thanks! Think you got it now. :) I'll let you know if I find anything more. Great mods! :)
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Wed Dec 23, 2015 07:06
by izzyb
Something is still wrong. Not sure what I was hitting that produced this. I was attacking a mob.
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
2015-12-23 00:04:10: ACTION[ServerThread]: izzyb uses hook:slingshot, pointing at [nothing]
minetest: /tmp/buildd/minetest-0.4.13+repack/src/util/serialize.h:265: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((float)(s32)((-0x7FFFFFFF - 1) / 1000.0f)) && i <= ((float)(s32)((0x7FFFFFFF) / 1000.0f))' failed.
Aborted
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Wed Dec 23, 2015 08:02
by AiTechEye
izzyb wrote:Something is still wrong. Not sure w...
ACTION[ServerThread]: izzyb uses hook:slingshot, pointing at [nothing]
minetest-0.4.13+repack/src/util/serialize.h:265: void writeF1000(irr::u8*, irr::f32): Assertion `i >= ((fl...
I running windows... and that folder does not exist in win, so i cant do anything :-)
I thought that was how to make the rope hang down. It would be co...
This was the deal with the mod, there is 2 other hooks that you can do it without risk to lose your tool, and its unlimeted... i tryed your idea, but it mess up a lot, and its a really big risk to lose the expensive rope (becaouse it will disappear after 10 sec if it not hit in about 2sec and will stuck in blocks).
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Sun Jan 10, 2016 14:09
by Neuromancer
Sometimes it's a pain when parts of the rope disappear too quickly. It might be nice to have a top and a bottom rope node that is a different color or is just darker or lighter shade. Then the rope could just stay there until you punch/ dig an end node and then the rope disappears and goes into your inventory as a hook again.
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Sun Jan 10, 2016 17:37
by AiTechEye
you can easly change it:
look for (at line 219): minetest.register_node("hook:rope", {
then: minetest.env:get_node_timer(pos):start(3)
change the number to something longer or remove to remove the timer
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Sun Jan 10, 2016 17:47
by Don
env: is depreciated. You might want to consider updating the code. You just need to remove env:
It only needs to be minetest.get_node_timer
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Fri Mar 11, 2016 04:51
by Sokomine
Didn't have time to actually play with it, but from the screenshots there's really something missing at the top. Facing a wall and "throwing" (placing) the rope could add a hook on the first horizontal surface so that the rope doesn't hang in midair. If the hook is long enough and sticks out upwards at a 45 degree angle or similar, it might look convincing. The trouble is that that'd require several more nodes and textures (or a really nicely done model). Ropes fit very well into the MT world and are usually more useful than ladders because they don't require huge amounts of sticks to craft.
Re: [Mod] Hook V6.1 (and/with rope)

Posted:
Fri Mar 11, 2016 14:28
by AiTechEye
I have idea to fix that, like a rop that works like the mesecons,(need 1 model only)
and a throwing/place rop should be added or replace
+ a oxygen bottle that gives extra bubbles in water.
but first i need to finish the sunshinesurvive mod...
adding stuff like a carnivorous plant, toxic berries (hurts with many times after punch with it, or eating it) and quicksand (generating holeroom under and hurts)
Re: [Mod] Hook V8 (survive tools) [hook]

Posted:
Sun Mar 13, 2016 12:44
by AiTechEye
Done
Re: [Mod] Hook V8 (survive tools) [hook]

Posted:
Thu Mar 17, 2016 02:41
by Sokomine
UjEdwin wrote:Done
That looks very nice. Thanks! Now there's no fear to fall down again when the rope learns about gravity :-)