Adding new txt file for new ship names

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
J.M.
Posts: 78
Joined: Tue, 26. Aug 08, 23:40

Adding new txt file for new ship names

Post by J.M. » Sat, 29. Feb 20, 15:37

Just coming back into modding x3tc and have run across a problem, one of which I solved the last time I put new ships into TC but its been about 3 years since then and I cant remember how to do it.
Basically the ships work in game but come up as readtext….
My text file is 9951-044 and is in the t folder in the in the game folder, but the game isn't recognising it for some reason. if I remember rightly I have to use the script editor to tell the game to load it but I cant seem to get it to work. this is what my script says:
Arguments
•1: loadtext , Var/Number , '9951'
Anyone point me in the right direction to get the game to read my text?
Thanks.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: Adding new txt file for new ship names

Post by Joubarbe » Sat, 29. Feb 20, 15:55

setup.MyScript:

Code: Select all

load text: id=9951
All scripts that are prefixed with "setup." are triggered each time a game is loaded.
Also, the name of your T file must be 9951-L044.xml, with proper format:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<language id="44">
	<page id="9951" title="My t-file">
		<!-- Your stuff here -->
	</page>
</language>

J.M.
Posts: 78
Joined: Tue, 26. Aug 08, 23:40

Re: Adding new txt file for new ship names

Post by J.M. » Sat, 29. Feb 20, 20:10

Do I put 'load text: id=9951' in the arguments section? if so which script input do I use? if not where do I type the 'load text: id=9951'?
Thanks for your help

J.M.
Posts: 78
Joined: Tue, 26. Aug 08, 23:40

Re: Adding new txt file for new ship names

Post by J.M. » Sun, 1. Mar 20, 12:01

This is what i've got now;
Script setup.myscript.text
Version: 1
for Script Engine Version: 45

Description
Description
Arguments

Source Text


001 load text: id=9951
002 return null

This doesn't seem to work either.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24963
Joined: Sun, 2. Apr 06, 16:38
x4

Re: Adding new txt file for new ship names

Post by X2-Illuminatus » Sun, 1. Mar 20, 16:41

Have you spawned new ships after loading the text file?
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

J.M.
Posts: 78
Joined: Tue, 26. Aug 08, 23:40

Re: Adding new txt file for new ship names

Post by J.M. » Sun, 1. Mar 20, 19:14

yes, they're names just show up as readtext17- and what ever number their entry is in the txt file.

User avatar
N8M4R3
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 399
Joined: Fri, 24. Nov 06, 15:48
x4

Re: Adding new txt file for new ship names

Post by N8M4R3 » Sun, 19. Apr 20, 01:18

maybe your t-file is not readable by the game, take sure that the t-file will be saved in "UTF-8" format. It's better to use Notepad++ or some other editor instead of windows editor for editing t-files!

Edit: Otherwise you also can load a textfile through a missions director file, for example

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
 	<documentation>
    		<author name="xxx" alias="xxx" contact="xxx"/>
   		<content reference="xxx" name="xxx" description="xxx"/>
   		<version number="1.00" date="xx/xx/xx" status="release" />
 	</documentation>
  	<cues>
    		<cue name="xxx" game="All" comment="xxx">
       			<action>
				<do_all>
          				<load_text fileid="9951"/>
				</do_all>
	   		</action>
		</cue>
	</cues>
</director>
Neue Erweiterung für X3 verfügbar: Farnham's Legacy | +Optional: weitere Verbesserungen im inoffiziellen Patch v1.3.14 *** Modified*** :khaak: :thumb_up:
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/

J.M.
Posts: 78
Joined: Tue, 26. Aug 08, 23:40

Re: Adding new txt file for new ship names

Post by J.M. » Tue, 5. May 20, 00:05

I got it to work via the script editor, it seems to be the plugin manager that was the issue, as I uninstalled it and loaded up the game without the PM and text file worked. I reinstalled PM and the script still worked. Not sure why but I’ve had a couple of bugs with the plugin manager like this recently, it seems like when I install something and load the game from the desktop shortcut it will work fine but if I install something and load the game from the PM it won’t work first time, load it up the second time and it all works :gruebel:
It’s like I need to give the PM a couple of attempts to load my scripts. Either way it works now so it’s all good.

User avatar
N8M4R3
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 399
Joined: Fri, 24. Nov 06, 15:48
x4

Re: Adding new txt file for new ship names

Post by N8M4R3 » Tue, 5. May 20, 13:39

I'm glad to hear that you were able to find out whats going wrong and that everything is working now :thumb_up: For myself i don't use the plugin manager, so i don't know about exiting bugs and whether this error is known. But as with other programs and scripts here, as long as you know or you find out what you can use them for without troubles and for which things less, everything is good. Maybe you find out more on the PM toppic viewtopic.php?f=94&t=265915 or by describing your problems there, if you want to. Cycrow was still responding to the last questions, i see.
Neue Erweiterung für X3 verfügbar: Farnham's Legacy | +Optional: weitere Verbesserungen im inoffiziellen Patch v1.3.14 *** Modified*** :khaak: :thumb_up:
Diese Woche im Angebot: HUD-GUI-Mix (FL) | Text-DB 0001-L049 (FL) | Textkorrekturen & Verbesserungen (FL)
Weitere Veröffentlichungen hier: N8workX
Nützliches Tool für nicht mehr vorhandene Downloads: web.archive.org
Externes Archiv für MOD/SCR Ressourcen: xdownloads.co.uk | code.google.com/archive/p/x3tcscripts/

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”