Jump to content
Ulisse Wolf

Let's write our own SC4 Building Styles

Cyclone Boom

Note:
Feel free to post your Custom Tileset city scenes in the Showcase topic:
Show us your additional building styles!

Message added by Cyclone Boom

225 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, Null 45 said:

    With hindsight, I think the Maxis range should have been reserved but not counted as part of the extended styles. That way we would have 16 community styles (0x2004-0x2014 in the UI), and 16  user-selected styles (0x2015-2025 in the UI). Of course, that would also require another revision of the style UI.

    The basic idea is to block IIDs of the range 0x2000-0x200F as it is used by Maxis and then the remaining unused IIDs of the range 0x2000-0x200F were used to add additional more common styles.

    One solution I propose is to block the range 0x00002010 - 0x0000201F (CoriBoom (Cori & CB)) and their related Private IID 0x00002800 - 0x0000280F.

    So it means that CoriBoom (Cori & CB) will have a new Public IID range (0x00002060 - 0x0000206F) and The Private IID (0x00002850 - 0x0000285F)

    However, there is also the fact that more and more people are using 2K and 4K screens so you may also consider expanding the UI to add more styles. So also create a UI compatible with 2K and 4K screens by solving the problem of the UI being too small

    • Like 1

    Federal Republic of SiculiaFederal Republic of Sonora

       Ain Member  Wiki

    NAM Team - Co-developer of Pedestian Revolution Mod - Railway Department (Hybrid Railway | HRW Expert) - MTA Member - BAT Creator

    Ulisse Wolf YouTube Channel - Ulisse Wolf Mastodon Profile

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    48 minutes ago, Ulisse Wolf said:

    One solution I propose is to block the range 0x00002010 - 0x0000201F (CoriBoom (Cori & CB)) and their related Private IID 0x00002800 - 0x0000280F.

    That makes more sense than taking only part of their assigned ranges.

    48 minutes ago, Ulisse Wolf said:

    However, there is also the fact that more and more people are using 2K and 4K screens so you may also consider expanding the UI to add more styles. So also create a UI compatible with 2K and 4K screens by solving the problem of the UI being too small

    The 2K/4K compatibility would probably be getting into UI overhaul territory, there is little point of the Building Style Control supporting it when the rest of the game does not.

    Cori created a UI with room for 128 custom styles and posted an image of it earlier in this thread.

    That UI was created before I added support for the lot subdivision controls, but it could serve as inspiration for other possible layouts.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Null 45 said:

    I have always found the UI editing tedious and I have no experience with edits involving the background PNGs.

    @Null 45, your revised list of Option A and Option B also got me thinking about the descriptions you use for them.  It would be really hard to remember which tileset each is, without an in-game description.  Does the UI support tooltips as a hover-text to potentially describe these tilesets?  Because honestly without an in-game description, there's no way I'm going to remember the difference between styles like "Berlin 1915" vs. "Stockholm 1945" (in the case of Option A), or the difference between "West Europe" and "North Europe" (in the case of Option B).

    More than anything, I support tooltips to describe these styles because I am a complete idiot when it comes to what these really mean.  All the more help would be really ideal.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    14 minutes ago, Kel9509 said:

    Does the UI support tooltips as a hover-text to potentially describe these tilesets?

    The UI buttons support tooltips, the building style UI's expand/collapse buttons have them.

    Anyone making their own Building Style Control UI could enable tooltips for the style radio buttons and add an additional LTEXT file with the description.

    But I am not sure how to handle the tooltips in BuildingStyles.ini. I would most likly add an optional section that mirrors the existing caption/captionres section. I don't know how SC4 sets the tool tips from the tooltipres command, but that should be easy to discover because I can search for that string in the Mac binaries.

    The tooltip strings use the format Title|Body.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    26 minutes ago, Null 45 said:

    The UI buttons support tooltips,

    Yep. Ofc, peeps'll need to keep in mind that the hover-over tooltips would be per physical slot unless you create some additional DLL magic.

    The additional Building Styles slots in the UI have the IDs of 0x00000000 thru 0x0000001B (which correspond to the entries in BuildingStyles.ini) and we could do a hex offset for the tips such as 0xABC00000 thru 0xACB0001B, but that would be per physical slot.

    So if I put 0x00002015 in the 2nd physical slot (slot 1 internally) then I'd still get the hover-over tip from LText 0xABC00001. However, if the DLL could see my 0x2015 and do the math to look for LText 0xABC02015 then it would accommodate everyone.

    • Like 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Null 45 said:

    I don't know how SC4 sets the tool tips from the tooltipres command, but that should be easy to discover because I can search for that string in the Mac binaries.

    The tooltip strings use the format Title|Body.

    Tooltips can have a title?  I've always wondered about how they work, and whether they can be resized or use a different font.  If that's possible it'd be really great, especially if we could change the font to bigger ones to assist with HD UI mods.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, CorinaMarie said:

    So if I put 0x00002015 in the 2nd physical slot (slot 1 internally) then I'd still get the hover-over tip from LText 0xABC00001. However, if the DLL could see my 0x2015 and do the math to look for LText 0xABC02015 then it would accommodate everyone.

    Where would the 0x2015 value be located?

    1 hour ago, CorinaMarie said:

    Yep. Ofc, peeps'll need to keep in mind that the hover-over tooltips would be per physical slot unless you create some additional DLL magic.

    I was thinking of trying to modify the BuildingStyles.ini format to handle the tooltips, the one bit of complexity is how to modify my parsing code for that feature. The string is comma-separated value, so I guess banning unquoted commas in the caption/tip text would work.

    Something like:

    <UI button id> = <style id>,<style text format>[,<style name>][,<tool tip>]
    
    <UI button id> is a style check box id in the range of 0-127.
    <style id> is the building style id assigned in the Building Style Index, or
    the text Show (case-insensitive) to display a disabled placeholder check box.
    <style text format> is one of the following values: N (normal text) or B (bold text).
    <style name> is optional, when present it uses one of the following formats:
    <name> or CaptionRes:<LTEXT group id>,<LTEXT instance id>.
    If <name> contains commas, the string must be surrounded by double quotes.
    When <style name> is not present, a default name will be used.
    <tool tip> is optional, is optional, when present it uses one of the following formats:
    <text> or TipRes:<LTEXT group id>,<LTEXT instance id>.
    If <text> contains commas, the string must be surrounded by double quotes.
    When <style name> is not present, <tool tip> will be ignored.
    
    Examples:
    
    0 = 0x2005,B,Mediterranean & Tropical
    1 = 0x2006,N,CaptionRes:0x6a231eaa,0x6bbbd875
    2 = 0x2007,N,Mediterranean & Tropical,Tool tip text
    3 = 0x2008,N,CaptionRes:0x6a231eaa,0x6bbbd875,TipRes:0x6a231eaa,0x6bbbd875
    4 = Show,N,Placeholder Check Box
    5 = Show,B
    3 minutes ago, Kel9509 said:

    especially if we could change the font to bigger ones to assist with HD UI mods.

    The tool tip fonts are defined in font.ini, search for ToolTip in that file.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 minute ago, Null 45 said:

    Where would the 0x2015 value be located?

    Modifying your example and it'd be in the 2nd line:

    0 = 0x2005,B,Mediterranean & Tropical
    1 = 0x2015,N,Cori's Example <-------------
    2 = 0x2007,N,Mediterranean & Tropical,Tool tip text
    3 = 0x2008,N,CaptionRes:0x6a231eaa,0x6bbbd875,TipRes:0x6a231eaa,0x6bbbd875
    4 = Show,N,Placeholder Check Box
    5 = Show,B

    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 minutes ago, CorinaMarie said:

    Modifying your example and it'd be in the 2nd line:

    So 0x2015 would be the style id? That should work. I think it would be best to have the style tool tips in their own group id, that way you don't even need to do an offset and can use the style id directly as the instance id. That scheme would save me the hassle of rewriting my BuildingStyles.ini parsing code.

    I am not sure that the individual slots should have tool tips enabled, as that would be a nuisance if the user didn't define one. But I could set it at runtime if there is one for that style id.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 minute ago, Null 45 said:

    So 0x2015 would be the style id?

    Yes. My example is that other peeps (me included) could have any valid style ID in any given slot and the order wouldn't need to make sense.

     

    1 minute ago, Null 45 said:

    I think it would be best to have the style tool tips in their own group id, that way you don't even need to do an offset and can use the style id directly as the instance id.

    Certainly. That is a better idea.

     

    2 minutes ago, Null 45 said:

    I am not sure that the individual slots should have tool tips enabled, as that would be a nuisance if the user didn't define one. But I could set it at runtime if there is one for that style id.

    Then let's don't. They aren't set now and with your method there'd be no reason to put them in the UI code.

    • Like 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forum: SC4 Modding - Open Discussion
     
    20 hours ago, Null 45 said:

    The issue with that is the UI actually only has 28 custom style check boxes, because the 4 Maxis styles are included in that count. So if someone wanted to use 32 custom styles, they would have to edit the UI to remove the Maxis style check boxes. Preserving the Maxis style check boxes is also necessary compatibility with existing content.

    Treating the Maxis range (0x2000-0x2003) as separate from the extended style range solves that conflict. The ids are still assigned in blocks of 16, so the community styles would use 0x2004-0x2014.

    The community style and custom style ranges can be thought of as subsets of the Maxis styles. As I mentioned in another post, all buildings would continue to have the Maxis styles in their Occupant Groups property for compatibility with the base game. The Building Styles exemplar property allows modders to remove a building from the 4 Maxis styles when the DLL is installed and transfer it into another category.

    Well, I was thinking that 28 custom styles would be more than enough for most people, so keeping the Maxis ones within the 32 styles that are supported with the UI shouldn't be that much of a problem for most people. For a non-programmer like me, remembering an ID range from 0x2000 to 0x200F is much easier than a range that starts with 0x2004 and extends to another digit up to 0x2014 (I can remember that A follows 9, but sometimes, I'll get puzzled about what's the next digit after F *;) ).

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    22 hours ago, Andreas Roth said:

    For a non-programmer like me, remembering an ID range from 0x2000 to 0x200F is much easier than a range that starts with 0x2004 and extends to another digit up to 0x2014

    What if we simply skip those IDs for the official version?

    Give CoriBoom 0x2004 thru 0x200F and then make the range for the current discussion start at 0x2010 and run for 16 (or 32) styles. That'd make this section of the UI potentially look like this:

    36 Slot UI with 0x2010-0x202F.png

    And, ofc, they would actually display proper style names. This shows placeholder text. *;)

    As far as the new styles goes, why not just use both ideas in full? Then start the assignments for other peeps's ranges beginning at 0x2030. This gives 32 choices for the ST sanctioned ones and no one has to take sides.

    Remember, individual players are going to pick one or three or such from the total list and skip the ones which don't suit their style so it's not like you are going to fill everyone's UI with no room left. The beauty of Null's DLL setting these on the fly is that none are set in stone. The one UI works for everyone and each person customizes their own.

    • Like 3

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    I've refined my proposal, and added collages for some of the proposed tilesets which might be unclear from the name and description alone. I also took out the Stockholm 1945 tileset which I think wasn't going to add much practical functionality. I think there might be potential for a European 1935 tileset, but I haven't thought it through enough to include it here. Also, I've included the numbers, but imo ideally they'd all be in chronological order in the UI.

    If this scheme is accepted, I would be happy to help people sort BATs into tilesets, in a dedicated thread or privately through PMs or Discord. The same thing goes for the 4 Maxis tilesets.

     

    These tilesets are groupings of architecture styles which would generally be acceptable to grow with each other. The city-date names exist to help evoke an image of what styles are contained within each tileset. Buildings belong in tilesets according to style, regardless of where or when they're built (so a postmodern building from Dubai built in 2025 would go in the Houston 1995 tileset). There's also some overlap between the tilesets which I think is good for players.

    0x00002000 - Chicago 1895 (Chicago 1890) - American styles of the period. Chicago School, Beaux Arts, Richardsonian Romanesque, etc.

    0x00002001 - New York 1935 (New York 1940) - American styles of the period. Art Deco, Craftsman, revival styles such as Neo-Gothic, Neoclassical, etc.

    0x00002002 - Houston 1995 (Houston 1990) - Postmodernism (including "modernism as a surface aesthetic").

    1h76eer.jpeg

    0x00002003 - Frankfurt 2005 (Euro Contemporary) - Modern architecture of the period. Previous Euro tileset minus what was split into others. 

    pQGtypy.jpeg

    0x00002004 - Rome 1755 - Pre-industrial European-based styles. Baroque, Renaissance, etc.

    0x00002005 - Paris 1895 - Haussmann Paris. Second Empire, etc.

    0x00002006 - Berlin 1915 - All European-based eclectic styles.

    0x00002007 - Los Angeles 1965 - US-centric modern architecture. Midcentury Modern, New Formalism, etc.

    xCKiNfl.jpeg

    0x00002009 - Rotterdam 1975 - European counterpart to LA 1965. Structuralism, high-tech, megastructures, communist, etc.

    QPQyQja.jpeg

    0x0000200a - Taipei 2005* - Contemporary building styles and types unique to East Asia.

    0x0000200b - Sao Paulo 2005* - Contemporary building styles and types unique to Latin America.

    0x0000200c - Copenhagen 2025 - Current modern architecture.

    HBpMkZL.jpeg

    0x0000200d - Other - Catchall for all of the rare regional or historical styles. Default style for niche things which don't belong anywhere else but need a tileset assigned.

    0x0000200e - Futuristic - Fictional styles of the far future.

    • Like 5
    • Thanks 1

    patreon.png    PATREON    •    MIPRO    •    MY BAT & TUTORIAL THREAD

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, Jasoncw said:

    0x0000200a - Taipei 2005* - Contemporary building styles and types unique to East Asia.

    I wonder how many buildings are there since as an Asian myself, I want to add a bit nuance, since you insert "x build in y would be placed in x tileset." Most of our styles are just adaptations of postmodernist and whatever the current architecture is, and almost nothing more. There are indeed uniquely contemporary Asian styles like Tokyo/Korean house style and whatever the style of government housings in Nusantara is called. Also buildings like Istana Nurul Iman could be have their own styles since it incorporates traditional architectures into modernist one. But, those are limited to low and medium density. And in the case of Nurul Iman, I would call it a fusion architecture (similar to fusion food). Don't get me started on I Nyoman Nuarta's presidential palace in Nusantara (spoiler alert, it's confusing. It has the shape of garuda in a postmo way. But the actual palace building is like neo-Art Deco since it has Parthenon pillars). Also, more importantly, I have difficulties to classify buildings like Wisma 46, the namesake Taipei 101, KLCC, that 3-legged tower in China, and PNB 118 since they indeed have distinct architecture, but they're certainly run-off-the-mill postmodernist, with some local touches. To make things even worse, there are styles that's prevalent in Asia but it's not really an Asian architecture. Good example of this is the tropical architecture that's found in SEA and the Indian subcontinent. Asian architecture would work best on historical examples. Modern ones, well, it's a bit difficult.

    Share this post


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

    This thread has been locked. The new thread where there is ongoing voting is available here

     


    Federal Republic of SiculiaFederal Republic of Sonora

       Ain Member  Wiki

    NAM Team - Co-developer of Pedestian Revolution Mod - Railway Department (Hybrid Railway | HRW Expert) - MTA Member - BAT Creator

    Ulisse Wolf YouTube Channel - Ulisse Wolf Mastodon Profile

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    ×

    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