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

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
User avatar
starcraftguy1
Engineer
Engineer
Posts: 47
Joined: 28 Sep 2016 02:32
Location: Victoria, BC, Canada

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

Post by starcraftguy1 »

how do i edit the default name of an object?
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

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

Post by Gwyd »

When you say object, what do you mean?
I'm guessing it's going to be via NewGRF.
User avatar
starcraftguy1
Engineer
Engineer
Posts: 47
Joined: 28 Sep 2016 02:32
Location: Victoria, BC, Canada

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

Post 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.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

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

Post 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.
User avatar
starcraftguy1
Engineer
Engineer
Posts: 47
Joined: 28 Sep 2016 02:32
Location: Victoria, BC, Canada

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

Post 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.
Attachments
change name.jpg
change name.jpg (50.45 KiB) Viewed 5866 times
User avatar
Zakos
Tycoon
Tycoon
Posts: 3977
Joined: 15 Mar 2012 02:48
Location: in my mum's car
Contact:

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

Post 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.
User avatar
starcraftguy1
Engineer
Engineer
Posts: 47
Joined: 28 Sep 2016 02:32
Location: Victoria, BC, Canada

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

Post 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.
User avatar
Walter1940
Tycoon
Tycoon
Posts: 983
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

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

Post by Walter1940 »

That's the order of the languages:
US
UK
FR
DE
ES
IT
9
CN


(Nobody knows what the "9" stands for)
http://www.walter1940.de
Vehicles for Locomotion

Tutorials in english
- From MSTS to Locomotion ---> http://www.walter1940.de/tutorial/msts2loco/
- Wally ---> http://www.walter1940.de/tutorial/wally/
- xml-modding ---> http://www.walter1940.de/tutorial/xml-modding/
User avatar
starcraftguy1
Engineer
Engineer
Posts: 47
Joined: 28 Sep 2016 02:32
Location: Victoria, BC, Canada

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

Post by starcraftguy1 »

The names did not change.
There are duplicate industries in the list.
Not sure which one is the modded and not modded.
Attachments
name-industry.JPG
name-industry.JPG (42.82 KiB) Viewed 5801 times
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 4 guests