(Help required) ? Normal Buildings to Misc Buildings ?

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

Moderator: Locomotion Moderators

Post Reply
User avatar
Mudkip1001
Engineer
Engineer
Posts: 3
Joined: 23 Jun 2015 01:46

(Help required) ? Normal Buildings to Misc Buildings ?

Post by Mudkip1001 » 23 Jun 2015 02:27

Hi, I was just wondering if someone could help with my endeavor
I was playing Locomotion with a friend on a new Scenario I created, and I came across a small problem. I built these small areas with things like courthouses,parks,concert halls etc. and as the city expanded, they were deleted. Image
Normal Buildings can be deleted at anytime by the city and other players/AI. But Misc Buildings Cannot (At least to my knowledge).
So I was wondering if there was a way to make a building from the regular {Build Individual Town Buildings} Building, to a Misc Building {Build Misc Buildings}

Image
Image

So if anyone could give me some information on how to do that, or point the way, that would be great. ~Thank you~
~WHY~

User avatar
uktrackbuilder_loco
Director
Director
Posts: 566
Joined: 06 Mar 2007 18:57

Re: (Help required) ? Normal Buildings to Misc Buildings ?

Post by uktrackbuilder_loco » 24 Jun 2015 13:12

You could try taking a dat from the miscelleanous section and decompiling it and doing the same for a normal building noting the differences in the xml coding as that will be where the necessary flag is to set the building type, for that you'll need locochanger to decompile the dats and remember when viewing the resulting xml files, use notepad or similiar to read them as IE will attempt to prevent you reading them if you use that programme to view them in

User avatar
Mudkip1001
Engineer
Engineer
Posts: 3
Joined: 23 Jun 2015 01:46

Re: (Help required) ? Normal Buildings to Misc Buildings ?

Post by Mudkip1001 » 25 Jun 2015 19:51

uktrackbuilder_loco wrote:You could try taking a dat from the miscelleanous section and decompiling it and doing the same for a normal building noting the differences in the xml coding as that will be where the necessary flag is to set the building type, for that you'll need locochanger to decompile the dats and remember when viewing the resulting xml files, use notepad or similiar to read them as IE will attempt to prevent you reading them if you use that programme to view them in
Just a quick question, what is the "locochanger"? I have the locotool and locowrapper, and in the tutorials they mention "Copy a dat file from your objdat folder to the folder locochanger." and "Copy a dat file from your objdat folder to the folder locochanger.". Where is this folder, or where do I have to make it? I'm not very good with coding/programming. Right now, I'm having problems with decompiling dat files to xml. My Goal is to convert the courthouse (BLDCITY21.dat) to a misc building.
Last edited by Mudkip1001 on 25 Jun 2015 20:30, edited 1 time in total.
~WHY~

User avatar
uktrackbuilder_loco
Director
Director
Posts: 566
Joined: 06 Mar 2007 18:57

Re: (Help required) ? Normal Buildings to Misc Buildings ?

Post by uktrackbuilder_loco » 25 Jun 2015 20:29

Mudkip1001 wrote:
uktrackbuilder_loco wrote:You could try taking a dat from the miscelleanous section and decompiling it and doing the same for a normal building noting the differences in the xml coding as that will be where the necessary flag is to set the building type, for that you'll need locochanger to decompile the dats and remember when viewing the resulting xml files, use notepad or similiar to read them as IE will attempt to prevent you reading them if you use that programme to view them in
Just a quick question, what is the "locochanger"? I have the locotool and locowrapper, and in the tutorials they mention "Copy a dat file from your objdat folder to the folder locochanger." and "Copy a dat file from your objdat folder to the folder locochanger.". Where is this folder, or where do I have to make it? I'm not very good with coding/programming. Right now, I'm having problems with decompiling dat files to xml.
http://www.tt-wiki.net/wiki/UsingLocoTools

links you to the version where you'll find the tool, there is also a sticky on the use of the program in the forum here as well and it is very self explanatory, you download it into a separate folder away from your objdata folder, back up your objdata folder and then unzip and run locotool
you copy repeat copy the dat you wish to decompile into that folder where you then select it and hold it over the icon for locotool and that will create an xml file and a folder in which will be the rendered sprites for the object
you read the xml file in notepad, do not use IE as it tends to reject reading it as it will come up with some garbage about active x controls, the xml is the code and when you are done in notepad you save and overwrite that file
To recompile the dat file with modifications, hover the completed xml file over the icon again and that will recreate the dat file with your modifications and a back up file of the dat

The reason for copy is simple, the original dats provided with locomotion are essential to it running so you never cut a dat file out because you will not be sure what it's importance is to the game or more pertinently any saved games, so it is best to play it safe that way if you do screw up then the backed up dat can be used to overwrite the modded one

User avatar
Mudkip1001
Engineer
Engineer
Posts: 3
Joined: 23 Jun 2015 01:46

Re: (Help required) ? Normal Buildings to Misc Buildings ?

Post by Mudkip1001 » 25 Jun 2015 20:58

Funny thing about that :lol: , I just figured how to convert to xml when you responded , All I have to do now finding out what makes a misc building indestructible. My guess is this for the castle

Code: Select all

<variable name="numaux01" size="1">1</variable>
	<variable name="numaux2ent" size="1">1</variable>
	<variable name="earliestyr" size="2">0</variable>
	<variable name="latestyr" size="2">65535</variable>
	<bitmask name="flags" size="1">
		<bit name="bit_0">1</bit>
		<bit name="bit_1">1</bit>
		<bit name="bit_2">1</bit>
		<bit name="ishq">0</bit>ing
makes it a misc building. because a couthouse is this

Code: Select all

<variable name="numaux01" size="1">5</variable>
	<variable name="numaux2ent" size="1">1</variable>
	<variable name="earliestyr" size="2">1890</variable>
	<variable name="latestyr" size="2">1968</variable>
	<bitmask name="flags" size="1">
		<bit name="bit_0">1</bit>
		<bit name="ishq">0</bit>
~Thank you for all the help~
"Your Winner"
Image
~WHY~

User avatar
uktrackbuilder_loco
Director
Director
Posts: 566
Joined: 06 Mar 2007 18:57

Re: (Help required) ? Normal Buildings to Misc Buildings ?

Post by uktrackbuilder_loco » 26 Jun 2015 12:16

Glad you got there in the end, most of the basic stuff for locomotion is not that difficult but the main point and the most important is no matter what editing you are going to do you have an original dat file backed up or stored away so you can undo any changes
Btw Locotool will self check anyway, so if the xml is bad it will inform you by giving you a line error number

Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 4 guests