Author Topic: TEMPLATE: Tumbleweed Verbs 1.1 Last update: 3rd August 2018  (Read 4798 times)

Ray

  • Alien from planet Earth
Thank you very much for this template!
I'm just starting with AGS, so such a good example will definitely be a help :)

imsomnia212

  • Imsomnia
This would require applying different graphic filter at runtime, which AGS currently cannot do, I am afraid. (Well, technically it could, but there is no script command or option to make it do so).

That's sad but maybe in a near future that's Will be possible.
I have another problem, when I set up a bg for the dialog gui (is a image with alpha channel) it show a pink bg and not the transparent img like do when use the ags gui system, see:

Using the ags gui system for the main gui (verbs, inventory items, etc):


Using the dialog script provide by Tumbleweed module:



I set up the script like the note said:

Code: Adventure Game Studio
  1. // Background
  2. // set bg img_transparency to -1 if you're using 32-bit graphics and
  3. // want to preserve the alpha channel
  4. this.bg_img                = 276;
  5. this.bg_img_scaling        = 0;
  6. this.bg_img_transparency   = -1;
  7. this.bg_color              = 0;
  8.  
Are u a tuna?

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
    •  
I'm so confused right now. Wasn't there a new parameter added recently to DynamicSprite.Draw or .Resize or whatever where you could choose the scaling algorithm? Or am I mixing it up with the new parameter for transparency copy (legacy, additive...)? My bad then.

But anyways, even if imsomnia212 has to write the antialised method himself (which shouldn't be too hard because it doesn't have to be real-time, it can be super slow, just copy some bilinear code from wikipedia), it's only an extra step to the method I described to achieve his goal of antialised saved games screenshots.
 

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Scripting a bilinear interpolation filter is complicated by AGS's crappy color handling (not allowing you to get or set the full 32-bit color value). To get the correct result without degrading the screenshot to 16-bit, you would have to grab the individual pixels as sprites and draw them on top of each other at various transparencies.

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!
@imsomnia212 I can replicate this, but I'm clueless why it isn't working anymore. Drawing images with an alpha channel used to work on dialog GUIs - at least in 2017. I'm trying to find out in which version of AGS, this feature broke again. It never broke, see below ;)

« Last Edit: 27 Jul 2018, 11:56 by abstauber »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
@imsomnia212 I can replicate this, but I'm clueless why it isn't working anymore. Drawing images with an alpha channel used to work on dialog GUIs - at least in 2017. I'm trying to find out in which version of AGS, this feature broke again.

What version of AGS are you using? Does it replicate in this template right away, or you need to do something extra to see it?

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!
Sorry for accusing AGS: I messed up :X.
I forgot to set info.HasAlphaChannel = true;

@imsomnia212
In line 382 (function dialog_options_get_dimensions) add this

Code: Adventure Game Studio
  1.   if ((CDG.bg_img_transparency > 0 || CDG.bg_img_transparency == -1) && CDG.bg_img!=0 ) {
  2.     info.HasAlphaChannel = true;
  3.   }
  4.  
« Last Edit: 27 Jul 2018, 11:56 by abstauber »

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
    •  
When you double-click on the hologram character, the player does not "fast walk". Is that intended? I haven't tested but I guess the same thing would happen when you double-click on objects or hotspots?
 

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!
For some reason I thought that this would be the way to do it. But apparently you can doubleclick-walk to everything in Thimbleweed Park.
So yeah, it seems to be an intentional bug which I'll fix right away :)

In the meantime you can comment out the 'if condition' in line 2075 and it's bracket in 2085. In line 2095 remove this piece from the if condition: 
"&& location_type == eLocationNothing"

I'll test it some more and see if this fix breaks anything.
--edit: of course it broke something :P Gotta fix the door handling now.
« Last Edit: 31 Jul 2018, 10:19 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!
Here's the new version - sorry for refactoring so much code after the 1.0 release.
All template settings are now grouped in a separate module and you can change them from anywhere in your code. I've also removed the old doubleclick code and integrated CW's module instead.

Btw. thanks to CW and Snarky for telling me about attributs and how they work :D Also thanks to Monsieur Ouxx who brought the issue up.

This version also contains two bugfixes:
1) Alpha transparency for the dialog GUI is now a thing
2) Running works on everything, not just plain areas.

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
    •  
hurray!
 

imsomnia212

  • Imsomnia
Hey thanks for the fix!
Are u a tuna?

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
    •  
Tiny issue : the "tiny" font points to the same file as other fonts : xpaider2.ttf. And that file does not seem to be the right one. I tried importing it at small sizes (5 or 6pt) but it's not right. Can you help me?
 

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!
Oh, that's easy to explain: the "tiny" font is a .wfn font. But if I recall correctly, you have to start with a ttf font first and then replace it with the wfn font in the file system.
You can find the wfn font in the assets folder in Github, or here on the forums: it is Tom Thumb.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48798

@Imsomnia212: Cheers! I'm looking forward to see some of your games in the future. Your abandoned mags game already looked very promising.
« Last Edit: 06 Aug 2018, 08:31 by abstauber »

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
    •  
You can find the wfn font in the assets folder in Github, or here on the forums: it is Tom Thumb.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48798

Cool. That's also the one I've been using in other places.
 

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
    •  
fyi : I've done a pull request.
 

imsomnia212

  • Imsomnia
@Imsomnia212: Cheers! I'm looking forward to see some of your games in the future. Your abandoned mags game already looked very promising.

Soon I will show in the forum something that I'm working on too hard
Are u a tuna?