ReadText Error

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
-XeNoN-
Posts: 373
Joined: Tue, 6. Mar 12, 12:04
x4

ReadText Error

Post by -XeNoN- » Fri, 8. Dec 17, 11:29

Recently i've been trying to add my custom ship to XRM but i always get ReadText17-***** error, i have director which loads that t file. But whatever i do the error is still there. The other names are correctly displayed only my ship is affected...

Is after the new update something changed in that matter and if so can someone point me in right direction how to make custom director/script and t file. Thanks.

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

Post by X2-Illuminatus » Fri, 8. Dec 17, 17:53

Nothing should have changed with regards to loading text files with the latest update. Have you tested, whether you can load other texts from a custom text file? General things to check are the correct formatting / encoding of the text file itself (UTF-8), possible xml errors (forgotten > or <), wrong language id in the file or the file name, text id mixup in the text file or the TShips 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!

-XeNoN-
Posts: 373
Joined: Tue, 6. Mar 12, 12:04
x4

Post by -XeNoN- » Fri, 8. Dec 17, 19:30

The X3Editor showed correctly...i have triple checked everything. Only in game it returns the error.

Anyways replacing did of the ship with other one in XRM did the job right and correctly displays the name because my custom ship uses same id as previous ship that used that id.

I could send here my custom director and t file if you wish...

BlaxTorm
Posts: 10
Joined: Tue, 18. Aug 15, 14:26

Post by BlaxTorm » Tue, 26. Dec 17, 00:55

i have a similar problem just changed a shield name which appears ok in the editor and also worked with other mod but it's not working in this one i tried new xml file tried placing inside and outside cat file to no avail :(

BlaxTorm
Posts: 10
Joined: Tue, 18. Aug 15, 14:26

Post by BlaxTorm » Sat, 30. Dec 17, 23:28

just found why! i was using a different file name for replacing a object name in the game which doesn't work because since the file has a different name (even if the same id as 17 it won't read it) or at least it did not this time.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 31. Dec 17, 00:04

in that case you could also have modified the setup script to point to your changed t file number ;) or create a new setup file do load your additional t file
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

BlaxTorm
Posts: 10
Joined: Tue, 18. Aug 15, 14:26

Post by BlaxTorm » Fri, 5. Jan 18, 11:05

ohhhh teach me senpai :D

BlaxTorm
Posts: 10
Joined: Tue, 18. Aug 15, 14:26

Post by BlaxTorm » Fri, 5. Jan 18, 11:06

you see scripting is not my strong, at all...

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

Post by X2-Illuminatus » Fri, 5. Jan 18, 20:11

In future, please use the edit button to prevent two or more of your posts from appearing directly after each other without someone else having the chance to reply.

As for using text from text files, only the main text files (numbered 0001, 0002 and 0003) are loaded by the game by default. All other (custom) text files, which you add yourself and which you want to read from, must be loaded manually. You can do that by using the load text: id command in a setup script. Setup scripts start their name with "setup." (without the quotes) followed by whatever you want to call your script and are automatically loaded on the start / loading of a (modified) game. They are used for things like registering command slots or hotkeys, loading text files and creating global variables - so all the initial parameters, which may be used later. The actual script function, in case there is one, should always be outsourced to other (plugin) scripts though.
If you want to learn more about scripting, I suggest reading the MSCI Manual (written for X2: The Threat, but still accurate for the Script Editor in the X3 games). You can also check our MSCI reference for explanations of specific commands.
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!

BlaxTorm
Posts: 10
Joined: Tue, 18. Aug 15, 14:26

Post by BlaxTorm » Wed, 10. Jan 18, 16:12

thanks! yeah just noticed there is an edit button XD sorry

Post Reply

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