Sorry for the time between updates; I have been working with weaponry recently.
I've been working on creating item versions of HL2 weapons. The weapons I've created for Itemforge use other items for ammo, like in Fallout 1 & 2.
The base_ranged weapon has been around for a while, but it was buggy and not fit for making other items with. I've only recently improving it; this means fixing the ammo loading, adding proper wire support, fixing the right click menu options, and creating ways for the players to load/unload ammo into the guns.
I've created two ranged weapons so far:
*A copy of the HL2 SMG, which takes SMG ammo in the primary and SMG Grenades in the secondary
*A copy of the Garry's Mod Flechette Gun (which takes flechette ammo).
Ammo loading/unloading has been giving me a lot of trouble, which is the main thing I have been focusing on.
There are several ways ammo can be loaded into a gun. The ways I have set up so far are:
* You can drag-drop ammo onto to a gun's world entity or to it's icon.
* While holding the ammo, you can load it into a gun by [USE]ing the gun.
* While holding the gun, you can load ammo by [USE]ing the ammo.
* While holding the gun, you can press R to reload. The gun will then try to locate some nearby ammo to load. I have it set up so scripters can make their own "find ammo" functions (so for example if your gamemode gives players inventories, you could make a findammo function that searched the player's inventory for ammo).
* You can right click the gun and choose "Reload" on it's right click menu. This does the same thing as above.
* Wiremod can tell the guns to reload themselves. This does the same thing as above.
* Additionally, any ammo in the gun can be unloaded by choosing "Unload [ammo name]" on it's right click menu.
Guns are wire-enabled! Put them in the world and control their primary and secondary fire with Wiremod. You can also get the amount of ammo in the primary/secondary clip.
Lastly, I've added an ammo meter to the weapons' icons that lets you check how much primary ammo you've got. It flashes red when you're at 20% or less.
Screenshots:
Shooting an SMG nade at antlions:
[img]http://img38.imageshack.us/img38/5588/gmflatgrass0061.jpg[/img]
Flechette gun:
[img]http://img33.imageshack.us/img33/9923/gmflatgrass0056.jpg[/img]
Wiremod:
[img]http://img132.imageshack.us/img132/111/rpc18v10005.jpg[/img]
Wiremod:
[img]http://img29.imageshack.us/img29/4556/rpc18v10006.jpg[/img]
Weapon menu:
[img]http://img14.imageshack.us/img14/5443/rpc18v10007.jpg[/img]
Lastly, I have been working on some other miscellaneous odds and ends that I can't completely recall at the moment. One of them was adding temporary "Selected Item Name & Description" text to the inventory:
[img]http://img20.imageshack.us/img20/2826/withtext.png[/img]
Cool.
This work is absolutely godlike.
I think Garry should endorse and assist in this project, and release it in a large official update to make everyone jump in glee.
[QUOTE=ntzu;15256581]This work is absolutely godlike.
I think Garry should endorse and assist in this project, and release it in a large official update to make everyone jump in glee.[/QUOTE]
This.
Today, I mostly fixed miscellaneous issues.
I fixed two moderately long-standing issues with inventories:
There was a bug where drag-dropping would cause items to appear in several slots of an inventory; this has been fixed; it turns out it was an oversight on the code that moves the items from slot to slot.
The other bug would be that if an inventory had limitless slots, sometimes the inventory window wouldn't allow you to scroll down to a lone item stuck on a lower row in the inventory. This was caused by me using table.getn instead of table.maxn when calculating the bottom row.
If you have two stacks of items that are the same type, you can now drag one stack on top of another to merge the two.
I have created an ammo_buckshot item (shotgun shells) for my version of the HL2 Shotgun; the shotgun itself isn't made yet. The ammo_buckshot item has an interesting feature, though. Whenever the number of shells is beneath 20, it has a single-shell model that plays the "clink" sounds whenever it falls on the ground (or is otherwise knocked around). If it's 20 or above, it shows the box of shotgun shells model you are familiar with.
I'm considering changing how the base ranged weapon works; right now, primary fire uses ammo from the primary clip, and secondary fire uses ammo from the secondary clip; however, some weapons like the HL2 shotgun have one clip for two modes of fire. I'm considering rewriting it so you can specify the number of clips you want a weapon to have. This would be nice because it would give you the option to have 3 or more clips if you wanted!
Items now have a built-in starting amount; whenever an item is spawned, it will be spawned with that many items in the stack.
The Item slots have been modified so that the models appear larger in them.
A relatively new Itemforge module that I haven't mentioned up until now is "Gear Attachment". This is used for attaching models to both bones and attachment points; originally this code was only used in the Item SWEP for the world models of held items; now this can be used for attaching models to any bone or attachment point; this may come in handy for worn equipment later on down the line (or even for something like attaching a tank to a player's back when he holds a flamethrower). The nice thing about this module is that you can have world models for weapons you normally wouldn't be able to hold:
Here's a screenshot of me holding a flechette:
[img]http://img33.imageshack.us/img33/7059/gmflatgrass0062.jpg[/img]
When setting networked variables on the server, there is now an option to only set the var serverside without changing it clientside; this is useful for networking macros.
Lastly, I noticed how weird it looked having all of the items rotating in the same basic direction, so this has been changed so that each item now rotates in a slightly different direction:
[img]http://img36.imageshack.us/img36/5331/randomrotate.png[/img]
[QUOTE=theJ89;15275905]Today, I mostly fixed miscellaneous issues.
I fixed two moderately long-standing issues with inventories:
There was a bug where drag-dropping would cause items to appear in several slots of an inventory; this has been fixed; it turns out it was an oversight on the code that moves the items from slot to slot.
The other bug would be that if an inventory had limitless slots, sometimes the inventory window wouldn't allow you to scroll down to a lone item stuck on a lower row in the inventory. This was caused by me using table.getn instead of table.maxn when calculating the bottom row.
If you have two stacks of items that are the same type, you can now drag one stack on top of another to merge the two.
I have created an ammo_buckshot item (shotgun shells) for my version of the HL2 Shotgun; the shotgun itself isn't made yet. The ammo_buckshot item has an interesting feature, though. Whenever the number of shells is beneath 20, it has a single-shell model that plays the "clink" sounds whenever it falls on the ground (or is otherwise knocked around). If it's 20 or above, it shows the box of shotgun shells model you are familiar with.
I'm considering changing how the base ranged weapon works; right now, primary fire uses ammo from the primary clip, and secondary fire uses ammo from the secondary clip; however, some weapons like the HL2 shotgun have one clip for two modes of fire. I'm considering rewriting it so you can specify the number of clips you want a weapon to have. This would be nice because it would give you the option to have 3 or more clips if you wanted!
Items now have a built-in starting amount; whenever an item is spawned, it will be spawned with that many items in the stack.
The Item slots have been modified so that the models appear larger in them.
A relatively new Itemforge module that I haven't mentioned up until now is "Gear Attachment". This is used for attaching models to both bones and attachment points; originally this code was only used in the Item SWEP for the world models of held items; now this can be used for attaching models to any bone or attachment point; this may come in handy for worn equipment later on down the line (or even for something like attaching a tank to a player's back when he holds a flamethrower). The nice thing about this module is that you can have world models for weapons you normally wouldn't be able to hold:
Here's a screenshot of me holding a flechette:
[img]http://img33.imageshack.us/img33/7059/gmflatgrass0062.jpg[/img]
When setting networked variables on the server, there is now an option to only set the var serverside without changing it clientside; this is useful for networking macros.
Lastly, I noticed how weird it looked having all of the items rotating in the same basic direction, so this has been changed so that each item now rotates in a slightly different direction:
[img]http://img36.imageshack.us/img36/5331/randomrotate.png[/img][/QUOTE]
The item rotation is :(
I'd suggest a different background for the item icons and a standard rotation that looks good on every item.
The Gear Attachment is :)
You'll be able to make all sorts of awesome shit like silencers on pistols and all that sort of giggly stuff. One little problem with this, though: If you're going to draw those models on the viewmodels too, you're going to need a dll to set the rendergroup of that entity.
If you need one just ring me up.
When I saw the flechette in his hands, all of the worries in my life just melted away. I always wanted to be able to equip gear. (Tried parenting stuff to me, but it didn't rotate when I moved. Disappointment.) This... Is... Awesome.
Nice, very nice :)
This is going to be one of the major mod releases in a while I think.
If this and the movie projector are released this year I think I'll explode with happiness.
I CAN'T WAIT! Just yesterday, I was looking for an inventory for Garry's Mod, then I found your thread. HAVE A COOKIE!!!!
This looks amazing. I'm glad to see a project like this coming along so well.
So, you will be able to wear different things? And they will lets say, give boost o your armour or something?
Link?
[QUOTE=Onfifty;15362151]Link?[/QUOTE]
It is a WIP, not released yet.
Pretty please put an svn up :(
holy crap its clientside awesome i always wanted a invintory so that a could like carry a ent around all the time or maybe i could spawn a quantum storage device AND carry it around,that would be awesome so good luck and i hope you release it soon :) bye
IF this finishs and turns out to be HALF as good as it appears to be it will be a big thing for garrys mod maybe even moreso than PHX and wiremod - keep working on this it looks epic!!
Like the crate stool, but advanced and with inventory system. Could it be or is it possible to store [u]non player charters[/u] into [i]inventory[/i] [b][i]of hundreds of soldiers[/i][/b], or even just few NPCs?
(Presumably it would [u]crash[/u] with hunders of them)
*Yes I know you can 'crate' NPC Kleiners into single boxes with that crate stool
**And what if you store [u]active grenade[/u] [u]before it explodes[/u]? Or is it possible to do?
You sir, are a god! I've been wondering about a decent inventory system for a long time, I always thought that was source engines weakness was that everything in regards to character customization and....forgetting the word here....individuality! everything in regards to character individuality in source games is very limited, you have your 1-6 slots where you can collect and use guns, you have your status hud, that's it. This is amazing, I anxiously await to see what comes out of this project, I think it could really put a new twist to playing gmod. Secondlife is similar in that it's a game created by players, but that everyone has an inventory where they can store things they've created and edit them, and also that in SL you can edit your playermodel. I would love to see something like this for gmod, the ability to parent things to your playermodel and edit it, not only color and texture, but also be able to attach your own creations to yourself, script jetpacks that activate in noclip mode and make you move faster, that kind of stuff.
SL uses a system where you can attach things from your inventory to different parts on your body, like left forearm, skull, torso, spine, right foot, etc. and then position the object to tweak it while it's attached. This could be done by holding C and dragging the object around while it's attached or something, just thinking out loud.
EDIT: [QUOTE=Mudkipzpwn;15276940]When I saw the flechette in his hands, all of the worries in my life just melted away. I always wanted to be able to equip gear. (Tried parenting stuff to me, but it didn't rotate when I moved. Disappointment.) This... Is... Awesome.[/QUOTE]
This actually worked out pretty well for me :D
Parented three turrets above my head, three manhacks in front of me like a barrier and a camera behind me for a third person view, had fun with it for a while but the manhacks were really obnoxious:
[IMG]http://i126.photobucket.com/albums/p102/Furuncle/gm_botmap0002.jpg[/IMG]
[QUOTE=garry;13338065]This is pretty kewl dude[/QUOTE]
::::::::::::::::::::::::::::::::::::OOOOOOOOOOOOOOOOOOOOOOOOOOO ggggggggaaaaaaarrrrrrryyyyyyy sbhldf has dlhfalskjdhflkashdflkahsldkfjhlaksj pppsjzxdkjvd;flkjg;slkdfjg;lkdjflg; haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxxxx ::::::)))))) :) :o
Very nice dude.
I can't wait to have melee battles with a friend by throwing pans and kettles at him.
Egad!
Its Amazing!
Wondiferous!
Exquisit!
Excellent!
Perfect!
Kewl!
Cool!
Is there a "Drop all" button? Because if there is you have created a server crashig device.
Heres how it works.
-minge gets on server.
-slowly acumulates asplosive props and junk in invetories.
-when he has 9000 props he dumps them all at once into the server.
-server crashes.
Pretty cool thing though.
[QUOTE=GmanMan;15382872]Is there a "Drop all" button? Because if there is you have created a server crashig device.
Heres how it works.
-minge gets on server.
-slowly acumulates asplosive props and junk in invetories.
-when he has 9000 props he dumps them all at once into the server.
-server crashes.
Pretty cool thing though.[/QUOTE]
Inventories can implement stacking, forcing them into stacks that are dropped as sub-inventories. So the person would need to overflow with unique items ( or be able to carry enough items to overflow on the drop all ) in order to crash like that.
Assuming the server has the inventory set up correctly, that is.
And even then, i am sure there will be a items per container limit.
[QUOTE=kevkev;15384202]And even then, i am sure there will be a items per container limit.[/QUOTE]
Exactly, containers already have support for limiting by slots, size, or weight.
It's all in the OP, what this supports, updated about a week ago unless theJ89 updated it sometime after yesterday midafternoon.
Just wow
Cant wait for the release! :v:
Can't wait! But is it togglable?
Sorry, you need to Log In to post a reply to this thread.