Jump to content
Korean Random
Sign in to follow this  
Okxa

Custom Text Substitutions?

Recommended Posts

Is it possible to for example, make {{v.nation}} output country codes by doing something like this:

"vnation": {
        "germany": "GER",
        "uk": "GBR",
        "usa": "USA",
        "ussr": "USSR",
        "japan": "JPN",
        "france": "FR",
        "czech": "CSHH",
        "china": "CHN"
    },

Is there anyway to do something like this?

Share this post


Link to post

Short link
Share on other sites

 

 

Is there anyway to do something like this?
yes. you can use custom macros {{.}} 

for example, based on your post

{{.vnation.{{v.nation}}}}

and you must to insert section with your custom macros in @xvm.xc

Share this post


Link to post

Short link
Share on other sites
and you must to insert section with your custom macros in @xvm.xc

 

How do I insert them there?

I can't get it to work with the following:

 

EDIT: NVM it works

 

@xvm.xc:

    // The minimum required version of the XVM mod.
    "modMinVersion": "6.4.1.1"
  },
    "vnation": {
        "germany": "GER",
        "uk": "GBR",
        "usa": "USA",
        "ussr": "USSR",
        "japan": "JPN",
        "france": "FRA",
        "czech": "CSHH",
        "china": "CHN"
    },
  // Parameters for login screen.
  "login": ${"login.xc":"login"},
Edited by Okxa

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...