[MODULE] SierraInv 1.0 - Add a automatic-resizing inventory to your game!

Started by NsMn, Tue 25/08/2009 17:05:11

Previous topic - Next topic

NsMn

Did you ever created a Sierra-style game and didn't get 5 cups because the inventory GUI was different? Or, did you wonder why you're wasting so much of your screen with a giant GUI, although you sometimes only need space for 3 items?

Well.... too bad I can't help.... nah, just kidding!

The SierraInv module helps you to create a inventory GUI familar to the ones in the old Sierra-classics, wihich changes its size depending on the amount of items the player's carrying!
Also, you can add your own, completely custom GUI as an iconbar. (Just read the readme and try the demo game  ;) )

Download Link:

-> http://dfoh.df.funpic.de/data/SierraInv%201.0.zip

Demo game:

-> http://dfoh.df.funpic.de/data/SierraInv_Demo.7z

=>Video demonstration<=

Requirements: AGS 3.0 ;  other modules/plugins: none



This is my first script module, so don't hesitate to slap me until I'm only red goo  :P

TerranRich

At first I thought this thread was a joke or something, because AGS already comes with a sort of Sierra-style inventory. Maybe mention its automatic resizability to the thread title? :)
Status: Trying to come up with some ideas...

NsMn


TerranRich

Do you want me to do a video demonstration and upload it to YouTube? Are there enough sample inventory items in the demo game to test it out fully?
Status: Trying to come up with some ideas...

NsMn

Say, that would be really nice! There is  actually an unlimited amount of items, because you can pick up one as often as you want.

TerranRich

Like I said in another module thread, every module should come with a video demonstration. Just get a free recording program like CamWhateverItsCalled and upload!
Status: Trying to come up with some ideas...

NsMn


TerranRich

Hmm, doesn't seem to work 100%. Should this really be "version 1.0"? ;)
Status: Trying to come up with some ideas...

Khris

Some suggestions:

- use a struct and group the Set* functions together:
  void SierraInv::SetUp(int MaxWidth, int MaxHeight, ...)
- the module relies on two GUIs and their controls already existing and having specific names, ideally the player should tell the module which GUI to use and it'll work from there

I'd do this:
In game_start, the user calls e.g. SierraInv.SetGui(GUI*g);
The module looks through its controls for an InvWindow and reads out/calculates all the dimensions and margins.
Using on_event/eEventAdd/LoseInventory, the module then resizes the GUI and InvWindow, repositioning all controls automatically.
Basically, a simple coordinate relation should reveal the layout of the GUI's controls and should suffice to determine the necessary changes to the other controls' positions.

SMF spam blocked by CleanTalk