[Mod] Grenades API [grenades]

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

[Mod] Grenades API [grenades]

by Lone_Wolf » Post

Grenades API

Adds an API for easily creating throwable grenades.

Downloads: Latest Stable

View: On ContentDB
View: Source Code

License: MIT

Depends: None
Optional Depends: None
Last edited by Lone_Wolf on Sun Feb 09, 2020 19:26, edited 12 times in total.
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

Update!
  • Flashbang was nerfed
  • Regular grenade was nerfed a little too much, undid this
  • Added crafting recipes
  • Fixed a bug with the flashbang
  • Few other minor changes
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
DELTA_FORCE
Member
Posts: 165
Joined: Tue Oct 30, 2018 01:26
IRC: DELTA_FORCE
In-game: DELTA_FORCE
Location: ee

Re: [Mod] Grenades [grenades] [v0.5]

by DELTA_FORCE » Post

So what exactly is in the mod? Maybe specifying what is in the mod would make it more appealing.
check me out nowhere because i never do anything

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

DELTA_FORCE wrote:So what exactly is in the mod? Maybe specifying what is in the mod would make it more appealing.
Spoiler
Three place-able and throw-able grenades. And an API to add more.
Image

Grenades
  • Regular - When it explodes it kills all players nearby.
  • Flashbang - When it explodes it temporarily blinds any players looking at it
  • Smoke - When it explodes it creates a cloud of swirling smoke you can't see through Image
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
DELTA_FORCE
Member
Posts: 165
Joined: Tue Oct 30, 2018 01:26
IRC: DELTA_FORCE
In-game: DELTA_FORCE
Location: ee

Re: [Mod] Grenades [grenades] [v0.5]

by DELTA_FORCE » Post

Ok cool thanks!
check me out nowhere because i never do anything

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] Grenades [grenades] [v0.5]

by BrunoMine » Post

I've been thinking about it for some time. Thanks for the initiative, I want to help with the API to support the future grenades I want to do.
These initiatives save a lot of development time.
I do not know if you know how to work cooperatively or if you want to get help on this project, in that case you can expect me in github.

Screenshots on the first post, please.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] Grenades [grenades] [v0.5]

by Stix » Post

An idea: how-about it someone shoots a placed grenade it sets it off? :D
Hey, what can i say? I'm the bad guy.

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

Stix wrote:An idea: how-about it someone shoots a placed grenade it sets it off? :D
That would probably be up to the mod that adds the guns. It should be pretty easy to do. If needed I could store the on_explode function in the global grenades variable
Last edited by Lone_Wolf on Sat Nov 24, 2018 04:01, edited 1 time in total.
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

BrunoMine wrote:I do not know if you know how to work cooperatively or if you want to get help on this project, in that case you can expect me in github.
Either works. Whichever is easiest for you. What grenades are you planning on doing?
BrunoMine wrote:Screenshots on the first post, please.
Done. I'll have to get some better ones soon.
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Grenades [grenades] [v0.5]

by TumeniNodes » Post

don't forget to add
https://en.wikipedia.org/wiki/M18_Claymore_mine
these could be tuned to work with technics

and RPGs
A Wonderful World

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

TumeniNodes wrote:don't forget to add
https://en.wikipedia.org/wiki/M18_Claymore_mine
these could be tuned to work with technics
lol, tempting. Probably be laggy if it has to check for players every tenth of a second though. Might release it as an 'addon'
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.5]

by Lone_Wolf » Post

Update!
  • Improved API.
  • Added API.md file (See original post)
  • Added missing depends.txt
  • Added trailing smoke particles to smoke grenade (See original post or spoiler below)
  • Fixed a bug or two
  • Quite a few other things I've forgotten
Spoiler
Image
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades] [v0.8-stable]

by Lone_Wolf » Post

Update!
  • Added sounds (WIP)
  • Improved the grenades
  • New license for textures
  • Minor improvements
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
MCL
Member
Posts: 654
Joined: Mon Aug 20, 2018 00:44
GitHub: MCLx86
IRC: migdyn
In-game: singleplayer
Contact:

Re: [Mod] Grenades [v0.8] [grenades]

by MCL » Post

Which version of CC BY?
2014-02-14 - 2024-02-14 TEN YEARS OF MCL

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [v0.8] [grenades]

by Lone_Wolf » Post

migdyn wrote:Which version of CC BY?
4.0
I've updated the OP. I must have forgotten to put in the version number
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
MCL
Member
Posts: 654
Joined: Mon Aug 20, 2018 00:44
GitHub: MCLx86
IRC: migdyn
In-game: singleplayer
Contact:

Re: [Mod] Grenades [grenades]

by MCL » Post

Thank you!
2014-02-14 - 2024-02-14 TEN YEARS OF MCL

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades [grenades]

by Lone_Wolf » Post

Update!
  • Greatly improved grenade physics
  • Remove backwards compat with older version
  • A few small tweaks
basic_grenades has been tweaked a bit too. I've improved the recipes, added an explosion texture to the frag grenade (the itemstring of which has changed btw), and improved how the other grenades work (flashbang is a little less buggy now)
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Adnunano
Member
Posts: 43
Joined: Thu Feb 13, 2020 09:28

Re: [Mod] Grenades API [grenades]

by Adnunano » Post

In any future will grenades hurt the enviroment and the animals?
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades API [grenades]

by Lone_Wolf » Post

Adnunano wrote:In any future will grenades hurt the enviroment and the animals?
Doesn't make sense for any but the frag grenade, but I've added plant/entity damage to my list for when I get back to my computer, which will be in two weeks.
If you were talking about the API: It doesn't handle any of that
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Adnunano
Member
Posts: 43
Joined: Thu Feb 13, 2020 09:28

Re: [Mod] Grenades API [grenades]

by Adnunano » Post

Better than nothing.I look forward to it.Thanks for taking my suggestion.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades API [grenades]

by Lone_Wolf » Post

Mobs now take damage from other entities.
Terrain damage is already supported it seems. Frag grenades will destroy flora and nodes with the dig_immediate group
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Adnunano
Member
Posts: 43
Joined: Thu Feb 13, 2020 09:28

Re: [Mod] Grenades API [grenades]

by Adnunano » Post

Astonishing.Again,thanks for making minetest more enjoyable.Now i can quickly kill the bears in the caves.Looks like Mobkit api is unsupported but mods_redo api are supported. Are you planning to add more grenade types like molotov?
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Grenades API [grenades]

by Lone_Wolf » Post

Adnunano wrote:Astonishing.Again,thanks for making minetest more enjoyable.Now i can quickly kill the bears in the caves.Looks like Mobkit api is unsupported but mods_redo api are supported. Are you planning to add more grenade types like molotov?
Yep, eventually. I'll probably do a 'fire_grenades' mod if I can think of some other fire related grenades to do
What mobkit mobs did you test this with? It should work fine with them
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Adnunano
Member
Posts: 43
Joined: Thu Feb 13, 2020 09:28

Re: [Mod] Grenades API [grenades]

by Adnunano » Post

I tested it with petz and wildlife mods.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Grenades API [grenades]

by runs » Post

Lone_Wolf wrote:
Adnunano wrote:Astonishing.Again,thanks for making minetest more enjoyable.Now i can quickly kill the bears in the caves.Looks like Mobkit api is unsupported but mods_redo api are supported. Are you planning to add more grenade types like molotov?
Yep, eventually. I'll probably do a 'fire_grenades' mod if I can think of some other fire related grenades to do
What mobkit mobs did you test this with? It should work fine with them
Hp default was buggy so mobkit introduced it own damage system. mobkit.hurt is the function to damage.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 20 guests