Modding for dummies-first tutorial of the series
I've heard questions about this and I though, let's get this clear:
-your mod ONLY exists from the class files, no need to add the ddstextures, layout files, sgbins and localizations
-if there is no <GroundType>ANY</GroundType> in the <placement> section, add it yourself
-don't use windows notepad for your mod, use Notepad ++ instead (and make sure the coding is set to ANSI in the coding menu in Notepad++)
Question test results:
As you can see, the NO collision box mods work, except that they say they aren't connected to the road, I've updated that part of the tutorial to fix that.
The third building is the suggestion of Lextacy to use a collision box of 0,80 meters, which has the extra that even when the two buildings are exactly on eachother, you can place them though eachother. And you can place the back side through for example roads now. Here's an example:
The German Pack building has a collision box of 1,40 and the hotel a collision box of 0,80
I hope the 0 meters wide collision box will work for more buildings, time will tell, I'll keep the 1 meters wide collision box in the tutorial in case the 0 wide doesn't work for all buildings
This tutorial might seem hard with all the code, but it's the easiest you can get with modding.
This tutorial is about making buildings small/no collision and Over Water Placeable
ATTENTION: A mod like this with just one or a couple buildings isn’t enough to be uploaded on the XL Exchange. If you want to make a mod that is, you should make a pack with more than 30 buildings with a small collision box or OWP
Be aware that your mod could be in conflict with other mods if it adds a small collision version of the SAME building.
Making a small collision/ OWP version of a MOD can be a bit different, so pay attention and always test it before you share it. Some modders won’t be glad if you make a new XLEX entry for your addon, if the modder is still active please discuss before uploading.
- Notepad ++
-unpacked Cities XL
First, make sure you have all cities xl game files unpacked. There are other tutorials on this site that explain how to do that in more detail, I will give a quick explanation below:
This time, we are interested in the design folder, you can open it now.
When you open it, you see a shitload of folders, don’t worry about it. Basically we’re just interested in the “buildings” folder, you can open it.
Okay, okay, just as much folders as the previous one, and this time we’re interested in almost every one of them.
Now the hard part, finding the building that you saw in game, the one you want to be small collision or over water placeable, maybe even both. If you remember the in-game icon, you should open a new tab and go back to the “data” folder again. This time you’ll click interface and then ddstexture. If it’s a normal building, click buildings. You’ll see a list of pictures, if you can’t see the pictures, even with the ‘big icon’ mode on you should find yourself a “dds” viewer, because these pictures are .dds .
If you have found your building in the icon list, cope its name and go back to the folder you had already opened. This folder is full of .class files, and if you search for the name of that dds icon you found, a class file with the same name will pop up, open it.
When you open the class file you’ll see a lot of code, we’re interested in a couple of sub-sections of the code:
The first section we’re interested in is the menu location, aka the tag. Changing this is needed for both over water mods as small collision mods. This is a code line that tells the game where to show to model. Browse the file for a code that looks like this:
Except if you want to change it to a whole other location, it’s very easy: Change MS18 to MSNOCOLLISION if you want it in the small collision box menu or change MS18 to MSOVERWATER if you want it in the OWP menu. If you want it in the custom content menu, change MS18 to MSCUSTOM.Code:<Tag>Commerce;Hotel;T4;MS18;GemCity;PRIVATE;UnqualifiedWorker;HolidayHotel;NOZAC</Tag>
BE CAREFUL: You HAVE to change this, you won’t be able to see which one is no collision/OWP or the real version if you don’t
Now to the next step:
Go to the <collisionshape> part of the file, what looks like this:
The code tells us that the building is 60 meters wide by 80 meters long by 69,5 meters high. We don’t have any problems with the height, except if you want the building to go through something like a bridge.Code:<CollisionShape> <Dimension>60,80</Dimension> <Height>69.59999847</Height> <FundamentHeight>40</FundamentHeight> <Use>1</Use> </CollisionShape>
continue in the SMALL collision box or the NO collision box spoiler
SMALL collision box:
For example, change b_hotr04_t3.class to b_hotr04OLE_t3.class
Save your changed class file to a new “mod folder” (a mod folder is a folder called data inside a folder with any name)
My new mod folder for this mod looks like this:
The design and buildings folders aren’t mandatory, but I strongly advice to use them.
Now the last step, export it to the game:
Open pakunpak and select the data folder in the source tab. Select a save location for your mod, call it something like [your name]_[name of the mod]_v1.0.patch.
Then hit compress
If you haven’t done it yet, place back the mods your moved before unpacking CXL and place your new mod in the paks folder too.
As you can see, the building is now fully OWP and has a small collision box
Pre-requisites for your mods:
Tutorial files and the mod I made:
-If you want a pack of OWP/SC buildings, you can put all class files together in one patch file. (so just place them all in your “mod folder”.
-if the game crashes when you try the mod, and you get this error in your log:make sure the coding is set to ANSI and not to UTF-8 BOMCode:XML ParseError, while parsing "ï":
-if you’re getting an error while packing in Pakunpak, try to run it as admin
If you are going to register on XLNation, please make sure you do not use a proxy server.Dismiss Notice
If you use a proxy server your registration will most likely get blocked due to spammers and hackers using proxy servers to hide their real IP address.
If your using your home or work IP address and have not received your registration email, check your spam folder.Thanks guys for helping out. I will have to adjust the next due amount up by $15 as I can't make the last two amounts go against the bill that just got paid. I'm going to look into how we can deal with this in the future.Dismiss Notice
Tutorial Modding for dummies: Small collision, no collision and OWP
This tutorial teaches you how to make a simple mod