Changing the default name for vehicles, industries etc...
Posted: 25 Feb 2018 16:50
how do i edit the default name of an object?
The place to talk about Transport Tycoon
https://www.tt-forums.net/
I want to be able to change the name of a vehicle/industry, so I can distinguish between them while looking through the list in scenario editor.Gwyd wrote:When you say object, what do you mean?
I'm guessing it's going to be via NewGRF.
I was referring to the file name.acs121 wrote:For a vehicle : go in depot, click on a vehicle (don't double-click, it will buy it) and click "Rename".
For an industry, AFAIK it's not possible and there's no patch for that.
Code: Select all
<unknown name="field_11A[15]" size="1">3</unknown>
<unknown name="field_11A[16]" size="1">13</unknown>
<variable name="numsnd" size="1">2</variable>
<description num="0" language="0">Boeing 777 (L)</description>
<description num="0" language="1">Boeing 777 (L)</description>
<description num="0" language="2">Boeing 777 (L)</description>
<description num="0" language="3">Boeing 777 (L)</description>
<description num="0" language="4">Boeing 777 (L)</description>
<description num="0" language="5">Boeing 777 (L)</description>
<description num="0" language="9">Boeing 777 (L)</description>
<description num="0" language="11">Boeing 777 (L)</description>
I know all that. I guess I didn't make myself clear. I'm just not sure which line to change? Is the first line for english? I saw a few english lines.Zakos wrote:If you haven't already, go and download Locotool. Download either locotool_v0.4.3 or locotool_v0.4.3b (not sure if there's any difference). Unzip the files and put them wherever is most convenient, in your Locomotion folder for instance.
You can now edit any file in the game's Objdata folder. Drag and drop the file (look for 777.DAT) onto locotool.exe and it will create a folder of images and an .xml document. Don't mess with the images folder. Open the .xml in Notepad and you can make any edits you like.
To change the name of the file, find these lines in the code.
Yours will have different names because mine are heavily modified, but where it says "777" change the name to what you want it to say. Be sure that you don't mess with any other parts of the code.Code: Select all
<unknown name="field_11A[15]" size="1">3</unknown> <unknown name="field_11A[16]" size="1">13</unknown> <variable name="numsnd" size="1">2</variable> <description num="0" language="0">Boeing 777 (L)</description> <description num="0" language="1">Boeing 777 (L)</description> <description num="0" language="2">Boeing 777 (L)</description> <description num="0" language="3">Boeing 777 (L)</description> <description num="0" language="4">Boeing 777 (L)</description> <description num="0" language="5">Boeing 777 (L)</description> <description num="0" language="9">Boeing 777 (L)</description> <description num="0" language="11">Boeing 777 (L)</description>
Once you've made you changes, save the file. Then drag and drop the .xml onto locotool.exe and your changes to the main file will be saved.