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

#1
After many attempts we figured out how to use this plugin. It works with the latest AGS too (3.5.0.24). Basically you just have to follow the steps in the readme file, but in some cases you have to pay attention to a few little things. We used it to create a Chinese translation so I can show you this method:
1. First of all generate the translation file. Then open the trs file in Notepad++ (or something similar software) and save it with UTF-8 encoding (without BOM). This way you can write chinese characters in the file.
2. Translate the texts into Chinese. It's important to finish all texts because you'll need all of the chinese characters that you want to use in the game.
3. Save a new file from the final translation (keep the original as it is). It could be a simple txt file, but the most important thing is to save it with UTF-8 BOM encoding.
3. Now download the Bitmap Font Generator from the link on GitHub.
4. Set up things in the software based on the GitHub readme file (enable Match char height, disable Font smoothing, 8bit font texture only, text format .fnt) and then select a chinese font in Font settings (You can find many free chinese fonts on the internet).
5. Now go to "Edit/Select chars from file" and open the file you last saved with UTF-8 BOM encoding. This way the software selects only the characters you need.
6. Export the bitmap font as a 'fontname.fnt' file ('fontname' can be anything you want). I used Targa texture files without compression.
7. Download 'AGSBMFontRenderer.dll' and put it into the AGS's installation folder. Now you can enable the plugin in the Editor.
8. Copy the bitmap fonts into the game's compiled folder. In my case into the 'Compiled/Windows' folder.
9. Now create a new font in the Editor. Change 'OutlineStyle' to 'Automatic' and write the font's ID to 'OutlineFont'.
10. Add this code to the 'game_start' function (3 is the font's ID):
Code: ags
if (Game.TranslationFilename == "Chinese")
{
  SetBMFont("fontname.fnt", 3);
  Game.SpeechFont = 3;
}


Probably you have much more texts in your game (like dialog options, labels on GUIs etc.) with different fonts, so you have to change them too. You can do it manually, or just use these functions:
Code: ags
function ReplaceFontOnGUI(GUI *g, int old_font, int new_font)
{
  int i = 0;
  while (i < g.ControlCount)
  {
    Button *b = g.Controls[i].AsButton;
    if (b != null)
    {
      if (b.Font == old_font)
        b.Font = new_font;
    }
    Label *l = g.Controls[i].AsLabel;
    if (l != null)
    {
      if (l.Font == old_font)
        l.Font = new_font;
    }
    i++;
  }
}

function ReplaceFontOnAllGUIs(int old_font, int new_font)
{
  int i = 0;
  while (i < Game.GUICount)
  {
    ReplaceFontOnGUI(gui[i], old_font, new_font);
    i++;
  }
}

I found them somewhere in the forum and they are incredibly useful.

11. If it's possible to change the language while playing your game, then you have to add these things there too. With an 'else' part to change everything back when you select English of course.
12. Now you can Build your game and then click on "Build/Run" option. You got an error message, right? Yeah, you can't use this "Run" button anymore :D You have to run the game with "Run game setup" or just run the .exe file in the compiled folder. But it should work this way.

Suggestion: The easiest way to do this if your game's default language is English. Because English characters are in the same "place" in ANSI and UTF-8 encoded files too (and AGS can't handle UTF-8 files natively). If your game's default language is for example Hungarian, then it won't work, because the special Hungarian characters are in different "places" in ANSI and UTF-8 encoded files. So the engine can't recognize the same sentences.

I think I've covered every detail, but if you have any questions, feel free to ask!

#2
Hi! I'm using this great module and I ran into a small issue. If I change the language ingame, while a bunch of queued speeches playing, then it doesn't translate these texts. I have the "GetTranslation" part before the texts but it works only if I change the language before I start to play the QueuedSpeech. Is there and easy way to update the actual speeches somehow? Or should I replay all queued speeches manually when I change the language? Thank you in advance for your help!
#3
Quote from: Crimson Wizard on Thu 09/04/2020 17:00:03
Quote from: daneeca on Thu 09/04/2020 16:26:03
But after maaany testing I found out what causes the problem. I don't know why it does it but I definitely found it. I use a GUI to notify the player about new infos. And the text problem happens only when this GUI is visible. It's a simple, not clickable, 65x65 pixel big GUI with Normal PopupStyle.

This is the case I mentioned above, AGS corrects speech lines sometimes if there's a GUI on top of screen, because it thinks that text may overlay GUI.

Oh, for some reason I thought it's happening only if I use "When mouse moves to top of screen" PopupStyle. Anyways I found the easiest solution for this problem. I just simply changed the height of the GUI from 65 to 600. The background is transparent so it doesn't affect its look. For now, it seems to work.
Thank you guys for all your help!
#4
Quote from: Cassiebsg on Thu 09/04/2020 15:26:42
Also, you could try SayAt, instead of just say.

The main problem is that it's happening with the player character too. Not always but sometimes the text is under his head. It's lower when the character is closer to the top of the screen.

But after maaany testing I found out what causes the problem. I don't know why it does it but I definitely found it. I use a GUI to notify the player about new infos. And the text problem happens only when this GUI is visible. It's a simple, not clickable, 65x65 pixel big GUI with Normal PopupStyle.
#5
Quote from: Crimson Wizard on Thu 09/04/2020 11:55:43
I'd make a small game for test to isolate this problem, just a scaled character and a speech, and see how it reproduces.

In the past I've also noticed that speech location may be affected by popup GUI on top, in which case speech was lowered down. Don't know if you have one in your game. Anyway, here the multiline text is not lowered, so probably not this case.

Okay, I made a new game with Sierra template. I used the same resolution, same font with same size, same character with the same sprites in the views. I put the character into the same position with the same walkable area scaling. Aaand it works perfectly. The text is in the right position. So after all I started to testing it in the original game. I made a new character with the same views and the problem is still there. Then I made a new view from one sprite with a little bit lower height without alpha channel. The problem is still there.

When I started to working on this game I used AGS 3.4.0 and later I upgraded to 3.5.0. But the Script compatibility level is still on 3.4.0. and Script API version is "Latest version". And I used the Deafult template back then (which is not available anymore as I see). Is it possible that this causes the problem?
#6
Quote from: Snarky on Wed 08/04/2020 22:05:33
Yes. It's an interesting bug. My suspicion is that it's an interal AGS bug, not linked to any of the modules, but it would be interesting to find out.

As a workaround, you might try ending short lines with a linebreak, "[".

Nothing changes if I add "[" to the end of the line, but it's working perfectly if I start the line with it. So basically it fixes the symptom, but I'm not sure if it's the best solution in every situation.

Quote from: Morgan LeFlay on Wed 08/04/2020 22:41:27
I've previously assisted with a bug similar to this, so I'll double check that this isn't the case for you:

Is there an animation on your sprites where the very first frame is shorter? It uses the first frame's height for speech placement.

For example, if the character was originally sitting, but is now standing, all within the same sprites, it will use the sitting height, not the standing height. If your character is originally sitting, see my response here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=55189.msg636569818#msg636569818

Code: ags
ViewFrame *currentFrame = Game.GetViewFrame(cEgo.View, cEgo.Loop, cEgo.Frame);
  ViewFrame *firstFrame = Game.GetViewFrame(cEgo.View, cEgo.Loop, 0);
  firstFrame.Graphic = currentFrame.Graphic;
  cEgo.SayBackground("Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello ");


That's an example on how you can solve this issue with changing heights, but you need to remember to re-set the first frame again when you're done.

All views of the squirrel have sprites of the same size, so I think it's not the same problem. Besides that if I move the character far from the top of the screen, then it works in the right way.
#7
Weird, it's visible on my side. I'll check if I can fix it. Thanks for the info.

Edit: I updated the links. Are the pictures visible now?
#8
AGS Games in Production / Re: Falcon City
Tue 07/04/2020 21:13:40
Hi! I just wanted to let you know we started working on the game again :) Check the main post for more info.
#9
Hi guys!
I'll try to describe my problem as simply as I can. The speech text sometimes appears under the character's head. It happens with the NPCs and the player character too. As I figured it out it happens only when the original size of the character's top would be offscreen, but I made a walkable area to reduce the character's size. This way it's far from the top of the screen. Another weird thing is that it happens only with short texts. When the text is long enough to have two lines, then everything is perfectly fine. It happens in dialogs and with the simple "Say" command as well.
I use LucasArts speech style, AGS 3.5.0.22 and these modules: QueuedSpeech 4.1, Credits, MathsPlus, ScrollingDialog 3, Tween, Smooth Scrolling & Parallax 1. Is it possible that one of the modules is interfering with the coordinates of the speech texts?

Probably it's easier if I attach some pictures:






#10
This module is fantastic! Is it possible to make it work with QueuedSpeech module? And is there an easy way to change all "Say" command to "SayBubble"?
#11
I tried everything I can but it's not working :( I have no idea what I'm doing wrong. I copied the DLL into the AGS folder, then I made a bitmap font from the UTF-8 text file. When I try to import this font I get an error message:
"Unable to import the font. Not a valid SCI font file"
Maybe I don't need to import it, because the script does it when I run the game, but when I run the game I get another error message:
"Error: Unable to load font 8, no renderer could load a matching file."

I tried to use the font from the Demo, the same happened. Did I miss something? I read the readme file many times, and I can't figure out what I'm doing wrong :confused:
Should I do something with these files maybe? -> src folder, thirdparty folder, appveyor.yml

Edit: I tried to remake the font in AGS and now I got this message:


"Illegal exception
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x578B2AF7; program pointer is +6, ACI version 3.5.0.22, gtags (7,1)
AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

in "room2.asc", line 18"
#12
Hi! Thank you for all the answers.
Unfortunately I don't speak chinese at all but we have a person for this job  :smiley: I didn't have time to try this plugin but I definitely will, and then I'll tell you my experiences.
#13
Hi guys!

We are working on an adventure game and the investors really want to have a chinese translation. They already started to translate it in a Word document. Is it possible to use this method to create a chinese translation?

Any ideas and advice would be greatly appreciated. Thank you!
#14
I downloaded Fontforge and opened the font. I loaded the encoding file, but I can't find Windows-1250 in the list. I tried to do it with ISO 8859-2 because I read on wikipedia it's similar. And then I made a new font file this way: File/Generate Fonts. Unfortunately it didn't work. The little Š‘ is still Q in GUIs. I reopened the new font file into Fontforge, and I noticed, everything is the same as before encoding. Is it normal?
#15
Okay, don't listen to me! I just needed to rewrite the version numbers in the script.
#16
It doesn't work with the newest AGS :-/ Can I fix it somehow?

QuoteFailed to save room room7.crm; details below
MathsPlus.ash(20): User error: The MathsPlus module requires AGS version 3.4.0.6 or higher. Please use a newer version of AGS to use this module.
#17
The point is that it's not a translation. Hungarian is the basic language in the game. So I can't edit the TRS file.

I opened the font in a font editor and these are the properties. Can I somehow put it into the range 0-255? I'm not the expert on this :-\
#18
Hi guys!
I hope it's a beginner question. So I'm working on a game with Hungarian subtitle. And the Hungarian alphabet contains some double accented letters. These: Ö,А,Ü,а. I use a truetype font and everything is working fine, except in GUIs. In the GUIs the little "Š‘" letter turns into the big "Q". I don't know what is the problem, because the font contains this letter. How can I fix this?
#19
AGS Games in Production / Re: Falcon City
Thu 11/08/2016 14:51:44
Hi guys!
There is a very short video from the game. The language is Hungarian, but I hope it's enjoyable.

https://www.youtube.com/watch?v=juvdG_ECE5s

PS: Can I embed somehow this video rather than a clickable link?
#20
I think more than likely that this was the problem. I checked the "corrupt" version and there it is 2 GB.
This compressing is very effective. It's just 267 MB now.
Thanks for the help!
SMF spam blocked by CleanTalk