Skip to content

Translating The Script

IN2_Moist edited this page May 9, 2023 · 3 revisions

(Incomplete WIP)


Translating MoistScript NG To Another Language

  • How to edit the translation script to your own native language.

The following Code Examples are small Snippets from the actual Script you need to edit.

  • DO-NOT-EDIT : Changing these will break the script completely
  • EDIT : This is the part to translate/Edit

These Indicators for Edit or Not are indicated between | --Above Function code-- | or for irrelevant code parts Do not Edit is at the right end of the line

Hopefully that will make it clear for people who have never edited code before. All edits / Translations Must be surrounded or enclosed within Quotation Marks " " So after the = a single space then: "This is my Translation"


Probably a Good Practice Would be to add an Identifier as to the language translated to, this can be done by editing the below code which is at the very top of the file:

|     **DO-NOT-EDIT**          |EDIT|
local Moist_Translate = {lang = "EN"}

Moist_is_Translated = true **DO-NOT-EDIT**
ScriptConfig.MyLang = Moist_Translate.lang **DO-NOT-EDIT**

Only Edit the part in the Quotation marks **"EN" The {lang = and } at the end are essential and must not be removed!

Change the EN to your translated Language code so example: German "DE", Russian "RU", French "FR"


Changing the Function Names

Some Partial Code Examples

Local Feature Example

function Moist_Translate.localmenu()**DO-NOT-EDIT** 
    |     **DO-NOT-EDIT**      |        **EDIT**        |
    Features.LocalParent.name = "Moist Script NG 3.0.2.0"
    |     **DO-NOT-EDIT**           |     **EDIT**   |
    LocalFeatures.Self_Parent.name = "Player Features"
    |     **DO-NOT-EDIT**              |     **EDIT**     |
    LocalFeatures.Self_Teleports.name = "Teleport Features"
    |     **DO-NOT-EDIT**             |     **EDIT**   |
    LocalFeatures.Online_Parent.name = "Online Features"

end **DO-NOT-EDIT** 

Online Player Feature Example

function Moist_Translate.onlinemenu_hints() **DO-NOT-EDIT**

    for pid = 0, 31 do **DO-NOT-EDIT**

      |        **DO-NOT-EDIT**              |       **EDIT**       |
      FeaturesonlineParent.feats[pid].hint = "Moist Script Features"


    end **DO-NOT-EDIT**

end **DO-NOT-EDIT**

Changing Feature Selector Text

Changing those features with a string / named option within angle Brackets < > that can be changed String Features can have multiple Options each option text is within Quotation Marks, Options are then seperated with a comma (see below Example)

LocalFeatures.save_settings:set_str_data({"Save","Reset"})

-- ** Options are within the Curly Brackets { } Seperated by a comma  , The Options Must be enclosed within Quotation Marks   " "   **

      [1]  ,  [2] 
   ({"Save","Reset"})

Local String Feature Example

function Moist_Translate.Set_StrData()

LocalFeatures.setDefenceZone:set_str_data({"Self off","Others off","Self On","Others On"})
LocalFeatures.save_settings:set_str_data({"Save","Reset"})

Online String Feature Example

function Moist_Translate.Set_Online_StrData()
   for pid = 0, 31 do

    OnlineFeatures.SE_CrashV3.feats[pid]:set_str_data({"Vector Method","Stat Method","Rando Method","Moist Method","Bit Method"})

    OnlineFeatures.ProximitySurrounded.feats[pid]:set_str_data({"Blame Me","Anonymous"})

   end
end

Clone this wiki locally