Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: RowdyAdventurer on Thu 16/11/2006 17:45:01

Title: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: RowdyAdventurer on Thu 16/11/2006 17:45:01
For my adventure, which for one i hope i can make an mmorpg, i would need multiple inventory and i know ts possible to do with using a blank acharacter's inventory. But i think a better solution would be that inventory items have a "Type" property. for instance, food could be type 1, weapons could be type 2 etc. Perhaps then the inventory window would only display objects with the given type. supporting multiple types in the window would also be something i would need.

Also, a question i had was: "will AGS ever support higher resolutions?" and while i am at it, will it ever have an easy feature for voice translations much like the text trans?
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: Pumaman on Thu 16/11/2006 19:02:49
Would anyone else use this inventory "type" functionality?

As for higher resolutions, well 1024x768 is a possibility one day; but considering how few games use 800x600 as it is, I can't see a huge demand for needing even higher res.

Quotewill it ever have an easy feature for voice translations much like the text trans

I haven't seen any demand for this. Creating a voice pack is a huge undertaking, even more so than writing a text translation. If this is something that people would seriously use, I can look into it.
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: Khris on Thu 16/11/2006 21:55:02
I believe creating translated voice packs is easily possible already, isn't it?
One would simply move the english voice files somewhere else, move the foreign language files into the game's Sound dir, then rebuild the vox files.
This should create another speech.vox which one can offer to download instead of the original one.
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: Alynn on Fri 17/11/2006 18:08:28
The inventory type functionality could come in handy, especially for games where they have a magic system or something similar, it could take some of the headache out of having multiple invisible characters and viewing their inventory, and just have one inventory box with applied filters.

I personally don't have a use for it (right now), but it could be useful, just not to a majority.
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: GarageGothic on Fri 17/11/2006 19:06:39
I think SSH would love to do a module for this ;)

Kidding aside, it's not that hard to write a module to handle multiple inventory types. Just create a struct the size of all existing inventory items, have an enumerated int value to assign type, and an int to assign current owning character.
Every time the player opens the inventory window, have a function loop through the struct, checking for 1) if player character owns object and 2) if it's the right type, and add objects to the inventory accordingly.

For a module, the inventory function call could be something like FillInventory(InvWindow *invtofill, ItmType item). You would also add two small functions to add items to player inventory and to transfer items between two characters.
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: gypsysnail on Sat 18/11/2006 01:39:56
*puts my hand up* I know I will probably need something like this :) as in my game I will be having a magic spell system and money increase/decrease, etc. This would be so much appreciated. You guys are marvellous module makers!  ;D
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: monkey0506 on Sat 18/11/2006 05:44:13
The Properties module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27385.0) could handle this.

You could set up some code like this:

// script header
enum InventoryItemType {
  eInventoryItemGenericItem = 0,
  eInventoryItemFood,
  eInventoryItemWeapon[, etc..]
  };

import void SetInventoryItemType(InventoryItem* item, InventoryItemType type);
import InventoryItemType GetInventoryItemType(InventoryItem* item);

// game_start
Properties.CreateNumberProperty("InventoryItemType", eInventoryItemGenericItem);

// global script
void SetInventoryItemType(InventoryItem* item, InventoryItemType type) {
  Properties.SetPropertyAsNumber(eProperties_InventoryItem, item.ID, "InventoryItemType", type);
  }

InventoryItemType GetInventoryItemType(InventoryItem* item) {
  return Properties.GetPropertyAsNumber(eProperties_InventoryItem, item.ID, "InventoryItemType");
  }


Okay so it's not specialized or whatever but it's pretty simple to set up. It's also smaller than making a large array to hold all the values. So yeah, whore...er...I mean use....use....use my module.


;)
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: RowdyAdventurer on Tue 05/12/2006 17:56:33
the module can be used as a step in for now. but I would like to have it eventually incorporated into the engine itself. Less code to write this way.

in regards to voice translation and higher resolutions: I think the higher resolutions is somethign non-agsers would use. I make my graphics in hi-res but then convert them to lower for ags. so it would be useful for me.

for voice- maybe each sound file can be parsed into a soundtranslation file. Example:

Soundtransfrench.txt
Sound1.wav 'Sound1 is the first sentence which would be 'you ate my banana'
Sound156.wav ' this translates that sentence into french.

it would be the same system. you would just define which sound file would be used instead of the default english one.

Also two new requests to that. if voice trans is implemented. Please allow us to hear one language and see text in another. i am making a learn french program. this would be great. And changing language in-game would be nice too.

Thanks Pumaman and others.
Title: Re: SUGGESTION: Inventory Type QUESTION: Higher screen resolutions?
Post by: GarageGothic on Tue 05/12/2006 18:14:36
For the localized speech, I think it would make sense to have a subdirectory to the editor folder called Speech. E.g. Speech\French, Speech\German etc. with the audio files using the same numbering as the original. On compiling, it could output french.vox, german.vox etc. which would then be used instead of speech.vox if french.tra or german.tra were selected from the setup.