Dateien

> > CS2D > Lua Scripts > [EngiN33R] Custom Weapons
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch [EngiN33R] Custom Weapons >

140 Kommentare155 kb, 1.736 Downloads

alt [EngiN33R] Custom Weapons

EngiN33R
Moderator Off Offline

Finally, I'm uploading the long-awaited (or not so much so now) script that is the custom weapons mod!

This modification allows you to add your very own weapons to the game. Naturally, owing to CS2D's limitations, it doesn't simulate real weapons to the fullest extent, but it's the first step toward that, and dare I say, quite a big one. Hopefully now all the whiners will stop whining as much.

Console commands >


To-do list:
flame Make custom weapons hurt buildings
flame Implement support for projectile-based custom weapons
flame Implement support for melee custom weapons
• Remove the bufferimg workaround and do the bloody thing properly

If you have the need to edit the script, the code is commented in the most part; if you do not understand something - let me know in PM. If you have, for some reason, the intention to upload your modified script - I do not prohibit that, just be so kind as to mention what you based your edit on.

This is, of course, a beta version, and its features are quite limited. I will continue developing it further, the next thing to do is to add projectile-based custom weapon functionality. Please do leave feedback and report bugs if such are found.

EDIT: My apologies, I've now uploaded the missing files. The archive should be complete now and the script should work properly.
Another missing sprite has been added for the ammo box.
4× editiert, zuletzt 05.07.12 17:57:14
Zugelassen von Yates

Download Download

155 kb, 1.736 Downloads

Kommentare

140 Kommentare
Seite
Zum Anfang Vorherige 1 2 3 4 5 6 7 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

J4x
User Off Offline

just epic!
Ich mag es!

alt

Infinite Rain
Reviewer Off Offline

Cool but why didn't you use the original equip/strip/spawn commands?
Ich mag es!

alt

MikuAuahDark
User Off Offline

bug found: equip a asr-2 weapon(ID 2) then drop the claw, after you equip the claw again the weapon image not showed but the effects is still work and show this on console:
LUA ERROR: sys/lua/custom_weapons.lua:300: bad argument #1 to 'image' (string expected, got nil)
.. bdw nice
Ich mag es!

alt

Seekay
Reviewer Off Offline

@user Jela331: You can't destroy breakable walls and buildings either, just sayin'.
Ich mag es!

alt

Jela331
User Off Offline

@user EngiN33R:
By the way, you can't kill NPCs with custom weapons, please fix it.
Ich mag es!

alt

SkullzOrig
User Off Offline

@user EngiN33R: Sorry, that was mistake of sentencing on my behalf. I meant add a option to change the weight of the gun, so that we may rearrange the weight of the gun. And if that is not possible. Then maybe add a speed mod to it. Try to add speed = 1 -- 1 = light, 2 = average, 3 = heavy. Hope this makes more sense.
Ich mag es!

alt

EngiN33R
Moderator Off Offline

@user Seekay: It may be an image bug, when some image overlaps another one - in this case, some image may have overlapped the pistol's skin. I had the same one with bullets, and I fixed it by using the buffer images (a few block.bmp images created outside of the player's view). Until we have better control over images, by their ID or something, all I can do is try creating more buffer images or some other nasty workarounds.

And no, I put the P250 skin on the M9 by design, since it was really just a demonstration of silencer functionality.

@People having EAV errors: can't help you with that, I never had one with this script. Have you downloaded the latest version of CS2D? I remember it was a frequently encountered bug until a hotfix was released.

@user SkullzOrig: What do you mean 'add the edit for the weapon'? And by your setspeed suggestion, do you suggest having speeds between speedmod 0 and 1? About bullets - I'm quite sure that since it's scalable, it would look weird. Try it yourself - the bullet image is completely editable and you can easily modify it yourself.

alt

Seekay
Reviewer Off Offline

@user EngiN33R:

Here I'm holding the P250, but it doesn't have a skin. But it is in my gfx folder. The M9 is using that skin.
1
2
3
name = "M9",
		sprite = "gfx/weapons/p250.png",
		sprited = "gfx/weapons/p250_d.png",
You wrote P250 instead of M9. How I said, I don't even have the M9 skins either.
Ich mag es!

alt

Suprise
BANNED Off Offline

EXCEPTION_ACCES_VIOLATION when i tried to spawn a weapon. (p250) (And when equip)
Ich mag es!

alt

EpicCrisis
User Off Offline

Time to make a weapon that can fire OVER 9000!!!
Ich mag es!

alt

_Sub-Z3ro_
User Off Offline

when I try to spawn weapon I get this error
EXCEPTON_ACCEPT_VIOLATION
Ich mag es!

alt

Jynxxx
User Off Offline

@user SkullzOrig: You can edit the weapons functions. Setspeed, if you mean how fast the gun shoots add some like this to the weapon table
1
ht = 1--time unit for shots, in milliseconds
this will make the weapons firing speed more faster. He commented everything needed to know about the lua. You just didn't even read it.
Ich mag es!

alt

SkullzOrig
User Off Offline

In next update, try to add the edit for the weapon. If not possible, try to add a setspeed to the player. In a min and max of 0.1-1.0 or something like that. So the speed could be changed but not to some freakishly high speed. And is there any chance of improving the bullet image. I know it already is at a width of 1 pixel, but if you can try to make it skip a 1 pixel length so it would appear as tho it has a more accurate look when it fires. Just some suggestion/opinions. Good job by the way. But the script does remind me of CS2D Tibia rpg items.lua but running itself individual.
Ich mag es!

alt

Sparty
Reviewer Off Offline

"Grab somebody sexy and tell them hey"
Your Lua is fucking awesome whats next your on list?
Ich mag es!

alt

Pirtyu
User Off Offline

Wtf? Nice script
Ich mag es!

alt

buraxia3
User Off Offline

Magnificent!
Ich mag es!

alt

EndDead
User Off Offline

Oops i found a small bug, Damage has no effects on NPCs. But np its still beta.
Still good job
Ich mag es!

alt

EngiN33R
Moderator Off Offline

Gentlemen, please.

@user Seekay: I've just checked, all weapons have their skins in the archive - I'm not sure what you mean. The ammo box custom 'item' didn't have its sprite though, so I've fixed that, thank you - other than that, all weapons either have their sprites uploaded or use default ones.
Zum Anfang Vorherige 1 2 3 4 5 6 7 Nächste Zum Anfang