[mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by W3RQ01 » Post

Hi i have this error:

Code: Select all

AsyncErr: ServerThread::run Lua: Runtime error from mod 'rangedweapons' in callback luaentity_Step(): /home/dario/.minetest/mods/rangedweapons/ammo.lua:112: bad argument #2 to 'random' (interval is empty)
stack traceback:
	[C]: in function 'random'
	/home/dario/.minetest/mods/rangedweapons/ammo.lua:112: in function </home/dario/.minetest/mods/rangedweapons/ammo.lua:31>
This happensa everytime that a bullet hit something (block, entity or nodes)
OneUnitedPower

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by Minix » Post

There is a problem with this mod, it does not matter from how far you shoot a gun from another player, everyone on the server can hear the gunshots. This only happened with some guns on version 0.3 but on 0.4 it happens with every single sound effect. Apart from that the new features are awesome. I will take a look at the code and try to fix the bug when I have the time.

Bag0Cheese
Member
Posts: 48
Joined: Fri Mar 26, 2021 02:08
In-game: BagoCheese
Location: why do you care?
Contact:

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by Bag0Cheese » Post

question, what does using it with more ores do?
You know the rules and so do I, SAY GOODBYE

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by davidthecreator » Post

Bag0Cheese wrote:
Tue May 25, 2021 16:15
question, what does using it with more ores do?
Some crafting recipes need moreores

mase
Member
Posts: 91
Joined: Tue Feb 21, 2017 20:16
In-game: mase

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by mase » Post

Is there a special reason why you don't put the code directly into the git repo and tag the releases? That would make it easier to track for updates.

User avatar
TechnoWolfTV
Member
Posts: 64
Joined: Wed Jan 29, 2020 20:04
In-game: TechnoWolfTV
Location: Wisconsin, USA

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by TechnoWolfTV » Post

Running into a similar error as W3RQ01. Running Minetest v5.4.1 and Rangedweapons v0.4 on an Ubuntu VM instance. In testing in singleplayer creative and spawning various monsters and shooting various rangedweapons, everything was fine. This is only happening in a multiplayer server environment:

Code: Select all

2021-09-04 21:25:28: ACTION[Server]: player Me (id=1, hp=20) punched LuaEntitySAO "mobs_monster:mese_monster" at (279,-744,-4) (id=7, hp=21), damage=4
2021-09-04 21:25:28: ACTION[Main]: Server: Shutting down
2021-09-04 21:25:30: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback luaentity_Step(): /minetest/bin/../mods/rangedweapons/ammo.lua:319: bad argument #2 to 'random' (interval is empty)
2021-09-04 21:25:30: ERROR[Main]: stack traceback:
2021-09-04 21:25:30: ERROR[Main]:       [C]: in function 'random'
2021-09-04 21:25:30: ERROR[Main]:       /minetest/bin/../mods/rangedweapons/ammo.lua:319: in function </minetest/bin/../mods/rangedweapons/ammo.lua:31>

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by davidthecreator » Post

sus

Brinso
Member
Posts: 21
Joined: Wed Mar 24, 2021 17:32
GitHub: BrinsoUwU
IRC: Brinso
In-game: Game_Lord

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by Brinso » Post

is the minigun in here? 'cause i don't see it in my creative inventory

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

davidthecreator wrote:
Sun Sep 05, 2021 01:40
sus
Yo bro... im interested in your Mod... When i downloaded it i noticed many bugs.. ill list them but i fixed them.
1. HUD of guns stay on all the time.
2. there was a 'rangedweapons_empty_shell_icon.png' HUD bug that covered left bottom of screen.
3. you couldnt hit an enemy close range.
4. sound.
5. TNT crash error.

To fix these bugs i:
1. removed all Gun HUD.
2. extended the skill chat call for downgraded skill to '600000000000000' .
3. i redrew the Scope HUD to make it clearer.
4. After a couple months i figured out why you cant hit mob close up so i adjusted the code of each gun.
5. i fixed 'get.yaw' bug and then needed to change the bullet to a sprite with 'BuckBall.png' texture.
6. I also removed the code to check for Anti Weapons Block... that check creates that tiny bit extra gun lag.
7. i removed the ricochet and the bullet spark to reduce its lag when many bullets are fired.
8. removed all sound.. even the sounds folder.
9. removed the callbacks for TNT.

Now, i wish to create a 'fork' of this mod. i have created good weapon textures and each weapon can hit close range mob (a mob within 1 block of you) .. im creating as many weapons as i can... I changed the grenade texture to a potato .. hahaha... potato 'cold' is a potato.. but pull the pin and it have a smiley face hahaha so funny. it was fun to draw.

Can i make a fork or do you want to add them to your mod? ... Create option 'dog_guns = true'.

i would like a copy of the init without the skills code
Last edited by L-Dog on Wed Nov 17, 2021 04:47, edited 2 times in total.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

Brinso wrote:
Sun Sep 05, 2021 17:26
is the minigun in here? 'cause i don't see it in my creative inventory
its in there.. not in inventory. i think it was disabled because of a bug.

go into minigun.lua and edit the top of the code... then change the 'dofile' string so it loads up the mini gun.

the textures are there for it

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by davidthecreator » Post

L-Dog wrote:
Wed Nov 17, 2021 04:19
davidthecreator wrote:
Sun Sep 05, 2021 01:40
sus
Can i make a fork
Always.

Mentos
Member
Posts: 22
Joined: Thu Apr 01, 2021 16:04

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by Mentos » Post

L-Dog wrote:
Wed Nov 17, 2021 04:19
davidthecreator wrote:
Sun Sep 05, 2021 01:40
sus
Now, i wish to create a 'fork' of this mod. i have created good weapon textures and each weapon can hit close range mob (a mob within 1 block of you) .. im creating as many weapons as i can... I changed the grenade texture to a potato .. hahaha... potato 'cold' is a potato.. but pull the pin and it have a smiley face hahaha so funny. it was fun to draw.

Can i make a fork or do you want to add them to your mod? ... Create option 'dog_guns = true'.

i would like a copy of the init without the skills code
Hi L-Dog, you did a fork? Can I try your custom version of this mod? I really love this mod and if you really have improved it as you wrote I would be happy to give it a try. Thank you!

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

Mentos wrote:
Tue Nov 30, 2021 16:06
L-Dog wrote:
Wed Nov 17, 2021 04:19
davidthecreator wrote:
Sun Sep 05, 2021 01:40
sus
Now, i wish to create a 'fork' of this mod. i have created good weapon textures and each weapon can hit close range mob (a mob within 1 block of you) .. im creating as many weapons as i can... I changed the grenade texture to a potato .. hahaha... potato 'cold' is a potato.. but pull the pin and it have a smiley face hahaha so funny. it was fun to draw.

Can i make a fork or do you want to add them to your mod? ... Create option 'dog_guns = true'.

i would like a copy of the init without the skills code
Hi L-Dog, you did a fork? Can I try your custom version of this mod? I really love this mod and if you really have improved it as you wrote I would be happy to give it a try. Thank you!
i have the version on my server but not released... i still need to do work on it, but code-wise its sound, i need create more weapons and test some new things out.

ill let you know when i complete it

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

Mentos wrote:
Tue Nov 30, 2021 16:06
L-Dog wrote:
Wed Nov 17, 2021 04:19
davidthecreator wrote:
Sun Sep 05, 2021 01:40
sus
Now, i wish to create a 'fork' of this mod. i have created good weapon textures and each weapon can hit close range mob (a mob within 1 block of you) .. im creating as many weapons as i can... I changed the grenade texture to a potato .. hahaha... potato 'cold' is a potato.. but pull the pin and it have a smiley face hahaha so funny. it was fun to draw.

Can i make a fork or do you want to add them to your mod? ... Create option 'dog_guns = true'.

i would like a copy of the init without the skills code
Hi L-Dog, you did a fork? Can I try your custom version of this mod? I really love this mod and if you really have improved it as you wrote I would be happy to give it a try. Thank you!
... Try this.... https://github.com/N-nec/rangedweapons-Dog-Wars... i smashed the Enemy and Rangedweapons together....

Tell me if it loads ok.... its legit and literally untested

**** Edit ****
i Just updated the script.. still not tested it yet but i think it should be fine

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

I think the scope was too small... couldnt see much so i thinned it out a bit
screenshot_20211201_014653.png
screenshot_20211201_014653.png (257.4 KiB) Viewed 4241 times

Mentos
Member
Posts: 22
Joined: Thu Apr 01, 2021 16:04

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by Mentos » Post

I created a new world with only your mod installed but the game crashed before start and I got this in debug.txt

2021-12-01 17:15:19: WARNING[Main]: Undeclared global variable "bullet_particles" accessed at ...\minetest-5.4.1-win64\bin\..\mods\rangedweapons/ammo.lua:8
2021-12-01 17:15:19: WARNING[Main]: Undeclared global variable "mobs" accessed at ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3
2021-12-01 17:15:19: ERROR[Main]: ModError: Failed to load and run script from C:\Users\Mirco\Desktop\giochi pc\minetest-5.4.1-win64\bin\..\mods\rangedweapons\init.lua:
2021-12-01 17:15:19: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3: attempt to index global 'mobs' (a nil value)
2021-12-01 17:15:19: ERROR[Main]: stack traceback:
2021-12-01 17:15:19: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3: in main chunk
2021-12-01 17:15:19: ERROR[Main]: [C]: in function 'dofile'
2021-12-01 17:15:19: ERROR[Main]: ...\minetest-5.4.1-win64\bin\..\mods\rangedweapons\init.lua:763: in main chunk

I then tried with mod "mobs" installed but I got the same error

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

Mentos wrote:
Wed Dec 01, 2021 16:19
I created a new world with only your mod installed but the game crashed before start and I got this in debug.txt

2021-12-01 17:15:19: WARNING[Main]: Undeclared global variable "bullet_particles" accessed at ...\minetest-5.4.1-win64\bin\..\mods\rangedweapons/ammo.lua:8
2021-12-01 17:15:19: WARNING[Main]: Undeclared global variable "mobs" accessed at ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3
2021-12-01 17:15:19: ERROR[Main]: ModError: Failed to load and run script from C:\Users\Mirco\Desktop\giochi pc\minetest-5.4.1-win64\bin\..\mods\rangedweapons\init.lua:
2021-12-01 17:15:19: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3: attempt to index global 'mobs' (a nil value)
2021-12-01 17:15:19: ERROR[Main]: stack traceback:
2021-12-01 17:15:19: ERROR[Main]: ...st-5.4.1-win64\bin\..\mods\rangedweapons/helicopter2.lua:3: in main chunk
2021-12-01 17:15:19: ERROR[Main]: [C]: in function 'dofile'
2021-12-01 17:15:19: ERROR[Main]: ...\minetest-5.4.1-win64\bin\..\mods\rangedweapons\init.lua:763: in main chunk

I then tried with mod "mobs" installed but I got the same error

i think its a depends.txt problem

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

Mentos wrote:
Wed Dec 01, 2021 16:19
I created a new world with only your mod installed but the game crashed before start and I got this in debug.txt


I then tried with mod "mobs" installed but I got the same error
https://github.com/N-nec/rangedweapons-Dog-Wars

its updated... try it. lastnight it wasnt merged correct... i use it on my server now...Less lag than running Ranged and enemy in separate mod folders
Last edited by L-Dog on Wed Dec 01, 2021 17:09, edited 1 time in total.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

the 'undeclared vars' are 'fossils' from when i deleted the HUD part of it.

Now i know.. self.object:remove() .. would of fixed this bug

User avatar
T6C
Member
Posts: 119
Joined: Thu May 07, 2020 17:11
In-game: T6C

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by T6C » Post

This is a fantastic mod. Great work, @davidthecreator! Here are a few suggestions for updates, some previously mentioned in this thread...
  • Everyone on the server can hear a gun being fired and reloaded regardless of where the gun is with respect to the player. The sound effect volume should diminish with distance, ultimately to zero at, say, 200 nodes.
  • The HUD artifact that shows which gun is active and the ammo loaded remains on the screen even after the gun is no longer the active item. This HUD artifact should be visible only when the gun is the active item.
  • The aforementioned HUD artifact should be in the upper-right corner of the window/screen, not near the middle of the field of view.
  • The guns are useless against mobs and players within about 5 nodes. Especially handguns should be able to do damage at point-blank range.
  • Every once in a while, the health bar is covered by the name of the gun being used, and that name is stuck there until the player restarts their client. Possible bug?
  • The guns should have safety mechanisms (perhaps toggled by the Minetest action key 'E'), so the weapon isn't accidentally fired when equipped.
Again, really good mod you've made here. Looking forward to further updates.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

T6C wrote:
Wed Dec 08, 2021 17:36
This is a fantastic mod. Great work, @davidthecreator! Here are a few suggestions for updates, some previously mentioned in this thread...
  • Everyone on the server can hear a gun being fired and reloaded regardless of where the gun is with respect to the player. The sound effect volume should diminish with distance, ultimately to zero at, say, 200 nodes.
  • The HUD artifact that shows which gun is active and the ammo loaded remains on the screen even after the gun is no longer the active item. This HUD artifact should be visible only when the gun is the active item.
  • The aforementioned HUD artifact should be in the upper-right corner of the window/screen, not near the middle of the field of view.
  • The guns are useless against mobs and players within about 5 nodes. Especially handguns should be able to do damage at point-blank range.
  • Every once in a while, the health bar is covered by the name of the gun being used, and that name is stuck there until the player restarts their client. Possible bug?
  • The guns should have safety mechanisms (perhaps toggled by the Minetest action key 'E'), so the weapon isn't accidentally fired when equipped.
Again, really good mod you've made here. Looking forward to further updates.
i fixed these..
i removed the hud.. and made the skills thing less spamy
https://github.com/N-nec/rangedweapons- ... yNoHud.lua

and the bullet richochet spark lag?
https://github.com/N-nec/rangedweapons- ... cochet.lua

i deleted the sound folder to fix the sound bug... but theres an easy fix... type 'max_hear_distance = 10' in the gun or ammo file.. im sure.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

T6C wrote:
Wed Dec 08, 2021 17:36
This is a fantastic mod. Great work, @davidthecreator! Here are a few suggestions for updates, some previously mentioned in this thread...
  • Everyone on the server can hear a gun being fired and reloaded regardless of where the gun is with respect to the player. The sound effect volume should diminish with distance, ultimately to zero at, say, 200 nodes.
  • The HUD artifact that shows which gun is active and the ammo loaded remains on the screen even after the gun is no longer the active item. This HUD artifact should be visible only when the gun is the active item.
  • The aforementioned HUD artifact should be in the upper-right corner of the window/screen, not near the middle of the field of view.
  • The guns are useless against mobs and players within about 5 nodes. Especially handguns should be able to do damage at point-blank range.
  • Every once in a while, the health bar is covered by the name of the gun being used, and that name is stuck there until the player restarts their client. Possible bug?
  • The guns should have safety mechanisms (perhaps toggled by the Minetest action key 'E'), so the weapon isn't accidentally fired when equipped.
Again, really good mod you've made here. Looking forward to further updates.
go into the gun .lua ... change the bullet speed to 20 .. velocity to 20... then its fine.. or add this sword function
https://github.com/N-nec/rangedweapons- ... he_Dog.lua

for obvs reasons a ranged weapon needs a faster bullet though

disable the TNT barrels... players like to stack them to crash the server in a BOOM

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

davidthecreator wrote:
Tue May 25, 2021 21:02
Bag0Cheese wrote:
Tue May 25, 2021 16:15
question, what does using it with more ores do?
Some crafting recipes need moreores
add 'max_hear_distance = 20' to fix the sound bug

User avatar
T6C
Member
Posts: 119
Joined: Thu May 07, 2020 17:11
In-game: T6C

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by T6C » Post

L-Dog wrote:
Wed Dec 08, 2021 20:17
i removed the hud.. and made the skills thing less spamy
The HUD doesn't need to be removed entirely. It needs to just be moved to a more appropriate location on the screen, and become invisible when the weapon isn't active.

If you removed the HUD, then how do you know how much ammo you have left in the clip, especially if you haven't used the gun in a while? You can't remove the clip to look. Currently, you need to fire one shot or reload to get the HUD to appear. But if you don't have a HUD at all, you have no choice but to reload first, or risk nothing happening when you pull the trigger.
L-Dog wrote: add 'max_hear_distance = 20' to fix the sound bug
Add that to what file? Will that change the max distance for all sounds to 20 or just this mod's sounds? The other sounds in the game are fine as-is.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [mod]ranged weapons[2021.03.05] [0.4] [rangedweapons]

by L-Dog » Post

T6C wrote:
Thu Dec 09, 2021 01:03
L-Dog wrote:
Wed Dec 08, 2021 20:17
i removed the hud.. and made the skills thing less spamy
The HUD doesn't need to be removed entirely. It needs to just be moved to a more appropriate location on the screen, and become invisible when the weapon isn't active.

If you removed the HUD, then how do you know how much ammo you have left in the clip, especially if you haven't used the gun in a while? You can't remove the clip to look. Currently, you need to fire one shot or reload to get the HUD to appear. But if you don't have a HUD at all, you have no choice but to reload first, or risk nothing happening when you pull the trigger.
L-Dog wrote: add 'max_hear_distance = 20' to fix the sound bug
Add that to what file? Will that change the max distance for all sounds to 20 or just this mod's sounds? The other sounds in the game are fine as-is.
ok...

the sounds are 'global' on this rangedweapons Mod.. add 'max_hear_distance = 20' on every gun.

the HUD was annoying enough for me to delete it, but adding 'self.object:remove()' would of removed the HUD icons after gun use

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests