Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Electroshokker on Sun 21/10/2007 16:31:02

Title: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Electroshokker on Sun 21/10/2007 16:31:02
Once upon a time long, long ago, I decided to write an AGS module out of my game script.


- the old version (1.7.2) is already included in the current AGS builds (has been for quite a while now)!
- version 2.0.0 for AGS 3.3 is available! (Get the agt file here (http://t-vandepoele.be/pms/e107_files/downloads/Fun/Verbcoin.agt))

New 2.0.0 Features:

- separate event handler scripts for characters and inventory items (aka interact/look/talk to/use interactions are now handled outside of the global script, keeping it nice and clean. You only need to set a specific function as catch-all function in the events)
- dynamic changing of overhotspot action labels and the 'act' property (if for instance you want to change a specific action to something different than what you set in the corresponding property, or if you want to turn a regular hotspot into an exit or something)
- cursor outline when holding an inventory item and moving over something it can interact with

Old features (but more bug-free):

- fully interchangable gui system (want to switch verbcoin/inventory GUI's half way through the game? you can!)
- a fully integrated verbcoin system where you can add upto 6 buttons to the verbcoin
- @overhotspot@ special interaction label properties (change an object/character/hotspot's properties to display either default or custom text when moving over the corresponding verbcoin button)
- basic keyboard support
- double-click functionality on hotspots/objects based on a boolean property ('act') (useful for room exits!)
- game resolution independent
- the ability to enable/disable this module at any point in your game!

backwards compatibility notice

v2.0.0 will *break* your old 1.7.2 code, though it is possible to replace the old functions with the new (more logically named) functions and properties.
AGS 3.3.0's find all occurrences functionality will make the transition a bit smoother.

Known bugs

No known bugs yet. Old 1.7.2 bugs stomped.
I expect bug reports from you guys!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Scorpiorus on Sun 21/10/2007 17:55:42
Nice work with rewriting the MI3 user interface! Many people will surely find a use for it :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Pumaman on Sun 21/10/2007 18:27:35
Good work, thanks! I'd like to include this with the AGS 3.0 distribution if that's ok -- but before I do so, can I just check about the graphics. I'm assuming they're ripped from MI3, is that the case? If so I'll have to replace them with some very dodgy home-made images before including it.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Dualnames on Sun 21/10/2007 21:05:36
Always glad to see people get motivated. It was your CODE anyway. As I did pointed. Good Job. Hope this time it works like it should.


EDIT: Though you've scripted it for BETA 3.0.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Radiant on Mon 22/10/2007 01:04:49
So does this have keyboard support?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Electroshokker on Mon 22/10/2007 19:19:37
Quote from: Radiant on Mon 22/10/2007 01:04:49
So does this have keyboard support?

No.

Quote from: RadiantMoving the main character with the cursor arrows is only a nice extra - however, invoking the GUI by keyboard presses (W=walk, T=talk, etc) is essential for LucasArts and VerbCoin GUIs (and a nice extra for Sierra ones). Hence, I would appreciate this being in the standard template. It's only a couple of lines, after all.

Quite. But I won't add it in the module code. I will however put up example code in the globalscript soon. The game designer will almost always want to modify which key does what anyways, and putting it in the globalscript will allow just that.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Rui 'Trovatore' Pires on Mon 22/10/2007 20:25:35
Actually, you'll find that if the template is well designed, people rarely change standard keyboard shortcuts. And if you provide for Look, Talk to and Use and leave placeholders for the other three modes, people will find their ways to them quite soon. I support Radiant's suggestion for having shortcuts in the template itself.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Electroshokker on Mon 22/10/2007 20:51:39
Quote from: Rui "Trovatore" Pires on Mon 22/10/2007 20:25:35
Actually, you'll find that if the template is well designed, people rarely change standard keyboard shortcuts. And if you provide for Look, Talk to and Use and leave placeholders for the other three modes, people will find their ways to them quite soon. I support Radiant's suggestion for having shortcuts in the template itself.

Yes, but I was talking about the module code. I fully intend to add keyboard support the way you suggest, but I'll add it in the template globalscript, where it's easy to find and customize.

If people start murking around in the module code (which does all the heavy lifting for the verbcoin gui) who knows what would happen.

I've been testing my own template further to fix up all the loose ends. I'll be posting an updated template later this week.

known issues:

- creating one of the 3 custom buttons will cause the game to crash when moving over them. This is due to a text property not being transferred to a string variable. (to be fixed)
- no keyboard support (to be added)
- still uses the old SetText() function (minor issue)

AGS 3.0 beta 14 known issue:

- text property changes doesn't set the room changed flag (bypass: change something else, such as the room/hotspot description in the room and save)

If you come across anything else, let me know.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Rui 'Trovatore' Pires on Mon 22/10/2007 22:36:39
QuoteYes, but I was talking about the module code. I fully intend to add keyboard support the way you suggest, but I'll add it in the template globalscript, where it's easy to find and customize.

Aaah. My bad, sorry. I agree completely. Best to avoid having people messing with the module code.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: SSH on Tue 23/10/2007 11:24:46
The module could have a function that sets up keyboard shortcuts. I think that would be the best way to make things configurable in the global script and avoid people editing the module but keep the internals of the module hidden:

SCUMM_VERBCOIN_GUI.SetShortcut('X', eModeWhatever);

Also, I have to ask why the functions are so verbose and use numbers rather than GUI pointers:


SCUMM_VERBCOIN_GUI.Item_Count(10);  //how many inventory items fit in your inventory screen?
SCUMM_VERBCOIN_GUI.Inv_Border_x_active(true); //inventory exit borders to the left and right
SCUMM_VERBCOIN_GUI.Inv_Border_y_active(false); //inventory exit borders to the top and bottom
SCUMM_VERBCOIN_GUI.Inv_Border_Bottom_Pos(190);  //y-coördinate of the bottom exit border (inventory exit point)
SCUMM_VERBCOIN_GUI.Inv_Border_Top_Pos(40);  // y-coördinate of the top exit border (inventory exit point)
SCUMM_VERBCOIN_GUI.Inv_Border_Left_Pos(40); // x-coördinate of the left exit border (inventory exit point)
SCUMM_VERBCOIN_GUI.Inv_Border_Right_Pos(295); // x-coördinate of the left exit border (inventory exit point)
SCUMM_VERBCOIN_GUI.verbgraphic_idle_verbcoin(1);
SCUMM_VERBCOIN_GUI.verbgraphic_interact_button(2);
SCUMM_VERBCOIN_GUI.verbgraphic_look_button(3);
SCUMM_VERBCOIN_GUI.verbgraphic_talk_button(4);
SCUMM_VERBCOIN_GUI.verbgraphic_custom1_button(0);
SCUMM_VERBCOIN_GUI.verbgraphic_custom2_button(0);
SCUMM_VERBCOIN_GUI.verbgraphic_custom3_button(0);
SCUMM_VERBCOIN_GUI.Inventory_Underlay(gInvUnderlay.ID);
SCUMM_VERBCOIN_GUI.Inventory(gInventory.ID);
SCUMM_VERBCOIN_GUI.Verbcoin_GUI(gVerbCoin.ID);


would be better as:


SCUMM_VERBCOIN_GUI.Item_Count(10);  //how many inventory items fit in your inventory screen?
SCUMM_VERBCOIN_GUI.Inv_Border_active(true, false); //inventory exit borders
SCUMM_VERBCOIN_GUI.Inv_Border_SetPos(40,40, 295,190);
SCUMM_VERBCOIN_GUI.verbgraphic(null, 1);
SCUMM_VERBCOIN_GUI.verbgraphic(interact_button, 2);
SCUMM_VERBCOIN_GUI.verbgraphic(look_button, 3);
SCUMM_VERBCOIN_GUI.verbgraphic(talk_button, 4);
SCUMM_VERBCOIN_GUI.verbgraphic(custom1_button, 0);
SCUMM_VERBCOIN_GUI.verbgraphic(custom2_button, 0);
SCUMM_VERBCOIN_GUI.verbgraphic(custom3_button, 0);
SCUMM_VERBCOIN_GUI.Inventory(gInventory, gInvUnderlay);
SCUMM_VERBCOIN_GUI.Verbcoin_GUI(gVerbCoin);



Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Electroshokker on Tue 23/10/2007 17:48:08
Quote from: SSH on Tue 23/10/2007 11:24:46
The module could have a function that sets up keyboard shortcuts. I think that would be the best way to make things configurable in the global script and avoid people editing the module but keep the internals of the module hidden:

SCUMM_VERBCOIN_GUI.SetShortcut('X', eModeWhatever);

Sounds good to me. One thing's been bugging me for keyboard support, however: there are custom text properties in which you can fill in the action being performed for display when moving over a button. (so when moving over the mouth icon, for example, you could have "Drink from bottle", "Bite hamburger", "Chew gum", ...)

If I set keyboard shortcuts to immediately perform the corresponding action, you don't get to see the custom text. I'm thinking about popping up the verbcoin when you press a certain button and as long as you are holding the button down the corresponding verbcoin button will look "pressed" as well as the corresponding text showing in the label gui.

Does this sound workable, or would it be annoying? Perhaps I should include an option which enables/disables this type of keyboard reaction? (so if set to "enabled" you would see the verbcoin and the custom text when pressing a button, if set to "disabled" the action would just run)

Or maybe if you press a certain key only the custom text label would pop up for as long as you press down the key? (and not the verbcoin)

What do you think the best way would be to implement keyboard support? (I want the one using the template to have total freedom)

Quote from: SSH on Tue 23/10/2007 11:24:46Also, I have to ask why the functions are so verbose and use numbers rather than GUI pointers

Basically, I spent more time thinking what functionality and options I should give your average AGS developer rather then the way to present it.

So thank you for your suggestions! I'll incorporate it in the next release. (Probably date of release: this friday or saturday)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Misj' on Tue 23/10/2007 19:02:27
Quote from: Pumaman on Sun 21/10/2007 18:27:35
Good work, thanks! I'd like to include this with the AGS 3.0 distribution if that's ok -- but before I do so, can I just check about the graphics. I'm assuming they're ripped from MI3, is that the case? If so I'll have to replace them with some very dodgy home-made images before including it.

Nooooo! - Not dodgy home-made images :P

Alternatively, I would like to give a small gift containing alternative (png) images for an AGS-template-Verb-Coin.

(http://www.2dadventure.com/ags/Misj-VerbCoin-Summary.png)

All files (in .png format) are contained within the following zip-file: http://www.2dadventure.com/ags/Misj-VerbCoin-Graphics.zip (http://www.2dadventure.com/ags/Misj-VerbCoin-Graphics.zip). The resolution of each sprite is the same as it's counterpart used in the original (MI3) template, and the Verb-Coin graphics contain one inactive, and three seperate active images.

All that rests me is a nice disclaimer (also contained within the zip-file)...since I don't want these graphics to end up in public domain.  :-[

Quote from: Misj'
------------------------------------------------------------------------------------------------------------------------------------
Graphics for the Verb-Coin-GUI for Adventure Game Studio 3 (AGS3).
------------------------------------------------------------------------------------------------------------------------------------

All graphics are created by Misj' in CorelDraw X3. These  images
are not in public domain, but may be used for GUI-templates for
AGS (as well as AGS games using that GUI). The images may not be
altered without permission of the author (with the exception of
file type conversions, and alterations to the empty inventory
sprite to create additional inventory items).

If you have created a GUI using these graphics, and you would
like to acknowledged me, do so at the location of distribution,
or in a text-file accompanying the GUI (or not at all ;) ).

These graphics were created as a gift to the AGS community, and
Chris Jones - creator of the Adventure Game Studio - in particular.

Have fun adventuring,

Misj'
23.10.2007
------------------------------------------------------------------------------------------------------------------------------------

Ps. No, I have no idea why wooden nickels would come in such a bag...but I didn't have time to think about that :)

Pps. The name 'Adventure Game Studio' is emprinted onto the coin. This is done, because these are only (AGS) template graphics, created to encourage people to draw their own game-specific versions.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: SupSuper on Wed 24/10/2007 17:42:45
Well using pre-made templates is the first step towards laziness :P though nice job. Maybe you should do the 3.0 default template too. ;)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Electroshokker on Wed 24/10/2007 19:58:54
Quote from: Misj' on Tue 23/10/2007 19:02:27

Nooooo! - Not dodgy home-made images :P

Alternatively, I would like to give a small gift containing alternative (png) images for an AGS-template-Verb-Coin.

Great! I'm pretty much done fixing the code to more user-friendliness as well as some bug fixes. I created a background containing some stuff from the old AGS demo game and quickly threw in an old colored sketch for character.

Only thing left to do now is add keyboard support... then I can release the new template. ;)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Dualnames on Thu 25/10/2007 10:21:56
Do that will ya?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Electroshokker on Thu 25/10/2007 20:51:04
Quote from: Jim "Dualnames" Span on Thu 25/10/2007 10:21:56
Do that will ya?

Version 1.1 is released. It includes basic keyboard support and all new graphics (and some minor jokes)

(Only thing "missing" is the label gui not displaying which custom action you're doing when pressing one of the action keys, like when using the mouse)


Notice: for some reason I couldn't save it as a template anymore (AGS just crashes when I try that), so I deleted the big files (debug and the backup sprite set), and zipped it all.

@Chris: could you figure out why it crashes when attempting to save as a template?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.0 (for AGS 3.0 only)
Post by: Radiant on Thu 25/10/2007 22:47:14
Yay! Thanks.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.1 (for AGS 3.0 only)
Post by: Pumaman on Fri 26/10/2007 21:09:55
Nice work with the graphics Misj, and with the template update Electroshokker! It's looking really good!

Quote@Chris: could you figure out why it crashes when attempting to save as a template?

Ah, this is happening because templates can't contain files with names longer than 24 characters, which the "ASCII Quick Converter.asc" file is breaching. I'll look into a fix for this.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.1 (for AGS 3.0 only)
Post by: Electroshokker on Sat 03/11/2007 06:29:06
Quote from: Pumaman on Fri 26/10/2007 21:09:55
Nice work with the graphics Misj, and with the template update Electroshokker! It's looking really good!

Thanks! Just noticed beta 15.

I discovered some new issues in my template whilest experimenting around a little:

major issue:

- high resolutions (800x600 and all higher resolutions achieved through filters) aren't supported yet. The verbcoin blinks in the upper left corner rather then open properly. This is a coördinate positioning bug.

minor issue:

- I left the custom_button1 expanded, so it can interfere when moving over the verbcoin to the right. Just setting all layout values to 1 fixes this.

I'll fix these issues and update the template.

EDIT:

- the high resolutions problem is not an issue. It only occurs if you call a room other then 1 from on_game_start()

- as for the custom_button1: see above fix.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.1 (for AGS 3.0 only)
Post by: Khris on Thu 08/11/2007 03:47:40
That's a really cool Template, solid work!

You should be able to fix the resolution issue by removing the check for room 1.
It shouldn't matter if the code is called in every room.

A small suggestion: you're using many, many GetAtScreenXYs, especially in rep_ex.
Instead, you can putObject*o=Object.GetAtScreenXY(mouse.x, mouse.y);
Hotspot*h=Hotspot.Get...
Character*c=...
InventoryItem*i=...
at the start of the function and use o, h, c, i afterwards. Will save a lot of typing and even a short deal of CPU time.

I've noticed a bug: open the VerbCoin over anything, then move the mouse ENE, above the talk button. The coin will disappear although the cursor hasn't left it.

Another thing I've noticed:
You're using checks for Hotspot.GetAtScreenXY(mouse.x, mouse.y) != null.
Those checks will never fail because it doesn't return null but hotspot[0].
It's a mean trap, and I fell for it a couple of times myself :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.1 (for AGS 3.0 only)
Post by: Electroshokker on Thu 08/11/2007 18:11:32
Quote from: KhrisMUC on Thu 08/11/2007 03:47:40
That's a really cool Template, solid work!

Thanks.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40You should be able to fix the resolution issue by removing the check for room 1.
It shouldn't matter if the code is called in every room.

Was planning on it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40A small suggestion: you're using many, many GetAtScreenXYs, especially in rep_ex.
Instead, you can putObject*o=Object.GetAtScreenXY(mouse.x, mouse.y);
Hotspot*h=Hotspot.Get...
Character*c=...
InventoryItem*i=...
at the start of the function and use o, h, c, i afterwards. Will save a lot of typing and even a short deal of CPU time.

Hmm... I'll look into it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40I've noticed a bug: open the VerbCoin over anything, then move the mouse ENE, above the talk button. The coin will disappear although the cursor hasn't left it.

No, that's no bug. It's the custombutton1 which is sitting above the talk button. A little left-over from my personal game gui which has 4 buttons.

Just set all custombutton1 layout values to 1 to fix this, like I said above. Since there's no action defined for custombutton1, you leave the gui when moving over it.

Quote from: KhrisMUC on Thu 08/11/2007 03:47:40Another thing I've noticed:
You're using checks for Hotspot.GetAtScreenXY(mouse.x, mouse.y) != null.
Those checks will never fail because it doesn't return null but hotspot[0].
It's a mean trap, and I fell for it a couple of times myself :)

Hmm... not sure of this one. I added all the checks because otherwise the game would crash constantly with null pointer errors. I'll check it out.


I'll update the template when I get around to it (maybe this weekend), right now my game project is the main priority again.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.1 (for AGS 3.0 only)
Post by: Khris on Fri 09/11/2007 14:38:26
About the last issue:
It's no big deal if it's just used as a check to avoid null pointer errors.
However if it's important for the game mechanics whether there's an actual hotspot there or not, you have to change the check.
The hotspots are drawn and thus stored as image, the number is simply the color. No hotspot drawn = color 0 = hotspot 0.
So Hotspot.GetAtScreenXY will return hotspot[0] instead of null. It's in the manual, too.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.2 (for AGS 3.0 only)
Post by: Electroshokker on Sat 01/12/2007 10:17:38
Template updated to v1.2

All outstanding issues have been adressed. Enjoy!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.3 (for AGS 3.0 only)
Post by: Electroshokker on Sat 01/12/2007 14:45:46
Since I was busy with it anyways... here's version 1.3 (download link in first post of this thread)

It adds double-click functionality to all hotspots/objects which have the 'act' property set to true.

Just thought you guys might find that useful... ;) The double-click speed is completely configurable, of course.

Code example given (try a single and a double click on the Advanced 3D Room hotspot)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.3 (for AGS 3.0 only)
Post by: khnum on Sun 02/12/2007 11:08:52
I found a bug in your template: when the inventory is on screen, clicking on a point where there's no object, with a character, an object or an hotspot behind the inventory in that place, results in looking at it... i tried to make the inventory gui clickable (the background), but it didn't worked...

edit: another bug (at least i think it's a bug), the player character doesn't walk (yes, i made the walkable area)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.3 (for AGS 3.0 only)
Post by: Electroshokker on Mon 03/12/2007 20:49:44
Quote from: khnum on Sun 02/12/2007 11:08:52
I found a bug in your template: when the inventory is on screen, clicking on a point where there's no object, with a character, an object or an hotspot behind the inventory in that place, results in looking at it... i tried to make the inventory gui clickable (the background), but it didn't worked...

So if I understand correctly, you're clicking on an empty patch of the inventory and the "look at" action is executed if there's something behind it.

This occurs if you didn't have the general option "Handle inventory clicks in script" set to true.

Please check on the general settings tab under inventory if "Handle inventory clicks in script" is set to "True". If it isn't, please change it. (If it is already, let me know, and I'll double-check my code.)

EDIT: ah, after checking I agree it IS a bug. I must have made a mistake with the latest code updates, as this shouldn't occur. Expect a fix later this week.

Quote from: khnum on Sun 02/12/2007 11:08:52edit: another bug (at least i think it's a bug), the player character doesn't walk (yes, i made the walkable area)

Characters walking or not has nothing to do with my template code. It has everything to do with views and the latest engine updates. (Try adding a bunch of frames to the first 4 views.)

This is a game engine issue, and is mentioned (I believe) in the AGS 3.0 RC1 thread.

Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.3 (for AGS 3.0 only)
Post by: khnum on Tue 04/12/2007 18:31:40
Quote from: Electroshokker on Mon 03/12/2007 20:49:44
Expect a fix later this week.

Thanks  ;D
Anyway, could you also specify what the error was, since i already heavily modified your script to fit into my game, so i'd prefer resolving it myself (actually i know which line of script causes the error, but i didn't understand what's its function, so i didn't remove it)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.4 (for AGS 3.0 only)
Post by: Electroshokker on Sun 16/12/2007 11:13:08
Quote from: khnum on Tue 04/12/2007 18:31:40

Thanks  ;D
Anyway, could you also specify what the error was, since i already heavily modified your script to fit into my game, so i'd prefer resolving it myself (actually i know which line of script causes the error, but i didn't understand what's its function, so i didn't remove it)

Yes, the error was a few old lines of code that weren't supposed to be there. You've already found them (was easy enough), and they can be removed without any problems.

was removed:

else{
    ProcessClick(mouse.x, mouse.y, eModeLookat);
    clicked=0;
    timer=0;
}


in the if (Mouse.IsButtonDown(eMouseLeft) == 0){ section
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.4 (for AGS 3.0 only)
Post by: khnum on Mon 17/12/2007 15:32:10
Man, sorry if i'm always complaining, but i found another bug in the inventory  ???
If you click on an empty area, and then move the cursor over an object, the cursor mode switches to useinv (and the graphic changes, of course)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.4 (for AGS 3.0 only)
Post by: Pumaman on Wed 19/12/2007 20:52:22
Good work with all the updates! :)

The latest version of this template has AudioManager plugin data embedded, which causes a warning message for people who don't have the plugin installed. I've removed it in the version that I'm including with AGS; it might be worth considering this for future versions of the template.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.4 (for AGS 3.0 only)
Post by: Electroshokker on Sat 22/12/2007 10:15:14
Quote from: khnum on Mon 17/12/2007 15:32:10
Man, sorry if i'm always complaining, but i found another bug in the inventory  ???

I don't mind at all. Just happy someone is actually testing it thoroughly.  ;)

Quote from: khnum on Mon 17/12/2007 15:32:10If you click on an empty area, and then move the cursor over an object, the cursor mode switches to useinv (and the graphic changes, of course)

Ok, I'll look into it. (I better hurry up, AGS 3.0 final is almost here  :o)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: Electroshokker on Sat 22/12/2007 10:51:44
Version 1.5 is up.

Created without any plugins (just standard AGS 3.0 RC3), fixed the latest bug.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: Dualnames on Sat 22/12/2007 19:08:03
Great to see you still working on it..
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: sentient on Sat 22/12/2007 21:46:05
Hello, sorry to be so green, but this looks just what I am after. Trouble is I have no idea how to use it! I have downloaded both files and copied them into the main adventure studio directory. I try import GUi, but it is not the right type of file for that. What do I do?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: Pumaman on Sat 22/12/2007 21:57:03
It's not a GUI, it's a new game template. That means that after putting the files into the AGS directory, you load the editor, choose "Start new game" and select it from the templates there.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: sentient on Sat 22/12/2007 22:24:44
Ahh, thankyou very much.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: Dualnames on Sun 23/12/2007 20:55:25
In case you want a not so cool but as cool as CMI search for Scumm Remixed at the forums... you'll end up with my "module". Though I suggest this one..my scripts were based on Electroshockers work.. and he motivated to work on this..
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: riseryn on Tue 08/04/2008 16:02:05
Hi
i'm trying to use your template but can't understand the way it works.

I have created a hotspot hRock and a function hRock_Look() in the room script file.
But i have no output when using the look button.


// room script file
function hRock_Look()
{
Display("Just a rock.");
}


which is the correct way to set an interaction?
I find (or maybe understand) nothing about it in the template or in the documentation.

I'm using ags 3.01 final

thanks

EDIT:
ok finally i managed to understand that I have to put the name of the function in the corresponding hotspot event :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: subspark on Tue 08/04/2008 20:44:09
Congrats on the new release Electroshokker!!

Cheers,
Paul.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: S on Wed 09/04/2008 21:37:52
Apologies in advance if my ignorance is caused by being too lazy to read stuff I should've read, like readmes etc., but I have a problem with the Verb Coin, and I suspect it might be an issue of resolution (my game is 800 x 600). The GUI won't display its three buttons when I click certain hotspots and objects, mainly those that are close to the right and the bottom of the screen - basically making it impossible to interact with those objects and hotspots.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: Electroshokker on Fri 11/04/2008 11:15:43
Quote from: S on Wed 09/04/2008 21:37:52
Apologies in advance if my ignorance is caused by being too lazy to read stuff I should've read, like readmes etc., but I have a problem with the Verb Coin, and I suspect it might be an issue of resolution (my game is 800 x 600). The GUI won't display its three buttons when I click certain hotspots and objects, mainly those that are close to the right and the bottom of the screen - basically making it impossible to interact with those objects and hotspots.

Are you using AGS 3.0 or 3.0.1 ? I haven't had time to check if everything works on the 3.0.1 version yet. Will do so shortly.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: riseryn on Fri 11/04/2008 12:57:45
Im using 3.01 32 bits colour depth, 800x600 and direct 3d 9 driver
with no technical problem at the moment with the template  :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: S on Fri 11/04/2008 14:17:35
I seem to recall that my version is 3.0.2 something (?), but I guess that might not be possible. I'll check it out when I get back from work.
It's a bit odd though, because the template's default is not 800 x 600 (why is that rare btw?), but one notch lower (600 something) - and everytime I start a new room I get a black rectangle in that res that needs to be expanded (with the warning every time). So, even though I changed it in the general prefs, the game seems to ignore my preferred resolution of 800 x 600, and the GUI does so too.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5 (for AGS 3.0)
Post by: S on Sat 12/04/2008 15:26:05
I'm on 3.0 by the way. Or, build 3.0.0.23, to be precise.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: Electroshokker on Sun 13/04/2008 09:05:14
Version 1.5.1 is up.

Minor bugfix only, it now supports the 800x600 resolution.

Please test, this shouldn't break any other resolution support.

For those of you using the 1.5 version and a lower game resolution, there's no need to upgrade.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: S on Sun 13/04/2008 16:33:57
Updated to 3.0.1 and the newest version of the verbcoin. All of it works now, and moreover, 3.0.1 contains some very nice improvements. Let's hope its stable (so far so good).
Thanks!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: S on Sun 13/04/2008 16:35:50
Ooh, just one more thing: When one presses the left mouse button to bring up the coin it defaults to "look at" or whatever button is placed in the middle. Is it possible to raise the coin or lower the hotspot for the pointer so that it does not open with the look at function already chosen?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: Pumaman on Sun 13/04/2008 18:13:56
Would it be ok for me to replace the Verb Coin template included in the AGS distribution with this latest version the next time I build it?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: Electroshokker on Sun 13/04/2008 22:14:42
Quote from: Pumaman on Sun 13/04/2008 18:13:56
Would it be ok for me to replace the Verb Coin template included in the AGS distribution with this latest version the next time I build it?

Sure, go ahead.  :)

Quote from: S on Sun 13/04/2008 16:35:50
Ooh, just one more thing: When one presses the left mouse button to bring up the coin it defaults to "look at" or whatever button is placed in the middle. Is it possible to raise the coin or lower the hotspot for the pointer so that it does not open with the look at function already chosen?

Actually, you can do this yourself quite easily (which is why I won't change the template: the guis can be and are supposed to be customized the way you want them to be).

The cursor is (except when you open the verbcoin at the borders of the screen) always placed in the center. Move/resize the gui buttons any way you like.

(If you don't see the buttons in the gui, that's because they have transparent backgrounds. You can select them as sub-elements of the verbcoin gui)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: S on Mon 14/04/2008 10:24:53
Yeah, I know about moving the buttons, and I just thought of a nice-looking way to do this that takes advantage of the cursor hotspot being slap bang in the middle (I'll fan the buttons out around it), but I still haven't figured out how to lower or move the cursor hotspot for the GUI. Ah, anyway. I'll direct such quieries to the Beginners forum from now on.
Thanks.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: riseryn on Thu 17/04/2008 18:35:31
I m trying to use both your template and the gridinventory from Besh.
Actually I cant manage to have them working together.

My main problem is that the on_mouse_click() function of grid inventory is somehow overrided by scumm verbpoint and i dont know how to manage this issue after several hours reading the code.

Anyone has a clue about it?

A solution would may be to have a template only for the verbcoin without the inventory to be able to use another inventory template I guess.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.1 (for AGS 3.0.1)
Post by: Electroshokker on Thu 17/04/2008 20:25:09
Quote from: riseryn on Thu 17/04/2008 18:35:31
I m trying to use both your template and the gridinventory from Besh.
Actually I cant manage to have them working together.

My main problem is that the on_mouse_click() function of grid inventory is somehow overrided by scumm verbpoint and i dont know how to manage this issue after several hours reading the code.

Anyone has a clue about it?

A solution would may be to have a template only for the verbcoin without the inventory to be able to use another inventory template I guess.

One of the reasons I made my verbcoin template because the old existing template didn't support the verbcoin inside the inventory. So removing it would miss the entire point.

I COULD try to see how the grid inventory is working and integrate it into a new module you can use. I've got no idea how much time I need for this and when I'll actually have the time;

(Merging codes rather then trying to run 2 seperate gui codes, which is always a bad idea as they will naturally interfere with one another)

Another, quicker way (in terms of coding) would be to create a set of options with which you can "turn off" certain verbcoin gui functionality.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.2 (for AGS 3.0.1)
Post by: Electroshokker on Thu 01/05/2008 10:59:58
New 1.5.2 version is up.

Release notes:

- bugfix: walk-to code no longer responding after clicking on something which had property 'act' set to 'true'
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.2 (for AGS 3.0.1)
Post by: Obi on Fri 09/05/2008 19:11:59
Probably a silly question but I was using the previous version of the verbcoin with the 800x600 problem, I only just realised I have that problem, I'm just wondering how I upgrade to the latest version of the template without having to start all over again and importing everything over.

edit

I transfered everything over to the latest version of the verb coin and ags and I'm still getting problems selecting things near the edges of the screen. :(
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.2 (for AGS 3.0.1)
Post by: Electroshokker on Sat 10/05/2008 11:29:01
Quote from: Obi on Fri 09/05/2008 19:11:59
Probably a silly question but I was using the previous version of the verbcoin with the 800x600 problem, I only just realised I have that problem, I'm just wondering how I upgrade to the latest version of the template without having to start all over again and importing everything over.

See the first post of this thread. I've uploaded the updated module script files seperately.

Quote from: Obi on Fri 09/05/2008 19:11:59edit

I transfered everything over to the latest version of the verb coin and ags and I'm still getting problems selecting things near the edges of the screen. :(

That's odd... are you sure you rebuild your game?

Come to think of it, my code's not very clean and general in that section. I feel another quick update coming up...
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.3 (for AGS 3.0.1+)
Post by: Electroshokker on Sat 10/05/2008 11:38:53
v1.5.3 is out. Just a quick fix.

The code is now completely resolution independent. Enjoy.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.3 (for AGS 3.0.1+)
Post by: subspark on Sat 10/05/2008 14:39:45
Fantastic work mate!
Very impressed here! :)

Cheers,
Paul.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.3 (for AGS 3.0.1+)
Post by: Obi on Sun 11/05/2008 00:17:51
Thanks! Now it works like a charm, you just saved my hide!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.3 (for AGS 3.0.1+)
Post by: Alarconte on Tue 13/05/2008 00:05:28
In the code, you say

"// if you're verbcoin is of a different size then 120x120 pixels, change these values. "

I try a lot but I don't know how to the template use my oversized verbcoin. It has 141x140 pixels, and the game its shows Cutted.

And too I see the change of image button is so slow. Why for?

EDIT: More important than size... Apart from a maybe problem of size, to activate a new button (I simple want a button to pickup objects), Is there more needed than expand the button size and all of that? My pickup button (custom_button3) don't "ilumine" (don't get mouseover and is unuseful).


Edit 2: I act as a noob and don't remind that gui's only update trought restarting game, not in save games u_u xD
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.5.4 (for AGS 3.0.1+)
Post by: Electroshokker on Sat 31/05/2008 13:12:33
Another update version 1.5.4, changes are:

- removed confusing commentary of old (Alarconte, you're NOT supposed to change ANYthing in the module code, it automatically supports any verbcoin size and any resolution)

- fixed another bug: when a couple of hotspots/characters/objects where close together, the label gui would display the wrong text, this was confusing when playing the game.

Quote from: Alarconte on Tue 13/05/2008 00:05:28
I don't know how to the template use my oversized verbcoin. It has 141x140 pixels, and the game its shows Cutted.

Increase the overal size of the gui so it matches the size of your verbcoin.

Quote from: Alarconte on Tue 13/05/2008 00:05:28And too I see the change of image button is so slow. Why for?

So you can have verbcoins with buttons of which the images overlap one another. It allows for more flexibility, though it is indeed slower then if you use seperate button images.

Quote from: Alarconte on Tue 13/05/2008 00:05:28to activate a new button (I simple want a button to pickup objects), Is there more needed than expand the button size and all of that? My pickup button (custom_button3) don't "ilumine" (don't get mouseover and is unuseful).

You have to define the new button's image in the globalscript:

SCUMM_VERBCOIN_GUI.verbgraphic(bCustom3, 0);

replace the 0 with whatever sprite number you want it to be.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.6.0 (for AGS 3.0.2+)
Post by: Electroshokker on Sun 15/06/2008 12:08:40
Major update: version 1.6.0 is up  ;D

- Lots of bugfixes
- A brand new feature: the ability to disable the module at any point in the game

help file on new function:



SCUMM_VERBCOIN_GUI DisableVerbCoinGUI

static SCUMM_VERBCOIN_GUI.DisableVerbCoinGUI(bool value)

Activates/Deactivates the SCUMM Verbcoin GUI system

Example:

SCUMM_VERBCOIN_GUI.DisableVerbCoinGUI(true);

will disable all verbcoin processing code.

Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.6.0 (for AGS 3.0.2+)
Post by: Ali on Fri 27/06/2008 11:36:42
Hi,

I've been using version 1.6, and I don't know if these points have been mentioned before, so I hope I'm not repeating stuff.

Because the module checks for hotspots before objects, objects situated over hotspots caused the wrong message to appear in the status line. Reordering the script sorted the problem for me. Though I'm not certain of what whould happen if characters overlapped objects or vice versa.

Also, I found I had to individually write "examine x" for every object. Is that the way the module is meant to work? I added a couple of lines which check if the custom repsonse is empty, and if so send a string saying "use/examine/talk activelocation" to the status line.

I think it would be good if that was built into the module, because it would only require users to create custom responses for certain objects (i.e. eat rather than talk for food).

Great module though, keep up the good work!

-Ali
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.6.0 (for AGS 3.0.2+)
Post by: Electroshokker on Wed 02/07/2008 20:13:16
Quote from: Ali on Fri 27/06/2008 11:36:42
Hi,

I've been using version 1.6, and I don't know if these points have been mentioned before, so I hope I'm not repeating stuff.

Because the module checks for hotspots before objects, objects situated over hotspots caused the wrong message to appear in the status line. Reordering the script sorted the problem for me. Though I'm not certain of what whould happen if characters overlapped objects or vice versa.

Hmm... good point. Basic AGS order is character => object => hotspot I think, but for characters/objects it really depends on the z-order (and thus the baseline).

I'll fix that in the next release. Thanks for spotting this!

Quote from: Ali on Fri 27/06/2008 11:36:42
Also, I found I had to individually write "examine x" for every object. Is that the way the module is meant to work? I added a couple of lines which check if the custom repsonse is empty, and if so send a string saying "use/examine/talk activelocation" to the status line.

I think it would be good if that was built into the module, because it would only require users to create custom responses for certain objects (i.e. eat rather than talk for food).

Yes, that's exactly how the module's supposed to work. I used to have a function which filled in a "default" message every time, but since I like to keep it as flexible as possible I removed that and replaced it with properties.

I'll probably add a brand new function which allows you to choose from 3 options:

- no messages
- default messages (customizable through a function call at any point in the game)
- property messages

That way you'll have all the flexibility you need. (and of course you'll be able to switch between these 3 modes in mid-game)

Quote from: Ali on Fri 27/06/2008 11:36:42Great module though, keep up the good work!

-Ali

Sure will. If people keep giving suggestions like these, the module will be a great extension to AGS.

And if I ever do get the time I might consider working out other gui templates for AGS 3.0 (If there's a request/need for them anyways).
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.6.0 (for AGS 3.0.2+)
Post by: Ali on Sat 05/07/2008 09:48:34
That's good to hear, though I would suggest having a "default messages + properties" mode, which I think would be the most useful. If customised text is available the module would display it, otherwise it would use the default response.

That's how I tweaked the module to work, as I mentioned above, and I think it would really streamline use of the module.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.0 (for AGS 3.0.2+)
Post by: Electroshokker on Sat 19/07/2008 12:55:44
Version 1.7.0 is up.

- buxfix: message ordering when you've got objects/characters on top of each other. The label gui will display the text property of the instance that is on top now.

- new feature: default messages. enable/disable at your leisure, change the default messages at any point in the game, use in combination with the custom messages if you like.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.0 (for AGS 3.0.2+)
Post by: rvampire on Sun 31/08/2008 09:40:05
Hello,

I've been using version 1.7.0 in my game and I think I found a bug: If I have a scrolling room and the character enters the room from a direction that requires the engine to show the room from somewhere else than upper left corner (say, I have a room sized 800x1000 and the character enters the room from the bottom) the hotspots outside the game resolution (in this case outside 800x600 rectangle) do not work properly. The GUI displays for a fraction of second in the wrong place (in this case at the bottom of 800x600 rectangle) and then disappears, probably because the mouse is not where the GUI is.

If the player enters the room so that the top left corner shows (in our example, from the top of the room), all the hotspots work correctly.

Also, sometimes the GUI script crashes on room change, though I am not sure what exactly causes it. In my game it only happens if I have two scrolling rooms linked so, that player exits the other from outside the 800x600 rectangle and then enters the new scrolling room also outside 800x600 rectangle. But even then only if I have not visited both rooms before from some other room. Error message is about null pointer reference on the line that gets custom properties from the player(?) character. Maybe loading the room and changing the viewport is so slow that when the code gets to this point, it has not yet loaded the character?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.0 (for AGS 3.0.2+)
Post by: Electroshokker on Tue 02/09/2008 18:23:52
I am unable to replicate this bug at this time (due to the fact I haven't used any vertically scrolling rooms yet).

Is it possible for you to send me a 1-room game with basic code which generates this error? (PM me)

In any case I'll look into it when I get some time, but my life's pretty hectic as it is right now, so that may be a while.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Electroshokker on Sat 11/10/2008 05:48:22
Ok, new 1.7.2 version is up.

This one's got a new feature: disable inventory()

And fixes the scrolling room bug. (When I finally got round to checking it out, it took me about 5 seconds to fix. Sorry it took so long, guys! My life's been pretty hectic.)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: goldensox on Fri 24/10/2008 21:35:15
so, why didnt anyone release some templates or skins of this GUI? i mean, im feeling scared about editing the original, cause, by my calculations, the chance of getting shitty is liek 99%...
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Sun 01/02/2009 10:19:02
I got problems with the inventory

Some items react different than others. When I select some items, the inventory closes nearly instantly. When I select other items the inventory closes after some seconds.
The Inventory only closes when i move the mouse cursor over the left border.

I can't remember changing anything in the script, except the item.count & the size of the items

-in the GlobalScript:
int item_count = 36;
function game_start()
{   SCUMM_VERBCOIN_GUI.Item_Count(36);
-in the Scumm VerbCoin GUI.ash:
import static function Item_Count(int count = 36);
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Mon 02/02/2009 12:17:34
I managed to fix the problem, although I still don't know what exactly caused it.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: MashPotato on Mon 02/02/2009 19:02:59
Did you change the inventory background from the default?  If so, you may need to change the edge coordinates to account for the different size :) (I had the same problem until I did that).
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Tue 03/02/2009 07:46:38
I did change the background image und made the top border smaller. But the position and size of the space for the inventory did stay the same. It worked after i adjusted the size of the @overhotspot@-button

The strangest thing was, that some items did react differently than others.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Thu 19/02/2009 09:14:52
How can I deactivate the Verb Coin and the inventory for special rooms?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Electroshokker on Thu 19/02/2009 13:52:12
Quote from: Helme on Thu 19/02/2009 09:14:52
How can I deactivate the Verb Coin and the inventory for special rooms?

in any script, type SCUMM_VERBCOIN_GUI. and you will automatically see all available functions.

Among these you'll see some enable/disable functions for this kind of stuff.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: beckymov on Mon 23/02/2009 14:47:17
I am using SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+) for a game I'm currently working on. However, I have a problem when using the ShowPlayerCharacter = false on the room settings. When I use this setting  I am no longer able to call up the inventory at all. Not sure what I'm missing to make this work?  ???
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Jared on Wed 04/03/2009 05:53:07
I've been using this template recently and it's wonderfully easy to use and straightforward - pretty much as efficient as the default SCI. I hate to get petty, though, but I wanted to use narrator messages in my game but the module seems to have overridden the Display() function to Character.Says() for the player character. I had a quick look through the Global scripts and couldn't see it anywhere.

Would there be a straightforward way to set Display back to its default function? Is there another function that does the same job as default Display()? If not I can re-write it without a narrator but I had been hoping to use one..
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Electroshokker on Thu 05/03/2009 14:54:53
Quote from: beckymov on Mon 23/02/2009 14:47:17
I am using SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+) for a game I'm currently working on. However, I have a problem when using the ShowPlayerCharacter = false on the room settings. When I use this setting  I am no longer able to call up the inventory at all. Not sure what I'm missing to make this work?  ???

I'll look into it.

Quote from: Jared on Wed 04/03/2009 05:53:07
I've been using this template recently and it's wonderfully easy to use and straightforward - pretty much as efficient as the default SCI. I hate to get petty, though, but I wanted to use narrator messages in my game but the module seems to have overridden the Display() function to Character.Says() for the player character. I had a quick look through the Global scripts and couldn't see it anywhere.

Would there be a straightforward way to set Display back to its default function? Is there another function that does the same job as default Display()? If not I can re-write it without a narrator but I had been hoping to use one..

I believe this is a general setting, nothing in the code, actually. Look on the general tab of AGS and change the "always display text as speech" setting.

The AGS default is to display narrator messages as textbox, but I probably changed this setting (dunno why, I'll revert it in the next update)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Jared on Sat 07/03/2009 03:55:26
Ah, yes, I was kicking myself just when I was coming to check out this thread, realising it was probably a GUI setting. That can be my trouble - spent so much time screwing around with Java I forget that in AGS not everything's in the code.

I think it's fine as is - to the best of my recollection LA never used a narrator in their games (unless you're pedantic enough to go back to Labyrinth) so it only makes sense for a verbcoin mod to be designed for a player character response, just as Sierra interface is generally made with a narrator.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Fri 03/04/2009 17:01:14
I still have a problem with the GUI.

In some cases (like Buttons for "Start", "Load", & "Quit" in the starting screen) I want to proceed a simple click without using the Verb Coin but I dont know how. If I deactivate the VerbCoin nothing happens when a click somewhere.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Electroshokker on Tue 07/04/2009 11:49:15
Quote from: Helme on Fri 03/04/2009 17:01:14
I still have a problem with the GUI.

In some cases (like Buttons for "Start", "Load", & "Quit" in the starting screen) I want to proceed a simple click without using the Verb Coin but I dont know how. If I deactivate the VerbCoin nothing happens when a click somewhere.

That's exactly the point. You disable the verbcoin module, any interactions or mouse-click events you wish to process you'll have to code yourself.

This was included so you could have mini-games or other stuff in your game where you don't want my module to interfere.

However, for your particular issue: every hotspot/character/object/item has the 'act' property. If you set this property to 'true' (it's a boolean), any clicks on the hotspot/character/object/item  will be processed immediately as an interact event.


Just left click on the ... field next to 'Properties'
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Thu 09/04/2009 22:03:05
Once again: Thanks!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: JpSoft on Wed 27/05/2009 18:08:16
I dont know if this was notified before, but i will post it anyway.

In scrolling rooms the verbcoin is not displayed in the right position (640x480 game, room 900x480 where i had this issue). I changed the declaration of gui_verbcoin_border which was bad implemented and now it works perfect.

Also, the act property to allow fast clicks is not complete. After all, if the player keep the mouse button down, the verbcoin will popup anyway. I just included a new boolvariable (VerbCoinAvailable) and add this in your module:

timer++;
if (!VerbCoinAvailable) timer = 1;
if (timer >= 15)
{
//Show verbcoin routines
}


I hope this helps.

Jp
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Electroshokker on Thu 18/06/2009 16:32:08
Quote from: JpSoft on Wed 27/05/2009 18:08:16
I dont know if this was notified before, but i will post it anyway.

In scrolling rooms the verbcoin is not displayed in the right position (640x480 game, room 900x480 where i had this issue). I changed the declaration of gui_verbcoin_border which was bad implemented and now it works perfect.

Also, the act property to allow fast clicks is not complete. After all, if the player keep the mouse button down, the verbcoin will popup anyway. I just included a new boolvariable (VerbCoinAvailable) and add this in your module:

timer++;
if (!VerbCoinAvailable) timer = 1;
if (timer >= 15)
{
//Show verbcoin routines
}


I hope this helps.

Jp

Actually, I have in my possession a brand new (customized) version of this module, which does not have any problems found in this version, (as far as I know) which is infinite more stable.

However, I don't have the time to do the code-merge at this time. My priorities lie elsewhere at the moment.

Rest assured, I WILL perform an update of this module somewhere in the (hopefully near) future. Between being a full-time coder on my day job, my girlfriend and the Linux engine + some other stuff, I'm pretty busy.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: mikosworld on Mon 27/07/2009 00:42:52
Electroshokker ?
Would it be possible to program a outline system in your template? Ie when an object of the inventory in overlap with another in the inventory or in the scene, it displays a small outline (color and thickness you want) as in Monkey Island 3 ...
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Helme on Wed 29/07/2009 12:17:02
Sorry, Electroshokker.

I got to report another bug to you. If you override the VerbCoin by setting the propertie 'act true' the game can crash, when you click at a destination where hotspots, objects or chars are close to each other.  For example if a charakter stands before a hotspot and you click at the edge of the charakter.

The game crashes with the following massage:
in 'Scumm VerbCoinGui.asc", line 547
Error: Error running function: 'repetedly_execute':
Error: Null pointer referenced

Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: corrado1989 on Wed 16/09/2009 12:58:13
Hi, I need some help...
I'm Italian, excuse me for my very bad translation ;D

I started a new game using the VerbCoin, but I have some problems...

When I write something like this, in the room scripts:

function oPoster_Interact()
{
 cEgo.Walk(459, 352, eBlock, eWalkableAreas);
 oPoster.Visible = false;
 cEgo.AddInventory (iPoster, 0);
 return;
}

My character should walk in the position (459,352) but he stops in another point of the room. :-[
This problem appears only when I use the VerbCoin
Could someone help me? Please I'm a beginner and I found this VerbCoin wonderful!! I want to use it!! :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Pumaman on Wed 16/09/2009 21:14:18
On the General Settings pane, check the "Use low-res co-ordinates in script" setting -- I can't remember what it's set to with the Verb Coin template.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: corrado1989 on Wed 16/09/2009 21:56:13
Thank you very much, now it works perfectly!!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: MarceloCSC on Wed 23/09/2009 05:06:40
Quote from: beckymov on Mon 23/02/2009 14:47:17
I am using SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+) for a game I'm currently working on. However, I have a problem when using the ShowPlayerCharacter = false on the room settings. When I use this setting  I am no longer able to call up the inventory at all. Not sure what I'm missing to make this work?  ???

Hello, I'm having the same problem as beckymov, I can't bring up the inventory while hiding the playable character. Can anyone give me some hint on how to make this work?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: beckymov on Thu 24/09/2009 22:16:46
hello. no one ever got back to me on this one but i managed to find a way around it by keeping ShowPlayerCharacter set to true, setting 0 on players view for the room (both on the edit room panel)  and editing the room script to set the players idle view and talking view to a blank one on: function room_Load()

e.g.

function room_Load()
{
cEgo.SetIdleView(-1,  0);
cEgo.SpeechView = -1;
}
then
resetting to the desired views on exiting that room.

e.g.

function hExit_Interact()
{
player.ChangeRoom(1, 522, 351);
cEgo.SpeechView = 13;
cEgo.SetIdleView (6, 15);
}


hope this helps!    :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Monk on Sun 18/07/2010 06:04:33
Quote from: beckymov on Thu 24/09/2009 22:16:46
hello. no one ever got back to me on this one but i managed to find a way around it by keeping ShowPlayerCharacter set to true, setting 0 on players view for the room (both on the edit room panel)  and editing the room script to set the players idle view and talking view to a blank one on: function room_Load()

So far, this one helps me alot.. hope theres some fixes available soon :) thank you beckymov !

THANKS :

Shokkermeister for updating the module, new features really helps alot!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Haggis on Mon 21/02/2011 20:21:44
Edit 2: Oh dear - user error i assume. I just commented out all the 'custom' options - seems to have resolved the issue. I must have removed them from somewhere else in the module at some point I guess. My bad.  :-[ Apologies mods.

Edit: I can't actually replicate this error in a new game - puzzling. Wonder if it's a known smoothscroll parallax compatability issue (although error occurs when scrolling is not taking place)... anyway if anyone has any advice on the below then let me know.

Not sure if posting here will get me into trouble as this is quite an old topic now - but i've noticed the same error that Helme raised previously and i was wondering if anyone else had experienced this error and found a way to resolve it. It still occurs with the latest version of this module. I've tried in vain to resolve it and have searched the forums of other examples of people experiencing this issue and Helme is the only other.

The Bug:

Imagine you were to create a hotspot that represented a door in a non-scrolling room, and on the wall next the door you placed an object. The door hotspot is then configured to act on a single click interaction rather than verbcoin interface (property 'act' = true) so that on a single click the player walks to the door and exits the room.

The bug occurs if you do the following -
*Click on door to initiate the character interaction.
*In-between the character walking to the door and changing rooms move the mouse cursor so that it is now positioned over the object next to the door.
*When the door interaction attempts to run the change room interaction a 'null pointer referenced' error is thrown referencing this line in the 'Scumm Verbcoin GUI.asc':

"...
else if (GetLocationType(mouse.x,mouse.y) == eLocationObject){
       custom_1 = obj.GetTextProperty("Custom_Look"); //THIS LINE REFERENCED AS ERROR
..."

I think the cause has something to do with the module repeatedly checking the mouse x/y coordinates for a hotspot, object, character etc but i'm not skilled enough to try and resolve the issue further.

Anyone able to help?

Asides from this bug, I love this module. ;D
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: TomatoesInTheHead on Fri 25/03/2011 09:57:24
Concerning the function DisableInventory(optional bool value):

I think it is very counter-intuitive to make this parameter optional.
This way, DisableInventory() is the same as DisableInventory(false), and actually enables the inventory (again).

My suggestion is to change it to either
1)
DisableInventory(bool value);
with mandatory parameter, true to disable, false to enable,
or
2)
DisableInventory();
EnableInventory();

or
3)
DisableInventory(optional bool value);
where DisableInventory() actually disables the inventory (the provided backwards compatibility might actually be dangerous if people used DisableInventory() to enable the inventory again),
or
4)
DisableInventory(optional bool value);
EnableInventory(optional bool value);

as a mixture of 3 and 4 (working like 3, with some backwards comaptibility like 4),
or
5)
SetInventoryEnabled(optional bool value);
where SetInventoryEnabled() enables the inventory. Would mean that everyone had to change her code from older games, but this way it's also not error-prone like options 2, 3 and 4 where only the behaviour of the function would change, but all games created with the current version would compile without a warning.

Same goes for the function DisableVerbCoinGUI.

DisableVerbCoinGUI I think also has another bug (or intended feature I don't fully understand):
If I disable the GUI, the inventory always shows up, no matter if it's enabled or not, and can't be closed.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Adder on Fri 28/10/2011 06:29:38
As this is a fairly old post, I'm not sure if this will help anyone but I've been struggling with the same issue Haggis mentions re. the 'null pointer' and was just about to re-ask the question when I stumbled upon (what seems to be) the solution:
(I think this is how it works, I'm pretty new to all this stuff)
I had all my 'exit' hotspots set with walk-to points,  as the default walk is 'eNoBlock' and the verbcoin can still be called and it causes problems (or did for me).  By taking out all the walk-to points and using instead a 'player.Walk' command in the room script I can pass 'eBlock' - so that the verbcoin won't be accidentally called before you change rooms.
It seems to work for me.

I hope this makes sense and can be of some help to others who may have a similar problem.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Adrian on Fri 10/08/2012 20:25:22
Hello,

I know, this thread hasn't been in use for quite a while, but I think I'm in the right spot here.

The VerbCoin Template is absolutely great but I have a litte issue with it:
When I set the player character's starting room to a different one than 1, I'm not able to open the inventory item. Right click has no effect then.
Works with all other room as starting room, though.

EDIT: Does NOT work with other rooms than room 1. Sorry.

I'm sure this is a minor issue. Can anybody tell my how to fix it?

Thanks!

EDIT: Seems this thread is out of order, so I moved this post to Beginners' Technical Questions. :)
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: dbuske on Sat 11/08/2012 17:29:44
LInk is dead
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Khris on Mon 13/08/2012 14:41:19
So?
The template is included with AGS and has been for long time now.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v1.7.2 (for AGS 3.0.2+)
Post by: Adrian on Fri 31/08/2012 17:28:27
Just to let you know. There's an isue with this module:

If you change to a room where the ShowPlayerCharacter property in the room property grid is set to false, the inventory item will not show up any more, even if you change back to a room where the property is set ot true.

I avoid the issue by using the player.transparency command instead.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Electroshokker on Wed 11/06/2014 21:33:01
Scumm Verbcoin 2.0.0 is out! (only 6,5 years after the original release :-X)

This new version is for AGS 3.3 only, and breaks older versions of the module. Therefore, it's released as a template file only. (See first post of the thread)

I was planning some beta testers to go through it to get some upgrading instructions, but no one volunteered so far.
So... be warned if you try to upgrade ;)

Feel free to post bug reports here.

EDIT The documentation and the template have been sent to CrimsonWizard so it can be included in the next AGS release build.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Crimson Wizard on Sat 05/07/2014 21:02:00
Uhh, sorry, this dropped from my head.

I meant to say that it is not necessary to send me copies of template, because I can take them from forum links anyway. Also, maybe it won't be me who will package next version.

Perhaps this could be a better idea to create some sort of file repository to store latest versions of templates meant to be included into AGS distributive?
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: arj0n on Mon 14/07/2014 22:36:46
Peder's agsarchives would be a good place
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: The Great Underground Empire on Sat 08/08/2015 23:11:38
I found a problem...just downloaded AGS 3.3.4, started a new game with the Verb Coin template, and found out I couldn't make cEgo walk by left-clicking.  It'll still obey cEgo.Walk commands in the script, but even with the Walkable Area covering the entire room, cEgo wouldn't move from mouse clicks.  Crimson Wizard assisted and verified that you can copy in an older version of the template and it'll still work.  Apologies if it was already found and I just missed it in the previous pages.  Thanks!

From this thread in Beginners':
http://www.adventuregamestudio.co.uk/forums/index.php?topic=52535.0
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: carlosuh on Wed 23/09/2015 20:49:15
Hi everyone, i have a bug with the 2.0.0 version..

You can reproduce the bug in a fresh new project.
When i click at any object or hotspot or anything that brings up the verb coin, if i accidentally move the mouse too fast (e.g. click at left and move fast to right) the game crashes with these errors:

Code (ags) Select
line 789     if (actionTextProperty[i] == "" && Verbcoin.get_Overhotspot_UseDefaultActionText() == true && default_text[i] != null)
line 1323    repeatedly_execute_set_overhotspot_gui_value();


The only "fix" that i know is to comment from line 787 to 795 but then the verb coin isn't showing any text on the @overhotspot@

I didn't see this bug in any post but if it's already posted before i apologize.
Sorry for my bad english.
Thanks for any help!.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Crimson Wizard on Sat 21/11/2015 19:13:35
I would like to ask, if anyone was able to use the newest version of Verbcoin template (2.0.0) for their game?
With the strange bug reported above, which prevents character from walking (http://www.adventuregamestudio.co.uk/forums/index.php?topic=32745.msg636518645#msg636518645), I am not sure if I should distribute this template with next AGS release until template author responds at least.
Unfortunately I cannot find time to test this myself and find out if these are not bugs, but optional behavior or something, that could be changed with a switch.

OTOH I could distribute both old and new versions of the template.
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Monsieur OUXX on Fri 11/12/2015 17:31:32
The issue is caused by actionTextProperty[ i ] being null. It makes the  comparison with "" crash (apparently it's forbidden to compare a null String with anything).

I obtained the same symptoms as carlosuh, not by moving my mouse too fast, but by changing resizing my game in the general options (from the template's 640x480 down to 320x200). I have no idea what it broke, but it caused actionTextProperty[ i ] to be null when you click on the character.

Sadly, I have no knowledge of this module's internal workings so I can't fix it.

here is a quick fix but I cannot guarantee that it fixes the module permanently:
Code (ags) Select

//...
if (gui[Verbcoin.get_Verbcoin_GuiId()].BackgroundGraphic == verbgraphic_button[i]) //LINE 787
{

        bool propertyIsEmpty = false;
       
        if (actionTextProperty[i]==null)
          propertyIsEmpty = true;
        else if (actionTextProperty[i] == "")
           propertyIsEmpty = true;

        if (propertyIsEmpty == true && Verbcoin.get_Overhotspot_UseDefaultActionText() == true && default_text[i] != null)
        {
          overhotspot.Text = default_text[i].Append(location_name);
        }
        else if (!propertyIsEmpty)
        {
          overhotspot.Text = actionTextProperty[i];
        }
}
//...


Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Electroshokker on Sun 13/12/2015 11:45:01
Ok,

just noticed the responses.

There are 2 issues:

1 - the no walking bit is due to a strange bug where only x out of y clicks are actually processed (when putting breakpoints it all works as expected, but without them clicks go 'missing')

2- actionTextProperty can be null if moving away from the verbcoin upon opening it, this is easily fixed

I'll upload a new version (2.0.1) asap to fix these. (might be a few weeks, since near holidays)

----

If you still have issues (and if you cannot identify the source of the problem yourself) you could provide me with a download link (just PM me, not everybody needs to see your unfinished game :wink:) to game sources which I can use to reproduce the problem so I can figure out a solution.

Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: The Great Underground Empire on Wed 15/06/2016 00:13:45
Shoot, sorry to report the same bug again, different engine version...I'm in 3.3.5, and just discovered the same issue with the verb coin and the inability to walk.  Electroshokker, did you ever get a chance to work on it?  Thanks!
Title: Re: TEMPLATE: SCUMM VERBCOIN GUI v2.0.0 (for AGS 3.x)
Post by: Trample Pie on Sat 20/08/2016 01:31:31
Hey if someone's still having trouble with this here's how I got it working with my game.

I followed Crimson Wizards advice and downloaded an older version of AGS (3.2.1) and copied the verb coin template into my newer versions template folder.

Then I used find and replace to replace "ProcessClick" with "Room.ProcessClick" in Scumm Verbcoin GUI.asc.

I hope that helps!