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

#101
Thanks @Snarky for the prompt reply. I really don't want to relay on 256 color palette game, nor to have every background in my game twice as it won't be pratical since even if I would go in that route, this will only be for the background while I'll still need to turn each and every object and character in the room to greyscale as well.

I thought that there might be a plugin for doing such thing, but alas I don't find any - this may be off-topic but how do plugins are written for AGS anyway? Maybe I could ask a programmer friend to write such plugin so everyone could enjoy.
#102
Hi everyone,

Tried to look for this in the forum but can't seem to find that anyone has asked about it.

I would like to know if there's an opition in AGS to take the current state of a given room (meaning the exact frame of everything in it), and to make it gradually turn into a grayscale form of itself - like a cross-fade between 2 rooms?

I was thinking about 2 scenarios of using this:

1. When the player takes a close-up look on an inventory item, and then everything but the close-up item turns into a greyscale color, and so the player can be focued only on the colored image of the item; there's this "The Riddle of Master Lu" game that I really like which behaves like this when using/looking on inventory items. Here's a direct link for a specific time in a YouTube walkthrough video showing what I mean.

2. A colored credits rollup, showing on a froze frame of a room.

For the second scenario - I could just take a screenshot of the frame that I want in a given room and make a whole new room from it. And then to have a cross-fade between the rooms and have my colored credits rollup showing on top of it. But that's not an ideal way to achieveing this, as it will be only for that specific frame screenshot that I took. And if I decide to make some changes to the room I'll have to re-create that screenshot. And for the first scenario that will not work as I want this to happen dynamically in every place and state that the player is in.

Thanks
#103
Quote from: Khris on Fri 21/07/2023 07:14:45330 pages! Wow :-D

unhandled_event is a built in function. If it exists, AGS calls it whenever an event runs that doesn't have a handler function associated with it. It's closely related to the multi-cursor Sierra GUI and according event functions, so if your game uses the BASS or Tumbleweed template for instance, you're not going to really use it anyway.
Or rather, you should probably implement your own way of handling unhandled events.

Moving stuff into custom functions is a good idea in general, not only makes it your scripts more readable and organized but you can easily change global aspects, indeed.

Thanks so much for the detailed explanation, @Khris! Much appreciated. :)

As for my reference book - yeah, I called it AGS from scratch (the name may change) and it became long and detailed with information; I started from a complete empty project, as I wanted to learn my way with the engine from a complete scratch, and up to re-creating the base Sierra-style template game that comes with it. Then I began improving it and cover many aspects, such as making a plot, adding speech, building some puzzles, and also side features like the translation of a game to another language. By how it turned out, I really look forward to making a video tutorial course series on YouTube. Will update on the forum if and when it will be done. :)
#104
Thanks guys! As I progress in learning AGS (and writing some sort of a reference 'book' to myself that as of this moment has reached the 330 pages!), I always encounter with new problems and new creative solutions to solving them - I'm not a programmer so I don't immediately get many of the technical things, but I'm trying my best with the manual and the forum here, and only when I really don't find what I'm looking for I make a new thread and ask. I much appreciate your assistance! Thanks again. :)

@Khris, this is exactly what I'm after - to make my script right so I won't have to come back and change plenty of lines of code if I want to make a global change to something; I'm still trying to understand the suggested method that you mentioned, as I'm having some difficulties to understand this unhandled_event thing. But in general, I understand your point of using a function and then call for it, rather than writing the actual code many times in many places, and then having to tune it everywhere if you want to change something - I'm learning a lot from the Narrate function that you assisted me with. :)
#105
Hi everyone,

Is there way that global strings of generic messages, such as "That doesn't work" which is commonly used in else statements when using items on random things, could be included in the translation file?

I made some global strings in a game I'm working on so I'll only have to write them once, and then I call for them from any scenario that I like, preventing any duplications of the same line in the translation file. Though, I found that they don't get included when the translation file is generated...

If not, where would you put your generic messages in a way that they will be included in the translation file?

I've read here and found that I can just create a new script in the Scripts tree and that as long as the script will be above the other scripts, that I could call for things in it from the entire project. However, when I try to declare a string variable name and set it to store the actua text string that I wish to show to the screen, I get the error that type 'string' is no longer supported; use String instead. But when I try String with capital 'S', I get the error "cannot assign initial value to global pointer", so I'm not sure what I'm doing wrong.

Would appreciate some help.

Thanks
#106
Hi everyone,

Using AGS Editor .NET (Build 3.6.0.50)
v3.6.0, July 2023

Just wanted to report that if I open a few tabs in the editor, then go to a previous tab that was opened, change stuff and save my project (CTRL+S), the editor jumps to the most recent tab that was opened. Quite abnormal when saving your project regulary during each change you make and want to keep working on the same tab.

Thanks
#107
Awesome! Thanks @Crimson Wizard! You were one step ahead of me before I asked a further question - I just tried to make my function to start with the false state, and encountered with the problem that the return command which I had to put into the statement's brackets didn't work. Now with return RUN_DIALOG_RETURN; I can actually use it within the brackets. Though, I see that there is no parallel token for the goto-dialog command, so I have to use "dDialog2.start()" instead.

Anyway, I think that when using the unique dialogue script commands that it's all a matter of where you locate your statements in the code - sometimes it makes more sense to write them from end to start, and sometimes it's the other way around.
#108
Thanks @Matti!

I moved the "return" command after the last closing curly brackets and it works. But it doesn't work for "goto-dialog" which comes before it, so I need to use "dDialog2.start()" instead.

A little confusing - I thought that these commands need to come inside the curly brackets as they're part of the statements.

Anyway, thanks again! :)
#109
Thanks, @Khris! Not sure what I'm doing wrong. I still can't make it to work. Here's my code. It still gives me the error: Script commands can only be used in the area between a entry point and the closing return/stop statement

Code: ags
// Dialog script file
@S  // Dialog startup entry point
  if (wasTalkedWith_cJosh)
  {
Ego: Hello again.
  cJosh.Loop = 1;
  Wait(20);
Josh: Oh, hi Roger.
goto-dialog dDialog2
  }
  else
  {
Ego: Hi!
  cJosh.Loop = 1;
  Wait(40);
Josh: Hello.
return
  }

@1
  Wait(20);
Josh: Hi Roger! Name's Josh. Nice to meet you.
  wasTalkedWith_cJosh = true;
goto-dialog dDialog2

@2
  Wait(20);
Josh: No worries.
  cJosh.Loop = 0;
stop
#110
Thanks @Matti! :)

Using the regular scripting in dialogues with indentation to make the players talk works great. Though, I found that the dialogue scripting commands work with if statements as well, so I put an if statement that checks if wasTalkedWith_Josh is false, which then greets the NPC for a first time greeting using Ego: "Hi!". And then I added an else statement to it, which then greets the NPC with an "already know each other" message.

The problem I found however is that when using the regular dialogues commands, such as return, goto-dialog, etc within the if statement, it gives an error as if these commands "break" the if statement before it ended. And so it gives this error:

Script commands can only be used in the area between a entry point and the closing return/stop statement.

Any way of using if statements along with the regular scripting commands to return to options or to jump to other dialogues, instead of starting a different dialogue manually the traditional way with indentation?
#111
Hi everyone,

Been reading about dialogues in AGS in a few places, but can't find information on this topic:

I would like to have my characters greet each other for the first time they talk, but on their second talk and on I wish their greetings (whatever I write within the @S of the first dialogue) to change, as they already know each other.

What would be the correct way to doing this? I'm thinking about making a bool of 'wasTalkedWith' for each NPC, which will launch the first dialogue when the players talk with other characters, and then to turn it to true. Then, any further talk to the other NPC will launch a different greeting dialogue with an 'already know each other' greetings.

Is this the right way to doing this? Or perhaps there's a simpler way to change the @S greetings of a given dialogue?

Thanks
#112
Thanks for the checking. I'm really not sure what's going on - I can swear it didn't work before in more than one project that I tested, but from unknown and awkward reason when I test the game now from the zip file that I shared, the replaced speech file is played correctly. I hope it will remain that way and that we didn't both encounter a temporary scenario that it actually works.

Thanks again for looking into this! So the only issue remains is the isSpeechVoxAvailable matter that keeps returning 1 when the game is begin test from the editor, even when there are no speech files in the Speech folder.
#113
Yep, if I rebuild all files then the new file that was replaced plays without any problem when running the game from the editor. Same as if I delete the Speech.vox file altogether from the Compiled folder.

Attached the new test game that I made if it helps - link

I've included in it a "_RESOURCES" folder with 3 speech files that I originally made for the Narrator in my version of the template. The first file is already in the Speech folder. I removed all the pre-compiled files so you could test it from scratch.

* There's also the Enter hotkey in it for the return value of the isSpeechVoxAvailable matter for your convenience. :)

If there's anything else you wish me to test from my side kindly let me know.
#114
Found the problem. It's quite confusing and hard to spot but I got it - it's not when adding new sound files, which work fine without recompiling. It is when you modify or replace the sound files that were already compiled, if for example you want to re-record a certain file or replace what is said in it while keeping the origianl file numbers.

Steps to reproduce:
1. Create a new game with the Sierra-style template.
2. Put 1 audio file such as Ego1.wav in the Speech folder.
3. Go to the cEgo_Look function and change the "Display()" with player.Say("&1 Damn, I'm looking good!");
4. Rebuild all files.
5. Run the game with F5 and confirm that the Ego1 file is played.
6. Close the game and delete the Ego1.wav from the Speech folder.
7. Copy an different audio file to the Speech folder and rename it to Ego1 as well.
8. Run the game with F5 - the new replaced file won't be heard but the previous one that was originally compiled.
#115
Quote from: Crimson Wizard on Mon 10/07/2023 16:10:18@Gal Shemesh

I tried this in 3.6.0, and it works as expected: if I add new files to Speech folder, or replace existing ones, without rebuilding speech.vox, then run the game from the Editor, then the files from the Speech folder are used.

Please tell in detail, how did you test this case in your game?

Yes, that works for me too - the actual problem is this:

Rename your Speech folder to SpeechOld or something, and make a hotkey to see what isSpeedhVoxAvailable() returns to you - run the game from within the editor and it will return the value 1 instead of 0, even if there are no speech files available, which is incorrect. If you re-build all files and check this by running the game (that doesn't have any speech files in it) from the EXE, the hotkey will return to you the value 0, which is what it should have done by running the game from the editor. That's one problem.

The second problem is if you compile all files and then add or change an existing speech file in the Speech folder, when testing the game by hitting F5 from the editor, it won't reflect in the game unless you delete the Speech.VOX file from the Compiled folder.
#116
Thanks guys for the input! Much appreciated.

I'm glad that at least I know by now how to troubleshoot this if this is a bug - I checked both scenarios when running my game from the EXE file, based on different conditions that I set when the speech VOX file exists and when it is not, so I'm not worried:

I set in the game_start() function a condition to check if the IsSpeechVoxAvailable is false. If so, it changes the default Voice & Text mode and button to Text Only. I also added an else if statement for displaying a text message to the players about the missing sound pack, if they were to click on the Voice button in the settings panel.

And so, if IsSpeechVoxAvailable is true, the game starts in the default Voice & Text mode and players could cycle through the different voice modes using the Voice button.

Now I'm back testing my game from the editor, and just make sure that there is no speech VOX file in the Compiled folder until if and when this is fixed, so when I add / change sound files in the Speech folder I don't have to recompile everything every time.

Again, thanks for looking into this! This is not taken for granted and I much appreciate you participation and help.  :)
#117
Yes, that would be great if it could behave that way.

I just checked whether the IsSpeechVoxAvailable() returns 0 when running the game from the EXE file and it actually does. Though I never thought there is a difference which is why I always relayed on running the game with F5 from within the editor.

Another thing I just noted in case the above thing gets fixed/added - if I compile all files once and a VOX file was created in the Compiled folder, when running the game from the editor it ignores the Speech folder completely and relays on the Speech.VOX file in the Compiled folder.

The same thing goes when adding more files to the Speech folder - if a Speech.VOX file was already compiled and I add new speech files to the Speech folder (or replace an existing file name with an alternate version) they don't play in the game until I re-compile all files. If I want the editor to relay on the actual Speech folder, I have to manually go into the Compiled\Windows folder and to delete the Speech.VOX file; I also manually delete the Speech.VOX file from the Compiled\Data folder to be on the safe side that it doesn't get use when testing the game.

I think that as long as the game is in development, testing the game from the editor should not relay and use the compiled VOX files, but rather relay on the presence of the source raw files in the game's folders.

Thanks for looking into this!
#118
AGS Editor .NET (Build 3.6.0.50)
v3.6.0, July 2023
#120
Nope. I have manually removed these files to be on the safe side from both the Data and Windows folders within the Compile directory. If I either run the game for a quick test from the editor or select to build all files where there is no speech files in the Speech folder, no VOX files get created, yet IsSpeechVoxAvailable remains to be equal to 1.

If I add a speech file and hit F5 for a quick test, the speech file plays in the game, though no VOX file gets created in the folders unless I selected to build all files - not sure if that's the correct behavior...
SMF spam blocked by CleanTalk