[Mod] Firearms [0.2.0] [firearms]

Exilyth
Member
 
Posts: 71
Joined: Sun Jul 28, 2013 18:46
Location: Earth

Re: [Mod] Firearms [0.2.0] [firearms]

by Exilyth » Fri Sep 18, 2015 16:21

Can a gun be made to switch between different fire modes, e.g. single shot, semi automatic, burst, automatic?

Slightly related: what about modifications installed on a gun like e.g. an assault rifle with underbarrel grenadelauncher/shotgun/flamethrower? (modifications could be just a different fire mode, e.g. cycle semi, full, underbarrel, back to semi)
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Thu Nov 19, 2015 22:05

This mod doesn't work. You can shoot someone at point blank range with an M9 pistol, and it doesn't hit or damage them. The M9 does damage, but very inefficiently.
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Fri Nov 20, 2015 16:56

Code: Select all
2015-11-20 11:48:24: ERROR[Main]: ServerError: Runtime error from mod 'firearmslib' in callback environment_Step(): .../rubenwardy/.minetest/mods/mt-firearms/firearmslib/bullet.lua:20: attempt to compare nil with number
2015-11-20 11:48:24: ERROR[Main]: stack traceback:
2015-11-20 11:48:24: ERROR[Main]:    .../rubenwardy/.minetest/mods/mt-firearms/firearmslib/bullet.lua:20: in function 'is_inside'
2015-11-20 11:48:24: ERROR[Main]:    .../rubenwardy/.minetest/mods/mt-firearms/firearmslib/bullet.lua:72: in function 'find_collision_point'
2015-11-20 11:48:24: ERROR[Main]:    .../rubenwardy/.minetest/mods/mt-firearms/firearmslib/bullet.lua:110: in function 'on_step'
2015-11-20 11:48:24: ERROR[Main]:    ....minetest/mods/mt-firearms/firearmslib/pureluaentity.lua:45: in function '__do_step'
2015-11-20 11:48:24: ERROR[Main]:    ....minetest/mods/mt-firearms/firearmslib/pureluaentity.lua:197: in function <....minetest/mods/mt-firearms/firearmslib/pureluaentity.lua:194>
2015-11-20 11:48:24: ERROR[Main]:    /usr/local/share/minetest/builtin/game/register.lua:355: in function </usr/local/share/minetest/builtin/game/register.lua:335>
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Sat Nov 21, 2015 04:28

I've done some debugging. Here is the crashing function in firearmslib, with added debug output:

Code: Select all
local function is_inside(px, py, pz, x1, y1, z1, x2, y2, z2)
        --print(("*** DEBUG: Is inside? p=(%f,%f,%f), minp=(%f,%f,%f), maxp=(%f,%f,%f)"):format(px, py, pz, x1, y1, z1, x2, y2, z2))
        if px and py and pz and x1 and y1 and z1 and x2 and y2 and z2 then
                return (
                        (px >= x1) and (px <= x2)
                        and (py >= y1) and (py <= y2)
                        and (pz >= z1) and (pz <= z2)
                )
        else
                print("Error: " .. dump({ px=px, py=py, pz=pz, x1=x1, y1=y1, z1=z1, x2=x2, y2=y2, z2=z2 }))
                return false
        end
end


here is the code that calls it (see comment for exact position):

Code: Select all
local function find_collision_point(objtype, pos, node_or_obj)
        -- TODO:
        -- This should return the actual point where the bullet
        -- "collided" with it's target, or nil if it did not "hit".
        if objtype == "node" then
                local boxes
                local def = minetest.registered_nodes[node_or_obj.name]
                if not (def and def.walkable) then return end
                if (def.drawtype == "nodebox") and def.node_box and def.node_box.fixed then
                        boxes = def.node_box.fixed
                else
                        boxes = full_box
                end
                local px, py, pz =
                        pos.x - math.floor(pos.x) + 0.5,
                        pos.y - math.floor(pos.y) + 0.5,
                        pos.z - math.floor(pos.z) + 0.5
                if type(boxes[1]) == "number" then
                        local x1, y1, z1, x2, y2, z2 = unpack(boxes)
                        if is_inside(px, py, pz, x1, y1, z1, x2, y2, z2) then
                                return pos
                        end
                else
                         for _, box in ipairs(boxes) do
                                local x1, y1, z1, x2, y2, z2 = unpack(box)
                                if is_inside(px, py, pz, x1, y1, z1, x2, y2, z2) then
                                        return pos
                                end
                        end
                end
        elseif objtype == "object" then
                local objpos = node_or_obj:getpos()
                local px, py, pz =
                        pos.x - objpos.x,
                        pos.y - objpos.y,
                        pos.z - objpos.z
                local x1, y1, z1, x2, y2, z2
                if node_or_obj:is_player() then
                         x1, y1, z1, x2, y2, z2 = -0.25, -0.5, -0.25, 0.25, 1.25, 0.25
               else
                        local e = node_or_obj:get_luaentity()
                        if not (e and e.collisionbox) then
                                return
                        end
                        x1, y1, z1, x2, y2, z2 = unpack(e.collisionbox)
                end
                -- this is where it is called from:
                if is_inside(px, py, pz, x1, y1, z1, x2, y2, z2) then
                        return pos
                end
        end
end


The output is:

Code: Select all
Error: {
   pz = -1.8512248349521,
   px = 0.52047790073571,
   py = 1.0474177973035
}


Which means that x1, y1, z1, x2, y2, z2 = nil

It's probably time for me to sleep now, but I'll investigate more tomorrow.
 

anuser
Member
 
Posts: 22
Joined: Sun May 01, 2016 23:07

Re: [Mod] Firearms [0.2.0] [firearms]

by anuser » Sun May 01, 2016 23:15

First I must say that this mod is awesome. I like all the guns, bullets and the counter. But there is only one thing wrong - this not work with mobs! Any suggestion what to do? I would like to use it with mobs redo...

I know that this is not new mod, many things could change in game engine and other modes since the firearms last update, but maybe it is any chance to use firearms now?
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Firearms [0.2.0] [firearms]

by TheReaperKing » Sat Jun 25, 2016 02:12

I believe what has to happen is that the damage groups have to be set up like fleshy, etc. I'm testing out different stuff and hopefully I can figure it out!
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

Teen_Miner
New member
 
Posts: 8
Joined: Fri Jun 03, 2016 18:21

Re: [Mod] Firearms [0.2.0] [firearms]

by Teen_Miner » Fri Jul 22, 2016 23:38

which mobs do they damage other than players?
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] Firearms [0.2.0] [firearms]

by TheReaperKing » Sat Jul 23, 2016 12:48

They don't damage anything.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

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

Re: [Mod] Firearms [0.2.0] [firearms]

by DS-minetest » Thu Aug 04, 2016 17:29

found a bug:
Image
use the night vision on day, instead of deactivating scroll in hotbar, everything seems to be dark
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Diamond knight
Member
 
Posts: 473
Joined: Sun Apr 19, 2015 19:50
Location: Chilling in Constantinople
GitHub: Diamondknight
In-game: Ferrumprinceps

Re: [Mod] Firearms [0.2.0] [firearms]

by Diamond knight » Sat Dec 10, 2016 19:56

suggestion: make a setting for using entities as the line of sight is even more buggy then entities right now but line of sight should still stay in and be fixed
 

User avatar
Christian9
Member
 
Posts: 337
Joined: Fri Sep 19, 2014 20:29
Location: Hell Creek
In-game: Christian9
 

User avatar
azekill_DIABLO
Member
 
Posts: 7491
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

IanniPowerup!!!
Member
 
Posts: 100
Joined: Wed Nov 29, 2017 17:33
In-game: IanniPowerup

Re: [Mod] Firearms [0.2.0] [firearms]

by IanniPowerup!!! » Fri Dec 01, 2017 19:24

I AM IMPRESED !! This is amazing . Tho it doesn't look exactly like the image . Anyway all this would need is sound
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Fri Dec 01, 2017 19:31

IanniPowerup!!! wrote:I AM IMPRESED !! This is amazing . Tho it doesn't look exactly like the image . Anyway all this would need is sound


This mod is quite broken and crashes quite a lot. I suggest trying shooter or ranged weapons
 

User avatar
azekill_DIABLO
Member
 
Posts: 7491
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Firearms [0.2.0] [firearms]

by azekill_DIABLO » Fri Dec 01, 2017 20:11

rubenwardy wrote:This mod is quite broken and crashes quite a lot.

Well, I use it on 4.16 and it has no pb. It even works with CME.

I suggest trying shooter or ranged weapons

Well, simple shooter doesn't even work minetest 0.4.16... but the other looks very nice, will try it out!
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Sat Dec 02, 2017 01:02

azekill_DIABLO wrote:Well, simple shooter doesn't even work minetest 0.4.16... but the other looks very nice, will try it out!


Works perfectly fine on CTF
 

User avatar
azekill_DIABLO
Member
 
Posts: 7491
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Firearms [0.2.0] [firearms]

by azekill_DIABLO » Sat Dec 02, 2017 10:42

oh. this mod. okay. last time I tried it crashed. anyway firewarms still works fine!
 

IanniPowerup!!!
Member
 
Posts: 100
Joined: Wed Nov 29, 2017 17:33
In-game: IanniPowerup

Re: [Mod] Firearms [0.2.0] [firearms]

by IanniPowerup!!! » Sat Dec 02, 2017 21:23

azekill_DIABLO wrote:
TheReaperKing wrote:They don't damage anything.

FAlse they damage mila mobs.

and? Why not all entities ?
 

User avatar
azekill_DIABLO
Member
 
Posts: 7491
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Firearms [0.2.0] [firearms]

by azekill_DIABLO » Sun Dec 03, 2017 12:50

I only had tried with them at the time I said this. Actually they seems to damage everything!
 

User avatar
ProxyAble
New member
 
Posts: 2
Joined: Fri Dec 22, 2017 13:14

Re: [Mod] Firearms [0.2.0] [firearms]

by ProxyAble » Fri Dec 22, 2017 14:17

I might have encountered a bug... Or an issue. I'm not really sure if this is caused on my part but-

After enabling the mod through a freshly created world (No others mods), it spews out this error "2017-12-22 22:00:02: ERROR[Main]: generateImage(): Could not load image "firearms_medkit_inv.png" while building texture; Creating a dummy image" and as you might have guessed, the med-kit item doesn't have a texture, I checked the textures folder and it exist, but for some reason it can't render it in-game.

EDIT: Also no sounds and I'm using 0.4.16
 

User avatar
azekill_DIABLO
Member
 
Posts: 7491
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Firearms [0.2.0] [firearms]

by azekill_DIABLO » Fri Dec 22, 2017 18:35

actually, there's a small typo in the name of the texture. For sounds, i don't know. I have them. (btw: i have no hud for aiming or reticle like I aways had, is this normal?)
 

xeno
New member
 
Posts: 7
Joined: Mon Feb 25, 2019 11:59
In-game: xeno

Re: [Mod] Firearms [0.2.0] [firearms]

by xeno » Tue Oct 01, 2019 07:23

nice mod !
but when i shoot the bazooka it makes me crash

and i cant find the sniper

but nice mod !
 

xeno
New member
 
Posts: 7
Joined: Mon Feb 25, 2019 11:59
In-game: xeno

Re: [Mod] Firearms [0.2.0] [firearms]

by xeno » Tue Oct 01, 2019 07:27

and when any explosions happen it makes me chrash
 

xeno
New member
 
Posts: 7
Joined: Mon Feb 25, 2019 11:59
In-game: xeno
 

User avatar
rubenwardy
Moderator
 
Posts: 5948
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Firearms [0.2.0] [firearms]

by rubenwardy » Tue Oct 01, 2019 08:29

This mod is very broken. I suggest using "shooter" by stujones
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 4 guests