TEMPLATE: Tumbleweed Verbs 1.4

Started by abstauber, Sat 29/04/2017 15:41:50

Previous topic - Next topic

AndreasBlack

#180
You can solve this easy by throwing a duplicate GUI/Slighty changed blocking the buttons oyu don't want to be clickable) on top of the original gMain buttons, that you don't need. If you don't understand what i'm talking about go to GUI create a gui then copy the settings of gMain's Height, Left, Top and start the game, then you'll see. Go into AGS sprite folder and export the original buttons if you want any of them, and have the original gui's button you want left clickable by making your duplicate GUI not blocking it.

Then go into the images you'd like to change to whatever Verb you want. However here you could potentially run into problems if your new verb is longer in text/size then the one it's replacing since i believe it is locked into place by code, but i would still try this instead of messing around with the code.



abstauber

Removing some verbs is actually way easier than adding more ;)
First you need to set this constant to your new verb count + 1 (5 in your case)
Code: ags
#define ACT_COUNT 5  // Action Button Count (gMain)

Then you need to get rid of all unwanted verbs in these functions:

Code: ags
static void Verbs::CheckDefaultAction() 
static void Verbs::MapButtons() 
static void Verbs::Localize() 
Unfortunately you need to do it for all languages in Localize()

The last thing you need to do is removing the buttons. But since you need button IDs from 0 to 4, you have to remove the buttons from the gui, not the verbs you don't want.

So your edited GUI should like this (presented in glorious ascii art)
Code: ags
┌───────────────────────────────────────────────────────────────────────────────┐
│ ┌──────┐    ┌────────┐                                                        │
│ │Open  │    │Pick up │               ▲ ┌─────────┐ ┌──────────┐ ┌──────────┐  │
│ └──────┘    └────────┘               │ │         │ │          │ │          │  │
│ ┌──────┐                             │ │         │ │          │ │          │  │
│ │Close │                               └─────────┘ └──────────┘ └──────────┘  │
│ └──────┘                             │ ┌─────────┐ ┌──────────┐  ┌─────────┐  │
│ ┌──────┐                             │ │         │ │          │  │         │  │
│ │Give  │                             ▼ └─────────┘ └──────────┘  └─────────┘  │
│ └──────┘                                                                      │
└───────────────────────────────────────────────────────────────────────────────┘

The GUI script will take care of remapping the buttons with the correct verbs.

That should be it.

@Discussion about code complexity:
I know, there's a lot going on in this template and I already tried to keep it simple.

The goal was to provide the same functionality as Thimbleweed Park and there's not much out of the box to work with (Save / Load, Custom Dialog Rendering, double click handling). Of course there modules available providing these features, but at least this way the included modules are all compatible with the template.

Danvzare

The scroll_rows setting seems to be bugged. If you set it to more than 1, it will sometimes skip dialog options if another dialog option takes more than one line to display.


For example, say you set CustomDialogGui.DialogGuiOptions[eDialogGui_scroll_rows] to 4, because there's only ever four options on screen at once, so why not have it scroll past an entire screen.

Then say you have 9 dialog options, the fifth dialog option being very long.

You start the dialog and see the first four dialog options, 1, 2, 3, and 4.
You scroll down and see the next three dialog options, 5, 6, and 7. Number 8 doesn't appear because number 5 takes two lines, that's fine.
You scroll down and see the last dialog option, number 9. What happened to 8? It skipped it entirely!

Jackpumpkinhead

I am using the Tumbleweed template for my game and I just got started. In the VerbGUI.asc script it says "Please do not edit these options directly anymore, but use the VerbGuiSettings settings script instead!" Where is that? Also is this version what is included with AGS 3.6 or do I need to update?

Khris

Quote from: Jackpumpkinhead on Thu 16/01/2025 07:54:27Where is that?

Looking at my 3.6.0 Tumbleweed test game, the script is called TemplateSettings (and the template version is 1.4, so no need to update)

Jackpumpkinhead

I love this template. However, I wish there were more animation options, especially in the Doors and the AnyClickWalkLookPick functions. Since these functions overwrite any other actions they are kind of useless if you don't have many animations. But to have an animation of the player opening the door or the player bending down to pick something up would be ideal.

Kara Jo Kalinowski

Quote from: Jackpumpkinhead on Fri 14/02/2025 23:42:50I love this template. However, I wish there were more animation options, especially in the Doors and the AnyClickWalkLookPick functions. Since these functions overwrite any other actions they are kind of useless if you don't have many animations. But to have an animation of the player opening the door or the player bending down to pick something up would be ideal.

I don't know if you saw my reply to you on your support thread or on the discord, but I've coded the solution for Doors and explained how to use it. You would have to do something similar for any other thing you wanted animations for. That's here for anyone else wanting to see what I changed, which adds animations before opening, closing, or using items on doors: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636681453

I think that Tumbleweed is good if you only want to use Tumbleweed but I don't like how integrated everything is with each other - I'd much prefer a more lightweight LucasArts GUI.

Jackpumpkinhead

Quote from: Kara Jo Kalinowski on Sat 15/02/2025 00:04:06
Quote from: Jackpumpkinhead on Fri 14/02/2025 23:42:50I love this template. However, I wish there were more animation options, especially in the Doors and the AnyClickWalkLookPick functions. Since these functions overwrite any other actions they are kind of useless if you don't have many animations. But to have an animation of the player opening the door or the player bending down to pick something up would be ideal.

I don't know if you saw my reply to you on your support thread or on the discord, but I've coded the solution for Doors and explained how to use it. You would have to do something similar for any other thing you wanted animations for. That's here for anyone else wanting to see what I changed, which adds animations before opening, closing, or using items on doors: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636681453

I think that Tumbleweed is good if you only want to use Tumbleweed but I don't like how integrated everything is with each other - I'd much prefer a more lightweight LucasArts GUI.

yeah I saw, It would just be nice if there was an option for animation.

AndreasBlack

#188
I did the tedious task of upscaling every single sprite (it took hours, just saying (laugh) ) to 1920 x 1200, thought i'd share it with you guys that really wants that "authentic" thimbleweed look ;) I didn't know this @Crimson Wizard informed in my beginning days. I had to laugh at myself for not realising it. That even tho the game "looks like 320x200" it's really not just upscaled and that in itself has it's own set of problems. Try move around the sprites inside of AGS editor and see for yourself. I probably messed up some stuff since i had to redraw walkable areas and place the objects, had a vague memory of where it was (the bluecup), the door, etc. I missed some pixels probably, my bad! :P @abstauber
 Edit: Imported all the Language GUI's with the same sprite numbers/filenames for convenience. The only thing that doesn't work with the template is the screenshots they are a bit "off" aswell as Verbs.GoTo(); which obviously goes to the wrong cordinates now the math needs to be multiplied by 6 perhaps i could have done it myself, but i beeeeeeep at programming, so perhaps @Khris or @abstauber could take a look at that!

Edit 2: If you want to go down this route do NOT upscale character sprites or objects outside of the AGS engine. I've experimented and the best solution i've come up with is to just manually scale all sprites/objects 600% ex character.Manualscaling= true, character.Scaling= 600; and object.Scaling= 600;, etc then if you're (like me) programmed the game for 320x200 you take the character/objects coordinates multiply by 6 to get their new positions and you should be done! This makes the AGS engine run highres games perfectly, at least i haven't ran into any issues and i have two three parallax layers that are very large objects. There's no need to convert all your files before going into AGS like i did like an idiot! All that does is slowdown the engine. I went from 32fps frustration whining about a "old engine's fault" with my upscaled parallaxes to a smooth 60fps experience by doing the upscaling in engine.



https://www.dropbox.com/scl/fi/41lomb0awsfj685fd00sr/Thumbleweed-Template-1920x1200.zip?rlkey=zxglum2kuod1phb8lacxjaoq3&st=ydosw332&dl=0

SMF spam blocked by CleanTalk