Author Topic: Modkit Help mods translation  (Read 456 times)

0 Members and 1 Guest are viewing this topic.

Offline tuggistar

  • Vendor
  • ***
  • Posts: 60
  • Country: 00
Modkit Help mods translation
« on: April 05, 2018, 01:46:13 PM »
Do tell how banished Modkit to make and combine in one mod sets of String tables to make the translation of mods. I did not understand how to make the translation itself in Modkit training, and the mod which I enjoyed no longer translates anything from 1.0.7.  What training on this site I look for, and then there are quite a lot of them. :(
« Last Edit: April 21, 2018, 07:32:02 AM by tuggistar »

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 912
  • Country: au
Re: Modkit Help mods translation
« Reply #1 on: May 02, 2018, 02:12:21 AM »
**I answered this on the Black Liquid website but thought it beneficial to also add it here:




To translate a mod. You will need to alter the stringtable files.

in vanilla Banished there is the main game stringtable located within the resource folder of the modkit:

Dialog/StringTable.rsc

the game displays the text highlighted within the code: String _text = "";   so that is what will need to be translated first.

This stringtable is the most important as it is connected with most elements of the gameplay.

The other are within the Game folder, they are for the in-game help reference material (Game\Help\), and for the tutorial game options (Game\Scenario\).

 

Make a new folder within your modkit root folder and give it the name of your mod  (C:\BanishedKit\**your Mod Name here**)

It might be easier to copy all of the folder and files that are part of the example translation mod: example/translation

if you are also going to translate mods, you will need to also create a 'UI' folder.

Your folder structure should look like this:

Code: [Select]
C:\BanishedKit\**your Mod Name here**\Dialog\
       - StringTable.rsc                 *** this will require editing/translating

C:\BanishedKit\**your Mod Name here**\Font\
       - CharacterSet.rsc                 *** this will require editing/translating
       - Font.rsc
       - FontLarge.rsc
       - FontLargeTexture.rsc
       - FontMedium.rsc
       - FontMediumTexture.rsc
       - FontSmall.rsc
       - FontSmallTexture.rsc
       - FontTexture.rsc

C:\BanishedKit\**your Mod Name here**\Game\Help\
       - **too many to list - check the translation example mod or copy from the resource folder**

C:\BanishedKit\**your Mod Name here**\Game\Scenario\
       - **too many to list - check the translation example mod or copy from the resource folder**

C:\BanishedKit\**your Mod Name here**\Texture\
       - UITexture.rsc

C:\BanishedKit\**your Mod Name here**\UI\

It is important that you include all the folders and files above.

If applicable for your mod, the file 'CharacterSet.rsc'  will need added any other font characters that are needed to display your translation.

 

Translate all the stringtable files, as I said earlier altering the text within: String _text = "**translate this text**" ;

If translating mods, download the available stringtables,

You will find most of the mods will have them within the UI folder, but you should check each mod by loading it up in game and looking at the mod info in the mod list and scroll through the list of included code files and note down the location and names of the stringtables. (most will be in UI folder: UI/MODNAMEStringTable.rsc, others might also have them within the Dialog folder: Dialog/MODNAMEStringTable.rsc)

Ensure you place them within the same named corresponding folders in your mod.

 

Create/Copy and edit your Package.rsc folder (located: C:\BanishedKit\**your Mod Name here**\Package.rsc)

on line# 1 of the code it is best to give the mod the same name as what the folder is called:

Code: [Select]
PackageFile **your Mod Name here**
{
String _name = "**your full Mod Name here**";
String _author = "tuggistar";
String _description = "This is a translation mod by tuggistar.";
String _icon = "icon.png";
String _preview = "preview.jpg";
int _userVersion = 1;

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

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

complete the rest of the Package.rsc file.

Below the above part is where you must call up all the stringtable files you have altered:

Code: [Select]
ExternalList list
{
External _resources
[
"Font/Font.rsc"
"Font/FontMedium.rsc"
"Font/FontSmall.rsc"
"Font/FontLarge.rsc"

"Game/Scenario/TutorialCommon.rsc:tutorialGeneral"
"Game/Scenario/TutorialFood.rsc:tutorialStrings"
"Game/Scenario/TutorialGettingStarted.rsc:tutorialStrings"
"Game/Scenario/TutorialSurvival.rsc:tutorialStrings"
"Game/Scenario/TutorialTrade.rsc:tutorialStrings"

"Game/Help/HelpTopics.rsc"

"Dialog/StringTable.rsc:achievement"
"Dialog/StringTable.rsc:autoSave"
"Dialog/StringTable.rsc:citizenActions"
"Dialog/StringTable.rsc:climate"
"Dialog/StringTable.rsc:clothing"
"Dialog/StringTable.rsc:common"
"Dialog/StringTable.rsc:disaster"
"Dialog/StringTable.rsc:diseases"
"Dialog/StringTable.rsc:events"
"Dialog/StringTable.rsc:gameDialogs"
"Dialog/StringTable.rsc:gameKeys"
"Dialog/StringTable.rsc:general"
"Dialog/StringTable.rsc:globalNames"
"Dialog/StringTable.rsc:graphKeys"
"Dialog/StringTable.rsc:graphTypes"
"Dialog/StringTable.rsc:graphYears"
"Dialog/StringTable.rsc:inventorySort"
"Dialog/StringTable.rsc:inventoryType"
"Dialog/StringTable.rsc:keyNames"
"Dialog/StringTable.rsc:loadingDetails"
"Dialog/StringTable.rsc:mainMenu"
"Dialog/StringTable.rsc:merchant"
"Dialog/StringTable.rsc:multiSample"
"Dialog/StringTable.rsc:objects"
"Dialog/StringTable.rsc:orderTypes"
"Dialog/StringTable.rsc:productionYears"
"Dialog/StringTable.rsc:professions"
"Dialog/StringTable.rsc:purchaseTypes"
"Dialog/StringTable.rsc:rawMaterial"
"Dialog/StringTable.rsc:reflectionQuality"
"Dialog/StringTable.rsc:scenario"
"Dialog/StringTable.rsc:seasons"
"Dialog/StringTable.rsc:shadowDetail"
"Dialog/StringTable.rsc:shadowResolution"
"Dialog/StringTable.rsc:startConditions"
"Dialog/StringTable.rsc:terrainSize"
"Dialog/StringTable.rsc:terrainType"
"Dialog/StringTable.rsc:textureFilter"
"Dialog/StringTable.rsc:toolBar"
"Dialog/StringTable.rsc:toolType"
]
}

Even though you do not alter the files: Font.rsc, FontMedium.rsc, FontSmall.rsc, FontLarge.rsc, you must call them as they individually call up the CharacterSet.rsc file themselves, and depending on how many characters added, you might need to alter the size code within those files: int _sheetWidth = 256;    int _sheetHeight = 128; (when trying to build the mod you will be given a warning if size is too small).

 

I think for better translating and seeing some of the changes occur in game, you might find it easier to build and package your mod in stages and play through modkit before packaging.

you will need to make 3 TextDocument.txt files, you will then rename them, along with the file name extension:

in the first text document file, insert and edit the following code (once again substituting **your Mod Name here** with the folder name you made earlier):

Code: [Select]
..\bin\x64\Tools-x64.exe /build Package.rsc:list /pathres ../**your Mod Name here** /pathdat ../**your Mod Name here**/bin
pause

now rename the file to: 01build.bat

 

the next text file:

Code: [Select]
..\bin\x64\Application-x64-profile.exe /ref Package.rsc:list /pathres ../**your Mod Name here** /pathdat ../**your Mod Name here**/bin
pause

rename to: 02run.bat

 

the last text file:

Code: [Select]
..\bin\x64\Tools-x64.exe /mod Package.rsc:**your Mod Name here** /pathres ../**your Mod Name here** /pathdat ../**your Mod Name here**/bin
pause

rename to: 03package.bat

 

Now you can build your mod by double clicking on the 01build.bat file you created, and if done correctly it should build with no errors.

If you then run the file 02run.bat it will start the modkit game environment, where you can run the game and see if your changes have worked and displaying correctly. If you pause the game and Alt-Tab out of the game you should be able to make translation changes while the game is playing in background allowing you to see changes right after you make and save them.

Once happy with what you have done. it is best to delete the bin and build folder and contents that the 01build.bat made. Then re-build the mod again by double clicking 01build.bat .

make your mod icon.png image (48x48px icon displayed in modlist) and if adding mod to steam the preview.jpg image (360x360px image, displayed on steam workshop)

you can now skip 02, and go straight to 03package.bat, double-click and it will package your mod into the .pkm mod file. once packaged you will find it located within the folder:

C:\BanishedKit\bin\WinData\




Offline tuggistar

  • Vendor
  • ***
  • Posts: 60
  • Country: 00
Re: Modkit Help mods translation
« Reply #2 on: May 02, 2018, 01:23:48 PM »
Really thank you very much for helping discrepancy. ;D I didn't know where else to ask. Good luck with your mod developments and thanks. :) How time will do.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9140
  • Country: ca
Re: Modkit Help mods translation
« Reply #3 on: May 02, 2018, 01:37:46 PM »
you are very welcomed Tuggi. here, mostly you will always find someone to help you, although we are individually not good at everything, we all have our strenght :)
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.