Home   Help Search Login Register  

Author Topic: RUG Inventory 0.6 BETA  (Read 21931 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
RUG Inventory 0.6 BETA
« on: 24 Mar 2008, 23:17:02 »
Edit: Version 0.6 BETA out now!
Edit: Version 0.5 BETA out now!


Heh. I just keep churning these weird little things out don't I?  :D

From the readme blurb:

Quote
RUG Inventory v.0.6

This script-suite allows you to add a vehicle-variable driven and very customizable RPG-like inventory system to your
missions. Create your own items and inventories, and then freely move items from one inventory to the other - even allowing dropping it on the ground! Currently in BETA for testing. Not tested in MP, no support as of now.

Use: Try the test mission and read some of the comments on some of the scripts and functions to get a deeper understanding as to how things work. Currently does not contain all planned features, but that shouldn't limit the usability as of now.

Important when porting to your own mission is to copy the custom dialog (RUG_Controls.h and RUG_Inventory.h) as well as the #includes in the description.ext to your own description.ext. Do not move any of the scripts that are inside the RUG_Inventory folder anywhere else, and keep the RUG_Inventory folder in the main folder of your mission (I.e. MissionName\RUG_Inventory).

How to create your own items : see the description in the test mission's comments (specifically TestInventory.sqf).

How to create your own inventories : see the description in the test mission's comments (specifically RUG_Inventory.sqf and TestInventory.sqf, as well as Init.sqf)

How to easily add, remove and transfer items: use RUG_EasyAdd, RUG_EasyRemove and RUG_EasyTransfer. See their script headings for usage!

Advanced use : Use your imagination, and check out the test mission for some ideas.

Future implementation:
- Possible smarter use of the "leave on ground" inventory, currently leaves a permanent inventory on the ground + weaponholder if any item is ever dropped on the ground.
- Integrated shopping system. [DONE]
- Better-looking dialog. [Partly done]
- Better support and implementation of the default "use" action. [DONE]
- More example missions to showcase the scripts.
- More functions for more in-depth item/inventory-manipulation. [Mostly done]
- MP-testing if possible
- SP-campaign compatibility testing.
- Proper commenting of scripts!! [Mostly done]

Version history:

v.0.6 BETA
- Improved RUG_EasyAdd and RUG_EasyTransfer by adding an optional true/false switch for checking if there is space: they now output false and do not move any items if check is set to true and there is not enough size to add/transfer the items
- Added new function, RUG_Inventory_InitVehicleVars, which inits the necessary vehicle variables (RUG_Inventory_Size and RUG_Inventory_Name) independently of the RUG_Inventory.sqf script where they used to be initialized.
- Removed some more nil= appearances from some of the template items. Oops
- Added a "RUG_Inventory_Core.Intro" map to the package -> only contains the scripts and init files, and has properly named and ordered template items so as to avoid the clutter of the other test mission. For advanced users (um, that's me, I guess).
- Added some comments to the HireMan.sqf and BuyVehicle.sqf scripts -> note to users, there are many MUCH better ways of doing this, but since the scripts are there...

v.0.5 BETA
- Added RUG_EasyAdd, RUG_EasyRemove and RUG_EasyTransfer functions: allows for simplified item adding/removing/transfering of items. Also added custom resources and a sound to notify of items being added/removed using these commands. Instructions for use in their headers.
- Moved the bulk of the global variable initialization to RUG_Inventory_Init.sqf which should now be run to init the inventory system.
- Added a text to the ammo bag inventory screen instead of the standard one.
- Made all executions of RUG_Inventory.sqf and RUG_Inventory_Trade.sqf within the scripts use spawn instead of execvm.
- Added more comments to various scripts and added some more instructions to the in-game items.
- None of the scripts that require the string name of the item are case sensitive any longer.
- Added RUG_Inventory_Monitor.sqf script which simply checks for certain items that need to immediately affect a unit when they are added/removed. Currently used to switch the map/compass etc. on and off.
- Removed the nil = in front of a bunch of scripts. Oops for redefining engine commands!
- Fixed a problem by which the Your ammo inventory could be filled with size 0 items which would then be lost. Now you cannot put any items of any size inside an inventory with a size of 0.
- Minor fixes in various scripts etc.
- Changed the look of the inventory screen slightly - old look is available in ORIGINALRUG_Inventory.h if you want to revert to it :) New look has more space for general messages and slightly more space for descriptions, as well as a slightly larger picture.
- Added green (positive balance) and red (negative balance) text to the Balance number when trading

v.0.4 BETA
- Added examples for how to purchase stuff such as soldiers and vehicles
- Added a working system for transfering magazines between gear and inventory
- Fixed some minor issues with some of the existing items

v.0.3 BETA
- Added MANY new items + pictures, showcasing the various uses of the inventory system
- Spiffed up the dialog again slightly by adding item pictures
- Changes to Take/Drop/Use default actions : placing a code within the [{}] of the spawn will make that code launch if the action is successfully completed (take/drop/use). The code will have the following parameters : _this select 0 = _curValue (amount dropped/taken/used), _curSel (item dropped/taken/used), _i (number that indicates how many times the scripts have run - they will run once for every case of _curvalue. Useful for limiting the script running to just one for instance).
- Added integrated gear-menu functionality - simply press "G" while in inventory mode to access the gear menu of the object (if applicable), and then close the gear menu to return to the inventory. Still researching possibility of doing this in a reverse order.
- Added functionality to transfer all types of guns (main, secondary and pistols) from inventory to gear (via a special item). Also left some guns in the ammo box to showcase this.
- Added comments here and there

V.0.2 BETA
- Added a working trading system, invoked simply by changing the action to "RUG_Inventory_Trade.sqf".
- Changes to the way items are created due to the trading system - now requires a third element in the 9th entry : value
- Small changes to all scripts to accomodate for the trading system.
- Slight visual overhaul of the inventory screen - still pending further improvements.
- Added new function : RUG_Inventory_ftotalvalue : returns total value of inventory
- Added new scripts : RUG_Inventory_Trade.sqf and RUG_Inventory_TradeCheck.sqf
- Added ability to flag items undroppable/takeable/sellable/buyable (with default scripts).

v0.1 BETA
- Initial release

Wolfrug
24.3.2008

Hope you'll enjoy it! Sorry about the slightly soulless demo mission!

Wolfrug out.
« Last Edit: 27 Nov 2010, 10:22:34 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Offline Loyalguard

  • Former Staff
  • ****
Re: RUG Inventory
« Reply #1 on: 25 Mar 2008, 09:45:41 »
Looks nice Wolfrug.  I'll check it out tonight.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: RUG Inventory
« Reply #2 on: 26 Mar 2008, 17:04:20 »
i'll check it out this weekend- finally got my PC going again!

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory
« Reply #3 on: 26 Mar 2008, 18:23:02 »
Yaay. :) I'll get back to working on that shopping/bartering system ASAP. I think I'll make it a bit like in the Fallout games : money would just be another inventory item, and have a base value of 1 (or more!), and all other items would also have their own values (as determined by the mission maker) : one could then for instance trade in one Beef Jerky (Tm) worth 5 + one Rock Shaped Like Abraham Lincoln (worth 15) plus 20 Shiny Pebbles (worth 1 each) for a Hula Hoop (worth 35) and Random Junk (worth 5). Or somesuch :D

Then when it comes to RPG-stuff like skills affecting values and whatnot...well...I'll just try to build it in a way to make it easy enough to implement as well... :)

Do give comments.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.2 BETA
« Reply #4 on: 30 Mar 2008, 23:19:58 »
Updated. Check first post. :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.3 BETA
« Reply #5 on: 07 Apr 2008, 22:40:44 »
Updated again, check first post. Changelog for 0.3 :

Quote
v.0.3 BETA
- Added MANY new items + pictures, showcasing the various uses of the inventory system
- Spiffed up the dialog again slightly by adding item pictures
- Changes to Take/Drop/Use default actions : placing a code within the [{}] of the spawn will make that code launch if the action is successfully completed (take/drop/use). The code will have the following parameters : _this select 0 = _curValue (amount dropped/taken/used), _curSel (item dropped/taken/used), _i (number that indicates how many times the scripts have run - they will run once for every case of _curvalue. Useful for limiting the script running to just one for instance).
- Added integrated gear-menu functionality - simply press "G" while in inventory mode to access the gear menu of the object (if applicable), and then close the gear menu to return to the inventory. Still researching possibility of doing this in a reverse order.
- Added functionality to transfer all types of guns (main, secondary and pistols) from inventory to gear (via a special item). Also left some guns in the ammo box to showcase this.
- Added comments here and there

;) Hey ed.depoters, are any of you actually checking this out or did you just SAY you were going to? Comments and suggestions for improvements much appreciated!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Nexolate

  • Members
  • *
  • The lurking S.T.A.L.K.E.R.
Re: RUG Inventory 0.3 BETA
« Reply #6 on: 07 Apr 2008, 22:53:54 »
Just got the 'content deleted' message, just so you know.
"JOHNS_BUGGYS" ring any bells? I'm gonna go look it up now.

EDIT: Got the Addon, tried the test mission.
Based on what I can see, this script has limitless potential. I adore S.T.A.L.K.E.R. and this reminds me a lot of it, albeit a bit less refined (atm obviously).
I personally couldn't get the Rifle/Launcher Holsters to work, no idea why. Other than that, everything worked pretty much as expected.

Some day I'd love to see a S.T.A.L.K.E.R.-ish mission using this script, would be truly awesome.
« Last Edit: 07 Apr 2008, 23:22:55 by Nexolate »
You'll only notice me when it's too late.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.3 BETA
« Reply #7 on: 08 Apr 2008, 08:02:56 »
Baargh! Damned buggys. I use no addons in the mission, except I might have put one into it at some point. >_< I'll re-upload the .rar file sans the "addon requirement". Bloody 'ells.

As to the rifle/launcher holsters : they both require quite a bit of space in your inventory (something like 10 each); if you haven't got enough space to put it there, it will tell you in the general text area and nothing will happen. Also if the weapon you're swapping to (say, from a carbine to a full-sized sniper rifle) is larger than the space you've got it will also refuse the swap. Might've been it? :)

Haven't played Stalker, although I know I probably should! I doubt it's ever going to be possible to create an as refined inventory system with abstract items for ArmA as it would be for a game designed to have one, since pretty much everything would have to be made from scratch. But maybe, with enough patience, it could be done. :)

Thanks for the test! Gonna re-upload the file now >_< damned addons.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Nexolate

  • Members
  • *
  • The lurking S.T.A.L.K.E.R.
Re: RUG Inventory 0.3 BETA
« Reply #8 on: 08 Apr 2008, 08:23:44 »
Baargh! Damned buggys. I use no addons in the mission, except I might have put one into it at some point. >_< I'll re-upload the .rar file sans the "addon requirement". Bloody 'ells.
Yeah I've had that happen to me loads of times, I put one Unit in for a small period of time then the whole thing throws shit at me. >_>

As to the rifle/launcher holsters : they both require quite a bit of space in your inventory (something like 10 each); if you haven't got enough space to put it there, it will tell you in the general text area and nothing will happen. Also if the weapon you're swapping to (say, from a carbine to a full-sized sniper rifle) is larger than the space you've got it will also refuse the swap. Might've been it? :)
That sounds right, I was carrying a fair load at the time so that was probably it.

Haven't played Stalker, although I know I probably should! I doubt it's ever going to be possible to create an as refined inventory system with abstract items for ArmA as it would be for a game designed to have one, since pretty much everything would have to be made from scratch. But maybe, with enough patience, it could be done. :)
Well yeah, it has a system similar to that where you can trade items among other Stalkers and aquire new items and ammunition from dead Stalkers or from secret "stashes". I know that creating a system of similar standard would require a lot of work, but atm you're pretty close! In my eyes, this sort of thing is the only way to incorporate RPG features without sucking the life out of the gamer. ;P

Anyways, hope this helps. I'll try out the next version, when it comes out.
Nexo.
You'll only notice me when it's too late.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.3 BETA
« Reply #9 on: 08 Apr 2008, 17:22:22 »
Didn't know that about Stalker - sounds like a cool game. :) I originally got the inspiration to create these scripts from agamoth's freedom fighter/resistance/post apocalypse units, so I guess the source is sort of the same in a way!

And yes, I'm a firm believer of making missions for scripts as well, and since I'm primarily a mission maker and only secondly a scripter, that's what I'm planning on doing. At some point in the future. :D Inbetween I have to design some kind of "character statistics" screen or somesuch to get that last little bit of RPG-feel. Then we've got an inventory, a conversation system (there're some floating about) and a stat screen...

But yes: this is just a Beta preview anyway, but I thought I'd get it out there in case someone ELSE were interested in it. Hopefully future versions will be more editor-friendly as well (i.e., more comments, better script-readability etc).

Anyone else?

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.4 BETA
« Reply #10 on: 22 Apr 2008, 12:55:26 »
Beta 0.4 out. :) Now has an example to show how you can use the inventory to hire mercenaries/buy vehicles, either ready-placed ones or dynamically createVehicle/United, as well as an item-script that allows you to transfer certain items of ammo from your "gear" to your "inventory". This is limited to one-shot items such as grenades, flares, rockets etc. since there's no reliable way to tell how much ammo is in your current mag. However you can have stores sell any kind of magazine.

Haven't yet gone through the scripts to clean them up and comment them, and I still want to fix a fairly major issue with the way the filler script works, but as far as I can tell this thing just plain...works. :D

Comments and suggestions welcome - especially aesthetic ones!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline ModestNovice

  • Members
  • *
Re: RUG Inventory 0.4 BETA
« Reply #11 on: 07 May 2008, 04:01:48 »
Thank You!!!!!!!  :clap:

have been looking for how to do this!!
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline ModestNovice

  • Members
  • *
Re: RUG Inventory 0.4 BETA
« Reply #12 on: 07 May 2008, 23:57:11 »
I have one question. I am using SPON Money for my mission. Is there a way I can substitute SPON Money's money values in? (HELP)

It also overwrites my current SPON Money and my paychecks script, it says my account balance  is 0 in my hint???
before it would say $8000. :dunno: [it seems to only be a little bug at the beginning then the next hint it sorts itself out  :scratch: Works Fine.]

[edit]
figured out how to remove default item  :-[ :D
still having problems with the money issue though.
« Last Edit: 08 May 2008, 06:04:35 by DaChevs »
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: RUG Inventory 0.4 BETA
« Reply #13 on: 08 May 2008, 06:04:13 »
Hello there DaChevs! Glad you're finding some use for my script! No need to double-post though :D You'll make hoz and h- nervous...

One caveat, which is pretty big if I'm guessing right what you want to use these for : there's no integrated multiplayer support as of yet, i.e., all inventory transactions at the moment are AFAIK entirely local. Since they depend on simple vehiclevariables though, there's no reason why someone more mp-savvy than myself couldn't make it work in MP as well. I guess :)

I've thought about how to implement things such as SPON money and other "variable-based" systems directly into RUG Inventory, but I didn't bother adding a function for that just yet since it's still in Beta (and likely to stay so until I get back to mah ArmA computer). However, using the functions already available in it there should be some possibility of making it work.

Since it's a lot harder however to manipulate RUG Inventory than a simple variable-based money system, it's probably for the best to change the SPON money values depending on the amount of "money" objects in the units RUG Inventory. So, for instance, have a simple looping script that runs every x seconds, and changes the SPON money values according to the amount of say "Money" in any one person's inventory. You can check how much of an item a unit is carrying using the RUG_Inventory_fstackcheck.sqf function (read script header for details on usage, one of the return values will be the total amount in the stack, which you can produce using select from the result of the call. Note that the functions are usually precompiled and can be called using a global variable named the same as the script without the sqf), although I'm not sure how to modify the SPON money values. If I don't remember wrongly, it's simply a vehiclevariable attached to each individual: so using something like Unit setVariable ["SPON_Money_Variable_Here", (RUG_Money_Amount_here)] should work out.

Sorry if this seems confusing, but I haven't really got anything here with me with which I can help verify these things, and besides as I told you I don't know exactly how SPON Money works so... :)

Good luck anyway!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline ModestNovice

  • Members
  • *
Re: RUG Inventory 0.4 BETA
« Reply #14 on: 08 May 2008, 06:11:57 »
Thanks Wolf!  :good:

sry for double post  :-[

seems to re-ensure some stuff.

is there a way to just show in the dialog itself the players cash, verified in SPON Money as: SPON_playerCashBalance, maybe if I make an item and have it show a formatted hint somehow?

I think I finally got how to add items and everything, but I'm not really getting how to use the remove...

So I just put in the class I want it to remove and it will remove one of those?

Again thanks for the help Wolfrug and love the system  :good:

Especially the Rifle Cases, fixed one of my biggest problems, the biggest being the inventory  :P
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley