Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: TEMPLATE: Tumbleweed Verbs (RC1) Last update: 17th May 2017  (Read 2832 times)

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
Hi,
as long as you know your ways around AGS, it should not be too hard. The whole GUI stuff is already pretty much modulized.
You need to export the optiongui module from the template, as well as the GUIs: gSave, gSaveConfirm, gLoad (and optionally gOptions).

In gOptions you might want to remove the Layout slider and the code behind it, since this is the only(?) template specific thing in this module.

Hi,
as long as you know your ways around AGS, it should not be too hard. The whole GUI stuff is already pretty much modulized.
You need to export the optiongui module from the template, as well as the GUIs: gSave, gSaveConfirm, gLoad (and optionally gOptions).

In gOptions you might want to remove the Layout slider and the code behind it, since this is the only(?) template specific thing in this module.

Thank you very much!:-D
I'm at my first game and I'm currently Learning Scripting but I'm confident to be able to do it (nod)

Hi Abstauber!

I tried to import the module but my AGS version is slightly older than the one you used for the module... so the importing failed
do you know if is it possible to use it in another way?

Sure, that is actually not a big deal. First you need to resize the gAction GUI to your game's screen resolution (eg 320x200)
Now you need to copy over this adjusted  AdjustActionBarPosition function to your template and make sure it is called in repeatedly_execute_always

Code: Adventure Game Studio
  1. void AdjustActionBarPosition()
  2. {
  3.   int actionLabelWidth = GetTextWidth(ActionLine.Text, eFontTextOut) + 4;
  4.   int actionLabelHalf = actionLabelWidth / 2;
  5.   int xpos = mouse.x - actionLabelHalf ;
  6.   int ypos = mouse.y - Game.SpriteHeight[mouse.GetModeGraphic(mouse.Mode)] - 4;
  7.  
  8.   if (xpos + actionLabelWidth >= System.ScreenWidth) xpos = System.ScreenWidth - actionLabelWidth;
  9.   else if (xpos < 0) xpos = 0;
  10.  
  11.   if (ypos < 0 ) ypos = 0;
  12.  
  13.   ActionLine.X = xpos;
  14.   ActionLine.Y = ypos;
  15.   ActionLine.Width = actionLabelWidth;
  16. }
  17.  


This is perfect! Thank you. But is it possible to hide the actionline when starting an action, in an easy way?
"Talk to character" for example is still on the screen (highlighted) when the dialog goes on. And sometimes those texts even overlap each other.

Thank you!

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
helping me with the existing translation.

Watch out you made a copy&paste mistake in the French screenshot : It's not "ourvrir", it's supposed to be "ouvrir".

Question : apart from the new copy&save, are there any other improvements? We've just finished integrating the 9verb into the "custom save with screenshots" and bam, just at the same time you release it packaged. So I'm thinking if it's worth integrating again.
« Last Edit: 19 Apr 2018, 10:05 by Monsieur OUXX »
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@zurik I'll have a look tomorrow

@Monsieur Ouxx
Hehe, thanks for the hint. I'll update the graphics in the future. How comes that you stumble upon this template almost exactly a year after it's release? (laugh)
Quote
We've just finished integrating the 9verb into the "custom save with screenshots" and bam, just at the same time you release it packaged.
Did I release something recently?

The main additions are double click running and the new save gui. And of course the whole code reorganizing and refactoring stuff, but technically these aren't features ;)
« Last Edit: 19 Apr 2018, 20:58 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on a game that was nominated for an AGS Award!
      abstauber worked on a game that won an AGS Award!
@zurik
I think the trick was to set the action label to an empty string after an action was executed or the GUI gets disabled. The GUI gets disabled once a dialog starts, so we use this effect.

This is from the tumbleweed script, so there's a bit work left to adapt it to the 9verb GUI variable and function names.

Code: Adventure Game Studio
  1. function repeatedly_execute_always() {
  2.  
  3.  
  4.   if (!IsGamePaused() && !Verbs.IsGuiDisabled()) {
  5.  
  6.     // Update Actionbar
  7.     if (classicGui == false) {
  8.       Verbs.CheckDefaultAction();
  9.  
  10.       // Update Actionbar after command is executed
  11.       if (location_clicked != null && location_clicked.Length > 0) {
  12.         if (location_clicked.IndexOf(">") > 0) temp_location = location_clicked.Truncate(location_clicked.IndexOf(">"));
  13.         else temp_location = location_clicked;
  14.       }
  15.       else temp_location = "";
  16.  
  17.       if (IsInterfaceEnabled() || temp_location != location || location == "") {
  18.         Verbs.UpdateActionBar();
  19.         location_clicked = "";
  20.       }
  21.       Verbs.AdjustActionBarPosition();
  22.     }
  23.     // Doubleclick Timer
  24.     if (dc_timer_run == true)
  25.     {
  26.       if (disableDoubleclick) {
  27.         dc_timer_run = false;
  28.       }
  29.       else {
  30.         dc_timer_click++;
  31.         if (dc_timer_click >= dc_speed){
  32.           dc_timer_click = 0;
  33.           dc_timer_run = false;
  34.         }
  35.       }
  36.     }
  37.   }
  38. }
  39.  
  40.  

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
The main additions are double click running and the new save gui. And of course the whole code reorganizing and refactoring stuff, but technically these aren't features ;)

So basically it does exactly what our template does. Even the running. I'm gutted. Proof I should visit the forums more often ;)