[Mod] Gunslinger [alpha][gunslinger]

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

[Mod] Gunslinger [alpha][gunslinger]

by ANAND » Post

Gunslinger [alpha]

Gunslinger is one of the most advanced guns mods for Minetest. It provides a very simple API to register custom guns, and almost every aspect of the gun can be customized. See the README, and the official API documentation to know more!

License
Code: MIT
Media: CC0

ContentDB: https://content.minetest.net/packages/ANAND/gunslinger
Browse code: https://github.com/ClobberXD/gunslinger
Browse releases: https://github.com/ClobberXD/gunslinger/releases
Download: https://github.com/ClobberXD/gunslinger ... master.zip
Last edited by ANAND on Tue May 05, 2020 11:08, edited 10 times in total.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

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

Re: [Mod] Gunslinger (WIP) [gunslinger]

by Lone_Wolf » Post

This is great! +10
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

As the mod is now somewhat functional, I've created a pre-release for easy testing. https://content.minetest.net/packages/A ... /download/
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Nice!!!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Join and this is what I get:

Code: Select all

2019-01-05 21:40:11: ERROR[Main]: ModError: Failed to load and run script from C:\MT-0.5-master\bin\..\mods\gunslinger-master\init.lua:
2019-01-05 21:40:11: ERROR[Main]: C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:250: gunslinger.register_gun: Attempt to register gun of disabled type 'semi-automatic'
2019-01-05 21:40:11: ERROR[Main]: stack traceback:
2019-01-05 21:40:11: ERROR[Main]: 	[C]: in function 'error'
2019-01-05 21:40:11: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:250: in function 'register_gun'
2019-01-05 21:40:11: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master/guns.lua:1: in main chunk
2019-01-05 21:40:11: ERROR[Main]: 	[C]: in function 'dofile'
2019-01-05 21:40:11: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master\init.lua:7: in main chunk
2019-01-05 21:40:11: ERROR[Main]: Check debug.txt for details.
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

Thanks for reporting, this has been fixed. Please get the updated version from the GitHub repo or the CDB.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Ok thanks!

:(

Code: Select all

2019-01-06 15:49:12: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'gunslinger' in callback item_OnUse(): C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:165: attempt to perform arithmetic on field 'time' (a function value)
2019-01-06 15:49:12: ERROR[Main]: stack traceback:
2019-01-06 15:49:12: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:165: in function <C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:124>
^^^^^^^ when i use the cheetah gun.
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

Fixed. Again, thanks for reporting. :)

Created another release. Please update your mod to the latest version.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Thanks hope it works:)!
ugh again after a while of trying to shoot this is what it gives me:(

Code: Select all

2019-01-07 15:06:42: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'gunslinger' in callback environment_Step(): C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:55: attempt to index local 'stack' (a nil value)
2019-01-07 15:06:42: ERROR[Main]: stack traceback:
2019-01-07 15:06:42: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:55: in function 'fire'
2019-01-07 15:06:42: ERROR[Main]: 	C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:196: in function <C:\MT-0.5-master\bin\..\mods\gunslinger-master/api.lua:185>
2019-01-07 15:06:42: ERROR[Main]: 	C:\MT-0.5-master\bin\..\builtin\game\register.lua:420: in function <C:\MT-0.5-master\bin\..\builtin\game\register.lua:400>
2019-01-07 15:06:42: ERROR[Main]: stack traceback:
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

I've encountered this myself quite a few times, I'll look into it.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Thanks.
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

Updates!

  • The fire function aborts if stack is nil, avoiding the error described here.
  • The gun definition field style_of_fire has been renamed to mode.
  • Some firing modes have been renamed for consistency and factual accuracy:
    • semi-automatic --> hybrid
    • manual --> semi-automatic
  • A new firing mode has been introduced: manual. Manual guns are truly manual, as in they have to be manually loaded after each shot. This can be used for guns like bolt-action sniper rifles, for example.
As usual, I've created a pre-release on CDB for those who prefer that to downloading from GitHub.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

How do you even shoot?
I keep clicking left and right mouse button but nothing happens:(
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

StarNinjas wrote:How do you even shoot?
I keep clicking left and right mouse button but nothing happens:(
lol, sorry. I forgot to rename style_of_fire field in the gun's definition to mode. Fixed now.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by StarNinjas » Post

Okay hope it works lol
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

Updates!

- Fix a potential crash.
- Set firing mode of `gunslinger:cheetah` to `burst` until `automatic` mode is fixed.
- Use particles for visual feedback of projectile path.

Created another release as usual.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (WIP) [gunslinger]

by ANAND » Post

Argh, I didn't even get the opportunity to bid farewell to the 15 posts that vanished... -_-
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (v0.20-pre) [alpha][gunslinger]

by ANAND » Post

The lost posts included release announcements, bug reports, feedback, and feature requests. I'll try to at least make a summary of the release announcements.

v0.9-pre

v0.10-pre

v0.11-pre

v0.12-pre

v0.13-pre

v0.14-pre

v0.15-pre

v0.16-pre

v0.17-pre

v0.18-pre

v0.19-pre

v0.20-pre

My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (v0.22-pre) [alpha][gunslinger]

by ANAND » Post

Pre-release 23 (v0.22-pre)


  • Zoom and scoping mechanics have been implemented.
  • New `config.debug` variable has been added, to allow `gunslinger` to toggle debug-only features. This would be set to `true` by default, until the `v1.0.0` release.
  • There have been some improvements to the structure and accuracy of the API documentation.
Changelog: https://github.com/ClobberXD/gunslinger ... .v0.22-pre

--------------------------------

Progressive Raycasting coming up! :)
Last edited by ANAND on Thu May 21, 2020 16:28, edited 1 time in total.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (v0.23-pre) [alpha][gunslinger]

by ANAND » Post

Pre-release 24 (v0.23-pre)


  • Deferred Raycasting, out. Progressive Raycast, in.
    • Progressive Raycast simulates the movement of each projectile along its trajectory on each server step.
    • When a projectile intersects a target, the target is damaged by config.base_dmg * def.dmg_mult.
    • All objects are valid targets.
    • TODO: Implement on_hit callback, and ignore default damage mechanics if callback is defined for a gun.
  • Support for projectile particle texture has finally been added.
    • If not explicitly specified in the gun def, the default projectile particle texture is used.
    • Note: Gunslinger doesn't support asymmetric textures (e.g. textures that resemble actual bullets) out of the box.
  • Determine debug mode from the gunslinger.debug setting instead of hard-coding it.
Changelog: https://github.com/ClobberXD/gunslinger ... .v0.23-pre
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Gunslinger (v0.24-pre) [alpha][gunslinger]

by ANAND » Post

Pre-release 25 (v0.24-pre)


  • Ammo is something mods needs to register using the gunslinger.register_ammo API method.
    • Currently, ammo does not have any functional significance, and only support the itemdef field.
  • Ammo finally has a proper texture.
  • New API method gunslinger.get_config for mods to access a copy of gunslinger's internal config (includes stuff like default values, debug mode, etc.).
Changelog: https://github.com/ClobberXD/gunslinger ... .v0.24-pre
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
thunderdog1138
Member
Posts: 68
Joined: Sun Dec 08, 2019 00:45
GitHub: thunderdog1138
In-game: thunderdog
Location: Venator-class Star Destroyer in the Xanadu System

Re: [Mod] Gunslinger [alpha][gunslinger]

by thunderdog1138 » Post

Thanks for creating this mod. Is there a way for a gun to have unlimited ammo?
Check out my Star Wars subgame.

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

Re: [Mod] Gunslinger [alpha][gunslinger]

by Lone_Wolf » Post

From the CTF Discord a few months ago:
Hello everyone. I'm online only to announce that I'm leaving Minetest (and CTF) permanently, due to a recent turn of events IRL.
I had one hell of a ride throughout my journey in Minetest and CTF, and I'd like to thank everyone for this. I hope CTF continues to develop into a super-awesome game.
Farewell :wave:
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
thunderdog1138
Member
Posts: 68
Joined: Sun Dec 08, 2019 00:45
GitHub: thunderdog1138
In-game: thunderdog
Location: Venator-class Star Destroyer in the Xanadu System

Re: [Mod] Gunslinger [alpha][gunslinger]

by thunderdog1138 » Post

Well that sucks. I was going to use it in my Star Wars game to make blasters.
Check out my Star Wars subgame.

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: [Mod] Gunslinger [alpha][gunslinger]

by StarNinjas » Post

Thats sad :'(
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests