Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: SSH on Fri 28/04/2006 16:05:06

Title: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Fri 28/04/2006 16:05:06
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 (http://duals.agser.me/Modules/Description_v1.06.rar) (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.
Title: Re: MODULE: Description v1.00
Post by: strazer on Fri 28/04/2006 19:56:34
Nice work!
Title: Re: MODULE: Description v1.00 - Display hotspot description
Post by: Candle on Fri 28/04/2006 23:58:03
Your a Machine SSH .. how do you do it..
/me Thanks you again.
Title: Re: MODULE: Description v1.00 - Display hotspot description
Post by: Scorpiorus on Sat 29/04/2006 22:06:59
Good work with the modules, SSH!

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

:)
Title: Re: MODULE: Description v1.01 - Display hotspot description
Post by: SSH on Tue 02/05/2006 10:25:27
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
Title: Re: MODULE: Description v1.02 - Display hotspot description
Post by: Alynn on Sun 10/09/2006 20:47:02
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.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: SSH on Mon 11/09/2006 12:21:46
Done, Alynn. Let me know if that was what you had in mind.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: Alynn on Thu 14/09/2006 09:11:44
Jes Shir! It works great.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: magintz on Fri 10/08/2007 21:21:07
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...
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: SSH on Sun 12/08/2007 20:42:31
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.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: magintz on Wed 22/08/2007 16:39:59
Regarding the Description.NoDescriptionWhenMode, it doesn't seem to be working, here's my code:


    Game.SpeechFont=3;
    Description.OffsetX = 3;
    Description.OffsetY = 3;
    Description.Location=eDescLocationFollow;
    Description.VerbMode=eDescVerbModeUseOnly;
    Description.NoDescriptionWhenMode = eModeWait;
    Description.IncludeInventory = true;
    Description.OLFont=3;
    Description.OLColor=4;
    Description.OverlayMode();


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?
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: SSH on Wed 22/08/2007 22:09:40
create a label, and pass the name you give it in the gui editor to the gui mode script function...
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: magintz on Mon 27/08/2007 11:52: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.

(http://www.sanslife.com/temp/error.png)

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.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: Gilbert on Mon 27/08/2007 11:58:21
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.)
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: magintz on Mon 27/08/2007 12:11:14
I'm not sure if it is anything I have done as the only code I am using is :


    Game.SpeechFont=3;
    Description.Location=eDescLocationFollow;
    Description.VerbMode=eDescVerbModeUseOnly;
    Description.NoDescriptionWhenMode = eModeWait;
    Description.IncludeInventory = true;
Description.CropGUIToo = true;
    Description.GUIMode(desc);


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


  if (this.DisplayType==eDescDisplayGUIControl) {
    this.Update_GUI();
  } else if (this.DisplayType==eDescDisplayOverlay) {
this.Update_Overlay();
}
}


function repeatedly_execute_always() {
  // Should this go in rep_ex_always?
  // easy enough for user to change, if required
  Description.rep_ex();
}


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.
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: SSH on Tue 28/08/2007 10:22:25
Can you stick this in the code of the first room where you get this problem, please? (e.g. in the after fadein script)


Display("MaxX %d MaxY %d VW %d VH %d", Description.MaxX, Description.MaxY, System.ViewportWidth, System.ViewportHeight);


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:


protected function Descriptions::Update_String() {
  if (mouse.Mode==this.NoDescriptionWhenMode) { this.Text=""; return; }


and replace it with:


protected function Descriptions::Update_String() {
  // Special case of busy cursor
  if ((mouse.Mode==this.NoDescriptionWhenMode) || (this.NoDescriptionWhenMode==eModeWait && IsInterfaceEnabled()==0)) {
this.Text=""; return;
}



I've actually put this now into Description 1.04, available in the first post
Title: Re: MODULE: Description v1.04 - Display hotspot description
Post by: magintz on Tue 28/08/2007 12:59:43
You truly are a king of kings!

Quote from: SSH on Tue 28/08/2007 10:22:25
Can you stick this in the code of the first room where you get this problem, please? (e.g. in the after fadein script)


Display("MaxX %d MaxY %d VW %d VH %d", Description.MaxX, Description.MaxY, System.ViewportWidth, System.ViewportHeight);


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"




Quote from: SSH on Tue 28/08/2007 10:22:25
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:


protected function Descriptions::Update_String() {
  if (mouse.Mode==this.NoDescriptionWhenMode) { this.Text=""; return; }


and replace it with:


protected function Descriptions::Update_String() {
  // Special case of busy cursor
  if ((mouse.Mode==this.NoDescriptionWhenMode) || (this.NoDescriptionWhenMode==eModeWait && IsInterfaceEnabled()==0)) {
this.Text=""; return;
}


Worked a treat; thanks for that.
Title: Re: MODULE: Description v1.04 - Display hotspot description
Post by: SSH on Tue 28/08/2007 13:16:45
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:


  Description.MaxX=system.viewport_width;
  Description.MaxY=system.viewport_height;


to:


  Description.MaxX=system.viewport_width-1;
  Description.MaxY=system.viewport_height-1;


Title: Re: MODULE: Description v1.04 - Display hotspot description
Post by: magintz on Tue 28/08/2007 14:59:28
Woot!

:D

It works now, thanks!
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: SSH on Tue 28/08/2007 16:22:49
This fix is now in v1.05 available to download in the first post
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: thebaddie on Thu 10/01/2008 17:22:41
Quote from: SSH on Wed 22/08/2007 22:09:40
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?:

function Descriptions::GUIMode(GUIControl *gc) {
  this.OLTidy();
  if (gc==null) {
Display("ERROR! null GUIControl passed to Description.GUIMode, contact game author");
return -1;
  }
  this.DisplayType=eDescDisplayGUIControl;
  this.gc=gc;
}

Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: bogdy103 on Sun 09/03/2008 14:57:25
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?
Title: Re: MODULE: Description v1.03 - Display hotspot description
Post by: SSH on Mon 10/03/2008 11:34:57
Quote from: thebaddie on Thu 10/01/2008 17:22:41
Quote from: SSH on Wed 22/08/2007 22:09:40
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


Description.GUIMode(gMYGUINAMEGOESHERE);


Quote from: bogdy103 on Sun 09/03/2008 14:57:25
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:

Description.OverlayMode();
Description.Location=eDescLocationFollow;




Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: bogdy103 on Mon 10/03/2008 18:00:56
Thanks! I couldn't understand where to put these functions!
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: kkmic on Sun 06/07/2008 22:20:16
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.
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: SSH on Sun 06/07/2008 23:17:10
Can you give more detail? What settings are you using, most pertinently, Overlay or GUI mode?
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: kkmic on Mon 07/07/2008 10:18:04
These are my settings (in the game_start section):
Description.Location=eDescLocationFollow;
Description.OffsetX=0;
Description.OffsetY=0;


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:
(http://audiozone.ro/personal/ags3-description.jpg)

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?
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: SSH on Mon 07/07/2008 11:00:27
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?
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: kkmic on Mon 07/07/2008 12:09:15
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 (http://www.audiozone.ro/personal/2000.rar) (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?
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: SSH on Mon 07/07/2008 12:55:51
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:

this.x = mouse.x + this.OffsetX;

becomes

this.x = mouse.x + this.OffsetX - (this.width/2);


Although, I can add an alignment setting when I get around to description 1.06...
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: kkmic on Mon 07/07/2008 18:05:15
Thanks mate. Both for the info and for the center quickfix.
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: DazJ on Mon 07/07/2008 22:51:21
Anyone know where this can be downloaded? The link is dead :(
Title: Re: MODULE: Description v1.05 - Display hotspot description
Post by: SSH on Mon 07/07/2008 23:06:34
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
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Tue 08/07/2008 11:30:28
I've uploaded v1.06 which fixes your problem, kkmic, even in that speech mode. It also adds an alignment option.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: kkmic on Tue 08/07/2008 12:29:08
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: DazJ on Tue 29/07/2008 16:38:27
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Gribbler on Fri 12/09/2008 23:01:17
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).
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Sat 13/09/2008 08:41:28
Quote from: Gribbler on Fri 12/09/2008 23:01:17
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

Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Gribbler on Sat 13/09/2008 22:49:21
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:)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Sun 14/09/2008 09:16:51
Put Description.OLFont=2; in your global script game_start function. Or change 2 to the font number that you want.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Gribbler on Sun 14/09/2008 14:02:17
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:-)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Gribbler on Mon 15/09/2008 01:14:13
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: _John_ on Sun 30/11/2008 19:13:01
Quote from: Gribbler on Sun 14/09/2008 14:02:17

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 .
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Sun 30/11/2008 19:25:39
Overlays are always behind GUIs, so use a GUI with a high ZOrder instead.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: _John_ on Sun 30/11/2008 21:45:14
Quote from: SSH on Sun 30/11/2008 19:25:39
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 ?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Trent R on Mon 01/12/2008 03:28:25
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
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: _John_ on Mon 01/12/2008 17:24:32
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 .
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Old Guy on Fri 12/12/2008 00:06:59
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!

Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Rentin on Tue 06/01/2009 01:45:53
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


String GiveS;
String Preposition2S;


And the following into the Description.asc along side the other "Description.VERBS="blahblahblah" which defines which text to display for the given string:


Description.GiveS="Give";
Description.Preposition2S="to";


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.

  else {
      if (this.VerbMode==eDescVerbModeAuto) {
     
      if (mouse.Mode==eModeGiveto) verb=this.GiveS;
 
      if (mouse.Mode==eModeLookat) verb=this.LookS;   
      if (mouse.Mode==eModeUse) verb=this.UseS;
      if (mouse.Mode==eModeWalkto) verb=this.WalkS;


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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Rentin on Wed 07/01/2009 00:58:40
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:

  else if (player.ActiveInventory!=null && Givegui==1){
    verb=this.GiveS;
    this.Text=String.Format("%s %s %s %s", verb, ai, this.Preposition2S, hs); }
    else if (player.ActiveInventory!=null && Givegui==0){
    verb=this.UseS;
    this.Text=String.Format("%s %s %s %s", verb, ai, this.PrepositionS, hs);} }


then in the following part I took out the "give" mouse mode I had originally entered and replaced it with:

else {
      if (this.VerbMode==eDescVerbModeAuto) {
      if (mouse.Mode==eModeUse) verb=this.UseS;
      if (mouse.Mode==eModeUse && Givegui==1) verb=this.GiveS;
      //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*
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Wed 14/01/2009 11:56:04
Glad you got it sorted, sorry I was on vacation so didn't see this before!
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Tonic Ink on Mon 23/11/2009 01:47:43
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 :)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Mon 23/11/2009 15:50:09
The module doesn't do anything to the cursor at all, so yes it shoudl be possible with no extra effort.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Tonic Ink on Mon 23/11/2009 22:17:23
Quote from: SSH on Mon 23/11/2009 15:50:09
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 :)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Snake on Tue 24/11/2009 03:41:12
QuoteMate, 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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Tonic Ink on Tue 24/11/2009 05:17:29
Quote from: Snake on Tue 24/11/2009 03:41:12
QuoteMate, 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.. :)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Tue 24/11/2009 09:13:24
Isn't it just a setting on the General Settings pane?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Tonic Ink on Tue 24/11/2009 09:37:35
Quote from: SSH on Tue 24/11/2009 09:13:24
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: xenogia on Tue 16/02/2010 15:29:07
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Fri 19/02/2010 04:53:52
If you are using a GUI, OLFont won't make any difference. Why not just change the font of your GUI label?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Romeo on Wed 16/06/2010 22:39:16

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

Cheers
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Pinback on Mon 16/08/2010 18:47:06
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!
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: DazJ on Sat 05/05/2012 08:28:49
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Dualnames on Sat 05/05/2012 11:26:31
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:
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: DazJ on Sat 05/05/2012 15:39:40
No GUI as it's following the cursor so I'm quite baffled...:/

Sorry for necroposting :(
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Dualnames on Sat 05/05/2012 17:50:52
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: DazJ on Sun 06/05/2012 10:23:16
That's the one, cheers mate :)
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: dbuske on Tue 08/05/2012 01:06:30
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: SSH on Wed 09/05/2012 07:22:59
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?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Dualnames on Wed 09/05/2012 09:26:41
@SSH: Well, there were no rules ever to this forum, except like now. They mostly exist to help people, not boss around.

QuoteIf 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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Snarky on Thu 10/05/2012 16:44:53
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Dualnames on Thu 10/05/2012 21:38:52
Alright, I shall reform the rule a bit.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Lasca on Mon 09/09/2013 21:18:13
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
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Disruption on Wed 31/12/2014 09:07:18
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Dualnames on Thu 01/01/2015 02:31:49
http://duals.agser.me/Modules/Description_v1.06.rar
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: DarkMoe on Sat 17/02/2018 20:21:06
This is exactly what I was looking for.

But links are down, any mirror please ?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Narehop on Sun 01/04/2018 22:02:48
Quote from: DarkMoe on Sat 17/02/2018 20:21:06
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.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: Deep Dark Fears on Mon 07/05/2018 16:00:59
Quote from: Narehop on Sun 01/04/2018 22:02:48
I need too... all modules of SSH are down. It's to hard to found.

You can get 1.02 version from AGS Resources.
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: bx83 on Mon 10/05/2021 07:34:56
Doesn't work either. Does anyone know where any of version of Description is?
Title: Re: MODULE: Description v1.06 - Display hotspot description
Post by: lorenzo on Mon 10/05/2021 08:17:20
The one on this page works for me: https://americangirlscouts.org/agsresources/modules.html
Here's an alternative link from my Dropbox: https://www.dropbox.com/s/fw3p6db7fvl8aa7/Description.zip?dl=0

It says it's version 1.02.