Jump to content
Korean Random
Nanawatai

Is it possible to consolidate items in markers files?

Recommended Posts

I have attributes in all four markers files (AliveExtended, AliveNormal, DeadExtended, DeadNormal) that are the same.

 

Is it possible to consolidate them somewhere, say like in markers.xc, where they can be in only one spot and easily read by all markers files?

 

For example, I have the value "def.healthBar" defined in all four files and they share the same values.  If I make a change to the healthBar in one file, I have to remember to make the same edit in the other three.  I'd like the values for "healthBar" to exist in one location and in one entry.  What is the easiest way of accomplishing this, or is there something that I can put at the beginning of markers.xc?

 

Thank you in advance.

Share this post


Link to post

Short link
Share on other sites

Let's say you place the definition of the field healthBar in the file markers.xc. Then to use it in any of those four markers files, you replace the sections healthBar inside of them with

"healthBar": ${"markers.xc":"healthBar"}

That's IIRC...

Correct me someone if I'm wrong.

Edited by konrad509
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

I just tried what Tornado_Odan_Rot and konrad509 said above, and it works fine with damageText.

 

Also, "damageText": ${"markers.xc":"damageText"} works only if "damageText" is the top-level section within markers.xc.

If you have it under another "def" section, use "damageText": ${"markers.xc":"def.damageText"}.

Edited by scyorkie
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Ah, thank you gentlemen!

 

Worked like a charm.  I was able to consolidate all of my marker def.* values into marker.xc which cleaned things up immensely (using scyorkie's suggestion so that I could put everything in its own "def" section).  Now, when I change a variable, I only need to change it in one place and the value is shared throughout all four files.

 

For future reference, don't forget to modify your textField lists by doing the same:

    // Block of text fields (extended format supported, see extra-field.txt).
    "textFields": [
      ${ "markers.xc":"def.iconEnemyTankWR" },
      ${ "markers.xc":"def.tankName" },
      ${ "markers.xc":"def.tankPtsInteger" },
      ${ "markers.xc":"def.topTankers" },
      ${ "markers.xc":"def.position" }
    ]

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...