Editing .xml Files

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

Moderator: Locomotion Moderators

Post Reply
User avatar
ChrisMatic
Engineer
Engineer
Posts: 32
Joined: 12 Sep 2015 01:35
Skype: chris.swavola
Location: Scranton, PA.
Contact:

Editing .xml Files

Post by ChrisMatic »

Morning, everyone.

If i wanted to change the amount of coal a mine produces by default, what line or lines would i change in the .xml file created by locotool?

Also, how can i change what product a freight car holds? What line do i change there?

Regards,
Chris S.
Regards,

Chris S.
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Editing .xml Files

Post by maquinista »

ChrisMatic wrote:Morning, everyone.

If i wanted to change the amount of coal a mine produces by default, what line or lines would i change in the .xml file created by locotool?

Also, how can i change what product a freight car holds? What line do i change there?

Regards,
Chris S.
You can use this document:
http://www.tt-wiki.net/wiki/Variable:List
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Walter1940
Tycoon
Tycoon
Posts: 989
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: Editing .xml Files

Post by Walter1940 »

ChrisMatic wrote: Also, how can i change what product a freight car holds? What line do i change there?
Follow the instructions from the tutorial. So you can change the freight.

http://www.walter1940.de/tutorial/xml-m ... english/#E

I am not familiar with buildings. But maybe the user "Emperor Darth Sidious" can help.
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
ChrisMatic
Engineer
Engineer
Posts: 32
Joined: 12 Sep 2015 01:35
Skype: chris.swavola
Location: Scranton, PA.
Contact:

Re: Editing .xml Files

Post by ChrisMatic »

Hmmm, thank you, Walter.
Regards,

Chris S.
User avatar
glenjimen
Traffic Manager
Traffic Manager
Posts: 139
Joined: 16 Aug 2013 00:44

Re: Editing .xml Files

Post by glenjimen »

ChrisMatic wrote:Also, how can i change what product a freight car holds? What line do i change there?
In the .XML, just under the description and languages you'll see lines like this:

<cargo num="0" capacity="35">
<cargotype id="8">0</cargotype>
</cargo>

cargo "8" -> goods
capacity -> "35"


This means the first type of cargo this car can hold, some cars can hold more than one type:
cargo num="0"

Here is a list of cargo type numbers used:
http://www.tt-forums.net/viewtopic.php?f=40&t=34521
Visit the Directory --> Loco-Dat-Directory
User avatar
AxelP14
Engineer
Engineer
Posts: 76
Joined: 03 Jun 2012 13:37
Location: Indonesia

Re: Editing .xml Files

Post by AxelP14 »

--Bump--

It's been long time since I really play into LocoTool, but since yesterday I have tried to edit Oil Tanker (ship), it always show this: Element cargo is inside element description but can be only be a child of chunk.

Even if I drag the original xml file to the locotool.exe, it's still shows that message. I never got this message before AFAIK. Any idea?
User avatar
Walter1940
Tycoon
Tycoon
Posts: 989
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: Editing .xml Files

Post by Walter1940 »

Sorry, can you make a screenshot from the message? I don't understand the meaning of the message. :?

So a message I had never in all these years.
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
AxelP14
Engineer
Engineer
Posts: 76
Joined: 03 Jun 2012 13:37
Location: Indonesia

Re: Editing .xml Files

Post by AxelP14 »

Walter1940 wrote:Sorry, can you make a screenshot from the message? I don't understand the meaning of the message. :?

So a message I had never in all these years.
When dragging xml to locotool
Attachments
Messagee.png
Messagee.png (64.15 KiB) Viewed 712 times
User avatar
Walter1940
Tycoon
Tycoon
Posts: 989
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: Editing .xml Files

Post by Walter1940 »

Wow, never seen before. :shock: Sorry
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
Zakos
Tycoon
Tycoon
Posts: 3977
Joined: 15 Mar 2012 02:48
Location: in my mum's car
Contact:

Re: Editing .xml Files

Post by Zakos »

@Axel- You probably made a small syntax error when you edited the code, though I don't know exactly where. I would just decompile the original .dat file again and redo your changes, unless you feel like searching for the mistake.
User avatar
AxelP14
Engineer
Engineer
Posts: 76
Joined: 03 Jun 2012 13:37
Location: Indonesia

Re: Editing .xml Files

Post by AxelP14 »

Zakos wrote:@Axel- You probably made a small syntax error when you edited the code, though I don't know exactly where. I would just decompile the original .dat file again and redo your changes, unless you feel like searching for the mistake.
I only edit the reliability section to make it 100%, and yesterday I'm trying to edit Lumber Camp and same message popped out. Maybe because I'm using Windows 10?
User avatar
Zakos
Tycoon
Tycoon
Posts: 3977
Joined: 15 Mar 2012 02:48
Location: in my mum's car
Contact:

Re: Editing .xml Files

Post by Zakos »

I don't think so, and it shouldn't be giving that message if you didn't mess with the structure of the code.
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 32 guests