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

#2701
I added them proper names in 3.6.0 (will be released in the next update), that appeared to be simple enough.
#2702
Quote from: Laura Hunt on Fri 19/08/2022 08:44:12
By the way, since we're talking about this, would it be possible, if it's not too much work at this stage, to implement a small quality of life improvement and give more explicit names to the different objects in the text window GUI? Right now, when you bring up the drop down, they're called simply TextWindowEdge; ID 0, TextWindowEdge; ID 1, and so on. It would be SO much more convenient if they were called something like TextWindowEdge (top left); ID 0, TextWindowEdge (bottom left); ID 1, etc.

I do know that AGS 3.6.0 is pretty much ready to ship though, so I'm only suggesting this in case it's straightforward to implement and doesn't risk breaking other stuff, of course.

The displayed names of objects and properties in the editor are purely cosmetic and they do not affect anything else. But certain names are constructed through a weird way and may require additional tweaking of the code to change; so I may look into this but don't give promises at this moment.
#2703
Quote from: heltenjon on Sat 20/08/2022 15:01:50
Quote from: Crimson Wizard on Sat 20/08/2022 03:55:53
Quote from: Pax Animo on Fri 19/08/2022 23:33:04
That's good to know, i can't remember where i read that all objects share the same ID globally throughout rooms. (or maybe i just misunderstood it at that time)

To clarify, they do share same numeric IDs (these are just array indexes), but only one in the current room is affected at a time.
Does that mean that you affect all with the same numeric ID if you change it in a dialogue? (If dialogues take place "outside" all rooms, that is?)

It does not matter which script this is in, the only room which is affected is the current one at the time when the script is run.
#2704
Quote from: Pax Animo on Fri 19/08/2022 23:33:04
That's good to know, i can't remember where i read that all objects share the same ID globally throughout rooms. (or maybe i just misunderstood it at that time)

To clarify, they do share same numeric IDs (these are just array indexes), but only one in the current room is affected at a time.
#2705
The typical solution is to organize your game in steps, where you can clearly define what is required for reaching each step: story variables set, characters moved to rooms, inventory given or taken, and so on. Note that I am not speaking of any player action, like walking around, or reading the dialogs, but the logical changes in the game only.

After that you will have a list of all things necessary to change from step A to step B, and so on.

Then you will be able to write a function that advances the game from start to any given step, by iterating through these steps one by one, until it reaches the required one. To clarify again, it only changes the logical state, and does not really simulate walking etc.

To give some example:

0. Game starts.
Step 1. Player have talked to character A (set boolean variable), got items B, C and D, and unlocked the door (another boolean variable, since the door may be an object in the room, and may not be accessible from anywhere).
Step 2. Player have used and depleted item B, so it has to be removed now, but solved a puzzle (set a boolean variable).
and so forth
#2706
There's always a fixed persistent number of walkable areas in AGS, regardless of whether they are painted or not, so don't bother yourself with that.
#2707
Quote from: tservo on Thu 18/08/2022 21:55:34
Hello I am curious if anyone else has a problem with 3.60 on android namely no mouse cursor or touch input working.Version 3.51 works perfect. Thanks wanted to make sure its not just me.  3.60beta 14 android 11.

Hello. I just tried latest android build (3.6.0 beta 14), and everything works fine. I have an old simple device with Android 5.1, if that matters.

Please tell, are you running games using the game launcher (aka "AGS Player") or compiling your own game apks for Android?
When you say "there's no cursor" do you mean there's actually no cursor image on screen right after you run the game?
Does this happen with particular games, or virtually any?
#2708
Quote from: skooperstooper on Thu 18/08/2022 23:32:30
I finally realized what I was doing wrong. I was zoomed out and the corner graphics were so small I literally couldn't see them. My gui looked like a solid block with no border and the faint outline didn't give it away.

I kept clicking around in it trying to get the borders to come up but I never clicked on the actual window edges themselves. I thought I was crazy until you confirmed that's how you do it! (laugh) What I didn't know was for 2, that I can assign my own gui to the dialog box as well. I thought that might be its own thing for the Sierra template. Thanks!

You do not have to click on them, you may select them for editing in the list on top of the properties panel. Same for GUI, rooms etc, there's a list of all the objects of the current editor / mode.
#2709
Quote from: Indra Anagram on Wed 17/08/2022 16:24:48
The piece of code in question starts in line 105. Although I put it inside function repeatedly_execute like you said, Shift is not assigned to sword swinging whatsoever.

Have you tried another key that worked before? If it does not work too, then this means that the code itself is not doing what is intended.

The best way to test if certain condition works (like, key press in this case) is to place a Display command under it. Like

Code: ags

  if (IsKeyPressed(403))
  {
      Display("hello");
  }


If the message does not appear, that will mean that the key code does not work. If the message appears, that will mean that the animation logic is not correct.


EDIT: following code works if I insert it into 2.72 version of the game, in repeatedly_execute:
Code: ags

if (IsKeyPressed(403)==1) {PlaySound(6);anim(EGO,0);} //sword!
#2710
If you were using custom dialog options rendering, they have their own "rep-exec" callback (called "dialog_options_repexec"), and theoretically you could check for the timer there, set a special ActiveOptionID and call DialogOptionsRenderingInfo.RunActiveOption();

https://adventuregamestudio.github.io/ags-manual/CustomDialogOptions.html
https://adventuregamestudio.github.io/ags-manual/DialogOptionsRenderingInfo.html

If you really have to use rep-exec-always for timer test, then perhaps you could instead set a global variable in there, and test for that variable inside dialog_options_repexec.
#2711
Advanced Technical Forum / Re: Virus Alert
Tue 16/08/2022 17:29:53
Quote from: Leisure Suit Harry on Tue 16/08/2022 17:26:26
So, sorry if this may sound like a stupid question, but what do you mean by "engine exe" and where do I find it?

Engine exe is acwin.exe, located in the editor's installation folder.
#2712
Quote from: Indra Anagram on Tue 16/08/2022 16:22:39
Also I wanted the key button for the sword be left Shift, not D. I tried to insert IsKeyPressed(eKeyModShiftLeft) and IsKeyPressed(eKeyShiftLeft), but the Editor considers this as an error and doesn't identify eKeyModShiftLeft or eKeyShiftLeft at all  :~(

These constants were only added in 3.6.0. In previous versions you would have to use numbers for mod keys:
https://adventuregamestudio.github.io/ags-manual/Keycodes.html

Left shift is 403, and so on.
#2713
Advanced Technical Forum / Re: Virus Alert
Tue 16/08/2022 15:59:53
Quote from: Leisure Suit Harry on Tue 16/08/2022 15:54:36
Thanks, that's what I did for my previous project. But I'm not convinced they whitelisted it, and I can't find those reporting options anymore resp. they limited the file size to 10MB (the game has 18)...

That is another problem with data attached to exe btw, every game exe is overall different (and may be huge), although the original engine exe is the same, and something about 2-3 MB.

Quote from: Leisure Suit Harry on Tue 16/08/2022 15:56:15
Thanks, that sounds promising. I did make my game with AGS 3.4.1 though. Is 3.5.1 100% compatible?

It should be, although I always recommend doing a backup before upgrade. Also, if some script commands don't work, you may need to adjust compatibility options in the General Settings (like set "Script compatibility level" to 3.4.1).

Also, it is possible to gather a game distribution by hand, combining game.ags file from Compiled/Data and the bare engine exe. Except you'll also have to rename the engine exe to your game's title, and change the file's icon with some tool, if you want one...
#2714
I decided to rename this plugin from "Sprite3D" to "SpriteVideo", that in my opinion better reflects what it does and is meant for.
All the script commands stay the same, of course, but if you used this plugin before in your game, you only need to disable old plugin with old name, and activate new plugin with the new name.

Also, updated to v0.9.3 with some minor fixes.

For Windows: https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.3/win_ags_spritevideo.zip
For Linux (debian-based): https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.3/libags_spritevideo.tar.xz

I think the plugin is fully working and ready to be released as a complete version 1.0, but I would like to hear from someone who used this in real games, especially with OpenGL renderer and on Linux.
#2715
Advanced Technical Forum / Re: Virus Alert
Tue 16/08/2022 11:25:30
AGS has been known for false virus alerts for years. I had a guess that the reason is that it appends game data to exe file. This means that it constantly opens exe file for reading. Antiviruses probably don't like it. Sometimes they may slow it down, because each time it reads some game data, AV would halt it for another check.

If that's the case, then the solution would be to not attach game data to the engine exe, and instead distribute game as a separate engine exe (renamed to game's title) and *.ags file with game data in it. Such option was added since 3.5.1 and called "Attach game data to exe (Windows only)", and located in General Settings -> Compiler section. Perhaps you could try this and see if these alerts go away.

PS. I also wonder why did not i make it default to not attach since 3.5.1. Probably no one noticed that this option even exists.
#2716
Quote from: Indra Anagram on Tue 16/08/2022 08:11:15
However I reassigned key value for the sword from 68 (D) to 16 (Shift), and this doesn't work. Probably, the thing is in the animation or the code section above that deals with cutting. I am not that skilled to figure out the reason on my own.

How do I make sword swinging work when Shift is pressed?

Before 3.6.0 and the "new key handling" mode the modifier keys did not work in on_key_press. The only way to test them was IsKeyPressed when used in repeatedly_execute* kind of functions.

Related articles in the manual:
https://adventuregamestudio.github.io/ags-manual/Globalfunctions_Event.html#on_key_press
https://adventuregamestudio.github.io/ags-manual/RepExec.html
#2717
Quote from: Indra Anagram on Mon 15/08/2022 20:18:27
Crimson Wizard, you mean Platformerius could have worked fine disregarding the lang on if the sword and throwing stars had different keys assigned? Say, Ctrl for the sword or Space for the stars? Do I understand what you're saying correctly?

That is correct. You may notice that arrow keys still work in game regardless of the system language.
#2718
Quote from: Indra Anagram on Mon 15/08/2022 20:02:41
I remember Sierra style template had keyboard controls too, but those worked whatever the language was on. How was this solved there? As far as I can tell, that template was created with the older Editor version, wasn't it?

Does not it use arrow keys? The system language only affects letter keys.
#2719
Quote from: Indra Anagram on Mon 15/08/2022 17:32:39
So there is no way 2.72 and 3.x.x could solve this?

3.6.0 can, any previous version most likely cannot.

Quote from: Indra Anagram on Mon 15/08/2022 17:32:39
Quote from: Crimson Wizard on Mon 15/08/2022 12:16:02
EDIT: oh, I see now, this works correctly only if "Use old-style keyboard handling" is off in the game settings; this is default in 3.6.0. If you switch it on (use old mode), then it stops working correctly again.

Are you talking about 3.5.1 or 3.6.0?

3.6.0, this is where this change was implemented.

Quote from: Indra Anagram on Mon 15/08/2022 17:32:39
I tried to load the game to 3.5.1 Editor, and an error window emerged:

What does this mean?

You have "Direct3D" driver set in Default Setup. Change it to "Software".

Although, you should not be getting this error anymore, because it's lying, Direct3D can run 256-color games, it just cannot do all the palette effects.
#2720
Updated to Beta 14
(use download links in the first post)

Editor:
- Fixed importing SCI fonts.

Script API:
- Extended Screen.ScreenToRoomPoint() with an optional "restrictToViewport" argument, which lets to choose whether tests over empty place result in conversion through the default viewport or a null pointer.
NOTE: this by default helps to prevent null pointer errors if the player clicks outside of the room view.

Engine:
- Fixed ShakeScreen does not work with Software renderer.
- Fixed audio may fail to initialize, if game's config has one driver set, while SDL_AUDIODRIVER enviroment variable has another.
- Fixed MP3 clips do not stop at the end (nor rewind), and continue to play next MP3 files found in a audio.vox.
- Fixed loading pre-2.55 games (2.50 - 2.54 to be precise, as the current engine still cannot load anything earlier than 2.5).
- Fixed on_key_press callback causing errors in some very old games (probably pre-2.60).
- Fixed restoring legacy savegame format.

Compatibility:
- Support Label.TextAlignment with legacy alignment constants for pre-3.5.0 games made with the custom engine from "Clifftop Games".
- Support native resolution hack for games made with "Clifftop Games" custom engine, where 640x400 games are run as 640x360.
SMF spam blocked by CleanTalk