RawNationDisplayName Explanation

From Terra Invicta Official Wiki

Explanation

The RawNationDisplayName page is a workaround for efficiently converting Nation data names into Nation display names. I previously attempted to use a template file using a #switch function, but it was extremely inefficient since there are so many Nations to check through one by one, and the template had to be called over and over for every Nation data name on the page that needed to be converted. This method is way faster.

Usage

Error while fetching data from URL https://wiki.hoodedhorse.com/Terra_Invicta/index.php?title=RawNationDisplayName&action=raw: $2.
There was a problem during the HTTP request: 403 Forbidden
Error while fetching data from URL https://wiki.hoodedhorse.com/Terra_Invicta/index.php?title=RawNationDisplayName&action=raw:
<!DOCTYPE html>
 <html class="no-js" lang="en-US"> 
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<style>body{margin:0;padding:0}</style>


<script type="c8db10390846d18792aac093-text/javascript">
  if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
</script>

</head>
<body>
  

Sorry, you have been blocked

You are unable to access hoodedhorse.com

Why have I been blocked?

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

<script type="c8db10390846d18792aac093-text/javascript"> window._cf_translation = {}; </script> <script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="c8db10390846d18792aac093-|49" defer></script><script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a3e56765dcd21489',t:'MTc4OTk1NTI2Nw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script><script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"51862476f1994747843f52d73cd5e123","spa":2}' crossorigin="anonymous"></script> </body> </html>
.

Just put this once anywhere in your wiki page that is before the Nation data names that you wish to convert.

{{#get_web_data:
|url={{fullurl:RawNationDisplayName|action=raw}}
|data=__all
}}

Then, to convert a Nation data name such as "USA", simply type:

{{#external_value:USA}}

Which would output: Error: no local variable "USA" has been set.

How to Update RawNationDisplayName

Whenever the game adds more Nations, RawNationDisplayName can be easily updated as follows:

  1. Open the file
     TINationTemplate.en 
    , which is located in
     \Terra Invicta\TerraInvicta_Data\StreamingAssets\Localization\en 
  2. Do a search for every line that starts with
    TINationTemplate.displayName.
  3. Copy every line found, and paste it into RawNationDisplayName, replacing everything after the line
    EXPLANATION=[[RawNationDisplayName Explanation]]
  4. Finally do a search and replace to replace every
    TINationTemplate.displayName.
    with nothing.