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 - Gal Shemesh

#41
Hi everyone,

I tried searching for the keywords 'collapse project tree folders' but it didn't give any results. So posting this new thread in a question. If it was already asked or reported somewhere else then kindly direct me to the appropriate thread. Thanks in advanced! :)

It appears that the project tree has a behavior of auto-collapsing of folders while dragging assets around, which makes it quite difficult organizing things in the project tree panel.

If we create folders in the VIEWS or AUDIO sections, and then want to drag assets between folders in given section, all the expanded sub-folders of the same section, apart from the one that the asset is dragged into, get collapsed. Obligating you to re-expand the folder you were working in to keep dragging assets from it.

I mainly find it difficult when working with AUDIO assets, which I tend to change and wish to update them in the different AUDIO folders. Since there's no way of replacing or deleting multiple audio assets, it is needed to delete them one-by-one, which also collapes all the others folder but the one you delete the audio asset from. And if you organize your audio in a 'scene' manner and have many sub-folders this makes things even worse, as you need to re-dig into the bottom most one to reach the assets that you wish to delete for re-importing...

Is there something that can be done to bypass this?

I like the way that the new audio system in AGS works, especially the audio types which you can set with different properties and control individually. Though, I wish that I could manage my audio assets externally and not need to import them into AGS - I know that a huge amount of work has been invested into making the new audio system, and so I'm not saying this in a non-appreciated way.

Personally, I find that whatever assets that you can organize outside of the AGS editor is easier to manage. Because, if for example I modify an audio file or replace it altogether, the change automatically reflects in AGS, and there's no need to import anything into the editor and to manage the audio assets in both the local folder and the editor. Which makes organizing things easier in my opinion.

I'm just thinking aloud here. I really don't know what it involves to change such things in the editor. So I just bring this up, and would like to know how you guys work or prefer to work with your audio files - do you still use the old fashioned way of numbering your audio files in external folders on your computer and set AGS to play them, or do you use the new audio system and import your audio assets into AGS?
#42
Quote from: Crimson Wizard on Wed 23/08/2023 14:45:06Although, in theory, you might script displaying 2 lines of same text with 2 fonts one above another.
Hey, that's a great idea! Can you assist me to adding this to my custom 'say' function? Here's my code:
Code: ags
void sayNew(this Character*, int cue, String text)
{
  String cueString = String.Format("&%d", cue);
  {
    if (Speech.VoiceMode == eSpeechVoiceAndText && IsSpeechVoxAvailable())
    {
      AudioChannel* ch = Game.PlayVoiceClip(this, cue);
      this.SayAt(Game.Camera.Width /2, Game.Camera.Height + 15, -1, text);
      if (ch != null)
      {
        ch.Stop();
      }
    }
    else if (Speech.VoiceMode == eSpeechVoiceOnly && IsSpeechVoxAvailable())
    {
      this.Say(cueString);
    }      
    else if (Speech.VoiceMode == eSpeechTextOnly)
    {
      this.SayAt(Game.Camera.Width /2, Game.Camera.Height + 15, -1, text);
    }
  }
}
#43
Hi everyone,

I searched in the forum but didn't find anyone asking about this.

I'm using WFN fonts; 'Font 1' is the actual font where 'Font 2' is its outline. The thing is, the font is quite narrow, and so an outline around the letters kind of "close" upon the font, making it look even narrower... So I checked the Font 2 properties and saw that there's a VerticalOffset property, which works great for offsetting the font vertically. Though, I also wish to offset it horizontally, but there's no built-in option for that...

So, is there a simple script way to setting this up? (and if there's an option to make the outline font a little transparent that would be even better!)

*I know that I can edit the outline font, letter by letter, and to position each in a way that it will look in an offset, but that too much work and it won't give the freedom to dynamically change the angle of the outline font if I ever want to simple tune it.

Thanks
#44
Yes, correct - backwards; the Hebrew text in text boxes is showing from Left to Right instead of from Right to Left, even if the entire game is set to show text from Right to Left. And when I wrote 'same as with the labels' I meant the text of buttons - not the actual label element which shows correctly.

But it's okay, since in the 3.6.1 beta as far as I checked everything in this area is fixed. :)

#45
You suggested me in your first reply of this thread to also check how ListBoxes and TextBoxes are working in RTL. I only came to checking this today and wanted to update with feedback.

AGS 3.6.0 - When the game runs in RTL mode, same as with buttons labels that remain showing from LTR, the ListBoxes / TextBoxes also showing from LTR. So Hebrew must be written backwards in the editor in order to show it correctly in runtime.

I've just checked it in the AGS Editor .NET (Build 3.6.1.4) ** BETA VERSION ** v3.6.1 from July 2023 and it appears to be solved - Hebrew in ListBoxes / TextBoxes is showing correctly from RTL. So I expect it to be okay in the next stable release.
#46
Quote from: Crimson Wizard on Tue 20/06/2023 16:13:08I noticed this recently when investigating how RTL works in AGS. This is the original behavior, and I have no explanation to this. Could be an oversight of the AGS creator, or some hidden intent which meaning was lost in time.

I would also test other things, such as ListBox and TextBox.

This could be fixed in the upcoming version 3.6.1, or a patch to 3.6.0.
Only came to checking this now in the current game of a friend which I finished migrating to 3.6.0. The text boxes are also showing the Hebrew text backwards. I just checked saving in Hebrew and realized that writing in the text box is backward... I guess it's the same as with the labels.
#47
EDIT:
Quote from: Khris on Tue 22/08/2023 11:48:21Can you be more specific about the gap? Why can't you temporarily use a view without the gap? Or remove it altogether?
I didn't want to begin modifying too much in the game's code, especially in the sprirtes, as it's not a game of mine but a friend's and has a very old code, and any change I may make could make something to behave unintendedly somewhere else in the game, such as 'jumpy' animations because some sprites may have a gap while ones that I may had fixed won't.

Thanks for the info, CW.
On the internal timer topic of the SayBackground overlay - how does it work? I mean, I tried using it in another place in the game to make a character speak in the background, writing his cues line by line and expected that there will be an automatic timer that removes each message after a period of time, but all I got was only the last message in the sequence showing up...
#48
Hi everyone,

Is there a way to show the Character.SayBackground function at a specific X and Y position?

I have a sound clip of a few characters saying something together, and I use Character.SayBackground in order to present the said text above each of the characters' heads, which works great. However, one of the characters has a huge gap of transparent area in his graphics (not something that I can change now as it will affect the entire game). So I just wish to show his text in a non blocking way a little lower, in relation to his y position.

Thanks
#49
Thanks @morganw. I've just finished editing my latest reply and you were ahead of me replying to its previous version with the GIF animation which I removed - I've confessed above with my embarrased mistake. :)
#50
Hi @morganw. Appreciate your reply. Thanks for the heads up regarding the closing double-quotes - I probably removed them by mistake while editing the example. I just fixed it above. :)

I'm quite embarrased and must confess here:
This thing had 'drove me mad' of why it worked in AGS 2.72 and why it doesn't after the migration to the recent release, that I just had to went through the entire thing bit-by-bit in both editor versions, side by side. Finally, I saw the embarrased mistake of mine, and I wish to mention it here so if anyone else encounters something similar during a migration / translation process, they can learn from my mistake:

The old code actually HAS(!) a closing curly braket, but it was at the END of a line of the latest action that executes in scenario 1.
I did not play the entire game after the migration to check that each and every function in the game works, and directly went to replacing the string lines with the translation text - that must be where the closing curly bracket was deleted unintentionally. But it did not make any error when compiling as the engine then saw this interaction function as an 'if within an if' logic.

This thread wasn't for vain after all, as it what brought me to dig much deeper into this to understand where I was wrong. Hope it will also help other translators when changing lines in codes. Thanks everyone!!
#51
Much appreciated @Crimson Wizard. Thanks for the clear explanation! After posting I actually encountered both scenarios as you mentioned and it took me a while to realized the difference between the two - but nevertheless, your explanation is much more simpler and clearer to understand. So thanks! :)

I cleaned the code from too many actions to make it simpler to post here. It's a room script:
Code: ags
int AirConditionerFix; // for checking if AirConditioner is fixed

function room_FirstLoad()
{
  AirConditionerFix=0;
}

function hAirConditioner() // interact with the air conditioner hotspot
{
  if (AirConditionerFix==1)
  {
    Display("Scenario 1"); // <-- note that there's no closing curly bracket here.
  if (AirConditionerFix==0)
  {
    Display("Scenario 2");
  }
}

What happens is, in AGS 2.72 you can click on the air conditioner hotspot where the AirConditionerFix variable equals 0, and scenario 2 runs without any problem, even though it sits within the first 'if' statement.

However, in AGS 3.6.0, the code doesn't work at all - which makes sense as the AirConditionerFix variable equals to 0 when you first enter the room, and this second 'if' statement condition that checks for it will never run in the above code, as the first 'if' statement will be true only if the AirConditionerFix variable is equal to 1.

Only after putting a closing curly bracket at the end of the first 'if' statement and removing one from the end of the hAirConditioner function that it works in AGS 3.6.0.

So that what I'm trying to understand for over a day now. At this point I can only assume that the old engine version scripts were more forgiving.
#52
Hi everyone,

During my current project upgrading a friend's game from AGS 2.72 to AGS 3.6.0, I've noticed that some functions doesn't work. Digging in the code I've noticed that is seems like back in AGS 2.72 there was no need for 'else if' statements, and that you could just write your bare 'if' statements one after the other, and the engine checked them from top to bottom, skipping what's 'False' and continuing to the next check.

That behavior is not working in AGS 3.6.0, and if you have more than 1 'if' statement in a given function, only the first one is checked while the second one and beyond below it is ignored, as it should be 'else if' and not just 'if'. Problem is, during the migration process the scripts didn't update all the 'if' statements that should be 'else if'...

Should it had? Or that we need to manually set every 'if' statement that comes after the first one in a given function 'else if' in all of the functions?

Thanks
#53
I know that this thread is quite old, but I don't want to make another one on the same topic.

You've mentioned that this can be done using the AGS Theora Plugin. I've read the 'PlayVideo' section in the manual, however I didn't find any info about playing a video with non-blocking; I set an OGV video to run, and as you tried, I'm willing to have the speech text showing on-top of it. Did you managed to achieve this?

Would appreciate if you could cast some light on this matter to me. :)

Thanks
#54
Thanks! I thought there may be issues with newer functions because of the script compatibilities that the game needs in order to run. The great part is - I've just managed to fix all issues when running the game in the Latest Script API version! 8-) There were several places where certain strings were used for variables, which are now reserved for the engine's built-in functions - so I changed them, for example 'Screen' to 'screen', etc. I only left the Script compatibility level setting as 3.2.1, because the game still needs to run old scripts.

Now I'm trying to make the a custom function to play the characters' speaking animation in a non-blocking form, and to have the long string of text to get broken apart, for showing sequentially, while the speech plays. I will appreciate help anyway if you have time. :) Thanks.
#55
Thanks for the info, @Snarky. :) Meanwhile I just position the long strings with the .SayAt and put them at the bottom center.

I would prefer to have the lines showing as a set of strings as you mentioned, but the thing is that I'll have to cut the audio files into separate pieces, right? If not, then I'm not sure how this will behave and how players could skip forward in the speech clip when skipping fractions of the text, if it's a single long audio file, that is. Maybe I'm not aware of such a feature in AGS and you can make this brighter to me? :)
#56
Hi everyone, hope you're all doing good. :)

I'm working on a friend's game from 16 years ago, which was developed in AGS 2.72. The game didn't had subtitles in it and I'm working with the creator to making subtitles to it.

The thing is, many audio files are very long, as there was no need back then to divide the speech to fractions for showing only a few lines on the screen at a time, because as I mention there was no subtitles meant to be in it. So over-head subtitles are not the best option here, as the text in most cases will cover the entrie screen.

So I'm thinking about making a custom speech function in a form of a text box, that will be located at the bottom center part of the screen, and that the text will automatically scroll up within it. The text should also 'feathered' from the bottom and top edges of the text box - very similar to how speech is shown in many RPG games like Diablo. But the text color should still be based on the speech text color that is set for each character.

Attached a screenshot of what I mean:



I would like to know what would be the best way to achieving such custom speech function. But I must mention that due to the age of the source code, I had to tune some compatibility properties in the General Settings, or else the game gives a lot of errors.

These are the backward compatibility settings:
- Allow relative asset resolution: True
- Enable mouse wheel support: False
- Enforce new-style audio scripting: False
- Enfore new-style strings: False
- Left-to-right operator precedence: True
- Script API version: 3.2.1
- Script compatibility level: 3.2.1
- Use low resolution co-ordinartes in script: True
- Use old-style custom dialog options API: True
- Use old-style keyboard handling: True

Many thanks! :)
#57
Hi everyone,

I'm helping a friend to migrate his game from AGS 2.72 to the recent official 3.6.0 release. I've managed to overcome many issues while migrating from one version to the other, until I'm finally able to run the game in the recent release.

The main tedious problem I found so far was that I had to re-write the names of all of the rooms, as they were in Hebrew and in the recent version of the editor they appeared as gibberish. And just copying the original Hebrew text from the old editor and pasting it in the new remained in gibbrish. So that's done now. But I'm still facing issues displaying the Hebrew game name correctly.

Currently, the game name in the title bar and in the Setup window, which was originally showing correctly in Hebrew, appears in gibberish. In addition, I've just found that even the 'Save games folder name' under 'C:\Users\%username%\Saved Games' doesn't show correclty but as 'dashes' ( ________ ), instead of a Hebrew name.

I've went through the General Settings and found that the game was originally set to text format: ASCII / ANSI. However, I find that it uses TTF fonts in the game folder (as the agsfnt0.ttf and agsfnt1.ttf files are present there).

I found that the only place that uses these fonts within the game is the save/load GUI. If I run the game as it is, the GUI shows in Hebrew correctly. But as I mentioned, the game title at the top bar of the AGS window shows in gibberish. However, if I change from ASCII / ANSI to Unicode (UTF-8), the game title shows correctly (while the title of the Setup window still remains in gibberish), but then the save/load GUI now shows in gibberish...

So far I've changed the game to show its text in Unicode (UTF-8) and overcame many of the issues in the scripts - which in include Hebrew strings in them, and most of the game is now showing correctly, apart from the title matter which probably also affects the name of the games save folder.

Would appreciate any assistance.

Thanks
#58
Quote from: Khris on Sat 12/08/2023 13:34:26Sure, but Gal explains in the first post why this is cumbersome because his views have so many frames. That's why he wants to do it via script.
Exactly. You were ahead of me relating to this as I was composing a reply to @Nahuel. :)

Speaking on the View editor for setting audio in frames, I also posted another feature request today regarding it here, as currently when seeking for a specific frame in the view editor preview, you have to manually seek for this frame either in the row of frames or within the dropdown list of frames in the properties panel, which both perform quite slow when you have great amount of frames.
#59
Thanks @Khris! Yet another one of your custom function. This one looks even more complicated for me to understand than the others, so I'm going to go over it and try to understand how it works line by line now. Thanks a lot! :)
#60
Oh, of course! I'm using @Khris's help with custom speech function which use the audio channel method, and wondered why I can't just use the '!= null' here as well. Thanks for the heads up!

I know that the new audio system has been discussed many times in many places around the forum - I spent HOURS last night reading many threads about it. It is still a mystery to me to understand. But only now note that people use different names when using this method: some use 'channel', some simply use 'ch', and you here used 'audio_channel'. So it maybe becomes more clear to me now - can this name be 'anything' we like, so theoretically I can decide in which "channel" name to use for specific audio elements?
SMF spam blocked by CleanTalk