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 - Monsieur OUXX

#21
Quote from: Crimson Wizard on Thu 17/07/2025 22:54:32I suppose that in this particular case AGS 4 could skip these and continue, with a warning.

Whatever works!
#22
In case it went unnoticed : The AGS 4 compiler is now stricter on "enum versus int" when it comes to declaring attributes (and their dedicated setter/getter).
For me it's a non-issue, I'm just reporting it. If it's by design just ignore it.

Code snippet (actually from the Thumbleweed module or one of its dependencies) :
Code: ags

// The struct that holds the dynamic array 
struct MyStruct {
  import static attribute int SomeArray[]; // Declared as int
}

// The array setter
void seti_SomeArray(static MyStruct, eSomeEnum index,  int value)  //the index is an enum instead of an int
{
   ...
}

The new compiler complains that "index" should be an int. It is (obviously) solved it by changing the type to int.

=========

Also, not directly the same issue: The author of the module originally made the setters return a boolean, like this :

Code: ags
bool seti_xxx(...) {  // Returns bool instead of void
{
   ...
}
The new compiler wants void as return type. In this case it doesn't matter because the method wasn't returning anything (no "return" statement at all). No idea if it was a bug or by design (again: I personally never use those setters).

I solved it by changing the return type to void.
#23
Quote from: Crimson Wizard on Thu 17/07/2025 22:54:32memory leak
Yes, I believe I've seen an "overflow" error at some point, even though it does not appear in that specific call stack. That's great news.
#24
Quote from: Crimson Wizard on Thu 17/07/2025 21:35:20You did not give any details

Like I said, when that happened I was focused on something else. But after I was done, I still thought it was worth reporting "on principle", if only to raise the issue.

So anyways, it happened again just now, and this time I was ready to troubleshoot. Here is the exception that happens at build :

Code: ags
Error: External component has thrown an exception.
Version: AGS 4.00.00.18

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. ---> System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at ccCompileText(SByte* , SByte* )
   at AGS.Native.AGS3ScriptCompiler.CompileScript(String scriptName, String[] scriptTexts, ScriptCompilerOptions options, CompileMessages messages)
   at AGS.Editor.AGSEditor.CompileScript(IScriptCompiler compiler, Script script, List`1 headers, CompileMessages messages)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages messages)
   at AGS.Editor.Components.RoomsComponent.SaveRoomOnThread(IWorkProgress progress, Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter, Int32 timeoutMs)
   at AGS.Editor.Components.RoomsComponent.SaveRoomButDoNotShowAnyErrors(Room room, CompileMessages errors, String pleaseWaitText)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Quote from: Crimson Wizard on Thu 17/07/2025 21:35:20Font size of courrier new
Yes. The issue is really the thinness, not the size. I guess that in "low res", the font appeared slightly beefier because of the rogue extra pixels added by the font rasterization and the high contrast trick (blue pixels on the left, red pixels on the right).  But now in "real" hi-res it's really too thin for good readability.

But then again maybe the issue would not be there without the special DPI scaling setting for compatibility; I have no way of telling because I don't know how this kind of .Net GUI issues is fixed on developer side, i.e. if the devs need to change some UI-related setting when they build the .Net app (and then it will be built in a new way that looks hi-res but still pretty out of the box), OR if what I'm seeing represents what the app will really look like in high-res.


Quote from: Crimson Wizard on Thu 17/07/2025 21:35:20Please provide the broken room
Let me zip that up and I will send it to you in private.
#25
I upgraded my game to AGS 4.00.00.18-alpha22.
I'm still using the AGS3 compiler, not the AGS4 compiler.

Here are the problems I'm experiencing so far :

ISSUE #1 After about let's say, 5 to 10 "rebuild all" which all end up with errors found in the script, I get an Exception in the editor. I haven't screenshot it; my focus is not on that right now. But it happened every time (I would close the editor, open it again, run "rebuild all" 5 to 10 times, and get the same exception).

ISSUE #2 The Editor is an old .Net app. As a consequence, when running on high DPI screens (let's say 1280x800 or more), by default its UI doesn't get scaled up and appears pixely and slightly blurry. In order to fix that, we can enable "Change high DPI settings" in the Compatibility tab of Windows, and then tick "Override high DPI scaling behaviour". This works great (and it makes AGS look like a modern app), except for two things :
1) all the icons (run, save, properties, etc.) are tiny. They would need to be scaled up at least 4 times.
2) The "courrier new" font appears weirdly thin in the Code editor. So thin that at first I thought it was all grayed out. I made it work by using the first random open-source font replacement I came across (I went to dafont.com and picked "NK57 Monospace Sc Sb".

ISSUE #3 I've had one room (out of a hundred) that couldn't get converted from AGS 3.6.1 to AGS 4. It wasn't a big deal, I just deleted it. I can provide it if asked. Note that this room was created a LONG time ago, maybe in AGS 3.2, and went through AGS 3.4 and AGS 3.6.

Apart from that it's all good so far. Impressively stable.

I will continue adding items as I find them.
#26
Quote from: Crimson Wizard on Thu 17/07/2025 18:02:26
Quote from: Monsieur OUXX on Thu 17/07/2025 16:55:45- Those new features do not appear in the autocomplete,

They do not appear in the autocomplete? That sounds as a bug.

I might have (definitely did) made a fool out of myself!
That was an assumption.

When I wrote that post, I was in the process of bulk-upgrading all my scripts to AGS 4 and I was "in the zone", not looking at details. I was not looking in detail because I had this knee-jerk reflex from previous upgrades (a few years ago) when the autocomplete had to be updated manually and was missing stuff.
But if you say it's all there, then it's all there! Thanks once again for spoon feeding the devs.

I don't fully regret asking, though, because the idea of looking at specific threads of specific features (with the "AGS 4" tag, which I never really paid attention to) is a great idea.

SOLVED!
#27
Here's my situation :
- I'm using AGS 4
- I know that there is a ton of new features in the "API" (i.e. the scripting language).

Problem:

- I know of those new features by reading the "Releases" subforum.
- Those new features do not appear in the autocomplete, let alone in the CHM help file.

QUESTION: Is there a simple workflow that I could adopt to navigate the new features?

It's an open question: Anything suggestion would help. Even something less-than-ideal is welcome.

Right now I don't see any other way than browsing all the change logs in the forums, one by one?
#28
I've been trying to read through the entire thread, all the updates with the GUIs, the blending modes,  the rendering layers, the nested objects,  the constructors, the new format for dialogs export, etc.

My head is literally spinning from all the awesomeness.

I don't know if that's ever happened to any game before,  but... I genuinely think I'm coming back from Unity to AGS. 2 years ago, I had sacrificed convenience for power. And now I can come back.

In other words: THANK. YOU.
#29
Quote from: eri0o on Fri 19/07/2024 00:52:10I just did it to myself
After looking more closely at IniFile2, it's not exactly written in the same spirit -- so I would say the two modules are complementary. Plus, as I wrote, yours shows the way to "modern" approaches. No regrets!

Quote from: eri0o on Fri 19/07/2024 00:52:10perhaps there is some smart way to create an AGS dictionary from an INI file and also to serialize a dictionary to an ini file

Just my two cents:
Spoiler
If you want to make String-manipulation and String-parsing lovers happy, I think you should instead focus on creating String.Split(delimiter), Array.Sort, Array.Min, Array.Max (At least for primitive types: int, float, char, String -- case-sensitive and case-insensitive...). And (if at all possible!) make String.Char faster (for reading) and String.Append faster (for writing).

I would never have suggested that before, but now that you've created pseudo-properties on dynamic arrays (.Length), it's opening a world of possibilities.

Side Note: It will not only allow new powerful parsing capabilities, but Array.XXX will probably help a lot in pixel-manipulation modules too, which are hindered by the scripting language's speed. That's how Python and GDScript worked around the speed problem: by wrapping fast c++ methods and exposing them to the scripting API.
[close]
#30
Possible alternative to this module:
IniFile2: https://www.adventuregamestudio.co.uk/forums/index.php?msg=627432

- "Easy config files" is not necessarily better but relies on the more modern "Dictionary" feature of AGS 3.6+
- "IniFile2" follows more closely the aging syntax of Windows' .ini files (comments, sections, etc.)


By the way, this thread should be in "Modules and plugins" rather than "Advanced Technical Forum"
#31
Possible alternative to this module:
Easy config files: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636626464

"Easy config files" is not necessarily better but relies on the more modern "Dictionary" feature of AGS 3.6+
#32
Modules, Plugins & Tools / Re: MODULE: IniFile
Thu 18/07/2024 22:36:19
(this thread still pops up in Google)
This module is obsolete. Possible replacements:
Easy config files: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636626464
IniFile2: https://www.adventuregamestudio.co.uk/forums/index.php?msg=627432


#33
I fail to find the absolute simplest way of using method System.Log.
From what I understand (here : https://adventuregamestudio.github.io/ags-manual/EngineConfigFile.html   and here: https://adventuregamestudio.github.io/ags-manual/RuntimeEngine.html#command-line ) one has to add a command line switch.

Is there a way of simply enabling the logging from running the game in Debug, from the Editor?

I tried adding this to acsetup.cfg in the _Debug folder :

Code: ags
[log]
file=all:all
file-path=C:\Users\admin\repos\ags-essential-modules\AGS 4 essential modules\_Debug\log.txt

Unfortunately the file gets reset every time I run the game.

I tried with acsetup.cfg from folder \Compiled\Windows and \Compiled\Data,. those don't get overwritten but do nothing.

#35
Quote from: eri0o on Tue 16/07/2024 17:02:10For dynamic sprites the change is explained in this PR https://github.com/adventuregamestudio/ags/pull/2455

OK it's a bit clearer now, but what I fail to understand is if the alpha channel is still a thing or if it has been entirely obsoleted.

EDIT: I can see from the file's history that the alpha channel has been removed in april 2023 and it has nthing to do with the newly-introduced "format". So, what? Every sprite has an alpha channel now?

EDIT 2 : OK, I found this : https://github.com/adventuregamestudio/ags/pull/1813
#36
AGS 4

- The last parameter of DynamicSprite.Create used to be hasAlphaChannel. Now, it's an int named "format".
- Object DialogOptionsRenderingInfo used to have a property HasAlphaChannel which it no longer has.

The help file of AGS 4 has not been updated yet and I don't know where to look in the forums in order to find out where exactly those changes were introduced (and explained).

A little help?
#37
About Tumbleweed : It is a submodule pointing to Abstauber ( on Github: dkrey ) 's repo.
Unfortunately it has no ags4 branch and I cannot create that branch in his repo, only in my fork of his.
I'll send him a PM hoping that he reads his messages.
#38
Please note: The Tumbleweed template relies on the same mechanics, as Lucasarts games let you change your mind while the character is walking towards the location where you told him/her to perform an action.
In Tumbleweed I nicknamed it "delayed action" when I spotted it, as it waits on the character "getting there" first, like this module does.
However in Tumbleweed the logic for this is mixed together with the logic for the rest of the module, making it hard to spot despite being a critical feature.
I had extracted it once into its own module, but have no clue what I did with that updated script.

I do not know which implementation has the least caveats : Khris' one or Tumbleweed's one. It would be interesting to compare side by side, and maybe Khris can snatch some cool tricks from that other implementation (or the other way around -- again, no idea which one did it best)

Long things short: I think the AGS code base would benefit from this very module (or its sibling from Tumbleweed) to be integrated into the templates, as a standalone module.

PS: It could have been Tumbleweed or one of the other Lucasarts templates : 9-verb, verbcoin ?
#39
This module is now at version 1.05 or higher.

It is maintained directly in AGS github repository : https://github.com/adventuregamestudio/ags-template-source ( files KeyboardMovement.ash and .asc, in folder Serra-style )
To get the latest version of this module, download the latest version of AGS and create a game using the Sierra template. The script files will be there, for you to export or copy-paste to your own game.
#40
Download AGS 4 alpha 11 (from the "AGS Releases" subforum) and try to run the Sierra template.
You'll get error message  ".on" is not a public member of "Character"

My question : I've never used that property, I didn't even know it existed.
- Has it been deprecated or did @eri0o simply forget to declare it in AGS 4 ?
- What is a workaround to that? Character has no "Visible" or "Enabled" properties.
 
EDIT: Enabled and Visible have been added, they just don't exist in the Help file. Problem solved!
SMF spam blocked by CleanTalk