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

#1
Note: Running version 3.5.0.25 (July 2020).
#2
Same issue here!

I have a GUI that uses buttons to display a sort of "checklist" when the player succeeds at things. The buttons have an initial graphic that is just a transparent bar, and when the player succeeds at something, that action includes a little snippet to change the button's graphic to show it as done, like so:

Code: ags
    if (cCharacter.ActiveInventory == iKey)
    {  bBlessing.NormalGraphic = 411;  }


Where 411 is the sprite number of the correct new graphic. This works just fine! The weird part comes in when the game is saved and then restored from a saved game. Suddenly, the buttons have reverted to their previous transparent appearance... or so it seems. Actually, when they're moused over, the correct graphic populates, which makes it seem like something is preventing the saved game from remembering the button's new graphic until it is somehow interacted with. (For the record, these buttons aren't clickable - they don't do anything but display the graphic.)

What am I missing here? Is it something about changing the button's NormalGraphic property vs. something else I should be using instead?
#3
Quote from: eri0oCan you tell which AGS version are you using exactly? It's usually in the about menu and has the format of something like 3.5.0.XX

3.5.0.25 (July 2020)!

Quote from: Crimson WizardSimilar question was asked several hours ago: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58881.0

If you have same problem it's best to merge discussions in one thread.

WELP, that's what I get for doing all my forum and manual searching yesterday and only posting the thread today. It does look like the same problem. Information added over there to that thread!
#4
Okay, so I have a GUI that uses buttons to display a sort of "checklist" when the player succeeds at things. The buttons have an initial graphic that is just a transparent bar, and when the player succeeds at something, that action includes a little snippet to change the button's graphic to show it as done, like so:

Code: ags
if (cCharacter.ActiveInventory == iKey)
{  bBlessing.NormalGraphic = 411;  }


Where 411 is the sprite number of the correct new graphic. This works just fine! The weird part comes in when the game is saved and then restored from a saved game. Suddenly, the buttons have reverted to their previous transparent appearance... or so it seems. Actually, when they're moused over, the correct graphic populates, which makes it seem like something is preventing the saved game from remembering the button's new graphic until it is somehow interacted with. (For the record, these buttons aren't clickable - they don't do anything but display the graphic.)

What am I missing here? Is it something about changing the button's NormalGraphic property vs. something else I should be using instead?
#5
Correct, the room could open in the editor!

I've been messing with it some more and discovered that the issue seems to be more than one corrupted room (from what I can tell, it's rooms 43-48 at least, which are the most recent ones that I was working on over the past few days). Doing a quick Build > Rebuild All Files allowed me to see which file AGS was trying to compile when it shut itself down, which at the moment is room 47. Since I knew I'd been working on 48 & 49 recently, I tried opening them in the editor, only to get new errors: "Can't deserialize interaction scripts: too many events" for 48 and "Error: Read error decompressing image - file is corrupt" for 49.

At this point, I have to assume something is going on with the drive the game is saved on to have this many corrupted files, so I'm assuming I'll need to delete these rooms and restore them all from the backup I have.

Quote from: Crimson Wizard on Thu 16/04/2020 12:55:53I wonder, would you be able/willing to send me the 3.5.0 project files and the room's backup to try compiling the game under debugger and investigate what causes the crash/corruption?

Sure, if you'd like to take a look! I'm starting to think this is an issue with broken files on my end, but I can PM you a link. I have already replaced rooms 43-46 from backup, but room 47 is currently doing the no-error-message shutdown still when any attempt is made to run/compile.
#6
Well, here's another update...

Great news! I had a recent backup, so I copied the script, replaced the room's .crm and .asc files from the backup, then pasted the script in and saved. Double-checked that all objects etc. were present, and tried to run an F5 test again.

Less great news! I didn't get a crash report this time... the editor simply goes directly from "Please wait while your files are saved" to closing the editor completely, with no further action. A look at the game files shows that the .agf files are updating/saving, but no test window for the game opens and the editor itself closes down completely with no fanfare.

Obviously the last step here is just to completely delete the room (which is now fully editable/interactable again from the backup) and try again, but on the off chance something else is going on, anyone...?

EDIT: Completely deleting the room actually did not solve this issue; attempting to run the game still causes a no-error-message shutdown of the editor even with the offending room deleted and not replaced.
#7
Quote from: Crimson Wizard on Thu 16/04/2020 11:03:35The weird format number in the message usually indicates a file corruption.

Did this happen immediately after you moved to AGS 3.5.0, like first time you run compilation, or some time later?
Do you still have a backup from previous version (3.4.1)? If so, and you may open this room in AGS 3.4.1, then could you try copying it to AGS 3.5.0 project and see if it opens there?

Yes, it was immediate after moving to 3.5.0 - as soon as I tried to compile or F5 test, the error appeared.

Quote from: Khris on Thu 16/04/2020 08:31:02
If you can no longer open the room from the editor, the same will be true for the engine. The file got broken somehow; I'd copy the room script, then delete and recreate the room.

If that's going to be a pain, now's the time to start with regular backups ;)

It will be to redo all the hotspots etc... but let me be a lesson in the importance of separate backups! I may have one and if not, I just learned the hard way to make sure I do.

Thanks, everyone! :)
#8
UPDATE:

The room called out in the error message (43) is definitely the problem. I missed it the first time around because opening the script file works fine... but opening the actual room file causes the editor to crash.  :-[

I tried reimporting all sprites for that room (objects, mostly), but the crash persists. At this point, is there anything I'm missing, or is it possible that the room file itself is just corrupted or something? I can't open it, so I can't check on the background/masks etc.
#9
Hi, Slasher!

I gave it a shot with the following configurations:

QuoteScript API version: Latest version
Script compatibility level: 3.4.1
QuoteScript API version: Latest version
Script compatibility level: 3.4.0
QuoteScript API version: 3.4.1
Script compatibility level: 3.4.1

It was previously set to Latest version/Latest version.

Unfortunately, all these configs are giving me the exact same error.
#10
I've made a couple of games with AGS and it's always been pretty smooth sailing. However, this week I upgraded from 3.4.1 to 3.5...

I'm still able to edit/work with sprites, rooms, script files and so on. But when I try to compile the game, I get the following error:



QuoteAGS.Types.AGSEditorException: Unable to load the room file 'room43.crm'.
Format version not supported.
Required format version: 12079, supported 17 - 33.

Followed by a number of places where the error is thrown.

To my untrained eye, it looks like it's getting an incorrect number for the format "version", but I'm not sure how to go about correcting that. I've dug around in the manual and wiki as well as trolling the forums, but I wasn't able to find a solution.

Does anyone know what the issue is? I feel like it must be something simple looking me right in the face...
#11
Oh, lord, no wonder.  I must have missed that.  Thank you so much!
#12
c[CharScriptName]1, 2, 3, and so on.

In this case:



I've used the same naming convention from the manual for all of them - other characters' files are playing, just not this conversation with this one.
#13
Hey, there!  Like my last post, this also seems like one where the solution must be really simple... but I've scoured manual and forums and tried everything I can think of, and no dice.

I have a character (cPieCir) that has some lines of dialogue being called up with SayAt, like so:

Code: AGS
    cPieCir.SayAt(440, 300, 400, "&2 Well, well, well... what do we have here?");
    cCharacter.SayAt(440, 300, 400, "&354 Hi, I'm...");
    cPieCir.SayAt(440, 300, 400, "&3 Oh, we know who you are...");


But no matter what I do, he stubbornly refuses to actually play the speech file for his lines.  His dialogue box appears with his speech view portrait so the SayAt command is going through, and the cCharacter in the conversation with him says her lines normally, but he remains silent.  I have 29 speaking characters in the game, and they all seem to be talking just fine except for him!

I have already run through all of the following:

1) Checked to make sure the files for his lines were in the Speech folder in the correct game directory (they are);
2) Played them outside of AGS and also imported them into AGS as sound effects to play via a Play command to verify they're working (they are, no problems);
3) Tried converting them to other filetypes in case for some reason AGS didn't like them as MP3s (did not work; WAV and OGG also did not play, and all other characters are using MP3 fine);
4) Tried changing the character's scripting name from cPieCir to cCircus, renaming the files and testing the code that way in case there was some weird bug (no change);
5) Tried both speaking to other characters first and not in case one of them was somehow overriding the other (no change);
6) Confirmed that audio settings should allow unlimited sound effects (Music is set to 1 channel to accommodate background music; Sound and AmbientSound are both set to 0 [unlimited]);
7) Cried.

Does anyone have any suggestions about what I'm missing here?
#14
Thank you - I was meaning to simplify it but wanted to figure out what was going on before I messed with it too much more.  :)

Using your debugging code, I see that when the game starts, channel 1 (BGMusic) plays the first track (aIntroScreen)... but when moving to the next room, all channels show that nothing is playing, even though the next room's clip (aStreets) clearly is.  Which explains why it keeps restarting in every room, I guess, since it's apparently playing in the background somehow rather than on channel 1 (BGMusic) the way it's supposed to.  I tried taking an action that triggered a sound effect and was able to confirm that that appeared on channel 2 as expected.

This is with music channels set to a maximum of 1; out of curiosity, I tried setting it to 0 (no maximum) to see what difference that would make, which predictably resulted in the first clip continuing to play on channel 1.  The other tracks started playing simultaneously when entering other rooms, which is also expected since they'd just start in another channel... except that they also didn't show as playing on any of the audiochannels in the debugging GUI, which continued to just show channel 1 playing the first clip and all other channels as empty.

I think it's possible I may have borked something in the debugging GUI display itself since I'm not sure what this would mean otherwise, so I'm going to mess with it some more.  In the meantime, I have a workaround with a big ugly eEventEnterRoomBeforeFadein set of conditions to check which room the player is in and which room they came from, which will work if I don't figure out how to do it in a cleaner/simpler way.

Thanks for all your help, folks!  I'll come back if/when I figure it out to post for posterity.  :)
#15
Ah, so if I understand right, you need two channels to crossfade a track, but I can't have two channels with what I'm trying to do because then AGS will just play the second track on the second channel instead of crossfading them together on the same one?

Hmm, I didn't declare the channel because I had it as a global variable AudioChannel, which I thought would work as well!

I removed the global channel and replaced it by declaring it in the GlobalScript, like so:

Code: AGS
AudioChannel *BGMusic;

//Set SetBGM Background Music behavior
void SetBGM(AudioClip *music) 
  {
    if (BGMusic == null || BGMusic.PlayingClip != music) 
    {
      BGMusic = music.Play();
    }
  }


and

Code: AGS
void on_event(EventType event, int data)
{
  if (event == eEventEnterRoomBeforeFadein) 
  {
    if ((player.Room == 1) || (player.Room == 2) || (player.Room == 3) || (player.Room == 4) || (player.Room == 5) || (player.Room == 6) || (player.Room == 7) || (player.Room == 8) || (player.Room == 9) || (player.Room == 14) || (player.Room == 15) || (player.Room == 10) || (player.Room == 64) || (player.Room == 68)) SetBGM(aMarysTheme);
    if ((player.Room == 48) || (player.Room == 49) || (player.Room == 50) || (player.Room == 51) || (player.Room == 52) || (player.Room == 53) || (player.Room == 54) || (player.Room == 55) || (player.Room == 56) || (player.Room == 57) || (player.Room == 58) || (player.Room == 59) || (player.Room == 60) || (player.Room == 61) || (player.Room == 62) || (player.Room == 63)) SetBGM(aMirrorMaze);
    if ((player.Room == 38) || (player.Room == 39) || (player.Room == 40) || (player.Room == 41) || (player.Room == 42) || (player.Room == 43) || (player.Room == 44) || (player.Room == 45) || (player.Room == 46) || (player.Room == 47)) SetBGM(aHauntedHouse);
    if ((player.Room == 28) || (player.Room == 29) || (player.Room == 30) || (player.Room == 31) || (player.Room == 32) || (player.Room == 33) || (player.Room == 34) || (player.Room == 35) || (player.Room == 36)) SetBGM(aMenagerie);
    if ((player.Room == 21) || (player.Room == 22) || (player.Room == 23) || (player.Room == 24) || (player.Room == 25) || (player.Room == 26) || (player.Room == 27)) SetBGM(aMuseum);
    if ((player.Room == 37) || (player.Room == 69) || (player.Room == 65)) SetBGM(aFortuneTeller);
    if ((player.Room == 11) || (player.Room == 12) || (player.Room == 13)) SetBGM(aStreets);
    if ((player.Room == 19) || (player.Room == 20)) SetBGM(aAfterHoursTent);
    if ((player.Room == 17) || (player.Room == 18)) SetBGM(aCircus);
    if ((player.Room == 71) || (player.Room == 72)) SetBGM(aIntroScreen);
    if (player.Room == 66) SetBGM(aGarden);
    if (player.Room == 67) SetBGM(aDeath);
    if (player.Room == 16) SetBGM(aVardo);
    if (player.Room == 70) SetBGM(aIntroScreen);
  }
}


...but no change, with the same restarting of the clip in every room.  Does the placement of the code in GlobalScript (for example, before/after game_start) matter?
#16
Well, hey, I got it.  I had Music set to crossfade:



Set it back to "no" and voila, all the clips now play.  Is that a known thing that causes problems or am I just not using it right?

Now, of course, the clips are playing... so I can tell that the behavior still isn't working quite right, because it just restarts the clip in each room instead of checking to see if it's already playing and taking no action if it is.  So close.  Any ideas there?
#17
Double-checked, but all clips are set to "music" and appear in the Music folder:



They are also all set to inherit priority, which unless I call something different should keep any one of them from overriding the others.

The clips do play, both separately outside of AGS and within it - previously, in my kludgy code I was calling when entering each room, they played fine under a basic MusicName.Play();.  I've only had this problem since trying to switch to using an AudioChannel formally to get them to properly swap when entering different rooms.  (Yeah, I know, I'm using AudioChannels either way since they're a constant, but before I was just using the Play command and letting AGS do it on its own instead of actively working with it!)

I do have voice acting and sound effects in the game, but they shouldn't be interfering (they're also all properly set to Sound, I checked) since I haven't actually gotten to the part where any of them would be called - this issue happens immediately on walking from room to room, whether interacting with other things or not.

Per CW's advice, I tried adding a High Priority tag to calling SetBGM, like so:

Code: AGS
void SetBGM(AudioClip *music) 
  {
    if (BGMusic == null || BGMusic.PlayingClip != music) 
    {
      BGMusic = music.Play(eAudioPriorityHigh, eRepeat);
    }
  }


But no dice, the same result.
#18
Sadly that's not the case, but it's always good to go back and check, so thank you.  :)  Room_Load is linked in all rooms.

Thanks, Khris!  I had actually seen that bit of code through trawling the forums for information, but wasn't entirely sure how to use it.  I think I have a better idea on it now!

...but unfortunately, the same problem is still happening.  If I set the max music channels to 0 or any number 2-8, just the first room's track plays, and in the next room keeps on playing while the new room's track does not replace it.  When confining music channels to 1, the first room's track plays, then stops when the second room is entered but without anything replacing it (silence).

Based on your code, I now have the following in my GlobalScript:

Code: AGS
  void SetBGM(AudioClip *music) 
  {
    if (BGMusic == null || BGMusic.PlayingClip != music) 
    {
      BGMusic = music.Play();
    }
  }


And then:

Code: AGS
void on_event(EventType event, int data)
{
  if (event == eEventEnterRoomBeforeFadein) 
  {
    if ((player.Room == 1) || (player.Room == 2) || (player.Room == 3) || (player.Room == 9) || (player.Room == 14)) SetBGM(aMarysTheme);
    if ((player.Room == 48) || (player.Room == 49) || (player.Room == 50) || (player.Room == 56) || (player.Room == 63)) SetBGM(aMirrorMaze);
    if ((player.Room == 38) || (player.Room == 39) || (player.Room == 40) || (player.Room == 45) || (player.Room == 47)) SetBGM(aHauntedHouse);
    if ((player.Room == 28) || (player.Room == 29) || (player.Room == 30) || (player.Room == 33) || (player.Room == 36)) SetBGM(aMenagerie);
    if ((player.Room == 21) || (player.Room == 22) || (player.Room == 25) || (player.Room == 26) || (player.Room == 27)) SetBGM(aMuseum);
    if ((player.Room == 37) || (player.Room == 69) || (player.Room == 65)) SetBGM(aFortuneTeller);
    if ((player.Room == 11) || (player.Room == 12) || (player.Room == 13)) SetBGM(aStreets);
    if ((player.Room == 19) || (player.Room == 20)) SetBGM(aAfterHoursTent);
    if ((player.Room == 17) || (player.Room == 18)) SetBGM(aCircus);
    if ((player.Room == 71) || (player.Room == 72)) SetBGM(aIntroScreen);
    if (player.Room == 66) SetBGM(aGarden);
    if (player.Room == 67) SetBGM(aDeath);
    if (player.Room == 16) SetBGM(aVardo);
    if (player.Room == 70) SetBGM(aIntroScreen);
  }
}


Any idea why this would happen?  The code seems correct, which keeps making me think it must be an issue with a setting in the Audio tab somewhere.
#19
I am 1000% sure I'm just missing something really simple somewhere, but since I've done everything I can think of, I'm here to ask for help from all you pros.  :)

I have an AudioChannel for background music that is checked in the room_Load of every room; if it's playing the correct music for that room, then the channel continues doing its thing, but if it's not, it should switch to the correct track.  The code for each room looks like this:

Code: ags
if ((BGMusic == null) || (BGMusic.PlayingClip != aStreets))
  {
    BGMusic = aStreets.Play();
  }
  else if (BGMusic.PlayingClip == aStreets)
  {
    return;
  }


The problem is that with the code above, when the player enters the room, the clip from the previous room continues to play in BGMusic and the new room's clip (in this example, aStreets) does not replace it.  There are no errors on save or run.

I have BGMusic set as a global variable audiochannel and have confirmed that all clips are loaded into AGS.  Music, Sound, and AmbientSound are all set to 0 (unlimited) maximum channels, but I have also tried it with 1 and 8 channels; the same problem occurs when it's on 8 channels, while if it's just 1 channel, the previous music stops but the new track isn't played.  I thought maybe both tracks were playing simultaneously somehow, but all tracks are at the same volume and it doesn't seem like this is the case.

What am I missing?
SMF spam blocked by CleanTalk