Author Topic: MODULE: Description v1.06 - Display hotspot description  (Read 30355 times)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
This module can do lots of things!

Want a FoA-style statusline? Description can do it!
Want a hotspot description that follows the cursor? Description can do it!
Want the description on an Overlay or a GUI? Description can do it!
Want the text to stay still while you're over the same hotspot? Description can do it!
Want to be richer than Bill Gates? Description can do it!


Download Description module here (Requires AGS v3.00 or later!)

For more info, here's the instructions from the script header: http://ssh.me.uk/moddoc/Description

v1.06 fixes the problem with Sierra with BG mode speech and overlay Descriptions. It also adds an optional alignment configuration parameter for overlays.
« Last Edit: 01 Jan 2015, 02:32 by Dualnames »

Re: MODULE: Description v1.00
« Reply #1 on: 28 Apr 2006, 19:56 »
Nice work!
« Last Edit: 19 Aug 2006, 17:10 by strazer »

Candle

  • Truly Hated
Re: MODULE: Description v1.00 - Display hotspot description
« Reply #2 on: 28 Apr 2006, 23:58 »
Your a Machine SSH .. how do you do it..
* Candle Thanks you again.

Scorpiorus

  • 100101101010b
Re: MODULE: Description v1.00 - Display hotspot description
« Reply #3 on: 29 Apr 2006, 22:06 »
Good work with the modules, SSH!

This one should especially help beginners to set up their game interfaces with just basic scripting.

:)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.01 - Display hotspot description
« Reply #4 on: 02 May 2006, 10:25 »
I've fixed the problems with running on 2.71, and the demo is now 2.71-compatible, too

EDIT: I also fixed the Fade function for gui mode not working
« Last Edit: 11 May 2006, 16:50 by SSH »

Alynn

  • I'm ugly because I'm pixelated, what's your excuse
    • I can help with scripting
    •  
Re: MODULE: Description v1.02 - Display hotspot description
« Reply #5 on: 10 Sep 2006, 20:47 »
SSH, you asked me to remind you.

Could you please make it where it turns off the description if in pointer mode (or any other mode of the players choosing). Only if there is a verb will it display the string.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #6 on: 11 Sep 2006, 12:21 »
Done, Alynn. Let me know if that was what you had in mind.

Alynn

  • I'm ugly because I'm pixelated, what's your excuse
    • I can help with scripting
    •  
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #7 on: 14 Sep 2006, 09:11 »
Jes Shir! It works great.

magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #8 on: 10 Aug 2007, 21:21 »
I can't seem to get the description to hide itself while the game is in wait mode (when the player is talking etc..).

Also I have an inventory GUI screen with a clear background at the bottom of the screen, the description of each inventory item appears behind the inventory item, is their anyway of bring this forward in front of this gui?

I haven't used AGS in a while so could be making n00b mistakes, but I would appreciate it if someone could help me out, let me know if you need me to post up code or screenshots etc...
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #9 on: 12 Aug 2007, 20:42 »
Did you set Description.NoDescriptionWhenMode to eModeWait?

As for the inv descriptions, you'll have to use GUI rather than overlay mode of the Description module, and set the Z order of the GUI you use for descriptions to be higher than that of the inv GUI.

magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #10 on: 22 Aug 2007, 16:39 »
Regarding the Description.NoDescriptionWhenMode, it doesn't seem to be working, here's my code:

Code: Adventure Game Studio
  1.     Game.SpeechFont=3;
  2.     Description.OffsetX = 3;
  3.     Description.OffsetY = 3;
  4.     Description.Location=eDescLocationFollow;
  5.     Description.VerbMode=eDescVerbModeUseOnly;
  6.     Description.NoDescriptionWhenMode = eModeWait;
  7.     Description.IncludeInventory = true;
  8.     Description.OLFont=3;
  9.     Description.OLColor=4;
  10.     Description.OverlayMode();
  11.  

I don't really understand the whole GUIControl part and getting it to work with a label, any chance you can help me out with that one?
« Last Edit: 22 Aug 2007, 16:51 by magintz »
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #11 on: 22 Aug 2007, 22:09 »
create a label, and pass the name you give it in the gui editor to the gui mode script function...

magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #12 on: 27 Aug 2007, 11:52 »
Sorry to be a pain, but I got it all sorted quite easily but now I seem to be getting an error when I move the mouse within the intro screen, this could be my problem, but it is pointing the error to the description.



I'm using 640 x 400 game resolution, could I have done something stupid?

The problem seems to occur when the mouse moves outside the game window, is their some way of preventing this?

Also, I still cannot get the description to vanish using the Description.NoDescriptionWhenMode = eModeWait; command.
« Last Edit: 27 Aug 2007, 11:56 by magintz »
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Gilbert

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #13 on: 27 Aug 2007, 11:58 »
I didn't check on the module, but remember even if your game's screen resolution is 640x400, the game resolution is still 320x200. So, maybe it's a problem on your side trying to use hi-res coordinates for stuff? (AGS currently cannot place stuff at hi-res precision, even when the displayed res. is hi-res.)

magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #14 on: 27 Aug 2007, 12:11 »
I'm not sure if it is anything I have done as the only code I am using is :

Code: Adventure Game Studio
  1.     Game.SpeechFont=3;
  2.     Description.Location=eDescLocationFollow;
  3.     Description.VerbMode=eDescVerbModeUseOnly;
  4.     Description.NoDescriptionWhenMode = eModeWait;
  5.     Description.IncludeInventory = true;
  6.                 Description.CropGUIToo = true;
  7.     Description.GUIMode(desc);
  8.  

Whilst, the error code comes from lines 143 to 153:

Code: Adventure Game Studio
  1.   if (this.DisplayType==eDescDisplayGUIControl) {
  2.     this.Update_GUI();
  3.   } else if (this.DisplayType==eDescDisplayOverlay) {
  4.                 this.Update_Overlay();
  5.         }
  6. }
  7.  
  8.  
  9. function repeatedly_execute_always() {
  10.   // Should this go in rep_ex_always?
  11.   // easy enough for user to change, if required
  12.   Description.rep_ex();
  13. }
  14.  

Edit: I changed "Description.Location=eDescLocationFollow" to "Description.Location=eDescLocationSticky" and I now do not get any problems or errora; but I still would want to use "Description.Location=eDescLocationFollow".

P.S. SSH, when you get a moment can you also help on my "Description.NoDescriptionWhenMode = eModeWait;" problem.
« Last Edit: 27 Aug 2007, 12:15 by magintz »
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #15 on: 28 Aug 2007, 10:22 »
Can you stick this in the code of the first room where you get this problem, please? (e.g. in the after fadein script)

Code: Adventure Game Studio
  1.  Display("MaxX %d MaxY %d VW %d VH %d", Description.MaxX, Description.MaxY, System.ViewportWidth, System.ViewportHeight);
  2.  

and tell me the numbers it displays. You should be able to work around your problem by manually setting MaxX and MaxY to something like 300, 180.

As for the busy cursor, I see that mouse.Mode never actually gets set to eModeWait, so we have to check this specially. I'll do a new version of the module, but in the meantime, edit the module script and look for  this code:

Code: Adventure Game Studio
  1. protected function Descriptions::Update_String() {
  2.   if (mouse.Mode==this.NoDescriptionWhenMode) { this.Text=""; return; }
  3.  

and replace it with:

Code: Adventure Game Studio
  1. protected function Descriptions::Update_String() {
  2.   // Special case of busy cursor
  3.   if ((mouse.Mode==this.NoDescriptionWhenMode) || (this.NoDescriptionWhenMode==eModeWait && IsInterfaceEnabled()==0)) {
  4.                 this.Text=""; return;
  5.         }
  6.  


I've actually put this now into Description 1.04, available in the first post
« Last Edit: 28 Aug 2007, 11:18 by SSH »

magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.04 - Display hotspot description
« Reply #16 on: 28 Aug 2007, 12:59 »
You truly are a king of kings!

Can you stick this in the code of the first room where you get this problem, please? (e.g. in the after fadein script)

Code: Adventure Game Studio
  1.  Display("MaxX %d MaxY %d VW %d VH %d", Description.MaxX, Description.MaxY, System.ViewportWidth, System.ViewportHeight);
  2.  

and tell me the numbers it displays. You should be able to work around your problem by manually setting MaxX and MaxY to something like 300, 180.

-- "MaxX 320 MaxY 200 VW 320 VH 200"



As for the busy cursor, I see that mouse.Mode never actually gets set to eModeWait, so we have to check this specially. I'll do a new version of the module, but in the meantime, edit the module script and look for  this code:

Code: Adventure Game Studio
  1. protected function Descriptions::Update_String() {
  2.   if (mouse.Mode==this.NoDescriptionWhenMode) { this.Text=""; return; }
  3.  

and replace it with:

Code: Adventure Game Studio
  1. protected function Descriptions::Update_String() {
  2.   // Special case of busy cursor
  3.   if ((mouse.Mode==this.NoDescriptionWhenMode) || (this.NoDescriptionWhenMode==eModeWait && IsInterfaceEnabled()==0)) {
  4.                 this.Text=""; return;
  5.         }
  6.  

Worked a treat; thanks for that.
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.04 - Display hotspot description
« Reply #17 on: 28 Aug 2007, 13:16 »
Can you try editing these lines of the module to see if this fixes the problem?

Right at the bottom of the Description script, in game_start(), change:

Code: Adventure Game Studio
  1.   Description.MaxX=system.viewport_width;
  2.   Description.MaxY=system.viewport_height;
  3.  

to:

Code: Adventure Game Studio
  1.   Description.MaxX=system.viewport_width-1;
  2.   Description.MaxY=system.viewport_height-1;
  3.  


magintz

  • Mittens Knight
  • Just because I rock doesn't mean I'm made of stone
    • I can help with story design
    •  
    • I can help with web design
    •  
    • magintz worked on a game that was nominated for an AGS Award!
Re: MODULE: Description v1.04 - Display hotspot description
« Reply #18 on: 28 Aug 2007, 14:59 »
Woot!

:D

It works now, thanks!
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #19 on: 28 Aug 2007, 16:22 »
This fix is now in v1.05 available to download in the first post

Re: MODULE: Description v1.03 - Display hotspot description
« Reply #20 on: 10 Jan 2008, 17:22 »
create a label, and pass the name you give it in the gui editor to the gui mode script function...

i can't understand how to do this step...

can someone please post an example to explain me where exactly i have to set the label name?

is this the correct piece of script?:
Code: Adventure Game Studio
  1. function Descriptions::GUIMode(GUIControl *gc) {
  2.   this.OLTidy();
  3.   if (gc==null) {
  4.                 Display("ERROR! null GUIControl passed to Description.GUIMode, contact game author");
  5.                 return -1;
  6.   }            
  7.   this.DisplayType=eDescDisplayGUIControl;
  8.   this.gc=gc;
  9. }
  10.  

Re: MODULE: Description v1.05 - Display hotspot description
« Reply #21 on: 09 Mar 2008, 14:57 »
Hello! I'm new into the world of AGS but still using the help I could make a game;
I didn't quite understand what I have to do or to change in the script so the description of the hotspot appear (preferably next to the cursor) in any cursor mode. Could you explain what I have to do?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.03 - Display hotspot description
« Reply #22 on: 10 Mar 2008, 11:34 »
create a label, and pass the name you give it in the gui editor to the gui mode script function...

i can't understand how to do this step...

can someone please post an example to explain me where exactly i have to set the label name?


In your game_start function, call

Code: Adventure Game Studio
  1. Description.GUIMode(gMYGUINAMEGOESHERE);
  2.  

Hello! I'm new into the world of AGS but still using the help I could make a game;
I didn't quite understand what I have to do or to change in the script so the description of the hotspot appear (preferably next to the cursor) in any cursor mode. Could you explain what I have to do?

Put this in your game_start function:
Code: Adventure Game Studio
  1. Description.OverlayMode();
  2. Description.Location=eDescLocationFollow;
  3.  




Re: MODULE: Description v1.05 - Display hotspot description
« Reply #23 on: 10 Mar 2008, 18:00 »
Thanks! I couldn't understand where to put these functions!

kkmic

  • Unidentified
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #24 on: 06 Jul 2008, 22:20 »
Has anyone tried this module with AGS3+? I'm using 3.0.2 and i'm getting a white background OVER the description text.

Can anyone recommend another module if this one has issues with 3.0.2? I would prefer modules instead of plug-ins.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #25 on: 06 Jul 2008, 23:17 »
Can you give more detail? What settings are you using, most pertinently, Overlay or GUI mode?

kkmic

  • Unidentified
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #26 on: 07 Jul 2008, 10:18 »
These are my settings (in the game_start section):
Code: Adventure Game Studio
  1. Description.Location=eDescLocationFollow;
  2. Description.OffsetX=0;
  3. Description.OffsetY=0;
  4.  

Everything else is default (and that means overlay). Even with the overlay mode explicitly defined in the game_start section, the end result is the same.

What I get is this:


To the right of the character is a hotspot (the character is not currently on the hotspot). It has a different description, but I get an identical sized box.

There seem to be some text in that box, as the yellow "dots" from topside differ from the character to the hotspot.

Anything  more that I can do to help tracking down the problem?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #27 on: 07 Jul 2008, 11:00 »
I've just tried your setup out with AGS 3.0.2 SP1 and it works fine for me. Can you:

* Make sure you're using 3.0.2 SP1 as CJ fixed a coupel of last-minute bugs
* Tell me the bit-depth of your game and background
* Upload the game folder (not compiled, the source) so I can try it out?

kkmic

  • Unidentified
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #28 on: 07 Jul 2008, 12:09 »
AGS version: 3.0.2 June 2008, Build 3.0.2.44 (I downloaded it less than 24 hours ago)
Game depth: 32 bit
Background depth: 32 bit

You can find the test files here (rar archive).

It's just a test, not a game. I'm just gathering assets ATM.

Hope this helps. The text under the cursor is something that i really want in my game (if i'll manage to finish it :D).

If you find the solution tot the  problem (it may be related to the color depth), I would like to make one request:
It would be possible to vertically align the text center with the cursor center?

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #29 on: 07 Jul 2008, 12:55 »
I messed around with bit depths, etc. but it didn't make any difference. The yellow dots are the text: the font you are using seems corrupted as I couldn't get it to display properly at all in a GUI or overlay, no matter what. I loaded a new font and it worked fine. However, the white box behind seemed to stay no matter what I did. This is very puzzling. I also treid creatign a enw game from the Default template and then importing Description and using your settings and there's no white BG there.

AHAHAH!

Found it. If you have your speech style set to SierraWithBackground, Text Overlays seem to acquire this white background. Looks like an AGS bug to me...


EDIT:
For centred text, you can edit line 83 of Description.asc:
Code: Adventure Game Studio
  1. this.x = mouse.x + this.OffsetX;
  2.  
becomes
Code: Adventure Game Studio
  1. this.x = mouse.x + this.OffsetX - (this.width/2);
  2.  

Although, I can add an alignment setting when I get around to description 1.06...
« Last Edit: 07 Jul 2008, 13:00 by SSH »

kkmic

  • Unidentified
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #30 on: 07 Jul 2008, 18:05 »
Thanks mate. Both for the info and for the center quickfix.

DazJ

    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #31 on: 07 Jul 2008, 22:51 »
Anyone know where this can be downloaded? The link is dead :(

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.05 - Display hotspot description
« Reply #32 on: 07 Jul 2008, 23:06 »
OK, sorry... link now fixed.

You should always be able to find my modules if you go to my home page and follow the links there

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #33 on: 08 Jul 2008, 11:30 »
I've uploaded v1.06 which fixes your problem, kkmic, even in that speech mode. It also adds an alignment option.

kkmic

  • Unidentified
    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #34 on: 08 Jul 2008, 12:29 »
I need a kiss smiley  ;D

Thanks mate. I'll give it a try later today. Though I believe that a lucasarts style speech will fit better with my game than sierra with backgrund.

DazJ

    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #35 on: 29 Jul 2008, 16:38 »
Is there anyway to disable to Descriptions of Object/Hotspots etc when the mouse cursor is in wait mode or when characters are talking? It looks sloppy when a cutscene is on but the player can still move the cursor and display the hotspots' and objects' descriptions.

Thanks in advance.
 
EDIT: EDIT: Fixed. I changed the

Description.NoDescriptionWhenMode;

setting.
« Last Edit: 29 Jul 2008, 16:43 by DazJ »

Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #36 on: 12 Sep 2008, 23:01 »
How can I change the font of decription text? I want it to be a bold one, like the one within the ags fonts (font 2).

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #37 on: 13 Sep 2008, 08:41 »
How can I change the font of decription text? I want it to be a bold one, like the one within the ags fonts (font 2).

From http://ssh.me.uk/moddoc/Description :

Quote
Description.OLFont/Width/Color

Specify the properties of the Overlay used in Overlay mode. For GUIs, they are picked up from the GUI settings


Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #38 on: 13 Sep 2008, 22:49 »
Well, yes I found that page and that particular piece of info but still I don't know where to put it and what numbers to use:) Im sorry, Im rather new to scripting. Now Im thinking maybe I should ask the question in the beginners section:)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #39 on: 14 Sep 2008, 09:16 »
Put Description.OLFont=2; in your global script game_start function. Or change 2 to the font number that you want.

Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #40 on: 14 Sep 2008, 14:02 »
Someone suggested that it would be better if I ask module questions here, in its own thread, not in beginners section. So here goes:

Q1: Where can I enter coordinates for sticky mode description? I want the description text to be displayed at the bottom of the screen.

Q2: I'm using default AGS gui. When I open inventory screen and move cursor over an item the description text is displayed "behind" the inventory gui. What should I do to display it on it. Or maybe what should I do to hide inv gui when looking on a inventory item, then character says some text about it and inv gui shows up again. That would be great solution cause now character's text about an item (when looking at it in inv gui) is displayed on the right side of the screen (even if character is standing on the left side).

Now before RTFM-kinda-answers... I read it ok, and I don't get it that much to find the solution on my own:-)

Gribbler

  • I'm selling these fine leather jackets.
    • Gribbler worked on a game that was nominated for an AGS Award!
      Gribbler worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #41 on: 15 Sep 2008, 01:14 »
Ok, so I partially found a solution for the text displaying. I created a label gui and defined it to always be visible at the bottom of the screen. Now what to do to make the description text be visible on it? I know that function
 
Description.GUIMode(GUIControl *gc);

is for it. I disabled the overlay btw. But I don't know how to configure this to display the text on my label.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #42 on: 30 Nov 2008, 19:13 »

When I open inventory screen and move cursor over an item the description text is displayed "behind" the inventory gui.


I got the very same issue  .

I've seen that in Aug 2007 user "magintz" was reporting the same thing.  But i havent found how he sorted that out , as he seemed to jump for another solution .

For now i've got the the overlay description all working fine , with font i want and not displayed while in waiting mode .
Just that inventory thingy , which is a bit annoying .

Just got AGS 2 days ago .. so i'll keep searching as it seems to be also ZOrder related .
If i got anything new i'll keep you posted .

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #43 on: 30 Nov 2008, 19:25 »
Overlays are always behind GUIs, so use a GUI with a high ZOrder instead.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #44 on: 30 Nov 2008, 21:45 »
Overlays are always behind GUIs, so use a GUI with a high ZOrder instead.

ok that make sense .
somehow it wasn't really clear for me that you could use 2 different system to display your data ( overlay / GUI) .

So i've created an empty gui named gDescriptionWin.

i'm calling it that way in the game_start()  function :
Description.GUIMode(gDescriptionWin);     // line 218

i've got the following error then .
Description.asc(218): Error (line 218): Type mismatch: cannot convert 'GUI*' to 'GUIControl*'

what i am doing wrong ?

Trent R

  • "I am the weapon" -Richard Cypher
    • I can help with AGS tutoring
    •  
    • I can help with scripting
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #45 on: 01 Dec 2008, 03:28 »
Well, it's saying that you're trying to convert a GUI to GUIControl, so you probably called the wrong type in Description.GUIMode(). I'm DLing right now to check...

[Edit]: Read the documentation in the header. It says
Quote
//  Description.GUIMode(GUIControl *gc);
//    Set the module to use the specified GUI Control (button or label) to
//    display text
So you need to put either a label or button on your gDescriptionWin GUI and then use its scriptname, ie.
 Description.GUIMode(lblDescriptionWin);


~Trent
« Last Edit: 01 Dec 2008, 03:32 by Trent R »
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.

Current Project: The Wanderer
On Hold: Hero of the Rune

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #46 on: 01 Dec 2008, 17:24 »
Thanks a lot Trent , worked like a charm.

My bad , noob ambition trying to go faster than what he can actually understand  :P .
Only playing around with ags for 2 days now .. so i'm still not really used to the logic and namings .

and a big thanks to SSH for making this module .

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #47 on: 12 Dec 2008, 00:06 »
After much investigation I have solved a problem that I was experiencing, but I wanted to give other users a heads up in case they encountered the same problem.

I am using AGS 3.1.0.60, and the SSH Description Module v1.06, using a location-following GUIMode configuration.

Here is what I was experiencing:

I slide the cursor up to the top of the screen, my custom Iconbar pops into view, and I click on a button. When I click on the bottom half of the button, there is never a problem. But when I click on the top half of a button, 80% of the time the button responds to my click, and the other 20% of the time, the button does not work; I must click on the bottom half of the button to get it to respond. When the top half of the button is not responding, the same is true for all the other buttons on the Iconbar, they too only respond to a bottom-half click.

The problem was solved by changing the Clickable property from True to False on the GUI used for the description.

I am guessing that although the Description Module was not displaying anything while over the Iconbar, an unseen GUI was still present, and sometimes interfered with the click.

In any case, thank you SSH for the module!


Re: MODULE: Description v1.06 - Display hotspot description
« Reply #48 on: 06 Jan 2009, 01:45 »
Hi, Im using the Description Module and I need some help.

I am trying to implement a "Give item to" option into my GUI. Basically the Give option can function pretty much the same way as use item, as in that when they click the give button on the gui it will display "give" in the label and when they mouse over/click inventory item it will display "give (item name) to (hotspot name)" in the label and change the cursor to inventory item graphic. Pretty much EXACTLY like "Use", the only difference is that it will say "GIVE (ai) TO (hs)" instead of "USE (ai) ON (hs)".

I have already added the following code into the Desceiption.ash along side the other verb strings
Code: Adventure Game Studio
  1.  
  2. String GiveS;
  3. String Preposition2S;
  4.  
  5.  
And the following into the Description.asc along side the other "Description.VERBS="blahblahblah" which defines which text to display for the given string:
Code: Adventure Game Studio
  1.  
  2. Description.GiveS="Give";
  3. Description.Preposition2S="to";
  4.  
  5.  
And I put in 'if (mouse.Mode==eModeGiveto) verb=this.GiveS;' along with the other ones which tell which text to display in the label depending on which mouse mode is currently in effect.
Code: Adventure Game Studio
  1.   else {
  2.       if (this.VerbMode==eDescVerbModeAuto) {
  3.      
  4.       if (mouse.Mode==eModeGiveto) verb=this.GiveS;
  5.  
  6.       if (mouse.Mode==eModeLookat) verb=this.LookS;  
  7.       if (mouse.Mode==eModeUse) verb=this.UseS;
  8.       if (mouse.Mode==eModeWalkto) verb=this.WalkS;
  9.  

And after that I'm stuck... I assume the next step would be to set a code to  tell it that if the "Giveto" cursor is currently in effect and if the player clicks on an inventory item then to display "Give (inventory item name) to (hotspot)" and change the cursor to the coresponding inventory item graphic just like the "use" option. I pretty much want "Give" and "Use" to do the same exact thing, just a different verb and proposition to be displayed depending on which button clicked. I just don't know the code to do it or where to put it.

If you guys could work with me to figure this out it would be much appreciated, I have been trying to figure this out all day yesterday and today. If anyone knows how to do this please explain it to me and include the code and where to put it. Thank you very very much in advanced. I really hope I get this straightened out soon.
I've got FIVE death cards... That can't be good...

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #49 on: 07 Jan 2009, 00:58 »
HA! I figured it out. God that was bugging me.

I basically just set the "Give" gui button to the "use" mouse mode and then set a global variable so that when the player pushed the use button disguised as "give" it sets the variable to 1 and if the player pushed the real use button labeled "Use" it sets the variable to 0.

then I altered the code that came right after if (this.VerbMode==eDescVerbModeUser && this.VerbS!=null) verb=this.VerbS; to:
Code: Adventure Game Studio
  1.   else if (player.ActiveInventory!=null && Givegui==1){
  2.     verb=this.GiveS;
  3.     this.Text=String.Format("%s %s %s %s", verb, ai, this.Preposition2S, hs); }
  4.     else if (player.ActiveInventory!=null && Givegui==0){
  5.     verb=this.UseS;
  6.     this.Text=String.Format("%s %s %s %s", verb, ai, this.PrepositionS, hs);} }
  7.  

then in the following part I took out the "give" mouse mode I had originally entered and replaced it with:
Code: Adventure Game Studio
  1. else {
  2.       if (this.VerbMode==eDescVerbModeAuto) {
  3.       if (mouse.Mode==eModeUse) verb=this.UseS;
  4.       if (mouse.Mode==eModeUse && Givegui==1) verb=this.GiveS;
  5.       //Replaced "if (mouse.Mode==eModeGiveto) verb=this.GiveS;" with above line

All this did was change what was displayed in the label, the "give" button and the "use" button both set the mouse mode to Use so they act exactly the same, meaning if you pushed the "give" button even though it says "give (item) to (hotspot)" it would still do the same thing as if you were "using (item) on (hotspot)". In the future though all I would have to do to distinguish whether the player chose the "give" button or the "use" button to select an inventory item and use it on the hotspot is to have the hotspot read whether the global variable is set to 0 or 1.

There is probably an easier way to do this or something but I just wanted to write all that out incase anyone had the same issue I did, was really bugging me for the past 2 1/2 days trying to figure out how to implement the "Give" option.
*whew*
I've got FIVE death cards... That can't be good...

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #50 on: 14 Jan 2009, 11:56 »
Glad you got it sorted, sorry I was on vacation so didn't see this before!

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #51 on: 23 Nov 2009, 01:47 »
Is it possible to disable the Verb mode completely.

As in... hover hotspot under mouse location (as per normal) But retain the sierra/AGS style use inventory graphics as mouse cursor (remove the whole 'use pen on paper').

Cheers :)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #52 on: 23 Nov 2009, 15:50 »
The module doesn't do anything to the cursor at all, so yes it shoudl be possible with no extra effort.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #53 on: 23 Nov 2009, 22:17 »
The module doesn't do anything to the cursor at all, so yes it shoudl be possible with no extra effort.

Mate, if you could possible give me a steer in the right direction on how to do this, I'd be forever in debt :)

Snake

  • @_@
    • I can help with making music
    •  
    • I can help with story design
    •  
    • Snake worked on a game that was nominated for an AGS Award!
      Snake worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #54 on: 24 Nov 2009, 03:41 »
Quote
Mate, if you could possible give me a steer in the right direction on how to do this, I'd be forever in debt...

Easy, you don't want to know what his debt entails.
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #55 on: 24 Nov 2009, 05:17 »
Quote
Mate, if you could possible give me a steer in the right direction on how to do this, I'd be forever in debt...

Easy, you don't want to know what his debt entails.

If I were a man of my word, this would trouble me.. :)

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #56 on: 24 Nov 2009, 09:13 »
Isn't it just a setting on the General Settings pane?

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #57 on: 24 Nov 2009, 09:37 »
Isn't it just a setting on the General Settings pane?

Oh my god... I am truly a sad case.


I didn't realize you had to set the cursor graphic in the inventory properties.

please punish me accordingly :P

Sorry about that.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #58 on: 16 Feb 2010, 15:29 »
I have an issue, I have GUI underneath the image to display the hotspot.  But whenever I do it displays the description in another font for a split second, then displays the correct font.

This is my code

  Description.OLFont = 3;
  Description.GUIMode (LabelDesc);
  Description.Location = eDescLocationStatic;
  Description.VerbMode = eDescVerbModeUseOnly;

So in another it's displaying font 0 for a brief second.

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #59 on: 19 Feb 2010, 04:53 »
If you are using a GUI, OLFont won't make any difference. Why not just change the font of your GUI label?

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #60 on: 16 Jun 2010, 22:39 »

Thanks for this really nice module. Good work! I'm using it in my game...

Cheers

Pinback

  • beyond cathode rays
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #61 on: 16 Aug 2010, 18:47 »
Great module! I've small problem though;

I need the description module to treat gui buttons and labels as though they are objects or hotspots, ie, have a
description for them. Been puzzling over it for hours, and searched around a lot and I can't figure out a simple way to do this.

Any help would be much appreciated!

DazJ

    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #62 on: 05 May 2012, 08:28 »
Is there any way at all of having the actual description text being on one line, rather than 2? I am using eDescLocationFollow and if I have a description that says for example 'Hotel Entrance', it is displayed like the following next to the cursor:

Hotel
Entrance

When ideally I'd like it like this:

Hotel Entrance.

I've messed with all kinds of settings but nothing seems to work? If it's something so obvious then I do apologise.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #63 on: 05 May 2012, 11:26 »
Are you using a gui control to display the descriptions? If so, then for a 320x200 resolution game I'm using a 100 height 261 width label. Perhaps yours is more confined. But I never had an issue with text cropping. Do you want me to copy my settings for it?

Also not wanting to go high and mighty on you, as the rules are fairly new and every post here works as a future reference, please refrain from necroposting, even if it's only 2 years.  :wink:
No more military army stuff. I'm alive and back.

DazJ

    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #64 on: 05 May 2012, 15:39 »
No GUI as it's following the cursor so I'm quite baffled...:/

Sorry for necroposting :(
« Last Edit: 05 May 2012, 15:46 by DazJ »

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #65 on: 05 May 2012, 17:50 »
Of course it's following the cursor. The module works in 2 ways i believe, either drawing the description by the cursor using an overlay, or using a GUI, if you have not set it up, I believe by default it goes into an overlay. Regardless, there's a function called Description.OFWidth or something like that, by default it's 100 so increase it. I think it's on the game_start on the Description script (not the header), if such section doesn't exist (i can't tell I've customized it a bit) then just look up for the function.
No more military army stuff. I'm alive and back.

DazJ

    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #66 on: 06 May 2012, 10:23 »
That's the one, cheers mate :)

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #67 on: 08 May 2012, 01:06 »
Go to Description.asc and go to the end of the script.   Change the width setting from 100 to up to 500.
This will make the default settings put the words on one line.
What if your blessings come through raindrops
What if your healing comes through tears...

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    •  
    • SSH worked on a game that was nominated for an AGS Award!
      SSH worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #68 on: 09 May 2012, 07:22 »
Thanks to everyone for answering this before I got here  ;)

I'm curious: surely the module thread is exactly the right place to post questions about the module. Surely necroposting rules don't apply to the Module/Plugin forum, do they?

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #69 on: 09 May 2012, 09:26 »
@SSH: Well, there were no rules ever to this forum, except like now. They mostly exist to help people, not boss around.

Quote
If the topic is fairly old DON'T NECROPOST. Either PM the author of the module or if said author is inactive, PM one of the moderators.

Agreeably most of the topics have been bumped for no good reason. There are no missing links anymore. I'm open to remove the rule, if you guys think it's annoying. For now let's see if it helps.
No more military army stuff. I'm alive and back.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #70 on: 10 May 2012, 16:44 »
I think like SSH that the rule is not appropriate for this forum, since a thread may be just as relevant to a new question or comment even if it is old. Whether or not it's appropriate to post in an old thread should be determined on a case-by-case basis.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #71 on: 10 May 2012, 21:38 »
Alright, I shall reform the rule a bit.
No more military army stuff. I'm alive and back.

Lasca

  • Rottwheelers
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #72 on: 09 Sep 2013, 21:18 »
Hi! I need some help with this module! I guess I'm taking the step up from the simpler coding to a tiny bit more advanced, but there's still some basic things that elude me. And I'm still not fluent in the terminology used in coding, but I hope you'll still understand me.
If I'm using a custom cursor (like Usermode1), how, and where, do I define the verb that will show on the description?
For example, when the Look cursor is selected, the description is "Look at ...". So if I have a custom cursor, where do I define what to display?
Thanks in advance!
/Lasca
« Last Edit: 09 Sep 2013, 21:23 by Lasca »

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #73 on: 31 Dec 2014, 09:07 »
Hi!

All the links are 404 right now. I see there are messages from roughly a year ago, even though the module was uploaded several years ago, so I imagine the links died 'recently'?
Can anyone provide the new links, or upload the module if available? I really would love to use it :)

Cheers!
Dis.

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on a game that was nominated for an AGS Award!
      Dualnames worked on a game that won an AGS Award!
No more military army stuff. I'm alive and back.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #75 on: 17 Feb 2018, 20:21 »
This is exactly what I was looking for.

But links are down, any mirror please ?

Narehop

  • Solodev on @Outline_team
Re: MODULE: Description v1.06 - Display hotspot description
« Reply #76 on: 01 Apr 2018, 22:02 »
This is exactly what I was looking for.

But links are down, any mirror please ?

I need too... all modules of SSH are down. It's to hard to found.

Re: MODULE: Description v1.06 - Display hotspot description
« Reply #77 on: 07 May 2018, 16:00 »
I need too... all modules of SSH are down. It's to hard to found.

You can get 1.02 version from AGS Resources.