Page 1 of 1

Changing the default name for vehicles, industries etc...

Posted: 25 Feb 2018 16:50
by starcraftguy1
how do i edit the default name of an object?

Re: Changing the default name for vehicles, industries etc...

Posted: 25 Feb 2018 20:49
by Gwyd
When you say object, what do you mean?
I'm guessing it's going to be via NewGRF.

Re: Changing the default name for vehicles, industries etc...

Posted: 25 Feb 2018 21:07
by starcraftguy1
Gwyd wrote:When you say object, what do you mean?
I'm guessing it's going to be via NewGRF.
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.

Re: Changing the default name for vehicles, industries etc...

Posted: 25 Feb 2018 22:56
by acs121
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.

Re: Changing the default name for vehicles, industries etc...

Posted: 25 Feb 2018 23:27
by starcraftguy1
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.
I was referring to the file name.

Re: Changing the default name for vehicles, industries etc...

Posted: 26 Feb 2018 04:34
by Zakos
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.

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>
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.

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.

Re: Changing the default name for vehicles, industries etc...

Posted: 26 Feb 2018 05:58
by starcraftguy1
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.

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>
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.

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.
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.

Re: Changing the default name for vehicles, industries etc...

Posted: 26 Feb 2018 06:46
by Walter1940
That's the order of the languages:
US
UK
FR
DE
ES
IT
9
CN


(Nobody knows what the "9" stands for)

Re: Changing the default name for vehicles, industries etc...

Posted: 26 Feb 2018 16:22
by starcraftguy1
The names did not change.
There are duplicate industries in the list.
Not sure which one is the modded and not modded.