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

#1
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]
#2
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"
#3
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+
#4
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


#5
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.

#7
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
#8
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?
#9
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.
#10
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 ?
#11
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.
#12
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!
#13
As AGS 4 cuts ties with old AGS features, should we get rid of the "old" on_key_press, and while doing it remove the old eKeyCtrlA, eKeyCtrlB, etc. ?

old way:
Code: ags
// Check that only Ctrl is pressed
void repeatedly_execute()
{
    if (IsKeyPressed(eKeyCtrlLeft)) { ... }
}

// Check that ctrl+A is pressed
void on_key_press(eKeycode keyCode) {
  if (keyCode == eKeyCtrlA) { ... }
}

New way

Code: ags
// Check that only Ctrl is pressed :
void on_key_press(eKeycode keyCode, optional int mod) {
  if (mod & eKeyModCtrl) { ... }
}

// Check that ctrl+A is pressed
void on_key_press(eKeycode keyCode, optional int mod) {
  if (keycode == eKeyA && (mod & eKeyModCtrl)) { ... }
}

See the help article of on_key_press for more details.

I'm adding a question mark because maybe those would still be useful do scripters who still brute-force key reading in their main loop?

Code: ags
void repeatedly_execute()
{
    if (IsKeyPressed(eKeyLeftCtrl)) { ... } // make the spaceship go pew pew
}

EDIT : yeah that last use case is definitely still valid for keeping eKeyLeftCtrl... Once again, writing a forum post made me walk myself through the process :-P

=====================

On a side note, I think the article could provide better examples :
Code: ags
//This checks if Ctrl was pressed : 
if (mod & eKeyModCtrl)

It could do with an example showing Ctrl+A instead of just Ctrl. I'm guessing most scripters are after that.
It could also do with an example of Ctrl+Alt+A as it is where the modifiers and the binary logic will shine
#14
Pull request for the BASS template : https://github.com/adventuregamestudio/ags-template-source/pull/61
(apologies for the deleted pull requests before this one, I'm rusty on my forking)

Pull request for the Sierra template : https://github.com/adventuregamestudio/ags-template-source/pull/60
Pull request for the Verbcoin template : https://github.com/adventuregamestudio/ags-template-source/pull/63
Thumbleweed update : waiting for abstauber to create an ags 4 branch in his repo
#16
I'm wondering what the best way would be to push my work into git.
The repo for the templates only contains .agt files. Which means two things :
1) I need to create the .agt from my updated template game for each commit
2) the reviewers will have to look into the .agt, which is not super convenient for the diff and all that.

Any idea? @eri0o since you're on fire you should create a pipeline that turns a game into a .agt and we should store the templates as game projects ;) (just kidding)

EDIT: What I could do is, inside the Templates folder, create a subfolder for each game -- freshly created from the 3.x template. Then, do my edits (and therefore commits too) in those subfolders.
For example I could create a "BASS template" subfolder, containing a game freshly created from the BASS 3.x template. Then, do my edits and commits there (those can then be easily read by the reviewers). Then, the final or close-to-final commit would be for the creation of the .agt file.
#17
By the way I strongly suggest to introduce a way of clearly marking anything that's AGS 4 compatible. Maybe there should be a forum rule enforced by moderators in the the Modules subforum: write the AGS version in the title of the thread or something.
#18
Hello,

I haven't visited the forums in a million years and I have a lot of catching up to do.
I've been looking at AGS 4 (which is amazing btw, it resolves 99.9% of my grudges with the AGS scripting language -- remove the "export" keyword and headerfiles, and we'll be at 101% :-D ).
- I've downloaded the early version and I saw that all the standard templates are here (BASS, Sierra, etc.).
- I've also read that AGS 4 breaks compatibility with AGS 3.x.

Which brings me to my question : Have the scripts of the templates been updated?

For example in the Sierra template I see the KeyboardMovement 1.04 module. Is that module written in AGS 4 fashion or is it still AGS 2.x or 3.x script that just happens to work in AGS 4?
(Note: I've been trying to search the forums myself but the search feature is extraordinarily slow today... I had only one search out of 7 attempts coming to completion. Therefore I'm blind)

I'm asking because I remember that some 3.x template scripts had to do some backflips to work around the limitations of "struct", keeping track of indices -- instead of just putting structs inside structs (was it Tumbleweed? Can't remember. I think tween does that too).

So anyways no that it is the summer holiday I could put a bit of effort into dusting off the most important scripts. If you have suggestions feel free to let me know.
#19
I'm curious about something but I'm too lazy to test it myself.
EDIT: I was wrong.
Spoiler
I wonder if there might be a possibility of a "softlock" in the game.

Early in the game, in the countryside house, you can pick up some
Spoiler
yellow dye
[close]
Later in the game,
Spoiler
during the secret meeting you will use that dye for cooking.
[close]
However you cannot go back to the countryside house at this point (the player won't allow it)
What happens if you didn't pick it up?

EDIT: it's not for the grog. No softlock.
[close]
#20
Quote from: croquetasesina on Thu 22/02/2024 21:21:06Maybe...
Spoiler
Have you tried the group of nobles on the right, on the lower floor?
[close]
.

Yes, they always say "can't you see you're bothering us here" ???
EDIT: So... Another thing that needs to be addressed in the game!
It seems like every time I've clicked on those people I have randomly always clicked either on the left-hand noble or the right-hand noble? The response is the same either way, and the "you're bothering us" line of dialogue is said by the MIDDLE one. So I naturally assumed that those three characters were just a single clickable area
.... Except, it's not! And clicking on the middle guy gives me a different response now!

SMF spam blocked by CleanTalk