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 - cat

#1341
I just got an error message in script editor while editing a module (I imported a sprite and then edited the script):

Spoiler
Error: Unable to create the backup sprite file. Make sure the backup sprite file is not read-only
Version: AGS 3.5.0.11

AGS.Types.AGSEditorException: Unable to create the backup sprite file. Make sure the backup sprite file is not read-only ---> AGS.Types.AGSEditorException: Unable to create the backup sprite file. Make sure the backup sprite file is not read-only
   at save_game(Boolean compressSprites)
   at AGS.Native.NativeMethods.SaveGame(Game game)
   at AGS.Editor.NativeProxy.SaveGame(Game game)
   at AGS.Editor.AGSEditor.SaveGameFilesProcess(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs 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.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at AGS.Editor.ToolStripExtended.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[close]

Besides that, I just want to mention that I absolutely LOVE the new sprite import GUI!

Edit: Ah damn it, looks like my sprite file broke - when I try to edit the sprites now, the editor just closes.
Do you want a copy of it before I git-revert it?
#1342
The link is down. Does anyone have a mirror? Or is there a similar module around?
#1343
Turns out that I was using 16bit (which is the default of the template) instead of 32bit. Switching to 32bit and reimporting the sprites solved the issues. Is there a reason for using 16bit at all?
#1344
I'm currently using 3.5.0.11 and have a weird issue: My object is not visible in the room editor, but it is visible when running the game. I can drag it around but cannot see it. The object uses alpha channel. When I replace the graphics with one of the default graphics that ship with the two-click-template, it is shown. It does not make any different whether I choose objects to be visible in the "Edit this room's" bar.

Edit: When executing the game, alpha channel does not work - the background is shown black. In sprite editor, I set AlphaChannel to true and TransparentColour to LeaveAsIs
#1345
TRAVELERS by LostTrainDude
Spoiler
I loved the descriptions and the exploration, although I didn't really understand that shard aspect.
[close]
The Era-Gone Trail by Mandle
Spoiler
Cool graphics, I had no idea what I was supposed to do. Only on closer inspection I saw that there was something running and there were lots of stats where I don't know what they do. You should include a readme in the game zip. I read only later on your description in the thread. I still couldn't win it - damn snakes!
[close]
Shamrock High School: Graduation by VampireWombat
Spoiler
I have no clue what this was all about. I don't mind conversation based gameplay, but why would I talk about graduation when I meet a clone of myself?
[close]
Heroes of Wyrdale by Jack
Spoiler
Very good graphics and cool characters. I struggled with the interface a lot and only realised I could have two characters after reading it here.
[close]
My vote went to:
Spoiler
Travelers, because of the exploration and the atmospheric descriptions
[close]
#1346
Great pick! I agree that the verbcoin was awkward but very cute game.
Spoiler
Would have been great if you had to face more "fears".
[close]
#1347
Works in FF and Chrome :)
#1348
Before pulling the branch, I tried it with the old version again and had problems reproducing it because I changed the intro scene in the meantime.

I narrowed the initial problem down to where I place the character initially. When I do

Code: ags
splashScreen.Events.OnAfterFadeIn.SubscribeToAsync(async () =>
            {
               ...
                game.State.Player = Characters.Cornelius;

                await game.State.Player.ChangeRoomAsync(Rooms.Stage, 2300,[b]100[/b]);


and in the room script
Code: ags
private async void PlayIntroCutscene()
        {
            Characters.Cornelius.PlaceOnWalkableArea();
            
            await Characters.Cornelius.SayAsync("Hello, here I am.");
            await Characters.Mortimer.SayAsync("* squeak *");

            FollowCat();
        }

the issue happens.

When I place the cat directly on the walkable area
Code: ags
await game.State.Player.ChangeRoomAsync(Rooms.Stage, 2300,[b]5[/b]);

it didn't happen.

Anyway, I can confirm that with the changes from your pull request, it doesn't happen in any case - it seems to be fixed  :)


Please note that I might work less on MonoAGS related stuff for the next weeks because I'm joining MAGS.
#1349
When I click the link, I only see an error message.
#1350
Another pick anyone? It's been quite some time already.
#1351
The Rumpus Room / Re: Happy Birthday Thread!
Mon 06/05/2019 11:05:34
Happy birthday, Mandle!
#1352
Good news - I was able to code the dialog tree for the puzzle :)

The next step will be adding actions. The expected type is System.Action. But I see that you just pass a function there - how is this supposed to work and what can I do? Is a function the same as an Action?
Can I just add one function and code all the stuff I want to write there? Or should I add one action per statement?

Edit: Right, I could actually read the documentation myself  (roll)
Action is just a function delegate. https://docs.microsoft.com/en-us/dotnet/api/system.action?view=netframework-4.8
However, the question above is still valid: what is best practise for dialogs?
#1353
Thank you for the detailed explanation. I will make sure to use the factory whenever possible.

Quote from: tzachs on Sat 04/05/2019 22:24:59
Anyway, for now I pushed a fix to have defaults for AGSTextConfig to match the defaults for the factory method, but not sure if in the future we'll want to continue exposing those constructors.
How would hide the constructors? Make them internal?
How does the factory pattern work anyway in connection with autofac dependency injection? When do you use what?

Quote
Quote from: cat on Sat 04/05/2019 14:39:14
I hope all my bug reports are not too frustrating  (roll)
Not at all, I live for this! (just realized that sounds sad).
Then I will continue posting them  :)
#1354
Good news first: The Z-order works and also setting the color. However, suddenly the idle dialog options were shown right aligned:

[imgzoom]https://www.clowdergames.com/stuff/MonoAGS/dialog_alignment.jpg[/imgzoom]

Highlighted and chosen lines are shown just fine. I only set the default for the idle dialog options:

Code: ags
                var defaultFont = game.Factory.Fonts.LoadFontFromPath("Fonts/Acme-Regular.ttf", 20f, FontStyle.Regular);
                game.Settings.Defaults.Fonts.Speech = defaultFont;
                game.Settings.Defaults.Fonts.Text = defaultFont; 
                game.Settings.Defaults.Dialog.Idle = new AGSTextConfig
                {
                    Brush = game.Factory.Graphics.Brushes.LoadSolidBrush(Colors.OrangeRed),
                    Font = defaultFont
                };


I then realized that I probably don't even have to set a new Object, just setting the brush does the trick and everything is left-aligned again:
Code: ags
                var defaultFont = game.Factory.Fonts.LoadFontFromPath("Fonts/Acme-Regular.ttf", 20f, FontStyle.Regular);
                game.Settings.Defaults.Fonts.Speech = defaultFont;
                game.Settings.Defaults.Fonts.Text = defaultFont;
                game.Settings.Defaults.Dialog.Idle.Brush = game.Factory.Graphics.Brushes.LoadSolidBrush(Colors.OrangeRed);


So, doing it this way it works alright. I just wonder why a new config object would yield right-aligned text...


I hope all my bug reports are not too frustrating  (roll)
#1355
Quote from: tzachs on Thu 02/05/2019 03:36:26
It should be fixed in this branch: https://github.com/tzachshabtay/MonoAGS/pull/316
I tried it and it works  :)

I noticed one more quirk with the Z-order: I set the z-order of the stage frame panel with
Code: ags
panel.RenderLayer = new AGSRenderLayer(AGSLayers.UI.Z + 1);


The dialog text is now shown above the stage frame, but the black background box is shown behind.

When I use
Code: ags
dialog.Graphics.Z = 50;

the same thing happens. Even weirder, in this case the black background is even shown behind the characters!
#1356
Quote from: tzachs on Thu 02/05/2019 03:36:26
Do you want to test it before I merge to master?
Sure, I will test it in the evening.


I had a quick look at the pull request and a more general question comes up:
It is great that you can specify lots of config for each individual dialog line, but I'd assume that most users will want to have all dialog options look the same, i.e. have one color for all options and another color for all hovered. In your pull request you create a custom getDialogOption() function, but ideally something like this should be provided by the framework.
Is it possible to set the color as default? Or have a hook where to put a custom function for styling all dialog options, like in AGS where you can use a few functions to make your owner drawn GUI? Not sure what would be the best option for this. And would it be possible to use graphics for dialog options?
What are your plans on how this will develop in the future?
#1357
Quote from: tzachs on Tue 30/04/2019 21:14:21
Ah, good catch.
I've put the dialogs on the same layer as the GUIs by default, so they can be behind other GUIs. I'll change the default and put them in their own layer.

Meanwhile, you can change the layer for your stage to be behind other GUIs (but still in front of room objects):
Code: csharp

stage.RenderLayer = new AGSRenderLayer(AGSLayers.UI.Z + 1);

Nice! I didn't know you could create your own layers.
I agree that it could be useful to put other GUIs in front of the dialog. Would it be possible to change the Z-order of the dialog itself but keeping it in the UI Layer?

One more question: In the start-up logic of the game, I set game.Settings.Defaults.SpeechFont and TextFont to a custom font. This works very well for spoken text as well as the "Loading" label of AGSSplashScreen, but it doesn't work for the dialog options. They are tiny (remember, the game is high-res) and with a different font. Would it be possible to use the TextFont there?
#1358
I created the first very basic dialog. It works, but the dialog options are partly hidden behind my stage GUI. Is is possible to change the order of elements? Or do I have to implement IDialogLayout as written in the documentation?
#1359
That concept of "time-machine" and "control-layers" sounds very interesting!
#1360
Quote from: tzachs on Sun 28/04/2019 22:42:35
Hmm, I'll look into that.
Thanks!

Quote
But, do you even want to allow walking the cat during the cutscene? Because if you don't, you can put "Characters.Cornelius.Enabled = false;" at the beginning of the scene (and "Characters.Cornelius.Enabled = true" when you want to return control to the player).
Does this mean I have to disable the character everytime I have a cutscene? With AGS, talking was blocking, so noone could walk around during a scripted dialog scene.
Didn't you build something that disables walking while talking?

Edit: I found the post I was talking about: https://www.adventuregamestudio.co.uk/forums/index.php?topic=56055.msg636597241#msg636597241

Quote
Also, slightly off-topic, but you can wrap your cutscene with "game.State.Cutscene.Start()" and "game.State.Cutscene.End()" in order to allow the player to skip the scene (how the player can trigger skipping the scene is controlled with "game.State.Custcene.SkipTrigger").
Thanks, but this is not the final intro cutscene anyway. I wanted to write it last to avoid having to skip a cutscene everytime when testing.

Quote
The short answer is that the Z property is the object's baseline (and by default, unless you explicitly set Z, Z will equal Y).

The longer answer is that the order in which objects render first depends on their render layer. For example, by default, all GUIs are created in a separate layer than room objects, and as the GUIs layer has a lower Z than the object layer, all guis will appear in front of all room objects, even if their individual Z says otherwise.
In other words, the object's Z is compared only for objects in the same render layer.
Also, you can add a Z offset for individual sprites, those are added to the object's Z when the comparison is made. So if you have an animation for an object in which you need one of the frames to appear behind something, you can give that specific frame an individual Z offset to make that happen.
And lastly, if you use object composition (i.e Cornelius the cat might have a gun as a separate object and that gun has the cat as its parent), then the children objects will only be compared against themselves, and will use their parents for comparing against other objects.
Wow, lot's of options! Thanks for the explanation.
SMF spam blocked by CleanTalk