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

#481
Quote from: greg on Tue 25/02/2025 03:56:57Interestingly, when I export the masks, they're at half the size of the room (e.g. exporting from a 1024x768 room yields a 512x384 mask), even though the default mask resolution is 1:1 in General Settings.

Each Room has a separate Mask Resolution setting. General Settings only set "default" resolution for the new rooms. If you like having 1:1 masks everywhere, then you need to go through all the existing rooms and adjust their settings individually.

If the mask is 1:2, then that usually explains why character cannot reach certain coordinates. Try changing "Mask Resolution" in these rooms to 1:1 and see if that fixes the issue.
#482
Quote from: greg on Tue 25/02/2025 03:56:57I'm displaying the character's line in a custom subtitles UI:

Code: ags
// The character says the line, but hide the message string.
chr.SayAt(Room.Width + 100, Room.Height + 100, 0, msg);

// Instead, display the message string in the subtitles UI.
if (Speech.VoiceMode == eSpeechTextOnly || Speech.VoiceMode == eSpeechVoiceAndText) {
  lSubtitlesLabel.Text = msg;
}

You don't need to call SayAt for this, since AGS 3.5.0 there's Game.PlayVoice():
https://adventuregamestudio.github.io/ags-manual/Game.html#gameplayvoiceclip
so above can be done by a combination of PlayVoice and WaitInput, for example.
#483
I don't know what is happening, but I currently see this below the forums:

QuoteUsers active in past 15 minutes: AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, AGS Site Reports, .............
where "AGS Site Reports" is repeated about 100 times.
#485
Quote from: greg on Sat 22/02/2025 17:02:35Hi, I noticed a change in the behavior of Character.SayAt().

I tried older versions, and SayAt behavior was exceptionally inconsistent already.
It allows to position the text below the bottom screen, but refused to position it above the top, or behind left or right borders.
The y position is unclear. The manual sais that "the text is displayed with its top left corner at (X,Y)", but it feels like the text is vertically centered or otherwise adjusted. Because passing screen height as Y will still make the text line partially visible.

If the wanted behavior is to be able to position it precisely where told to, then it has to be fixed in multiple ways.


Quote from: greg on Sat 22/02/2025 17:02:35I intentionally display the message off-screen, so that I can instead show it as a subtitle in a dedicated UI element:

Earlier I missed the fact that you are displaying it completely offscreen (I thought it should only be partially offscreen). This sounds like an unnecessary workaround for something. Why do you need to call SayAt at all?

Quote from: greg on Sun 23/02/2025 20:12:49When an object and a walkbehind have the same baseline, previous versions rendered the object on top of the walkbehind.  The current version renders the walkbehind on top of the object.

I cannot reproduce this. When I test this, whether object has an automatic baseline by its position, or manually set baseline, if baseline is equal to walk-behind's, object appears on top. Please clarify how do you setup this scene?
#486
Quote from: Tarnos12 on Mon 24/02/2025 10:23:28Yes it's on a button press, because I don't know how I can automate GUI translation without a script.

You can detect game translation in game_start, and change fonts there.

I don't understand what do you mean with "2 separate builds" though.
#487
@Tarnos12 I don't see any reason why would anything work differently for other people with this script.

QuoteI am not sure which config settings could be changed and where.

I meant translation choice, for example. But if you have new translation set on a button press in game, then this is less important.
#488
@greg for all the walk issues I would require to have exact walkable mask for a test.

Please clarify, which older version are you comparing with (which worked correctly)?
#489
Quote from: Tarnos12 on Sun 23/02/2025 01:08:23Btw, is there a requirement to see the font properly on a built game on Windows?

Someone else is trying the game and they can't see GUI font, but speech font works fine.
But when I test it, everything works.

Please give more details.
How are the fonts imported.
How is GUI font set.
How do you run the game, which config settings do you use.
How do they run the game, which config settings do they use.
Double check that you test same compiled version of the game.
#490
Quote from: Baguettator on Sun 23/02/2025 05:59:02I don't know anything in coding for engine, but it may be a color value "ERASER" that if we use it, it clears the pixels under the surface and gives transparent pixels instead ?

That won't work, because the color value is interpreted as AARRGGBB now, and it does not have space for "special" values without conflicting with some color value. COLOR_TRANSPARENT is 0x00000000.

MAYBE I could make COLOR_TRANSPARENT, or any color with 0 alpha to always act as a copy, since in theory it does not make sense to draw a fully transparent color. That would be inconsistent though. And then there will still a question of whether we may require an operation that draws with a half-transparent color by replacing underlying pixels.
#491
Quote from: Baguettator on Sat 22/02/2025 22:19:58I'm just testing the new color system in AGS 4.0. I'm using AGS 4.00.00.14, and I don't know how to draw something transparent on a drawing surface ? Before the new system, I used DrawingColor=COLOR_TRANSPARENT, but it doesn't work now.

This is something that is missing in the new system. Unfortunately, nobody who observed and tested my changes noticed or mentioned that this option is missing either.

The new system uses alpha blending of colors by default, which means that if drawing color is translucent, then it's drawn translucent over a surface mixing with the colors underneath, and if drawing color is transparent, then it draws nothing.

I think we might need a separate operation switch between blending and copying pixels for that to work again (or special "blend mode" that sais "copy source pixel" instead of blend with dest).
I don't know whether similar effect may be accomplished using other existing blending modes (I am not fully understanding their uses).

#492
Quote from: greg on Sat 22/02/2025 17:02:35Hi, I noticed a change in the behavior of Character.SayAt().

I intentionally display the message off-screen, so that I can instead show it as a subtitle in a dedicated UI element:

Before RC1, this displayed off-screen as expected.  Starting with RC1, the text is now displaying at the bottom-center of the screen.

I've been fixing an automatic display of LA speech over character's head, which could appear completely under the bottom of the screen. I tried to keep the case when SayAt requires explicit offscreen position, but apparently made a mistake.
#493
Quote from: dad d on Sat 22/02/2025 01:46:49On implementing the code above,  I added the portion to the on_mouse_click section of the global script, but when I add the rest to the top of global, I still get an error calling for DisplayTextBox("Sentence here") [or to be precise I named it Message() ] in my room script.  Do I have to define the function in each room individually?

You need to declare the function's import in the global header, the process is explained in the manual:
https://adventuregamestudio.github.io/ags-manual/ImportingFunctionsAndVariables.html

Simply put following to the GlobalScript header:
Code: ags
import void Message(String text);
(or whatever the function declaration is)
#494
Quote from: dad d on Sat 22/02/2025 01:07:08Ah, as in when you use the tool "Add GUI Textbox" as opposed to "Add GUI Label" or "Add GUI ListBox" when editing a normal GUI

The "TextBox" is a text input control, it lets player to type text into the field.
Label displays the fixed text set in its Text property.
#495
Quote from: Tarnos12 on Fri 21/02/2025 22:42:20EDIT: That actually worked!, I just need to figure out how to change font for the GUI, but I assume that's done manually with a loop?

There's a typical script snippet that does this:
Code: ags

int ReplaceTranslatedFont(int old_font)
{
    // switch depending on the original font here
    // and return a new font depending on current translation
}

function ReplaceGUIFonts()
{
    for (int i = 0; i < Game.GUICount; i++)
    {
        GUI* g = gui[i];
        for (int j = 0; j < g.ControlCount; j++)
        {
            GUIControl* c = g.Controls[j];
            Button* btn = c.AsButton;
            Label* lbl = c.AsLabel;
            ListBox* lbox = c.AsListBox;
            TextBox* tbox = c.AsTextBox;
            if (btn != null)
                btn.Font = ReplaceTranslatedFont(btn.Font);
            else if (lbl != null)
                lbl.Font = ReplaceTranslatedFont(lbl.Font);
            else if (lbox != null)
                lbox.Font = ReplaceTranslatedFont(lbox.Font);
            else if (tbox != null)
                tbox.Font = ReplaceTranslatedFont(tbox.Font);
        }
    }
}
#496
Quote from: Khris on Fri 21/02/2025 10:58:29For reference, here's the font: https://fonts.google.com/noto/specimen/Noto+Sans+Georgian

Well, I quickly tried this, and it works, if I translate few lines and assign font for translation properly.
#497
With the Unicode support there's no difference what the translation language is, the rules for fonts is all the same. The Font's layout and game/translation text format should match each other. Following things matter:

1. Is the Font unicode-compatible, and not, for example, ANSI-125x.
2. What is your translation's encoding: how TRS file is saved, and what is set as Encoding option in TRS.
3. How do you assign these fonts in case of language change. Do you use translation settings, or script this (and how)?
https://adventuregamestudio.github.io/ags-manual/Translations.html#additional-options

Checking the font preview is useless currently, as it only displays first 256 characters, but in Unicode fonts the letters may occupy slot indexes of 1000+.
Do you check results by font preview only, or by testing the game too?
Please give links to actual fonts that you used, I don't want to check any random fonts on that page and guess which did not work for you.

EDIT: btw, I don't think that Georgian language uses Cyrillic letters.
#498
Quote from: dad d on Fri 21/02/2025 05:26:37Out of curiosity just as I'm learning AGS, what's the difference between a non-textbox GUI that you add a texbox layer to compared to adding a label to it?  I had actually tried doing the former at one point while experimenting.

I am not sure if I understand the question, what do you call a "textbox layer"?
There are 2 types of GUI in AGS:
1. normal gui that can display any combination of controls
2. textwindow gui that cannot have any controls, but lets configure 9-tile pieces that form borders and background. Some functions use this kind of gui to display texts: Display (and variants), Character.Say and Overlay.CreateTextual (only if Speech.Style is "Sierra-style with background").
#499
AGS saves are not *.sav, they are called agssave.001, agssave.002 etc.

The default save location on Windows is "%USERPROFILE%/Saved Games/<gamename>/".

https://adventuregamestudio.github.io/ags-manual/RuntimeEngine.html#game-saves
#500
Quote from: RootBound on Thu 20/02/2025 17:05:57Thanks for the clarification. In that case, I think I'll just have to not use the software renderer.

There's a bug in the module, which can be fixed (I mentioned the fix in the module's thread).
But "Software renderer" is not something that a player would use today without a good reason.

Quote from: RootBound on Thu 20/02/2025 17:05:57This leads to a more general question, which is, is it common practice to include acwin.exe with distributed games, or should I leave that out, since players changing the settings can cause problems?

Maybe you mean winsetup.exe?
It is proper to give player a way to choose the settings.
If you like, you may disable software renderer from selection, it's explained in the manual:
https://adventuregamestudio.github.io/ags-manual/EngineConfigFile.html
in the "[disabled]" section:
Quote[disabled] - special instructions for the setup program hinting to disable particular options or lock some in the certain state. Ignored by the engine.
gfxdrivers = [0; 1] - tells to lock "Graphics driver" selection in a default state;
<gfxdriver id> = [0; 1] - tells to remove particular graphics driver from the selection list;

Besides that you may also add a graphics driver test into the game itself, and quit the game if it's software renderer, for example.
https://adventuregamestudio.github.io/ags-manual/System.html#systemhardwareacceleration

SMF spam blocked by CleanTalk