TEMPLATE: Tumbleweed Verbs 1.4

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

Previous topic - Next topic

AndreasBlack

I'm probably messing something up with having multiply keys in the same room that goes to different doors. One door works, the other semi works. It opens the door, the inventory goes away, but then it comes back when re-entering. Looks like a bugg to the untrained eye, but it's probably not. I've set up the roomload_first wrong possibly. Not a coder, so i'm not sure. In the beginners thread btw

Anyway enough about that. I had a suggestion before. That if a player has choosen an dialog option before, that it is greyed out the next time it shows up! Would you be able to add that feature as a bool thing? Would be awesome!
Also when running when using the uniformmovementspeed false/movementlinkedtoanimat/false the doubleclick does not seem to reset sometimes, so i did a little amateur fix for it in a rep execute code i run, no big deal ofc. Just wanted to let you know, perhaps it's been fixed, i think i'm using a older version of the template. To scared to update  (laugh)

abstauber

Well, the last bugfix regarding running via doubleclick is from 2018. So I'm sure, if you started using the template afterwards you should be fine.
Nonetheless I see if I can replicate this issue.

Regarding the dialog options, that's actually a cool idea and it seems to be feasible.
https://adventuregamestudio.github.io/ags-manual/Dialog.html#dialoghasoptionbeenchosen

I see if I can find the time to implement this feature.

abstauber

Adding a different color for chosen topics was in fact pretty easy. Resetting the state on the other hand is not - at least not from the module's perspective.
There is no function which would be called after a dialog finishes, so there's no straight forward way to reset everything.
I suggest you reset the state in the stop section of the dialog scripts (or call your own reset function)

Also I wasn't able to get stuck on running with the mentioned options disabled. The movement speed is set back to normal after the sprite reaches the cursor - at least while I was testing it. But hey, since you already found a fix, I wouldn't dig too much further into this issue.


AndreasBlack

True! An obvious idea would be to add the parameter since u already have aclosesound & aopensound, so ta-da, unlocksound. I think i've ran into a potential mini problem, also easy fixed by the user i guess, but still.

Maybe there needs to be a timer of some sort before changing rooms, cause the character flips to the room pose's intended direction just before the screen fades out. it's supposed to have that pose when entering the new room not before the screen fades out from the previous room! When using the doorstate function that you've helped out with in the beginners section. But again, i'm probably using a older module so,. maybe this is a none problem.

Can't wait to try the latest version of the template with my "future game"  (nod)

An example GIF from in game, maybe easier to understand the small issue, again it's easily fixed but still! https://drive.google.com/file/d/14YGpHGUWG2s-jAWRVXoXgMKlgsBJQeig/view?usp=sharing

abstauber

#124
Well, I can see it but at least in the demo game it works as expected.

edit: I think I know what's going on: Have a look at the manual
https://adventuregamestudio.github.io/ags-manual/Tumbleweed.html#exit-extensions

Have a look at your hotspot description and change it to >e if needed.


Btw. I've just published the new release.

Maybe you could try the new template and see if your issues are still present in the latest version:
https://github.com/dkrey/ags_tumbleweed/releases/download/1.4/Tumbleweed_demo.1.4.zip


AndreasBlack

Just downloaded it!  :) Nice, will give it a go! As for the E extension advice. If i'm not mistakening i lose the rightclick open/close feature then won't i? Which feels like "luxury" to me, that i want in the game! (laugh)
But yeah again, i just did a "if (player.previousroom==)" and add in the player.FaceDirection in the entering room load, that fixed it anyhow so, no big deal. (nod)

abstauber

Quote from: AndreasBlack on Thu 19/05/2022 23:15:01
If i'm not mistakening i lose the rightclick open/close feature then won't i?
If you use
Code: ags
>e
you don't loose the exit extension. But this one e.g. means
Code: ags
>ed
exit and face downwards. As said, have a look at the manual and see how the extensions work.

Crescendo64

Hi there, I had a question. Is there any way to make the cursor change into the inventory item when clicked? I tried turning on the built in setting and tried some codes, but wasn't able to override the original script.

Also, whenever you're running and you click the screen, whether you're done moving or not, it will revert back to walking. Is there any way to make it so you keep running?

AndreasBlack

#128
Quote from: Crescendo64 on Thu 29/09/2022 21:21:32Hi there, I had a question. Is there any way to make the cursor change into the inventory item when clicked? I tried turning on the built in setting and tried some codes, but wasn't able to override the original script.

Also, whenever you're running and you click the screen, whether you're done moving or not, it will revert back to walking. Is there any way to make it so you keep running?

You can do what you ask with the touch of a button (inventory item question) in the game setup settings if you use AGS 3.5 and upwards. As for the running. Yes, it's possible, but if that's what you want. Then why not just set the speed manually so it's always "that fast"? character.SetWalkSpeed(9, 9); very easy to do.

Abstauber, you really should add the module InvItemAnimation by strazer into the template. It's very present in Thimbleweed Park as we know, from phones blinking to skulls turning  :-D .

Crescendo64

Hi!

Thanks for your reply. If you mean the option "Use selected inventory graphic for cursor," then I have tried that already and it did not work. Though I am not using the beta program. Would that make the difference?

As for the running, the reason is if I have a long screen and want to keep running across it, I would have to stop and slow down every time I want to run to a newly revealed part of the screen. It's more a quality of life improvement, not a necessity for anything  :-D

abstauber

Inv Item as Cursor:
I've activated this setting and it seems to work just fine:
General Settings -> Inventory -> "Use selected inventory graphic for cursor" => True

Infinite Running:
You might need to find an exit condition to end running. Currently it's handled in VerbGui.asc:2426
https://github.com/dkrey/ags_tumbleweed/blob/27a7745813c7869dc94aa2413b731489807e0eaf/verbgui.asc#L2426

So you could comment this out and define another condition to end running.

@AndreasBlack I like to keep things modular :P  I already hesitated to include custom dialog rendering and only added it because the built in solution is very very basic.
Also Strazers code is ancient and unmaintained so I'd like to keep it up to the users wether to include such code or not.

Crescendo64

QuoteInv Item as Cursor:
I've activated this setting and it seems to work just fine:
General Settings -> Inventory -> "Use selected inventory graphic for cursor" => True

Hmmm... This is interesting. I've turned this setting on, and now the cursor jumps up and to the left, as though showing the item, but it is invisible... I can't seem to find out why that is.

QuoteInfinite Running:
You might need to find an exit condition to end running. Currently it's handled in VerbGui.asc:2426
https://github.com/dkrey/ags_tumbleweed/blob/27a7745813c7869dc94aa2413b731489807e0eaf/verbgui.asc#L2426

So you could comment this out and define another condition to end running.

Ah! This worked perfectly! Thanks for your help!

AndreasBlack

Quote from: Crescendo64 on Wed 05/10/2022 01:27:19Hi!

Thanks for your reply. If you mean the option "Use selected inventory graphic for cursor," then I have tried that already and it did not work. Though I am not using the beta program. Would that make the difference?

I've edited my original post i was wrong, it's possible in AGS 3.5, as for your issue, i'm no AGS expert. Ask in beginners forum, i spam that section a lot  (laugh)

@abstauber That's ok. It seems to work fine for me, but i haven't really die hard tested it yet so who knows! A turning headskull or such advanced stuff! I've just done a paper blowing in the wind when new notes have been added too it.

abstauber

Quote from: Crescendo64 on Thu 06/10/2022 03:20:22Hmmm... This is interesting. I've turned this setting on, and now the cursor jumps up and to the left, as though showing the item, but it is invisible... I can't seem to find out why that is.
Did you set up the "mouse cursor image" for the inv item itself?

Crescendo64

#134
Yes, I did. In fact, I'm trying it with one of the template items (keycard), but it's not working. I have tried with a fresh game in the template and it DID work, so I must just have accidentally altered some code somewhere. I'll have to fish around to try and figure out what that would be.

EDIT: I figured it out! I wanted an animated cursor, but I foolishly but the view onto the ItemInv cursor, so the image was showing up, but then immediately changing back to the animation. It's fixed now.

On another note, is there any simple way to add a confirmation button for the Load gui, like there is for the save?

Thanks again for this awesome template!

abstauber

Well, there's no real shortcut, but's pretty straight forward.

You need to override the instant loading here:
https://github.com/dkrey/ags_tumbleweed/blob/27a7745813c7869dc94aa2413b731489807e0eaf/optiongui.asc#L583

Instead open a yes/no gui, just like the Save-GUI does and load only after confirmation.

Crescendo64

Hi!

I've fiddled around a little bit, and have come up with this:

This is under the LOAD DIALOGUE heading in 'Options' script.

Code: ags
else if (IsRestoreSlot(control))    {
        gLoadConfirm.Visible = true;
        CustomLoad.InitLoadDialog();
    } 
      //OK
    else if (control==btnLoadConfirmYes)    {
        CustomLoad.SelectLoadSlot(control.ID);
        gLoadConfirm.Visible = false;
    } 
    //No
    else if (control==btnLoadConfirmNo)    {
        gLoadConfirm.Visible = false;
        }

But when I run it, the game only loads the last slot saved in, not the slot I've selected. What can I do?

Thanks!

abstauber

That's because the ID of the savegame is gone once you open the load confirmation gui.

In Line 465 (function SelectLoadSlot ) you'll find the function call "RestoreGameSlot(slot)". Just like the Save function you need to store away the ID of the slot and after that show the confirmation gui.
Code: ags
customLoadData.loadSlotId = slot;
gLoadConfirm.Visible = true;

I hope it helps to get you on the right track.

AndreasBlack

#138
So i've hardcoded some give away items as @Khris suggested for none moving NPC's. Since there's a bug where the player just won't give the item away, until you click a second time and the cordinates are correct for the script, i suppose. It happens very often. For future release of the template i have a suggestion.

You could add a x/y parameters for the distance of giving an item between characters. Since it would be a neat thing to be able to line up the figures hands or such like i did when hardcoding it.

Edit: Gave up my code attemps, haha!! My last attempt was trying to turn of the  Verbs.SetApproachingChar=false, but still no

CCrane

Hi there,

I'd like to add an option to change language in-game. I would've prefered to re-purpose the (for me) obsolete two-position GUI style slider but I didn't manage to do that so I opted to use a button.

Here's what little I was able to do (in GlobalScript.asc)  ??? :
Code: ags
function btnOptionsLanguage_OnClick(GUIControl *control, MouseButton button)
{
 //switch GUI to German
Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangDE;
  
  if (Game.ChangeTranslation("German") == true) {
    Display("Deutsch aktiviert");
}
}

This worked ... but just temporarily and probably more by accident. While the game used the translation file (german.trs) I had created earlier it seemed to do so rather because it was the only translation file present. In any event I wasn't able to revert back to English after that, and after some minor changes (which I'm unable to replicate) it didn't work anymore at all.
Alas I know next to nothing about scripting so I'd appreciate any help I can get. If someone could tell me how to achieve switching language in-game with said slider, even better.

Thanks a bunch!

-------
unrelated to the former ... but I found replacing sprite numbers (in my case the verbs in gMain) in the editors' property pane had no effect because the settings there are "over-ruled" by commands in the verbGui.asc

for example (line 1178):
Code: ags
    Verbs.LocalizeActionButton(eLangEN,eGA_Open,    59, 60, 'q');

Is that how it's supposed to work? Maybe there's some line of code where this can be over-ruled?


also there's a possible bug here. The offset position of the sliders' handles in the editor is not the same as displayed during the game. I had to double the offset value to have the handle in the correct position in-game (see image below).


P.S. in case it matters, I'm using AGS 3.5.22 with Playonlinux

Thanks again,
Chris

@ChristophCrane_ (Indie author)

SMF spam blocked by CleanTalk