Author Topic: TEMPLATE: Tumbleweed Verbs 1.2 Last update: 4th April 2019  (Read 13961 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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for 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 »

@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
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for 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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for 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
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for 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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
hurray!
 

imsomnia212

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

Monsieur OUXX

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for 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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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

  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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?

Babar

  • Creator, Mutator and Defecator
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • Babar worked on one or more games that won an AGS Award!
    •  
    • Babar worked on one or more games that was nominated for an AGS Award!
I get a "Not Found" page when I try to download the template.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

I get a "Not Found" page when I try to download the template.

I think you may still download the source project from github:
https://github.com/dkrey/ags_tumbleweed
if you click on green "Clone or download" button and choose Download ZIP.

Babar

  • Creator, Mutator and Defecator
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • Babar worked on one or more games that won an AGS Award!
    •  
    • Babar worked on one or more games that was nominated for an AGS Award!
I think you may still download the source project from github:
https://github.com/dkrey/ags_tumbleweed
if you click on green "Clone or download" button and choose Download ZIP.
Yes, that is what I did, I just figured I'd try to get the template as an agt file.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone