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 - Crimson Wizard

#1041
So, after quickly looking through the template script, apparently this is how you configure the dialog options:
https://github.com/dkrey/ags_tumbleweed/blob/master/CustomDialogGui.ash


You need to have this somewhere in global script, in "game_start" function perhaps:
Code: ags
CustomDialogGui.DialogGuiOptions[ OPTION_ID ] = value;

where OPTION_ID is one of the options from the eDialogGuiOptions list.

For example:
Code: ags
CustomDialogGui.DialogGuiOptions[ eDialogGui_gui_width ] = Screen.Width;
CustomDialogGui.DialogGuiOptions[ eDialogGui_gui_height ] = Screen.Height;
and so on.

That should affect the whole module, and likely get you better results.


Overall, I must say this, it's a very bad strategy to hack insides of a module, because there may be multiple connected things in it. You change it in one place, but it still not working in another, or just breaks. It's better to learn how module can be used from "outside", by calling its public functions.
#1042
So, if we look at this code:

Code: ags
//Size of GUI
//info.Width  = CDG_options.gui_width ;
//info.Height = CDG_options.gui_height;

you can see that this module was taking GUI sizes from CDG_options. CDG_options is actually what you should be changing instead, because these CDG_options may be used elsewhere, in multiple places.

CDG_options are configuration for this module. This template comes with the documentation, and I wonder if this is explained there:
https://github.com/adventuregamestudio/ags-manual/wiki/Tumbleweed

I suggest reverting all your changes to the template code, and instead search the documentation for how you configure it.

EDIT: no , looking quickly through the manual, it does not mention configuration. That's a dissapointment.
#1043
I see now that I should have rather made a simpler demo game featuring the most common textbox which prints character speech or game narration.
#1044
Frankly, this looks like either a mistake in the template, or that you are not using it correctly, because normally one would expect it to rearrange dialog automatically depending on game's resolution and/or size of the dialog gui.

I'd advise to report this to the template's author, either in the template's forum thread:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/template-tumbleweed-verbs-1-4/
or in the template's repository here:
https://github.com/dkrey/ags_tumbleweed/issues


On a side note, this topic's title is bad, because it's not specific. This may make it harder for other people to find it if they have similar issues with this template. It could be "Changing game resolution with Tumbleweed template", for example.
#1045
An updated variant of this experimental build, now allows to have new script modules (so older save may have less scripts in it) and change script order in the game:
PR: https://github.com/adventuregamestudio/ags/pull/2489
Download: https://cirrus-ci.com/task/5502965476229120
UPDATED: 14 September 2024


Also I remembered that plugins are already handled properly starting with AGS 3.6.1, so it should be safe to add and remove plugins, and that won't break saves.
#1046
About what to put and not put into the script header:
https://adventuregamestudio.github.io/ags-manual/TheScriptHeader.html

Importing and exporting variables is explained in this topic in the manual:
https://adventuregamestudio.github.io/ags-manual/ImportingFunctionsAndVariables.html

But it seems that you don't need to make any variables public here, they must not be read or set from other place, so you may just hide them inside the script, and have only function "imports" in the header.


I might also recommend not putting this into "globalscript", but make a separate script module for the code related to this "typewriter".


This code has no use at all, this was added to the module's code for compatibility with other versions of AGS:
Code: ags
#ifndef SCRIPT_API_v350
  #define eAlignCenter eAlignCentre
#endif
so you may throw it out.

Throw out any other code that you dont use or which is not working for your case.
#1047
It sounds like you need to move all this code to the global script then.
Since it has to be displayed in the same way throughout the game, then it should not be displayed on a room object, but on something else, like a GUI, or screen overlay. Both may have a sprite assigned as a background graphic (check the manual for GUI properties or screen overlays).
I recommend GUI, because it's easier to configure and work with (imho).

Quote from: TypewriterTextLover on Thu 12/09/2024 21:23:27I also have no idea how to get the pages to stop and wait for a mouse click before displaying. I'm going to look into it further and try to mess around with timers although I'd rather have a mouse click to skip text and then wait for user mouse click input again to go to next page.

Simplify UpdateTypewriting, you do not need 2 cases, only handle IsActive case:
Code: ags
void UpdateTypewriter()
{
  if (ttdraw.IsActive)
  {
    ttdraw.Tick();
    DrawingSurface *ds = papersprite.GetDrawingSurface();
    ttdraw.Draw(ds);
    ds.Release();
    oPaper.Graphic = papersprite.Graphic;
  }
  // TEST STRING
  Label1.Text = String.Format("ttdraw active: %d, idle %d, wait %d", ttdraw.IsActive, ttdraw.IsIdle, ttdraw.IsWaitingForReader);
}

Change the Click function to do different things depending on current state:
- if still typing then skip
- if finished typing, then go to next page
Code: ags
function oPaper_AnyClick()
{
  if (ttdraw.IsActive && !ttdraw.IsIdle)
  {
    ttdraw.Skip();
  }
  else if (ttdraw.IsIdle)
  {
    DrawingSurface *ds = papersprite.GetDrawingSurface();
    ds.Clear(65535);
    ds.Release();
    oPaper.Graphic = papersprite.Graphic;
    StartTypeNextPage();
  }
}

Something like that should do it.
#1048
Quote from: TypewriterTextLover on Thu 12/09/2024 04:31:44Replace the room code with this code to replicate the error. It doesn't happen every time but when the text comes up that says "Best Module of all time! 700,000 Views Baby!!!"
If you try to skip by clicking on the paper between the word "all" and "time" it should hang. It sometimes hangs if you click on the paper right after it types "Crimson" on the first sentence.

This is not the module that hangs, it is the Wait(60); command that you have in your script that makes it wait for 1 second before going to the next page.

Skipping makes full text displayed, which also results in Idle state, because it's done typing.
Your own code detects Idle state, waits for 60 ticks, and starts typing next page.

You need to modify your code to let it:
- redraw once more
- maybe wait more before going to the next page after Idle, to let player read the whole page, or wait for another player's clicks, depending on how you want it to be done.

I also recommend to not use Wait() command here, but instead set up a Timer, because Wait suspends all player's interaction.
#1049
Played this now.

I do believe that this art style deserves a higher game resolution; otherwise it have to be "downgraded": to be more pixely and look less smudged in low-res.
But what bothered me most in the art is the lack of shadows! Maybe this is because of the time constraints (i understood this was made for a game jam). Your other game "Shards of God" seem to have shadowed areas, judging by the screenshots (I plan to play it next).

The game itself is pretty well built, has a good and consistent pacing, and rather well developed characters despite story being short.

The uncommon use of inventory item as a compass was quite fun to see, I believe this was already mentioned few times in this thread.

The theme of the "ancient machine" in the "ancient ruins" felt way too random, but I suppose this could be another forced decision due to a time constraints?
#1050
I do recommend also check out another recent module, which allows to draw individual words in different style (color, font), made by @eri0o:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-fancy-0-1-0/

It does the word splitting itself, so may be capable of reporting their positions on screen too.
I don't remember if it has this in its commands, but even if not it might be possible to add that.

Maybe combining these two modules will get you what you want.
#1051
I completed this recently, a first full-length AGS game I played in a pretty long while.

This is a overall pleasant game, full of different and genuinely interesting characters. Sort of a game which I used to call "cinematic", as it's not focused on puzzle solving as much as on exploring the surroundings and following the character interactions, much like watching the movie.

At the same time there have been few things in this game which left me much confused, as they felt inconsistent with the character, whether too "gamey", difficult to believe, or just weird. I am speaking about certain decisions which the heroine had to make, such as...

Spoiler
... investigating the barely known town late in the night, following a random missing person, while having no pressing need to do so,
... making her way into animal's ground hole having very little actual reason to do so,
... having to perform a weird combination in order to get to a certain lord's mansion, although there were no visible obstacle to do so on your own,
... staunchly refusing to carry umbrella, although it's been raining each second day,
... proceeding to investigate the depths of the barrow without a working light source, or any supplies, even though there's no expectation of what may be found there (how do you do anything without a light?)
[close]

...at some point I've been wondering if the character is literally loosing her mind (or if that is an intentionally made impression).


The final part of the game, which takes place inside the barrow, is quite different in nature, which is understandable. But this unfortunately became my least favourite part of the game. It has this classic design trope of "random puzzles in the tomb", where you constantly wonder why would any ancient people create these at all. This part have smeared otherwise good impression somewhat.
#1052
This problem is not related to LockView. LockView simply keeps a particular character locked at a certain view, nothing else.

This is the code that locks your game controls:
Code: ags
  while (!wastebasketClicked) {
      Wait(1);
  }

The way AGS works no other player interaction (whether on room objects, or gui) can be run while there's a script function running.
Wait() function lets engine to update and redraw the game, but player clicks on objects will not be handled.
In order for interactions to work again you must exit the previous function first.

The solution for this, and any similar case, is to split the sequence into 2 parts: one before waiting for player input and one after.
For example: play only the first part in the function "wastebasket_Interact", and the second part in the function oInsideWasteBasket_Interact.
#1053
If I understand your question correctly, you like to drag words from character's speech text to a listbox?

Drag and drop is not present in the standard AGS functionality, and  "words" from a speech text are not real objects in AGS. That's why you will have to either script this completely yourself, or use some existing drag module and accommodate it for your case.

You can use my DragDrop module as a start. The DragDrop module was designed to also let drag "custom objects" or "imaginary objects", but this will require extra scripting from your side. This is explained in its documentation:
https://github.com/ivan-mogilko/ags-script-modules/wiki/Drag-&-Drop-module


In simple terms, you would have to script:
- detection of a "draggable object" below the cursor. Because the module does not recognize "words" in text, you will have to tell it when the cursor is above one.
- create image of a dragging object (probably with a text on it).
- detection of a valid dropping place below the cursor (particular list box?).
- handle "after drop" action, where you add this word to the listbox contents, and maybe something else.

In practice that will be more complicated than that. But I do believe that's possible.
It looks like the toughest part will be word detection. For that you'll likely have to parse displayed text and calculate its structure, so that you could know each word's coordinates. This is going to be a separate problem of its own, unrelated to drag'n'drop action.

Such complex tasks are better solved step by step.

I suggest start by learning how DragDrop module works, read its documentation, in particular the part where it explains how to script dragging an object from scratch, and study the Demo Game, which illustrates dragging "imaginary" things too, among other things.
Perhaps, make a experiment by scripting dragging and dropping something unusual in a test game.


PS. This is in no way a "Beginner's technical question", it's rather a advanced topic, perhaps it would make sense for mods to move it into appropriate forum section?
#1054
Here's the fixed version if you're interested:
https://cirrus-ci.com/task/4970957322846208
#1055
So, I posted this on github in our repository. I've been considering to fix the naming rule for the voice clips to let avoid conflicts when characters have identical first 4 characters. My proposal was to instead require using a full character name in the clip names.
https://github.com/adventuregamestudio/ags/issues/1456

But then I found there's another separate possible conflict, that is when character name has digits in it.

For example: character names are cGuy1 and cGuy11. And you do this:
Code: ags
cGuy1.Say("&11 word");
cGuy11.Say("&1 word");
Both will result in a voice clip name "guy111".

This of course is a very rare case, but it's still possible. Which means that the current rule has a loophole.
Besides, having any digits in character's name makes following clip number harder to distinguish.

The only way to avoid a situation like that completely is to separate name and number with a symbol that cannot be in a scriptname, but can be in a filename. Such symbol as a dot ('.') or a hyphen ('-'), or else.
I.e. make voice clips called like: guy1.1.ogg or guy1-1.ogg.

What do you think about this?
#1056
Quote from: Dave Gilbert on Mon 09/09/2024 16:42:23I think (not at my desk now so can't confirm) if you get the error while in test-mode, it highlights the offending line of code. But if you're playing a stand-alone build, it just throws up the error.

Yes, but it should also append a script line to the error message. It did so in previous versions, but not anymore since 3.6.0. There's a mistake in the engine that prevents that.

EDIT: okay, i fixed this one, should be in the next 3.6.1 patch.
#1057
What bothers me about this particular case is that normally engine should have appended script location to this error, but somehow it did not.

EDIT: I confirm, script location is not posted, and it's not immediately clear whether this is specific to the given error. Could be it's broken for all error reporting in 3.6.1.

EDIT2: So, this was broken somewhere in the middle of 3.6.0 development.
Previously any such error would have a script line, but now it does not.
#1058
There are likely multiple error messages that don't give any details, or not enough.
I even opened a ticket for bringing them to a uniformity:
https://github.com/adventuregamestudio/ags/issues/1486
and suggested that this should be done systematically.

There should be rather a list of messages to fix, instead of a separate topic per each single message.

This list is easier to gather from the engine source code, where it may be searched for function calls such as:
"debug_script_warn", "quit", "quitprintf" and similar.
#1059
I'm adding this for the next version of AGS:

#1060
Quote from: Snarky on Sat 07/09/2024 17:11:37(There is a question of whether the event handler will be able to access local variables from the function in which it was declared. If so, I guess they have to be copied and stashed somewhere. It's probably easier to say no.)

No, it won't, as callback is a separate function with a separate local stack.
In normal programming languages lambdas allow a "capture" syntax, where you explicitly tell which values to copy.
I'm not sure how this is implemented, but from user's perspective this is almost like passing a custom list of function arguments.
SMF spam blocked by CleanTalk