Jump to content
Korean Random
Sign in to follow this  
scyorkie

Help with $ref

Recommended Posts

So you see $ref in various files, such as minimapLabelsTemplates, damageLog, etc.

 

This is one example in minimapLabelsTemplates:

 

"vtypeSpotted": {
      "$ref": { "path":"def.defaultItem" },

...

 

What I've noticed is that they always refer to a path within the same file. Is it possible to $ref to something in another file?

 

 

Share this post


Link to post

Short link
Share on other sites

sure, you can see example in my config (e.g. configs\sirmax\sirmax-minimapLabels.xc):

 

full format:

${"my_items.txt_player_alive_mog"},
      {
        "$ref": { "file":"../default/minimapLabelsTemplates.xc", "path":"def.vehicleSpotted" },
        "format": "..."
      },

simple format:

${ "../default/minimapLabelsTemplates.xc":"def.nickLost" },

Here the doc for JSONx format used for XVM configs:

JSONx have this extensions for original JSON format:
1. Comments:
        Block: /* */
        Line: //
    2. References:
        Internal: "obj": ${"path.to.object"}
        External: "obj": ${"filename":"path.to.object"}
        Root object: "obj": ${"."}
        Full format: "obj": { "$ref": { "file": "<filename>", "path":"<path.to.object>" } }
        Override referenced values (full format only):
            "obj": {
                "$ref": { "file": "<filename>", "path":"<path.to.object>" },
                "name": <value>
            }
Edited by sirmax
  • Upvote 3

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