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

#3321
Strictly speaking the acsprset.spr itself is not from 3.5.1, as it was saved in 2016 last time, but current version is supposed to open older spritefile too.

EDIT: the error message "Failed to open spriteset file nnn" means that the file could not be opened at all (so it's not because of the bad contents).

Is the file actually in the folder after you unpacked it? What it's size?
Do you open other projects normally?
#3322
Quote from: bx83 on Sat 25/12/2021 03:06:34
Got the file okay, but it says the acsprset.spr is corrupt, so I can't open the project.

What version of ags are you running?

You may check the version if you open Game.agf in any text editor. At the top there will be a line like:
Code: ags
<AGSEditorDocument Version="3.0.3.2" VersionIndex="27" EditorVersion="3.5.1.11">



Checked the project now, it opens fine in the latest stable version.
#3323
Quote from: Khris on Fri 24/12/2021 10:53:38
If the tile map sprite is imported as regular sprite, you can create a DynamicSprite from it, then crop it down to the individual tile.
I'd use a global array of dynamic sprites and prepare them at the start of the game (by doing the above in a loop).

I wanted to mention, as a future alternative, 3.6.0 adds extended DrawImage variant that lets you pass source rectangle coordinates, thus allowing to copy a tile from the source sprite.
The new function looks like
Code: ags

import void DrawImage(int x, int y, int spriteSlot, int transparency=0, int width=SCR_NO_VALUE, int height=SCR_NO_VALUE,
						int cut_x=0, int cut_y=0, int cut_width=SCR_NO_VALUE, int cut_height=SCR_NO_VALUE);

Thus you may save on creating separate tile images.
#3324
So, this is a side note, but I've been looking into the crash Slasher mentioned few posts above, and it turned out that TextBox crashes the engine if there's empty string and you press Backspace again (when there's nothing to delete).

There has to be another patch made for 3.5.1....
#3325
Look up "Custom Properties" in the manual, these are named variables that may be attached to game objects, set in the editor and read or changed in script.
#3326
Line numbers were added to 3.6.0 wip, but it's likely we're having another 3.5.1 patch with dialog-related bug fixed, so maybe it may be transferred there too.
#3327
This is strange. I might test this out myself, but in the meanwhile, would that work if you check ID instead?

i.e.
Code: ags

if (this.ID == Sara.ID) { anim_view = 242; }
#3328
Quote from: nightmarer on Mon 13/12/2021 15:14:07
I display that anim_view is not changing the number, as it is not identifying the character from the dialog, or at least is not matching the name of the character of the dialog with the real character with exactly the same name.

How are you using MySay in dialogs? Could you post an example of your dialog script?
What happens if you Display "this.ID" or "this.Name" inside MySay?
#3329
First of all, this code looks wrong, because for proper behavior you need to call LockView, not ChangeView, before Animate (and then UnlockView). But I'm not certain what other actions are playing at the same time (are you also playing some portraits simultaneously? if this is what you've meant by "mushots"...)

In any case, my suggestion is to not start animation in the repeatedly_execute, but instead write a custom Say function that runs everything, and use that for speech.

If this is only for particular character / certain moments, then may use this function explicitly in dialogs. But if it's for all the characters in game, set up "Custom Say function in dialog scripts" in General Settings -> Dialog section: then this function will be used instead of Say to replace common dialog lines.

The example of how the function may look like:
Code: ags

function MySay(this Character*, const string text) {
    // Starting up
    int anim_view;
    if (this == Sara) { anim_view = 242; }
    else if (this == SomeoneElse) { anim_view = xxx; } // etc

    // Running speech
    this.LockView(anim_view); // lock to speaking animation
    this.Animate(this.Loop, 3, eRepeat, eNoBlock, eForwards);
    this.Say(text);

    // Ending
    this.UnlockView(); // unlock back to current view
}


Then it may be used like
Code: ags

player.MySay("text");
Sara.MySay("bla bla bla");
#3330
Were there any error messages when opening the game in the editor?

This may happen if there was a problem saving or loading the sprite package ("acsprset.spr" file). The project contains references to sprites, but if the "acsprset.spr" was not saved or loaded properly their actual images are lost, and these sprites will be temporarily displayed using a placeholder.

In theory there are two ways this may be fixed:

1) AGS creates a spritefile backup called "backup_acsprset.spr", if you rename it to "acsprset.spr", replacing broken file, this may revert latest save.

2) By doing "Replace sprite(s) from source" command from the context menu (may be used on multiple sprites at once); but this will work only if you still have source images at the same locations you imported them from (ideally - if they are also somewhere inside the game project folder). That of course may take a while of manual clicking if you need to restore alot of sprites.
#3331
Quote from: Cone Arex on Wed 08/12/2021 03:28:33I set the language by Building the exe and then running winsetup through the editor. So the selected language was not written in the acsetup.cfg that the Linux (and probably Android) port use.

What you probably need to do instead is use Default Setup page in the editor, available since 3.5.0 also. That specifies the contents of the default config found with the compiled game.
Winsetup only saves user config, which is personal for current OS user (this is how it works since 3.3 or 3.4, the reason is that game may be installed in a read-only location, or where current user does not have write permissions, so winsetup now saves in common user document folders).

But of course this will only create initial config. For having their own players should either edit config file by hand using instructions, or a third-party setup program (I heard some people already made crossplatform ones in the past, but sadly they are not part of AGS distribution still).

Quote from: Cone Arex on Wed 08/12/2021 03:28:33
What I still not get is why the actual translated text is still loaded without the language being set correctly in acsetup

Yes, this confuses me too.
#3332
Quote from: Cone Arex on Wed 08/12/2021 01:42:04
Quote from: Crimson Wizard on Wed 08/12/2021 00:16:49
Could you upload your game you made for linux for me to check?
https://storage.conequest.de/mmm/ConeArex_TranslationTest_Linux.zip

Well... This starts without translation, but if I set up "english" in acsetup.cfg, run ags64, and it displays "Translation Output: english". If i set it as "English" with capital E, then the title also switches to "Berthold's Return".
#3333
Quote from: heltenjon on Wed 08/12/2021 00:39:22However, afterwards I changed it back to "english" in order to reproduce the error again, but now it keeps working correctly, both in German and in English, even with the lower case spelling in config. Go figure. (Windows 10 Enterprise.)

Are you changing default config in the game dir, or user config in the %USERPROFILE%/Saved Games/<game name>? If you save in winsetup at least once then translation is written to the user config.
#3334
Quote from: Cone Arex on Wed 08/12/2021 00:08:44
QuoteCould you also tell, what version of a linux port are you using and where did you get it, to make sure we're testing same thing?
I just build the game for Linux and then executed the ags64 file. (Is this the right way? I always run into issues with ags and linux.) Version is ACI version 3.5.1.11.

I think you should run the script with the game's name located one directory above "data", but I don't know if there's much difference.
I usually compile linux engine from the source, but now tried to use editor's feature, and has same (correct) result as before.

Could you upload your game you made for linux for me to check?
#3335
In regards to the Game.TranslationFilename, to be certain I did another test with a dummy game that displays TranslationFilename on screen. Tried Linux ports for the latest builds of 3.5.0, 3.5.1 and 3.6.0, and all of them work correctly, displaying the selected language...
#3336
Okay, I tested this on linux now with "Bernhold's revenge", and see the issue: the game's subtitle on a intro screen is displayed in german but the character speech etc texts are in english.

Changing "translation" option in config file from "english" to "English" fixes it though... I'd suppose this is the case sensitivity problem that I mentioned above, but since you said that Game.TranslationFilename becomes empty, not sure what is going on at this point.

Could you also tell, what version of a linux port are you using and where did you get it, to make sure we're testing same thing?
#3337
Quote from: Cone Arex on Tue 07/12/2021 19:58:06
The output of Game.TranslationFilename is indeed an empty string if played under ScummVM, but "English" when played under windows.

ScummVM is not precisely 1:1 with ags engine, and it may have its own bugs (also it's likely more in sync with some wip stage of 3.6.0 engine now).

I think it's best to try ags ports first to see how they behave.
#3338
Quote from: Cone Arex on Tue 07/12/2021 19:12:41while TranslationFIlename returns -101 under ScummVM, which is the same value that is returned under windows if no translation is selected/the default language is used.

Sorry, i am bit confused; TranslationFilename is a string, how do you get "-101"? ...or is this a result of Compare?

What I meant, it could be displayed as:
Code: ags

Display("translation = %s", Game.TranslationFilename);
#3339
Oh, Cone Arex, another thing that I forgot to mention, you may display the value of Game.TranslationFilename on screen, either with Display command or on a label.
If it has unexpected value, then we'd have to find out why. If it has a proper value, then there might be something wrong with the game script.
#3340
Quote from: Cone Arex on Mon 06/12/2021 21:26:00The .tra file is spelled with all lower case, but the check only works with an initial upper case "English". Checking for "english" will not work with the case-sensitive == operator despite the file's name.

AGS complicates this in many places. The filename's case is not important, what's important is how it is written in the config file. Winsetup.exe has an additional quirk: it always capitalizes the first letter of the translation name, probably for backward compatibility reasons (because people in the past used to spell translations with capital letter in scripts). This means that if you are using winsetup, then the language will be set with first capital letter.

You may test this by setting up language in user config file by hand in small letters (on windows user config is located in %USERPROFILE%\Saved Games\<name of game>).
Alternatively it's also possible to test using Game.ChangeTranslation command in script.
SMF spam blocked by CleanTalk