Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: tristPWN on Sat 02/12/2023 06:30:30

Title: Change VerbCoin behaviour in inventory
Post by: tristPWN on Sat 02/12/2023 06:30:30
Hey,

I started a game with the Verbcoin Template and want it to still open the verb Coin in the inventory, so I get the same 4 options as outside (like MI3 did).

Thanks!
Title: Re: Change VerbCoin behaviour in inventory
Post by: Rub on Mon 04/12/2023 16:30:33
Hello!

Just to be clear, you want to be able to see the verbs while looking at the inventory, like this?

https://pasteboard.co/maAcuUDbX0re.png (https://pasteboard.co/maAcuUDbX0re.png)
Title: Re: Change VerbCoin behaviour in inventory
Post by: Khris on Mon 04/12/2023 16:59:44
Rub: No, it's about the verb coin, not the 9verb interface.

tristPWN: Unfortunately the verbcoin template has no built-in support for showing the coin when you click an inv item. This requires a substantial chunk of additional code.
Title: Re: Change VerbCoin behaviour in inventory
Post by: tristPWN on Tue 05/12/2023 02:29:48
I understand, ok - then what kind of workflow are you supposed to use with the verbcoin, when you want to interact with an Inventory item, but not using it with something else?
Say I want to open, or eat an inventory item? Are you supposed to always "use inventory item with player character"?
Title: Re: Change VerbCoin behaviour in inventory
Post by: heltenjon on Tue 05/12/2023 08:25:46
Quote from: tristPWN on Tue 05/12/2023 02:29:48I understand, ok - then what kind of workflow are you supposed to use with the verbcoin, when you want to interact with an Inventory item, but not using it with something else?
Say I want to open, or eat an inventory item? Are you supposed to always "use inventory item with player character"?
The Inventory window will use the BASS standard, which is look and use. In the case you state here, I'd argue that using a food item with the character would be a logical way to eat it, but if you need something to be opened, I'd rather go with having the "examine" option automatically opening/unwrapping.

A possible workaround if you want those options available in your inventory, could be to add items in your inventory that symbolize eating or opening or whatever action you want to be available. Then you could drag your item to the "interact item" to get your desired effect. (It would probably be wise to not make it possible to do it the other way around, or else you need to make responses for the player using the "interact item" on everything in the game, not limited to the inventory window.)

A bit more professional-looking would be to add extra icons to the inventory GUI, but that requires extra scripting, too.
Title: Re: Change VerbCoin behaviour in inventory
Post by: Snarky on Tue 05/12/2023 09:26:39
Quote from: tristPWN on Tue 05/12/2023 02:29:48I understand, ok - then what kind of workflow are you supposed to use with the verbcoin, when you want to interact with an Inventory item, but not using it with something else?

Just for the record, you're not necessarily "supposed" to do anything in particular. It's up to you how you want it to work; it's just that this particular functionality isn't (yet) part of the template, so if you want it you would have to implement it yourself.

I personally think there are good grounds to consider it an oversight, and that it should be added (as an option, if not default behavior).
Title: Re: Change VerbCoin behaviour in inventory
Post by: Crimson Wizard on Tue 05/12/2023 09:45:09
I think in BASS template at least the inventory item behavior are controlled by a custom property which tells whether this item is "selected" on left click, or "interacted with".

Possibly same could be done with the VerbCoin.

But, like Snarky sais, it's up to you to decide how it should work in your game, this is a question of game design. After you come to an idea of what you want to have, then you may look for possible solutions.
Title: Re: Change VerbCoin behaviour in inventory
Post by: Khris on Tue 05/12/2023 11:12:50
I didn't check it but iirc MI3 and FT have slight delays before the verbcoin opens so you can still single click stuff.

The biggest question is how you would select an inventory item to use it on something else when a single click directly opens the verb coin.

7 days a skeptic had a pretty ingenious solution to this: the first few inventory items where verbs. Which means you would always click the target of the interaction first, then select a verb or inv item from the "coin". The only slightly weird thing about this was that you had to click a hotspot to open the inventory (if you wanted to look at an inv item for instance).
Title: Re: Change VerbCoin behaviour in inventory
Post by: Cassiebsg on Tue 05/12/2023 16:15:51
Nothing is impossible, here's my VerbCoin implemented in the inventory window:

https://www.youtube.com/watch?v=msWREZ_SlqE

Left clik pickup the item, right click opens the verbcoin.