News:

Welcome to World of Banished!

Main Menu

Need a help with main game translation mod :-/

Started by bagi576, June 01, 2019, 05:13:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bagi576

Hello there. I'm new here and will be honest and cut my speech.
First things first, i've already translated few games into my native language ( Mongolian ). i bought this game when it released on steam. Last month played again The Banished ( guess after 4-5 years ) and saw there many mods which called translations. I was like wtf yolod and started translating. Now i'm facing with some confusing problems with some characters. builtExpample.bat gives me error with Unexpected character '*' or ';' or 'E' or ':' etc. So it is my problem #1. Can't figure it out how the heck it's happening even it's already in CharacterSet file. Also FontSheet gives me error as well
Please see CharacterSet.rsc CharacterSet resource
{
// notes
// this file needs to be UTF16 little endian if it contains characters over index 255
// fonts that use this character set need to support all the characters listed here
// ~ is a special escape character, so ~~ is required to add tilde to the set, ~" is needed for quotation marks

String _characters = "

// Special escape characters
~~ ~"

// Punctuation
`!@#$%^&*()_+-={}|[]\:;'<>?,./©

// Numbers
01234567890

// characters for English
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqustuvwxyz
// additional characters
АБВГДЕЁЖЗИЙКЛМНОӨПРСТУҮФХЦЧШЫЭЮЯ
абвгдеёжзийклмноөпрстуүфхцчшьыэюя

";
}



Here is my result when i run BuildExamples.bat

Batch runs then gave me error #1 (please see the attached pic1



when i click on Ignore button gives me about 3 same error with characters ( like i said '*' ';' ':' )
then gives me error #2 (please see the attached pic2



again, i clicked Ignore for another error #3 ( please see the attached pic3



then gives me error #4 (please see the attached pic4)



by clicking Ignore button batch runs about 5 seconds and it closes.

Problem #2

Assert: Sprite Sheet 'Build\FontSheet.rsc:resource' isn't large enough to hold all sprites

I will put here my CharacterSet.rsc, Font.rsc, FontLarge.rsc, FontMedium.rsc, FontSmall.rsc files.

CharacterSet.rsc

CharacterSet resource
{
// notes
// this file needs to be UTF16 little endian if it contains characters over index 255
// fonts that use this character set need to support all the characters listed here
// ~ is a special escape character, so ~~ is required to add tilde to the set, ~" is needed for quotation marks

String _characters = "

// Special escape characters
~~ ~"

// Punctuation
`!@#$%^&*()_+-={}|[]\:;'<>?,./©

// Numbers
01234567890

// characters for English
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqustuvwxyz

// additional characters
АБВГДЕЁЖЗИЙКЛМНОӨПРСТУҮФХЦЧШЫЭЮЯ
абвгдеёжзийклмноөпрстуүфхцчшьыэюя

";
}



Font.rsc

Font resource
{
CharacterSet _characterSet = "Font/CharacterSet.rsc";
String _fontName = "Arial";
int _fontHeight = 24;
String _sheetName = "Build/FontSheet.rsc";
int _sheetWidth = 256;
int _sheetHeight = 128;
String _materialName = "Font/FontMaterial.rsc";
String _imageName = "Build/uiFontImage.png";
}


FontLarge.rsc


Font resource
{
CharacterSet _characterSet = "Font/CharacterSet.rsc";
String _fontName = "Arial";
int _fontHeight = 48;
String _sheetName = "Build/FontLargeSheet.rsc";
int _sheetWidth = 512;
int _sheetHeight = 256;
String _materialName = "Font/FontLargeMaterial.rsc";
String _imageName = "Build/uiFontLargeImage.png";
}


FontMedium.rsc


Font resource
{
CharacterSet _characterSet = "Font/CharacterSet.rsc";
String _fontName = "Arial";
int _fontHeight = 18;
String _sheetName = "Build/FontMediumSheet.rsc";
int _sheetWidth = 256;
int _sheetHeight = 128;
String _materialName = "Font/FontMediumMaterial.rsc";
String _imageName = "Build/uiFontMediumImage.png";
}


FontSmall.rsc


Font resource
{
CharacterSet _characterSet = "Font/CharacterSet.rsc";
String _fontName = "Arial";
int _fontHeight = 14;
String _sheetName = "Build/FontSmallSheet.rsc";
int _sheetWidth = 128;
int _sheetHeight = 128;
String _materialName = "Font/FontSmallMaterial.rsc";
String _imageName = "Build/uiFontSmallImage.png";
}


Every opinions will helpful to me. I already fighting with this *.rsc files and with errors almost week. Couldn't find any solution in internet even Google couldn't help.

Thank you for advance and i will update if something happens. Cheers !

Tom Sawyer

Your character set looks right. The error messages tell about syntax errors in StringTable.rsc line 2688 etc.. Probably you missed there some ; or ". Such mistakes also can be in lines before the compiler notice an error. So you have to look through your translation and fix it.

The second problem is a sprite sheet to small to hold all your additional characters. Just increase it to a bigger value. 512 x 512 should be enough. To set in your font..rsc files as sheetWidth and sheetHeight = 512.

bagi576

Thank you for reply. In the line 2688 is character '*' thats gave me error (i already attached picture as well above and also other characters such as ';' ':' also gaves me error. Will try bigger value as you recommend and let you know. Many thanks again Tom Sawyer
Any ideas would be helpful best regards

Tom Sawyer

You can copy the lines here where you still get errors, so we can look what exactly is wrong. Or via PM.

bagi576

Dear Tom, thanks to you i already made it and checking bugs.
Many thanks to whoever saw this topic. I just increased value of up to 512 as you recommended, result was great any of *.bat didn't gave me error. Everything went without error.
Problem was there where is some miss characters " (it's hard to notice if you already scrolling up and down between 5000 line strings). So i checked everything again and it worked.
Many thanks and best regards.

RedKetchup

sweet !
i was following your post. i was hoping to be some kind of utility... but i am total noob in translations structure and i know i wouldnt be able to post anything usefull..
so i am happy you fixed it. maybe who knows, you can become our expert on this ^^ many people ask advice on this.....
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

bagi576

Hello RedKetchup,
Funny thing is i followed your topic too. And found there useful things :)

If there is anyone who stuck at translating i'd like to help as well. Just one damn character " ' " can ruin all stringTable things :)

So i've checked everything 100% then i run BuildExample.bat ( it runs without error if there is no character error and fontsheet size is large enough )
Then i used the commands which used for compiling i found here on  Discrepancy's post as 03Package.bat

bin\x32\Tools-x32.exe /mod Package.rsc:***Your mod name*** /pathres ../***Your mod folder*** /pathdat ../***Your mod folder***/bin
pause


You have to pay attention here:

***Your mod folder*** - this folder name must be same as where your translation and package.rsc, icon.png, preview.png located.

***Your mod name*** - must be same as PackageFile *NAME* in Package.rsc (see below, in my case my translation mod will be named Mongolian)



PackageFile Mongolian
{
String _name = "Your mod name";
String _author = "Your name";
String _description = "Your mod description
";
String _icon = "icon.png";
String _preview = "preview.jpg";
int _userVersion = 9;

// all files in resource directory
String _includeList
[
"*"
]

// exclude package files, mod files, file used for building packages
String _excludeList
[
"Package_*.crs"
"*.pkg"
"*.pkm"