RawPowerPlantDisplayName Explanation

From Terra Invicta Official Wiki
Revision as of 20:09, 14 June 2025 by Redwah (talk | contribs) (Created page with "== Explanation == The RawPowerPlantDisplayName page is a workaround for efficiently converting Power Plant data names into Power Plant 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 Power Plants to check through one by one, and the template had to be called over and over for every Power Plant data name on the page that needed to be converted. This method...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Explanation

The RawPowerPlantDisplayName page is a workaround for efficiently converting Power Plant data names into Power Plant display names. I previously attempted to use a template file using a #switch function, but it was extremely inefficient since there are so many Power Plants to check through one by one, and the template had to be called over and over for every Power Plant 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=RawPowerPlantDisplayName&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=RawPowerPlantDisplayName&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="b541f5fbf7a013f1a3a4e22c-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="b541f5fbf7a013f1a3a4e22c-text/javascript"> window._cf_translation = {}; </script> <script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="b541f5fbf7a013f1a3a4e22c-|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:'a40d68a0bf6ed262',t:'MTc5MDM3NDc0OA=='};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 Power Plant data names that you wish to convert.

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

Then, to convert a Power Plant data name such as "SolidCoreFissionReactorVIII", simply type:

{{#external_value:SolidCoreFissionReactorVIII}}

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

How to Update RawPowerPlantDisplayName

Whenever the game adds more Power Plants, RawPowerPlantDisplayName can be easily updated as follows:

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

Note: There are also some comments in TIPowerPlantTemplate.en that need to be removed.