Omg, It's Amazing!! Lua King!!! Chewgum's Inventory addons was good but now it's gone. Inventory Addon 2.0 have PILE OF ERRORS! But i think Item Forge is Perfect Inventory System.
If Item Forge is remake for DarkRP, Maybe DarkRP is AWSOME!!!!
That's just my opinion. Ignore.
[QUOTE=rebel1324;17672820]Omg, It's Amazing!! Lua King!!! Chewgum's Inventory addons was good but now it's gone. Inventory Addon 2.0 have PILE OF ERRORS! But i think Item Forge is Perfect Inventory System.
If Item Forge is remake for DarkRP, Maybe DarkRP is AWSOME!!!!
That's just my opinion. Ignore.[/QUOTE]
You know, I always thought that itemforge came first, even that the inventory addon used itemforge. Though I'm not completely sure, as I haven't been able to find the inventory addon to investigate. Can anyone confirm this for me?
Two questions. 1. How do you open up your inventory (Yes, I read the instructions). 2. How come when I open the debug menu, there is nothing in it, and I can't click on anything in it, I can't close it, I can't move it, and when I tried typing in itemforge_debug again, I got this
[code]Itemforge Inventories: Couldn't handle incoming message from client -
message type wasn't received.
Itemforge Debug:
Couldn't handle incoming message from Player [1][[CIA] ZOmBine] -
message type wasn't received.[/code]
Nice bump you smelly penis.
I'm only posting an error and a question. Why is that so bad?
[QUOTE=TehBigCheese;18510496]Nice bump you smelly penis.[/QUOTE]
At least he didn't make a new thread about it and actually posted in the thread of people who know what his problem is. Consider that before instantly flaming someone about a bump.
Well, I fixed the not being able to use the items and stuff, but now when I spawn something, it's invisible. I have no idea why. Also, I can't quite get the password lock to attach to a footlocker. It always gets stored in the locker.
[b]EDIT:[/b]
I got the lock working, but I just can't seem to figure out why everything is invisible when I spawn it. Color tool doesn't work, nor does material tool. Please help me if you can.
Ok, this is weird. I opened up the debug menu, pressed ESCAPE, spawned something from the menu, and it wasn't invisible; however, when I spawned it by opening the menu and pressing [b]C[/b], the item spawned invisible and all I saw was a shadow. Please help.
If the item is not visible, it may be that the item is not linking to it's entity clientside. I'll see if I can do something about that with the next update.
I'd suspect that something hasn't been installed right, or that a Garry's Mod update has broken Itemforge. You mentioned that incoming messages couldn't be received, this is often caused by an out-of-date debug module, but I've never received a message that said the message type wasn't received.
It's pretty hard for me to tell without actually being there, but can you describe your situation to me?
Are you doing this in singleplayer or multiplayer? And if multiplayer, are you testing this on a listen server that you are hosting?
Is this vanilla gmod or have you installed any other addons? If so, which?
[b]Status Update[/b]:
I haven't been working on Itemforge recently, but I'll issue an SVN update to commit the changes I've made so far sometime soon.
I've started on a save/load module but before I can progress with that I will be updating the way Itemforge networks it's data. I'm going to make a general purpose NWTable that the items and inventories will be derived from.
I'll have a complete list of changes when I post the next status update.
I use it in singleplayer with only 4 addons. Cinematic cameras, Gore mod, explosive tool, and this.
I'm actually pretty glad he bumped this, I had never known about it. I might be able to put this to some use in the Bergenbuild.
Does the player have a viewable inventory yet?
All the items are like sweps and can be held and are displayed in your weapon interface. Does that suffice your needs?
Fine, FINE, I'll add a script that gives the player a viewable inventory to the Beta SVN since everyone seems so hell-bent on this.
I'm removing the player's inventory for the final release, however.
It's funny because a viewable inventory takes about 10 lines of code to create.. If people can't figure that out, how are they going to figure anything important out..
In my humble opinion, the save module is the most important.
Saving items is easy, but I don't know how to approach saving inventories, and the items connected to those inventories, and inventories within inventories..
I seem to have found a bug. In rp_townsend_v1, whenever I attach a password lock to a door, the door will open, but not close again. Once I detach the password lock, it closes again. (The door was not locked)
The same thing happens with base locks.
Something up with a map's door, same thing happens with the map doors spawned with the Door STool, it doesn't close because something is "in the way". I'm not entirely sure why it does that, either, it's some bug in the system or it was specifically coded so someone couldn't jam a prop in there and permanently shut the door.
gotta say, I'm really impressed with this! could be really useful for certain types of different game modes, and role playing. I probably won't use it, but it's really neat!
[QUOTE=theJ89;18586296]Fine, FINE, I'll add a script that gives the player a viewable inventory to the Beta SVN since everyone seems so hell-bent on this.
I'm removing the player's inventory for the final release, however.[/QUOTE]
Sorry, I didn't mean to offend :)
I've just been screwing around with making an inventory system for an entirely unrelated project. I was just curious as to whether or not you'd created one, and if so, how.
i must say though this is pure win and this could possibly be the single most epic addon if it allowed saving, however difficult. but ive been looking for something just like this for my ZombieRP server so thanks a million man
keep this thread alive people
This is some amazing work!
Nice work. Yet another great theJ89. enjoyed seeing your codes since 06 :)
The beta SVN has been updated. This particular cycle took a long time but adds a lot of stuff.
Many of the things here are WIP and may not work correctly or at all, but I'll finish them off when I have time.
[b]Status Update:[/b]
Changes to Itemforge's UI allow you to drag/drop items by holding C and dragging their world entities with your mouse. Additionally changes to Itemforge's UI now make drag/drops more friendly for developers - any entity or panel can be rigged to allow dragging and accept dropped panels. The item entity can detect when it is moused over, moused out, mouse pressed, and mouse released. However the item entity doesn't pass this functionality to the items yet - the code is currently used for drag-drops.
Itemforge Item Entities now glow orange while your cursor is overhead.
[img]http://img697.imageshack.us/img697/5483/gmatomic0010.jpg[/img]
While holding an item, you can drag/drop another item onto the held item's slot (displayed in the upper-left corner).
Dragdropping an item in the world is now handled somewhat differently. A trace using the item's model will be used to determine where to drop the item. This may make placement somewhat harder but will reduce the likeliness the item's entity will spawn inside of another object / will fall out of the map.
Players now have inventories. You can access them with the console command "show_inventory".
I suggest binding this to a key: [b]bind "l" "show_inventory"[/b]
The PlayerInv module gives players after about 5 seconds after being ingame or something.
Any items in a player's inventory are removed after they leave.
New Items:
Many of these are WIP.
[b]Metal Reinforcement Kit[/b]:
When you use one of these on an item, it increases the HP of that item by 200 (or if it's a stack of items, divides the bonus by the number of items in the stack).
[img]http://img444.imageshack.us/img444/4430/dragdropreinforce.png[/img]
It also changes the material the item uses.
[img]http://img197.imageshack.us/img197/3996/reinforced.png[/img]
[b]Turn Lock[/b]:
This item is a simple deadbolt. After attaching the lock, using it will lock/unlock whatever it's attached to.
This item is particularly useful when used indoors (you could have a password lock on the outside and a turn lock on the inside). I've also found it useful if you just want to close a footlocker (although in the future I'll probably make it so you just have to select "close" from the menu or something).
[b]Keyboard[/b]:
This item allows you to play a virtual piano with your keyboard. This works, but only if you have the associated sound pack. I didn't bother to include it with Itemforge because it's huge. Just ignore it.
[b]Battery[/b]:
This item is WIP. I'm going to have it act like ammunition for electrical devices like the lanterns.
[b]Unremarkable Pumpkin[/b]:
I forgot what this does.
[b]Containers[/b]:
Crate (item_crate): A small item crate (uses the same model as the ammo crates scattered all over the HL2 campaign). Accepts 15 items up to 40kg, size 26 or under.
Paper Bag (item_bag): Even smaller and less durable than the crate (uses the fast food bag model). Accepts 5 items up to 1kg, size 12 or under.
[b]Weapons[/b]:
Combine Sniper Rifle (weapon_combinesniper): Jaanus graciously granted me permission to use and distribute the models/materials for his combine sniper rifle with Itemforge. I did not use his code, however. I coded my own version of his sniper rifle, which is somewhat WIP. The combine sniper rifle is extremely powerful, albeit slow. A single shot can send barrels flying into several feet the air. Besides that, it also features a targeting laser and scope (which can be activated with the right mouse button). It is loaded with pulse ammunition. The scope cannot currently be adjusted and often times doesn't zoom in/out correctly (it's supposed to zoom in to the chosen zoom level each time you swap to the scope). Additionally, the sniper rifle's laser may be invisible to players unless looking in the general direction of the rifle it's coming from.
Stunstick (weapon_stunstick): This is a WIP version of the HL2 Stunstick. For the most part this weapon is complete, it's just missing some various effects. Like the original, the stunstick is slower than the crowbar but does more damage.
Pulse Rifle (weapon_ar2): This is a WIP version of the HL2 Pulse Rifle. It currently doesn't have a secondary attack and fires weirdly.
Crossbow (weapon_crossbow): Again, a WIP version of the HL2 Crossbow. This doesn't fire bolts even if they are loaded and has no scope.
RPG (weapon_rpg): Another WIP version of the HL2 RPG. This doesn't fire missiles yet.
[b]Ammunition[/b]:
9mm Ratshot Ammuntion (ammo_ratshot): Personally my favorite type of ammunition so far, this ammuntion is filled with lead shot. Loading this into the H&K USP Match will make it fire like a low-powered shotgun. This ammunition is colored violet, as opposed to standard 9mm Ammunition which is colored green.
Pulse Ammuntion (ammo_ar2): Works for both the Pulse Rifle (weapon_ar2) and the Combine Sniper Rifle(weapon_combinesniper)
Combine Ball (ammo_ar2_altfire): Secondary ammuntion for the Pulse Rifle. WIP
Rebar (ammo_crossbow): Ammunition for the crossbow.
RPG Round (ammo_rpg): Missile for the RPG. WIP
The following items have had their names changed to/from:
Buckshot / Shotgun Shells
9mm Ammunition / Pistol Ammo
Colt Python / .357 Revolver
Franchi SPAS-12 / Shotgun
The following items have more accurate descriptions:
.357 Ammo
Buckshot
9mm Ammunition
SMG Grenade
Rope
Colt Python
Crowbar
Franchi SPAS-12
The following items now have realistic weights:
.357 Ammo
Buckshot
Flechette
9mm Ammunition
SMG Ammo
SMG Grenade
Lantern
Password Lock
Rope
Sawblade
Trashcan
Colt Python
Axe
Flechette Gun
H&K USP Match
Rock-It Launcher
Franchi SPAS-12
H&K MP7
The following items now have item sizes set:
Buckshot
Flechette
9mm Ammunition
SMG Ammo
SMG Grenade
Lantern
Item Magnet
Password Lock
Sawblade
Trashcan
Colt Python
Axe
Flechette Gun
H&K USP Match
Rock-It Launcher
Franchi SPAS-12
H&K MP7
Many, many items now have world models held correctly by the player:
.357 Ammo
Buckshot
9mm Ammunition
SMG Ammo
SMG Grenade
Rope
Flechettes now spawn in a stack of 30 (previously 20).
Rope now spawns with only 500 units worth of rope (previously 1000).
Bugs with item icons and world models not showing up when an item is held were fixed.
The default item icon (melonracer/go) disappeared with the latest GMOD update, so it's now using hammer's env_cubemap icon (editor/env_cubemap).
Karolis O. created an icon for the Item Magnet:
[img]http://img29.imageshack.us/img29/5908/magneticr.png[/img]
All items now have an "Examine" option that outputs some information about the item to the chat (name, amount, total weight, condition, description, etc).
Now by default, items with a size >= 30 cannot be held.
[b]You can now set an item's color with the toolgun.[/b] Try this out on the lantern in particular.
The lantern's world model was not showing up when held. This has been fixed.
If an item's world model is changed to the same world model it already has, no action is taken (the modelname is not re-networked to the client, the item's entity is not respawned).
Item amount is now a "predicted" var. All this really means is the item's amount will not change immediately after it's set - it will change when the server ticks a few milliseconds later. I did this because often times an item's amount changes several times between ticks, sometimes unnecessarily. This measure reduces unnecessary network traffic. One tradeoff is that it may take slightly longer for the client to be informed in a change in item amount.
The base item's SetNWColor function was not protected. This has been fixed.
The annoying clientside warning "Itemforge Items: Warning! Setting entity of ITEM to ENTITY even though it already has an entity (EXISTING ENTITY)!" has been commented out. This bug occurs randomly and does not appear to affect the item
oh man this is amazing fantastic to see your still working on it and updating it :) although i have one problem is it possible for a weapon template of yours to have ironsights? possibly because im retarted
Could the items be updated to use DTVars for things like health, amounts and weights?
Also, if an inventory has a weight limit of 40 kilos. And a crate has a weight limit of 50 kilos. And you fill the crate up to 50 kilos, prevent the crate from being able to be put into the inventory.
Another thing, the weights of things should be in the 'best' unit. While the standard now is in grams, it's annoying having for example, 4000 grams, it's easier to just read 4 kilograms.
[QUOTE=Kill coDer;18812362]Could the items be updated to use DTVars for things like health, amounts and weights?
[/QUOTE]
Garry has only made DTVars accessible through entities, so no. The networking update I'm making aims to make the Itemforge's networking resemble source's DTVars more, but that still won't solve the prediction problems until garry finds a way to better integrate these.
[QUOTE=Kill coDer;18812362]Also, if an inventory has a weight limit of 40 kilos. And a crate has a weight limit of 50 kilos. And you fill the crate up to 50 kilos, prevent the crate from being able to be put into the inventory.[/QUOTE]
Right now, none of the container items get any heavier when items are inserted into them. I can do this, but it's going to take a while since I need to handle cases where a weight change is not allowed (eg adding an item to an inventory would cause the inventory's attached crate to grow heavier, which would break the weight cap of the inventory the crate was in, so deny the insertion).
Additionally, not all containers should behave like this (grow heavier when items inserted). The Bag of Holding from D&D can hold many, many items without growing heavier, and imitation bags of holding have the effect of reducing half the weight placed in them (or something). And I want to make that available to coders as well, so I'll likely be spending a while on this.
[QUOTE=Kill coDer;18812362]Another thing, the weights of things should be in the 'best' unit. While the standard now is in grams, it's annoying having for example, 4000 grams, it's easier to just read 4 kilograms.[/QUOTE]
Yeah, when you examine an item in the new update it says "4 kg" instead of "4000 grams", I'll be going through and fixing that up in various places for the next update. The reason it hadn't been done before is because Itemforge is based off of Stranded 2's inventory system. They displayed the weight in grams, so I did too:
[img]http://img198.imageshack.us/img198/5762/strandinv.png[/img]
Speaking of which, I have a few ideas planned for the new networking system that should make networking a lot easier, however this is likely going to be a major change from the old networking system.
I plan to do away with the whole SetNWInt(), SetNWFloat(), etc stuff. Instead, I was thinking of just declaring a variable as a networked variable (eg NetworkedObject:NWVar("Weight") ). That way, you could just do item.Weight=5 on the server, and the server would automatically update the var (whether or not a variable changed would be determined on tick, just like the DTVars). After the variable arrives on the client, the update would then take effect on the next client tick.
Whenever I do this, I'll also improve Itemforge's efficiency checking for changes. I think whenever a networked variable is set I can mark the item/inventory containing it as "changed" like source does for entities. This can be done by having __newindex check the key to see if a networked variable is being set. Marking the item as "changed" will insert it into a table of networked objects that gets checked each tick. Networked objects in this table will be checked for changes and then cleared. This is an improvement upon the current way things are done - each tick every item is checked for changes.
Additionally, for the Networked Commands, I was thinking I could divide that into NetworkedObject:C2SNWCommand(FuncName,args) and NetworkedObject:S2CNWCommand(FuncName,args).
This way, you could have a shared function which runs on both the server and client.
Declaring a function as a C2SNWCommand would mean that whenever you call that function clientside (and it returns true), it runs it serverside.
Declaring a function as a S2CNWCommand would mean that whenever you call that function serverside (and it returns true), it runs it clientside (I haven't yet decided how the programmer would give a specific client to run the command on).
[lua]
function ITEM:TurnOn(player)
if !self:Event("CanPlayerInteract",false,player) then return false end
if SERVER then
self:EmitSound(self.TurnOnSound);
self.IsOn=true;
end
return true;
end
--Still thinking about what the right way to declare a NWCommand is, bear with me.
ITEM:C2SNWCommand("TurnOn")
[/lua]
Notice that the function returns false if this cannot be done, and true if it can be done.
Now, lets say a client wants to run TurnOn() on the server. All he has to do is this:
[lua]
myItem:TurnOn(LocalPlayer());
[/lua]
Also, there's a bug with Itemforge I need to fix. Apparently, player inventories aren't being removed when a player leaves, so whenever a full update of inventories sent the server is erroring that it "can't connect inventory to an invalid entity" or something.
That's quite the huge changelist. Good to see this is still being worked on.
So is there any possible way to add ironsights to a weapon? because i really need me ironsights for my SWEPS i plan to add in
Looks good.
holy geeze! this looks amazing! I believe it kinda gives it a resident evil feel now.
just add this+DarkRp+GibSplat2(not out yet) and it would make the greatest server ever!
Sorry, you need to Log In to post a reply to this thread.