RawTechDisplayName Explanation

From Terra Invicta Official Wiki
Revision as of 18:16, 23 June 2025 by Redwah (talk | contribs) (Created page with "== Explanation == The RawTechDisplayName page is a workaround for efficiently converting Tech data names into Tech display names. I previously attempted to use a template file using a <nowiki>#switch function</nowiki>, but it was extremely inefficient since there are so many Techs to check through one by one, and the template had to be called over and over for every Tech data name on the page that needed to be converted. This method is way faster. == Usage == {{#g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Explanation

The RawTechDisplayName page is a workaround for efficiently converting Tech data names into Tech display names. I previously attempted to use a template file using a #switch function, but it was extremely inefficient since there are so many Techs to check through one by one, and the template had to be called over and over for every Tech 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=RawTechDisplayName&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=RawTechDisplayName&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="e9ccfd2187f7ee141f2dadb4-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="e9ccfd2187f7ee141f2dadb4-text/javascript"> window._cf_translation = {}; </script> <script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="e9ccfd2187f7ee141f2dadb4-|49" defer></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> <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:'a3e385834ad8a2bf',t:'MTc4OTkzNTUyOQ=='};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></body> </html>
.

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

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

Then, to convert a Tech data name such as "NuclearFusioninSpace", simply type:

{{#external_value:NuclearFusioninSpace}}

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

How to Update RawTechDisplayName

Whenever the game adds more Techs, RawTechDisplayName can be easily updated as follows:

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