Jump to content
CorinaMarie

CoriBoom Partial Mythbusting - Building Style Tilesets Not Locked Down in the EXE

131 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
On 2/1/2020 at 5:04 PM, Cyclone Boom said:

Relating to the identified caveats so far, these controls do appear to just be decorative at this stage, and how the game doesn't seem to recognise when other tilesets are active in a given tile. That needs a bit more investigating to see if there's anything which can be fed into the system. I investigated the XML source view and found how the existing 0x2000 to 0x2003 ones were in the same format, and so it may well suggest that full functionality is asking for a missing piece of the puzzle.

The class in the EXE that handles UI events (button clicks, etc) for the Building Select window (cSC4BuildingSelectWinProc) is hard-coded to use only the first 4 tile sets.

It may be possible for a DLL to patch the affected code using SC4Fix-style x86 assembly hacking, but it would appear to be fairly complex task. In some areas you could just bypass the range checks, but for others you would have to rewrite the affected code to get the installed styles and use those values in-place of the hard-coded 0x2000-0x2003 loops.

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 26/12/2023 at 5:58 PM, Null 45 said:

It may be possible for a DLL to patch the affected code using SC4Fix-style x86 assembly hacking, but it would appear to be fairly complex task.

I was reading this thread and I was going to @Null 45 you!

The ability to choose from more tile sets could be one of the mayor mod changes for SC4, ever. Currently, you are the official SC4-DLL master. But I have no idea about the amount of work and difficulty involved in a mod like this. So I can't ask for it, just wish it's doable.

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
5 hours ago, Membrillo said:

But I have no idea about the amount of work and difficulty involved in a mod like this.

I have located all the relevant code in the GOG executable, but I am still working on understating what the code is doing and what I would need to do to patch it.

I am also unsure of how to test it, as far as I am aware the CoriBoom team didn't release the modified files that they were experimenting with. But the built-in Maxis styles should be sufficient to confirm that the code works.

  • Like 2
  • Thanks 1

Share this post


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

Great news! I wish you success!

Cori is absent from Simtropolis. I don't know the details but I hope she's feeling better now and doing all right. Hopefully, one day she'll be able to return.

Probably, @Cyclone Boom will be able to send you the necessary files to test it. IMO, making this mod user friendly enough to be released would be a great gift to her.

  • Yes 1

Share this post


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

I have a beta DLL that allows for more UI style check boxes, it can be downloaded from GitHub.

The DLL gets the list of supported styles by scanning the buttons in the Building Style Control dialog, so that is the only file you need to modify to add new building styles to the UI. I have not tested the in-game building portion of the styles, but I have confirmed that the new style is correctly added/removed from the game's active style list when the checkbox is checked/unchecked. When a building style check box is checked or unchecked, the plugin will write an entry to its log file with the ID number of the button.

I attached a ZIP file with the modified Building Style Control dialog I am using for testing to this post as an example. Those of you who have been reading the SC4E programming channel may already be aware of this DLL, but I decided it was relevant to post here as well. *:)

ExpandedBuildingStyleUI.zip

  • Like 3
  • Yes 1

Share this post


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

Wow, this is amazing! If I am understanding your progress correctly @Null 45, this DLL will provide full functionality to any additional in-game building styles radio buttons. I went back and reviewed previous posts from this thread. Unless I missed something, hex editing the save game editing is not needed. Command line tools are available to edit and add custom building styles to lot files en masse. With that, this DLL seems like the final piece of the puzzle. Am I misunderstanding anything? because this seems like a big development.

Thank you @Null 45 for all the work that you have done creating this and other DLL plugins.

If this is indeed the final element to providing new tile-sets, that will open a lot of new options. Immediately, this would be very useful for being able to separate W2W buildings and toggle when they appear without having to exit the game and use blockers. I'm really excited to see this come to fruition.

  • Like 1

Life is architecture and architecture is the mirror of life. – I.M. Pei

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
5 hours ago, Panda said:

Am I misunderstanding anything?

I don't think so. I have not tested the mod with any in-game buildings that use a custom style, but I don't see any reason that it wouldn't work.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
9 hours ago, Panda said:

Unless I missed something, hex editing the save game editing is not needed. Command line tools are available to edit and add custom building styles to lot files en masse. With that, this DLL seems like the final piece of the puzzle. Am I misunderstanding anything?

If command line tools exist to do this, great it would be easy, but there is one small issue that needs consideration as a player.

Whilst you can mod say a special style around themes like W2W, Diagonal, FAR and WRC’s, which would be very handy for those who prefer everything to grow naturally. The problem arises that you will need enough content for each category to prevent growth from stalling. If you selected to only build a style where for example only growth stage 5 & 6 lots existed, you might find nothing appears unless those same conditions apply to current demands. Likewise wealth, EQ and capacity comes into this equation also. In other words, you’d need a diverse range of content for every new style in use or things won’t be as smooth as it seems. This is already a problem when using blockers to control things, so it’s nothing new, but it is going to require consideration. 

  • Like 1
  • Thanks 1

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


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

That's a fair issue. If there are too many different styles with only one or two buildings each, I can see how matching the supply of lots at various stages and dimensions to in-game demand could be difficult. I can imagine a scenario where mod authors independently create new building styles resulting in a huge mess. For now, Since this is so new, it's up to the player to organize their mod folder and edit any building styles.

I can imagine a day when there are a few agreed upon styles that add more even variety and control to the game. As I mentioned before, I'm excited at the prospect of toggling W2W on and off with the building styles instead of blockers would be great. I'm not sure how FAR or WRC might as growable lots since there are specific left and right options (I guess you could just keep bulldozing what grows until you get one that fits and then mark it historical...) I also think expanding the building styles to encompass different architectural styles, periods, and regions would be a great. I'm imagining something like toggles for Neoclassical, Victorian, Edwardian, Mid-Century Modern, Asian, or American Rural building styles, etc. However, deciding on which styles to include and getting a consensus from mod authors to will be a coordination challenge.

Still, I'm excited at the prospect of new building styles accessible fully in-game without having to quit and edit anything.

  • Like 2

Life is architecture and architecture is the mirror of life. – I.M. Pei

Share this post


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

The more building styles DLL is now on the STEX:

 

  • Like 3

Share this post


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

OFFICIAL ANNOUNCEMENT

We have implemented a Master IID for the inclusion of the additional styles. Please consult this link for more information

 

 

  • Like 2

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

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


×

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