Jump to content
Sign In to follow this  
avk996

Editing Buildings in CXL

38 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

I'm just wondering, is it easily accessible to modify structures in Cities XL? And if so, how? Could someone please supply me with the following information:

1. What file contains the buildings? (I have the Pack/Unpack application just to let you know.)

2. What programs do I need to edit the buildings, and are the free of charge?

3. With the coming of CXL 2011, is it worth devoting time and effort to editing the buildings?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Originally posted by: avk996
I'm just wondering, is it easily accessible to modify structures in Cities XL? And if so, how? Could someone please supply me with the following information:

1. What file contains the buildings? (I have the Pack/Unpack application just to let you know.)
2. What programs do I need to edit the buildings, and are the free of charge?
3. With the coming of CXL 2011, is it worth devoting time and effort to editing the buildings?quote>



I'm glad you're taking an interest in modding!!

I'll try to briefly explain the basic steps, what you'll need, and where to find things.

1. The first thing you should do is unpak everything; this way, you can use your OS to search for files (or use other (free) programs to search within the files). To unpak everything you can use the pakunpak program from the French site: Generation City, or even jeremy12's program found on Google projects. But I'm not sure how long it will take; I think one person reported Jeremy12's to take an hour to decompress. You can also grab CitiesXS's cxlPackager tool. My favorite by far for repacking is the new pakunpak; but to unpak, I use a different approach:

What I used, and only took a few minutes to decompress everything, was QuickBMS. You'll also need to download the needed citiesxl.bms file. 

To use QuickBMS to unpak (quickly) CitiesXL, open the small program (inside of the .zip) and follow the easy steps when the windows open:
  1. Find and open (through QuickBMS) the citiesxl.bms file
Find a .pak file or .patch file you'd wish to extract - however since you'll want to extract all the files, highlight all of the files in your paks folder (excluding any mods!!)
Find a directory that you'll wish to place these unpacked files. Remember that it will create about 4gb of space so find a suitable hard drive. For example, I have it placed in my d:/ in a folder called CitiesXLfiles. Inside there it will create your data folder, and all the other folders.
Within a minute it should prompt you to overwrite any files; type in 'all'. Basically all of the .patch files MC created are overwriting the older .pak files from the vanilla version.

You can definitely still use the pakunpak but it may take longer. I believe the pakunpak program is using the same script to decompress as QuickBMS. If the pakunpak works well, then go for it; I just have no experience with it.

Once you've unpacked everything, you can search everything that MC had to offer. To search inside files, I use a free program called Grep; there are several others. I also use a simple free program called CSDiff which compares two folders (and subfolders) OR two files together and highlights the modifications. With that tool, you can easily compare one of the modder's mods (the patch file unpacked) with MC's files (that you just decompressed) and see what we did to unlock it and change its attributes. A good place to look at some simple files with a few edited buildings would be at the citiesxl mods page on Google projects. For example, you can compare the Mod_Karaaib_Parking with MC's parking lots (which were originally locked). You could also unpak my Money_Bank mod and then change the building's attributes to whatever numbers pleases you (and get more money!!).

BUT, if you just want to look at changing some small things concerning the buildings, the just unpak only the design paks and patches (all_design.pak/patch).

2. To answer your second question, I use another freeware program to view and edit the files called Notepad++, although Microsofts Textpad would do too 3.gif.

The majority of the files that you'll want to look at are in the design folder. Another trick I use is to view all of the buildings in the ddstexture folder (data/interface/ddstexture/buildings) -- this way I get a clear visual of what the buildings are, associated with their real building names: b_ind_bla01_t3. You will need the ability to view .dds images on Windows. You can download some tools from nvidia (*they also have a plugin for editing dds in photoshop).

Personally, I use a share program called MysticThumbs which enables Windows to see a lot of strange image formats, like .dds. This way I don't have to open the dds file in photoshop to see what it is!! You can also use a image converting program to convert the dds files into jpeg - this is only if you still want that visual of knowing what B_strange_building_name_t2 looks like.

If you don't have photoshop, you can also use a free photoshop-like program called Paint.net which can edit .dds. Gimp will also do the trick with a dds plugin. These tools are needed if you wish to edit the dds files for the ingame buttons or the texture -- sgbin files (also using the pakunpak tool).

So to answer your second question more directly, "yes - everything needed to edit CXL is free"

3. For your third question: is it worth your time? probably not.

For me, I was working on a few projects, such as unlocking and fixing the gemski and adding new content like functional boats and HOV lanes, but some of these projects are too difficult and/or impossible for my limited time. And Focus has already shown us some new content.

But we also have some projects that you could easily help us with, like making the buildings and roads more realistic. Most of these things can be changed with a simple text editor and any understanding of the English language; French is also useful for some of the comments in the config and lua scripts.

Perhaps I'll write up a tutorial on how to mod; but it's pretty self-explanatory once you get in there.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Notepad, i will hate you!!!!!!!

Too many hours using it jejejeje XDDD

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

sorry guys,one question:

I have this mod( into paks folder)"CXL Unlocker v2 and CXL Unlocker Mod v.2.0 Addon patch" can insert too this mod (mod_root_40BPv0_3_235.patch)together with the others mod?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Originally posted by: Tanzy70s

sorry guys,one question:

I have this mod( into paks folder)"CXL Unlocker v2 and CXL Unlocker Mod v.2.0 Addon patch" can insert too this mod (mod_root_40BPv0_3_235.patch)together with the others mod?quote>

Nop, you must use it separate.

Now you can use mod_global_wyllman_v0_0_255.patch  for test your blueprints and landmarks without lock conditions

and verylow cost.

A lot of anothers mods changes (i´ll make a list soon)

As i know you can use with any mod.

bye

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Originally posted by: wyllman

Originally posted by: Tanzy70s

sorry guys,one question:

I have this mod( into paks folder)"CXL Unlocker v2 and CXL Unlocker Mod v.2.0 Addon patch" can insert too this mod (mod_root_40BPv0_3_235.patch) together with others mod?

quote>

Now you can use mod_global_wyllman_v0_0_255.patch  for test your blueprints and landmarks without lock conditions

and verylow cost.

A lot of anothers mods changes (i´ll make a list soon)

As i know you can use with any mod.

bye

quote>

instead this mod (mod_global_wyllman_v0_0_255.patch) i can use together others mod?

What it adds this mod?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I've not yet finished.

It is a collection of all the mods I use, in addition to my changes.

When I finish post them all.

You can use it together other mods, or you can do in the near future ;-)

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Nice mini modding tutorial.

Might have to give it a go some time.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Tutorials are coming... 2.gif

I finished chapter 1 (essentials) and 2 (class files)...

They'll be available from Omnibus or as link in modding index.


 

my website:

www.victorfleur.com

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I feel I'm being a bit 'demanding' with myself, but I actually want to create NEW buildings altogether. What do you people think of that?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    You have to find ways to "decode" MonteCristo 3D format.

    I would start trying to create a simple square of road and that the game will accept it.

    I would not even know where to start ;-)

    Good Luck!!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    OK, I think I've found where the buildings are - They're in 'all_design.pak'. Unfortunately, the files are .CLASS files, which I personally find very irritable files.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    what do you want? duplicate a building or creating new building(3d model)?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Models: sgbin archive, unknown format. Data/gfx/buildings - only dds textures are editable.

    Lot: layout file. Data/design/layout/buildings - you can edit it with Notepad++

    Description/Function: class file. Data/design/buildings - you can edit it with Notepad++


     

    my website:

    www.victorfleur.com

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Originally posted by: GlobexCo

    Models: sgbin archive, unknown format. Data/gfx/buildings - only dds textures are editable.

    Lot: layout file. Data/design/layout/buildings - you can edit it with Notepad++

    Description/Function: class file. Data/design/buildings - you can edit it with Notepad++quote>

    Could you be more clear GlobexCo? I'm rather new to CXL modding.

    What's this sgbin archive thing? I saw it in one of the scripts, but I have no idea what it is.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Added others 4 maps to the new second region button in the global mod, as i know the game files has no more maps to use(without crash)

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    3. With the coming of CXL 2011, is it worth devoting time and effort to editing the buildings?quote>

    There is not going to be Cities XL 2011 !!  Monte Cristo is gone and out of business on the last few days of May, 2010.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: supercity124

    3. With the coming of CXL 2011, is it worth devoting time and effort to editing the buildings?quote>

    There is not going to be Cities XL 2011 !!  Monte Cristo is gone and out of business on the last few days of May, 2010.quote>

    Focus Home Interactive bought the rights to the game and is releasing CXL 2011 in October. The news is all over this site and the official CXL site.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: nashville nelson

    779fe9dc3bb614a82fa6652c9d8366af.jpg

    i found a few things out about the sgbins, but at the moment there is no way to edit them or even build a new one.

    quote>

    okok...

    what did you exactly do?

    You opened a poly cloud... it can be a start point...


     

    my website:

    www.victorfleur.com

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I didn't found much out, but here is what i got.


    Here is a typical MC fileheader from a texture file,

    01 00 00 80 BE BE 38 2B 00 00

    ...texture...

    00 00 00 00 ED ED

    Most files start with a BE BE and ends in an ED ED.

    The four bytes directly behind  the ED ED is in this case the lenght of the texture file.

    38 2B 00 00 = 11064 Bytes


    This example is from a graph.bin

    The BE BE and ED ED are nested:

    01 00 00 80 BE BE 02 00 00 00                                     begin of the file

       02 00 00 80 BE BE 0E 00 00 00                               0E 00 00 00  = 14 = length of the following string+00

             76 5F 74 72 5F 67 65 6D 62 75 73 30 32 00                                   = v_tr_gembus02 +00  =14Byte

                01 00 00 80 BE BE 00 00 00 00

                ED ED

                   01 00 00 80 BE BE 00 00 00 00

                   00 00 00 00 00 00 00 00 00 00

                   80 3F 00 00 80 3F 00 00 80 3F

                   00 00 00 00 00 00 00 00 00 00

                   00 00 00 00 80 3F

                   ED ED

       01 01 ED ED

    The missing ED ED is at the file end. The graph.bin and  ***sg files are basically the same.


    This example is from a gamedata.bin:

    00 00 00 00                                     = Spacefiller

    0B 00 00 00                                     = 11 = 11 entries are following

    0D 00 00 00                                     = 13 = lenght of the first entry + 00

    43 4F 4E 53 54 52 55 43 54 49 4F 4E 00          = CONSTRUCTION

    0C 00 00 00                                     = 12

    44 45 53 54 52 55 43 54 49 4F 4E 00             = DESTRUCTION

    07 00 00 00     43 52 45 44 49 54 00                = 7 = CREDIT

    06 00 00 00     50 49 53 54 45 00                   = 6 = PISTE

    09 00 00 00     53 48 4F 50 50 49 4E 47 00          = 9 = SHOPPING

    0B 00 00 00     52 45 53 54 41 55 52 41 4E 54 00    = 11 = RESTAURANT

    06 00 00 00     53 41 4C 45 53 00                   = 6 = SALES

    05 00 00 00     44 45 42 54 00                      = 5 = DEBT

    07 00 00 00     55 50 4B 45 45 50 00                = 7 = UPKEEP

    07 00 00 00     49 4D 50 4F 52 54 00                = 7 = IMPORT

    07 00 00 00     45 58 50 4F 52 54 00                = 7 = EXPORT

    00 00 00 90                                     = unknown

    06 00 00 00                                     = 6 entries are following

    09 00 00 00     42 55 49 4C 44 49 4E 47 00

    05 00 00 00     52 4F 41 44 00

    06 00 00 00     50 49 53 54 45 00

    09 00 00 00     53 48 4F 50 50 49 4E 47 00

    0B 00 00 00     52 45 53 54 41 55 52 41 4E 54 00

    01 00 00 00                                     = 1 = last entry is one byte long

    00                                              = last entry = 0

    The gamedata.bin exist in two places. The first one is located in the .lvl file and the second one is located in the savegame.sol. So the gamedata.bin is basically the Savegame of CXL.


    ...to be continued

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Now the sgbins

    In this example the  v_ai_gemairport09_02_l1

    The entry

    09 00 00 00 23 56 65 68 69 63 6C 65 00

    at offset  0x350

    just means 9 bytes are following:  #Vehicle + 00

    after this there is a typical MC file header.

    01 00 00 80 BE BE BB 0A 00 00

    The BB 0A 00 00 is a 32bit number which represents: 2747

    But this time the number did not represent the lenght of the following data, it represents the number of entries which are following.

    Between the file header BE BE BB 0A 00 00 and the next ED ED are 98892 bytes.

    98892/2747=36

    Every entry is 36 bytes in lenght.

    Every entry contains 9x32bit floating point numbers.

    The first 3 numbers are the XYZ value for this vehicle.

    The other...

    ...now i have a problem , I did this a few month ago and i didn't save everything and i can't get more specific. The rest is from memory.

    The function of the other values are unknown. When you load all 9 Entries as XYZ data in a 3d App you will see a point cloud located round the 0-point. It could be the uvw map. To extract the data from an hex editor i first cut out the 98892 bytes ans saved it. With a Hexadecimal to Text tool you can extract the floating point values with a given precision to a .txt file. When you open the txt file in Excel or Calc you can easily delete all values you don't want and save the rest back to a .txt file. Now you have to convert the .txt file to an .obj file which is basically an ASCII 3d file. When my memory is correct you have to open the .txt file with an hex editor and change all "TAB" values to "Space" values, there should be a function for this kind of work in your editor.

    When all work is done you can open the *.obj file with a 3d app as a Point Cloud.

    There are a few more entries in the  v_ai_gemairport09_02_l1  look for the BE BE headers.

    One data block contains the values for the triangles.

    I don't remember exactly, but you can convert them like the xyz values and import them in the .obj file as triangles. the result will look slightly corrupted. Normally the highest number in the triangle section should be 2747 because there are no more points defined. But there were a few more, i don't remember exactly how much but there is another section in the v_ai_gemairport09_02_l1 file which is encapsuled in an BE  BE-*-ED ED header and this section has exactly the right number of entries as the triangle section determines.  Thats all i remember.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hello.. I currently on a mod who duplicate buildings with differents textures ... 4.gif

    Here some screens

    McDo & Ikea :

    cxl_sc36.jpg

    cxl_sc38.jpg

    some tests for GC buildings 2.gif

    cxl_sc15.jpg

    Not perfect 9.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    The only problem with just re-texturing the building though is that you can still see the bump maps (notice the original hidden logo in the IKEA logo).

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Originally posted by: Asheroo

    The only problem with just re-texturing the building though is that you can still see the bump maps (notice the original hidden logo in the IKEA logo).quote>

    Yes, i 'm trying to fix this problem... but no result for the moment   :s

    screen :

    corse13.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Would it be possible to edit the amount of freight/passengers that a small airport can hold?

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections