Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Khris

#461
It should work out of the box. I tried to run my 3.6.0 Sierra test game and it worked fine.

If you haven't already, compile the Game in AGS by pressing F7. Do not save the game after this because it will delete the .exe again!

Now add a game to ScummVM and pick [game folder]/Compiled/Windows as the folder to add. You might get a compatibility message, just click "Add anyway".
#462
It's primarily the .tmp files afaik. Windows also prevented me from running AGS4's AGSEditor.exe until I specifically allowed it, same for basically any game exe of a downloaded AGS game (and other Indie games tbf).
#463
Those numbers are colors, you can pick a color and copy its number in the Palette node of the project tree.
Alternatively you can use Game.GetColorFromRGB(r, g, b).
#464
True, here's the fixed version:

Code: ags
      // Giveto
      else if (( verbsData.AGSCursorMode == eModeUseinv)  && Verbs.IsAction(eGA_GiveTo)) {
        lblAction.TextColor = verbsData.actionLabelColorHighlighted;
        verbsData.ItemGiven=player.ActiveInventory;
        if (verbsData.location_type == eLocationCharacter) {
          if (!verbsData.approachCharInteract || Verbs.GoToCharacter(character[verbsData.location_id], 0, verbsData.NPCfacingPlayer, 2))
            if (IsInteractionAvailable(x, y, eModeUseinv)) {
              character[verbsData.location_id].RunInteraction(eModeInteract);
              Verbs.SetAction(eGA_Default); // reset action
            }
        }
        // give to object
        else {
          Room.ProcessClick(x, y, verbsData.AGSCursorMode);
          Verbs.SetAction(eGA_Default); // reset action
        }
      }
#465
The Tumbleweed template uses a "simplified fork of CDG" (CustomDialogGui). I looked at the code and tried for a few minutes to come up with a quick fix but gave up because the relevant variables aren't that well documented / named.
It uses CDG_options.scroll_from and CDG_options.scroll_to for instance, and I suspect the fix needs to reset those, but I wasn't in the mood for shotgun debugging.
#466
Find this part again, near line 2550

Code: ags
        // give to object
        else Room.ProcessClick(x, y, verbsData.AGSCursorMode);

Replace it with:
Code: ags
        // give to object
        else {
          Room.ProcessClick(x, y, verbsData.AGSCursorMode);
          Verbs.SetAction(eGA_Default);
        }

In theory one should also call verbsData.ItemGiven = null; however this would get called too early since Room.ProcessClick doesn't run immediately.

The special Give stuff is a remnant of the original Maniac Mansion Deluxe and has caused so much grief in the last 20 years  (roll)

I've been wanting to do a 9-verb GUI from scratch for years, maybe I'll get around to it at some point :-D
#467
You need something like this:

Code: ags
  if (button == eMouseLeft) {
    // left-clicking nothing with active inv item
    if (GetLocationType(mouse.x, mouse.y) == eLocationNothing && player.ActiveInventory != null) {
      player.ActiveInventory = null;
      Mouse.Mode = eModeInteract;
    }
    else Room.ProcessClick(mouse.x, mouse.y, Mouse.Mode);
  }
#468
Please always show the exact code you tried and mention the exact error message you got. This really helps (and also allows to better gauge how much help you need).

1.
Code: ags
function room_FirstLoad()
{
  Verbs.HideGui();
  Display("Crescer por aqui foi uma experiência marcante demais. Todas as viagens");
  Display("...");
  Display("...");
  Verbs.ShowGui();
}

You tried only passing text to DisplayAt(), which also requires coordinates and a width, as the "At" part implies. Please always, always check the manual first. Simply click a script command in the editor to move the cursor there, then press F1 to show the explanation in the manual. (This even works for a ton of Tumbleweed commands, as I've just found out to my amazement :))

2.
In the script node, open Tumbleweed -> TemplateSettings -> Edit Script and find line 36. Change it to
Code: ags
  Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangPT;

3.
Further up in the same script you'll find a way to specify which verb button goes where. Simply move the buttons for the six verbs you need to the top positions (by assigning them to Controls 0, 1, 3, 4, 6 and 7), then edit the gMain GUI accordingly. (Keep the other three buttons(!), but move them outside the GUI by changing their Top property.)
To change the keyboard shortcuts, go to Tumbleweed -> VerbGui -> Edit Script, select Verbs::Localize from the dropdown at the top and scroll down to the Portuguese section. (Assign a char like "^" instead of a letter to "sort of" disable the keyboard shortcut.)
#469
Great :)

This requires just a small change: you can shorten the first line of the new "giveto" block to:

Code: ags
      else if (( verbsData.AGSCursorMode == eModeUseinv)  && Verbs.IsAction(eGA_GiveTo)) {

(We basically skip the location type check completely.)
#470
This is handled in two places in VerbGui.asc.

line 811:

Code: ags
      cond =((Verbs.IsAction(eGA_TalkTo) || (Verbs.IsAction(eGA_GiveTo) && (Mouse.Mode == eModeUseinv))) && (GetLocationType(mouse.x, mouse.y) != eLocationCharacter));

Change to
Code: ags
      cond = Verbs.IsAction(eGA_TalkTo) && GetLocationType(mouse.x, mouse.y) != eLocationCharacter;

Next, go to the "giveto" section, it should be lines 2524 - 2549 (mind the proper closing curly brace).

Replace the block with:
Code: ags
      // Giveto
      else if (( verbsData.AGSCursorMode == eModeUseinv)  && Verbs.IsAction(eGA_GiveTo)) {
        lblAction.TextColor = verbsData.actionLabelColorHighlighted;
        verbsData.ItemGiven=player.ActiveInventory;
        if (verbsData.location_type == eLocationCharacter) {
          if (!verbsData.approachCharInteract || Verbs.GoToCharacter(character[verbsData.location_id], 0, verbsData.NPCfacingPlayer, 2))
            if (IsInteractionAvailable(x, y, eModeUseinv)) {
              character[verbsData.location_id].RunInteraction(eModeInteract);
              Verbs.SetAction(eGA_Default);
            }
        }
        // give to object
        else {
          Room.ProcessClick(x, y, verbsData.AGSCursorMode);
          Verbs.SetAction(eGA_Default);
        }
      }

You should now be able to handle giving things to objects by simply adding the verb to the any_click handler like any other verb, i.e.

Code: ags
    else if (Verbs.UsedAction(eGA_GiveTo)) {
      if (Verbs.GetItemGiven() == iKeyCard) player.Say("Yes.");
      else player.Say("No.");
    }

edit: fixed code
#471
Are you using custom dialog code or a module?
#472
Btw, a quick fix for you personally is to add your AGS folder to the exclusions.
In Defender go into the Settings for Virus and Threat Protection, scroll down to Exclusions and add your folder.
#473
I assume you put that last piece of code inside on_mouse_click and inside the block for a specific mouse button?
Assuming you did that, you naturally also need to check GetLocationType() again (and/or the .IsInteractionAvailable() methods), like you already did in repeatedly_execute, or the code will simply fire on any click.
#475
Not an ideal solution but this should work if you add it to any script's repeatedly_execute_always function:

Code: ags
  bool show = true;
  for (int i = 0; i < Game.CharacterCount; i++) if (character[i].Speaking) show = false;
  gAction.Visible = show;

You could also use a custom say command that turns off the GUI.
#476
Yeah, you said "mouse pointer" in your first post, but now you're turning gAction invisible. Are you using a GUI as the cursor?
#477
It works fine for me.

Are you using SayBackground() maybe? Can you give a bit more details? What happens to the cursor while a character talks?

"doesn't seem to work" is a useless problem description.
#478
You need to use a dummy character for this since each character has their own inventory.
Set the 2nd InvWindow's Character ID to the one of the dummy.

Transferring an item is done by:
Code: ags
  player.LoseInventory(iQuestItem);
  cInvDummy.AddInventory(iQuestItem);

Using the items of the 2nd inventory is a bit tricky because AGS only supports setting an item as player.ActiveInventory if it is actually held by the player, so you might need to write your own handling.
#479
#480
@cat Finally made a module thread :)

If the 1:2 thing turns out to be an issue for more users I will look into addressing it.
SMF spam blocked by CleanTalk