[Mod] Spears [2.2] [spears]

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

[Mod] Spears [2.2] [spears]

by Echoes91 » Post

Spears

This mod adds spears to Minetest games. They are versatile weapons that can be used to attack like a normal sword, even if slower, or safely thrown to the bad ones from the distance.
These are the spears introduced within throwing enhanced, now improved, and here is where I'll continue their development.

Image

Download from content DB - Minetest version 5.2.0 required

Run git clone https://gitlab.com/echoes91/spears.git from mods folder to clone the repository. Beware, mess in progress :)

Browse the code and report bugs

Dependencies: default

License:
Code under LGPLv2.1
Textures and sounds under CC-BY 3.0
+ Spoiler
+ Spoiler
+ Spoiler
+ Spoiler
Have fun!
Last edited by Echoes91 on Fri May 08, 2020 17:51, edited 15 times in total.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Spears [alpha1] [spears]

by Don » Post

+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha2] [spears]

by Echoes91 » Post

Added screenshot and fixed a bug causing spears that hit a mob and a node at the same time to duplicate.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Spears [alpha2] [spears]

by Don » Post

Looks awesome. If you don't mind I am going to use this in my subgame.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha2] [spears]

by Echoes91 » Post

Don wrote:Looks awesome. If you don't mind I am going to use this in my subgame.
Have fun!

User avatar
DS-minetest
Member
Posts: 1138
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Spears [alpha2] [spears]

by DS-minetest » Post

the mod looks interesting
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha3] [spears]

by Echoes91 » Post

Fixed spears that used to self repair while being thrown after reaching maximum wear. Reorganized code files for better visualization.
DS-minetest wrote:the mod looks interesting
I hope so :)

User avatar
Krock
Developer
Posts: 4556
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Spears [alpha3] [spears]

by Krock » Post

Why did I not see this mod earlier?!
The throw function works fine but I would like to throw them using the LMB, like with snowballs and shuriken.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha3] [spears]

by Echoes91 » Post

Krock wrote:Why did I not see this mod earlier?!
The throw function works fine but I would like to throw them using the LMB, like with snowballs and shuriken.
Because it appeared few days ago :) they were introduced within my older mod but it was turning into a big mess.
Assigning a function to the LMB would remove the tool's capabilities (dig and melee attack), while at the RMB would work only if pointing at something (close enough to get a selected target). These are API limitations.

User avatar
Napiophelios
Member
Posts: 1018
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Spears [alpha3] [spears]

by Napiophelios » Post

I made some 32px textures for this awhile back if you want to use them
spears_textures_32px.zip
License:WTFPL
(3.42 KiB) Downloaded 60 times

Image
spearz32.png
(7.12 KiB) Not downloaded yet

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Spears [alpha3] [spears]

by Minetestforfun » Post

Napiophelios wrote:I made some 32px textures for this awhile back if you want to use them
spearz32.png
We also made our 32px textures https://github.com/MinetestForFun/serve ... s/textures
Feel free to re-used them.

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha3] [spears]

by Echoes91 » Post

Napiophelios wrote:I made some 32px textures for this awhile back if you want to use them
spears_textures_32px.zip

Image
spearz32.png
Nice! I prefer to keep it as coherent as possible with default game, using 16x16 textures with similar look and feel, however of course everybody must feel free to replace them, you just have to give them the same names and put them into the texture folder.
Minetestforfun wrote:
Napiophelios wrote:I made some 32px textures for this awhile back if you want to use them
spearz32.png
We also made our 32px textures https://github.com/MinetestForFun/serve ... s/textures
Feel free to re-used them.
OMG you have the earliest snapshot, where i didn't even finish to rewrite the README.txt XD. I'd really suggest you to upgrade to the latest release since there was quite some mess that has been fixed.

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: [Mod] Spears [alpha3] [spears]

by Minetestforfun » Post

Echoes91 wrote: OMG you have the earliest snapshot, where i didn't even finish to rewrite the README.txt XD. I'd really suggest you to upgrade to the latest release since there was quite some mess that has been fixed.
Yes, as you can see here https://github.com/MinetestForFun/serve ... issues/304 we planned to update the mod but we haven't updated the mod for the moment.

My earlier post wasn't for your advice on our updates cycle, but was on the 32px textures we made/use and we want to share with you. ;)

User avatar
swordpaint12
Member
Posts: 191
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]
Location: Foobass, isle of Atlantis, castle of Bardvendelle

Re: [Mod] Spears [alpha3] [spears]

by swordpaint12 » Post

I believe I use your throwing mod. Kind of a shame they aren't being developed together anymore, but kind of makes sense. +1
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [alpha3] [spears]

by Echoes91 » Post

Minetestforfun wrote:My earlier post wasn't for your advice on our updates cycle, but was on the 32px textures we made/use and we want to share with you. ;)
Of course, but I felt quite guilty for having published such an unpolished snapshot so I'm hoping for any of its tracks to disappear as soon as possible...
swordpaint12 wrote:I believe I use your throwing mod. Kind of a shame they aren't being developed together anymore, but kind of makes sense. +1
Actually i split them because i noticed that developing one set of features (like spears) wasn't bringing improvements to the others anymore, but just increasing the mess. I thought that spears would have been similar to arrows but now they don't share a single function anymore.
Once all of its sets will be functional and polished as themselves, so that one can concentrate testing and development easily on one without breaking any other, throwing enhanced will probably survive as a modpack.

User avatar
swordpaint12
Member
Posts: 191
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]
Location: Foobass, isle of Atlantis, castle of Bardvendelle

Re: [Mod] Spears [alpha3] [spears]

by swordpaint12 » Post

Yes. That makes lots of sense. Maybe eventually you'll upgrade it to a weapons modpack. I dunno. Best of luck!
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.

npx
Member
Posts: 164
Joined: Thu Apr 09, 2015 21:17
In-game: npx
Location: Turin, Italy

Re: [Mod] Spears [alpha3] [spears]

by npx » Post

Amazing! I love your work!

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [1.0] [spears]

by Echoes91 » Post

Updated to 1.0
Since I've not been able to animate spear's flight any better through using API, this first stable version won't bring any drastic change.
However, apart of knowing that everything works good, this release brings a small buff to spears' speed and, consequently, damage at range, two new spears were added and inventory images now are oriented like all the other default's tools.
I've been testing for some hours now, also hosting (and playing) multiplayer, no issue have emerged so far.

Dalethejr
New member
Posts: 7
Joined: Thu Feb 11, 2016 23:48
GitHub: LuaLover
IRC: LuaLover
In-game: LuaLover

Re: [Mod] Spears [1.0] [spears]

by Dalethejr » Post

Sorry for copying your mod dude, I hadn't seen this before... I'll put a link in my mod so ppl can come see this one

Dalethejr
New member
Posts: 7
Joined: Thu Feb 11, 2016 23:48
GitHub: LuaLover
IRC: LuaLover
In-game: LuaLover

Re: [Mod] Spears [1.0] [spears]

by Dalethejr » Post

Also, would you like to combine our mods? viewtopic.php?f=9&t=14044

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [1.0] [spears]

by Echoes91 » Post

Dalethejr wrote:Sorry for copying your mod dude, I hadn't seen this before... I'll put a link in my mod so ppl can come see this one
Dalethejr wrote:Also, would you like to combine our mods? viewtopic.php?f=9&t=14044
If you had not seen this one you can't have copied it, so your work is totally yours. Spears are a really ancient weapon so nobody can't patent such an idea :)
I have not enough time to develop mods right now, however i released them as free software (see the licence) which means that anybody can look at the code, modify it and publish it again as long as is under the same licence (and possibly with some credits to the author).
If you would like to improve my work or merge some features into yours you're welcome, surely it's better to join forces instead of developing something redundant.
I see that your mod has more features other than spears and since mines are older (so probably more refined) you could create a modpack containing my repo cloned among with your new weapons.

Dalethejr
New member
Posts: 7
Joined: Thu Feb 11, 2016 23:48
GitHub: LuaLover
IRC: LuaLover
In-game: LuaLover

Re: [Mod] Spears [1.0] [spears]

by Dalethejr » Post

Echoes91 wrote:
Dalethejr wrote:Sorry for copying your mod dude, I hadn't seen this before... I'll put a link in my mod so ppl can come see this one
Dalethejr wrote:Also, would you like to combine our mods? viewtopic.php?f=9&t=14044
If you had not seen this one you can't have copied it, so your work is totally yours. Spears are a really ancient weapon so nobody can't patent such an idea :)
I have not enough time to develop mods right now, however i released them as free software (see the licence) which means that anybody can look at the code, modify it and publish it again as long as is under the same licence (and possibly with some credits to the author).
If you would like to improve my work or merge some features into yours you're welcome, surely it's better to join forces instead of developing something redundant.
I see that your mod has more features other than spears and since mines are older (so probably more refined) you could create a modpack containing my repo cloned among with your new weapons.
Well, thanks dude, I'm kinda new to the forum and was just checking. Thanks.

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [1.1] [spears]

by Echoes91 » Post

I'm glad to announce that in Update 1.1 spears can be finally thrown using right mouse button!

This thanks to new API -> It requires Minetest version 5.2.0 or newer

User avatar
Echoes91
Member
Posts: 75
Joined: Thu Feb 19, 2015 13:21
In-game: Echoes
Location: Lombardy, Italy

Re: [Mod] Spears [2.0] [spears]

by Echoes91 » Post

Version 2.0 has arrived and it's a pretty big update. It has:
  • - Cleaner, streamlined code without deprecated functions
    - Spears hurt players
    - Spears animated in flight
    - Spears stick into nodes
    - New textures
    - New sound when hitting flesh
    - New receipt to fit with default tools
    - Drag now depends on fluid
    - Rewritten instructions
    - New gold-plated spear to celebrate
Please report bugs and have fun!

Bastrabun
Member
Posts: 113
Joined: Mon Nov 04, 2019 19:48

Re: [Mod] Spears [2.0] [spears]

by Bastrabun » Post

I'm going to test that mod for my server :)

Are you planning on submitting it to content db?

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests