Jump to content
simmaster07

Game framework compatible DLL loading (and other modding discoveries)

107 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
2 hours ago, SIM-ple Jack said:

Any idea where it might be in that massive thread? I made it to about page 34 reading backwards, found a few tricks.

The tool itself? I'll have to ping @Cyclone Boom. We were in a convo together (I had asked Cori and CB about the river tool) and if I remember correctly, all of the messages and files were going to be copied into an actual topic, but it never came to be.

I personally don't see any harm in publishing it, as it may lead to more discoveries! *:D  (not to mention, EffectDir could *really* use more documentation in general - the more knowledge of it, the better!)

49 minutes ago, asasnat said:

I didn't think it was the originally intended river tool, because I couldn't bridge over it (although that's probably just a limitation of having to spawn the effect in manually by using cheats or scripting)

It might be possible to do that with some additional tweaking to the tool. Or, if it can't be done that way, there might be a workaround.

49 minutes ago, asasnat said:

EDIT: Another thing. Unused parameters in the terrain tuning INI file suggest that water streams would pick up sediment from the ground, turning a different color. As it goes further downstream, it would deposit it back into the ground, leading to slow, gradual, hydraulic erosion. I wonder if this would work with the stream effect?

That is quite intriguing! *:yes:

  • Like 1

Once you play with NAM installed, one simply cannot go back!

I'm waiting for the day when someone makes a Faber College lot for SimCity 4  :lol:

IMG_3716.jpg.7fe0b78e164e258bac5afb32dc9f9588.jpg

 

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 3.07.2023 at 11:18 PM, asasnat said:

EDIT: Another thing. Unused parameters in the terrain tuning INI file suggest that water streams would pick up sediment from the ground, turning a different color. As it goes further downstream, it would deposit it back into the ground, leading to slow, gradual, hydraulic erosion. I wonder if this would work with the stream effect?

I hope this is not considered necroing but I don't think it would've worked that way. The stream effect can "jump" into the air if it goes down a slope that is too steep. We all know Maxis developers were hardcore when designing SC4, but I don't think even they would be hardcore enough to take jumping rivers/streams into account for the hydrology/erosion simulators. This may sound silly, and admittedly I don't have much to prove this, but I think for the water/stream simulation they were going for something more akin to the lava spewed out by the volcano disaster, which flows and pools in a realistic manner (at least until the disaster ends and the lava magically vanishes; realism is my passion).

Features like these, and the possibility that we might never get to see them work in the way Maxis envisioned, make me want to create my own city builder, implementing all such features. Maybe some day...


  Edited by asasnat  

oops
  • Like 2

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 12/30/2023 at 9:32 AM, asasnat said:

I hope this is not considered necroing but I don't think it would've worked that way. The stream effect can "jump" into the air if it goes down a slope that is too steep. We all know Maxis developers were hardcore when designing SC4, but I don't think even they would be hardcore enough to take jumping rivers/streams into account for the hydrology/erosion simulators. This may sound silly, and admittedly I don't have much to prove this, but I think for the water/stream simulation they were going for something more akin to the lava spewed out by the volcano disaster, which flows and pools in a realistic manner (at least until the disaster ends and the lava magically vanishes; realism is my passion).

Features like these, and the possibility that we might never get to see them work in the way Maxis envisioned, make me want to create my own city builder, implementing all such features. Maybe some day...

Necroing again, but yeah, I agree with you. Hydrology was pretty hard to simulate at the time. So, Maxis wouldn't probably bother much with them. And speaking of city builder, go ahead. We're waiting for that OpenSC4.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
6 hours ago, Propfam said:

any idea of the hydrology system in SC4?

AFAIK it is a cut feature, along with other things like the river/stream tools.

  • Like 2
  • Thanks 1

Share this post


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

AFAIK it is a cut feature, along with other things like the river/stream tools.

Can you revive it?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
39 minutes ago, Propfam said:

Can you revive it?

Doubtful. I expect a lot of those features would be hard to restore even if EA released the full source code, as they obviously wouldn't be releasing the internal design documents describing those features. Based on the CnC source code releases, the source code would also have information lost in a public release due to EA stripping the internal commit history.

It looks like Maxis planned a water erosion terrain tool at one point, it has an operation id handled in the same block of code as the rain and spring tools. But I have no idea if it actually works. The full list of terrain brush operation ids appears to be:

RaiseLower = 0
Flora = 1
Smoothen = 2
Paint = 3
PlaceEffect = 4
Level = 5
WaterErosion = 6
VolcanoAsh = 7
LakeBed = 8
Rain = 9
Spring = 10
  • Thanks 1

Share this post


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

Based on the CnC source code releases, the source code would also have information lost in a public release due to EA stripping the internal commit history.

AI could help reverse, uh sorry, re-engineer those functions as it should. Of course, there are always be trial and error. But AI can do obscure things surprisingly really well.

Share this post


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

AI could help reverse, uh sorry, re-engineer those functions as it should. Of course, there are always be trial and error. But AI can do obscure things surprisingly really well.

I was referring to the change history, e.g. how Maxis implemented bug fixes in their patches.

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
14 hours ago, Propfam said:

Can you revive it?

I'm not an expert, but I'd say it depends on how much of the hydrology code is left in the final game binary.

If the hydrology code is fully intact but disabled by an obscure "toggle", it should be possible (with enough looking around...) to find it and turn it back on.

If the hydrology code is either fully gone or only small pieces of it remain, things would be a lot harder. It'd probably take a lot of SC4Fix-style code injection to reimplement the missing functions and make it work again. Sadly, if Null's words are anything to go by, this situation seems like the more likely one.

Also, it appears that the few people who possess the knowledge to do all this stuff are not terribly interested in the hydrology simulation, and would rather research parts of the game that would have a greater impact on the player experience.
I can't blame them - other city builder games with water physics have game mechanics that mesh well with the water, making it fun to play with.
Timberborn has badwater - which you must keep away from the beavers so they don't get sick - and droughts, so you have to stockpile water to keep your beavers hydrated and farmland watered.
Cities: Skylines has building abandonment and damage from floods, so you have to be careful when damming up a river for power. Also, you have to carefully place your pumps and sewage outlets, so you don't accidentally pollute your devoted cims' water supply.
SimCity 4 has none of these, so to make the hydrology an actually interesting gameplay mechanic and not just a neat gimmick, you'd have to design and implement special mechanics that take advantage of it. That's a tall ask for a modding community whose knowledge of the game they're modding is still very incomplete.

Now, part of me thinks that this conversation is off-topic. However, another part of me thinks that the "and other modding discoveries" in the post title means that this conversation - which is about things found deep in the code base of SimCity 4 - is still on-topic. What do you think?

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 hours ago, asasnat said:

SimCity 4 has none of these,

I'm sorry to say, while I do agree with you, but it's a bit incomplete. SimCity 4 does have some remnants of hydrology-affected gameplay. Fresh and salt water sources come to mind. SimCity 4 does have a near-complete hydrology-tied weather simulation, iirc. Most prominent example is @TropicalWeatherEP. I don't know if they just use effects or not. But I do believe they really utilize the hydrology-tied weather simulation. The potential is really huge, really. It's just shame that we can't use it.

Of course, it wouldn't be like Dr. Vu saving nuke plants from drowning. But you get the idea.

Share this post


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

I don't know if they just use effects or not.

Most likely. It is crazy what Maxis used the effects system for, according to a former SC4 developer particle effects were one of Ocean Quigley's specialties. Sadly Maxis never publicly documented the binary effects format, but there have been people who have used the built-in effect script development features to compile new effect directory resources.

5 hours ago, Propfam said:

SimCity 4 does have a near-complete hydrology-tied weather simulation, iirc.

The weather simulator tracks moisture, but I don't think effects can alter that table. AFAIK the moisture system just affects flora and the seasonal flammability. The weather simulator also has wind, but I think it is just static for the whole tile. My Query UI Extensions DLL exposes the moisture, wind, and a bunch of other info as part of its advanced terrain query tool tips.

  • Like 3

Share this post


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

The weather simulator also has wind, but I think it is just static for the whole tile.

I wonder it's working like SC13's Wind Power Plant. And also, I wonder if Maxis wanted to add even more, like resources distribution, again like what we see on SC13 and C:S. So, mines are completely functional and depend on depleting material.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 hours ago, Propfam said:

Fresh and salt water sources come to mind.

Fair. I didn't mention them because, while more functional than the rest of the hydrology simulation, the fresh/saltwater system is still very incomplete (all surface- and sea-level water sources are treated as providing both fresh and salt water). If the modders find a way to introduce a clear separation between fresh and salt water sources, I might be more interested in it, but as it stands, I think it's a completely forgettable game mechanic, certainly one that I won't be playing with anytime soon.

7 hours ago, Propfam said:

SimCity 4 does have a near-complete hydrology-tied weather simulation, iirc.

That is true. However, from what I recall, the weather simulation doesn't affect the city simulation much, if at all. (The game does use the moisture values to determine what terrain textures should be placed where. Temperature is also a factor, but I don't know if it's taken from the weather simulation, or just approximated based on terrain height. These are completely cosmetic though.)
The only thing I managed to find that still worked - a multiplier for flammability in summer - is disabled by default (set to 1, which means that flammability is the same regardless of season). But I'm not sure if it even uses the weather simulation for that. I have a suspicion that it has something to do with the mysterious city latitude and longitude values that Null 45 found. Maybe it uses those to calculate the start and end of summer for the purposes of the flammability simulation?

Quote

And also, I wonder if Maxis wanted to add even more, like resources distribution, again like what we see on SC13 and C:S.

Back when SimCity 3000 was still being developed as a 3D title, there were plans to have special zone types for farming and mining uses. It's possible that these ideas came up again during the development of SimCity 4. This is just speculation though. I don't think anything related to these features has been found in SimCity 4's code base. (Besides farming, that is very much a thing in SimCity 4.)

  • Like 3

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
11 minutes ago, asasnat said:

SimCity 3000 was still being developed as a 3D title,

Do you have any access to the lost development version of SC3K that was still part SC2K aka still had the 2D environment, rather than 3D?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Just now, Propfam said:

Do you have any access to the lost development version of SC3K that was still part SC2K aka still had the 2D environment, rather than 3D?

I've never heard of that being a thing. If it does exist, I'm not the one who has the build.

  • Like 2

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 hours ago, asasnat said:

I have a suspicion that it has something to do with the mysterious city latitude and longitude values that Null 45 found. Maybe it uses those to calculate the start and end of summer for the purposes of the flammability simulation?

It just asks the weather simulator for the current season. The season calculation is fairly basic, it just divides the month number (0-11) by 3 and adjusts for the hemisphere. Replicating that calculation gives the following table:

Northern Hemisphere:

January - Winter (0)
February - Winter (0)
March - Winter (0)
April - Spring (1)
May - Spring (1)
June - Spring (1)
July - Summer (2)
August - Summer (2)
September - Summer (2)
October - Fall (3)
November - Fall (3)
December - Fall (3)

Southern Hemisphere:

January - Summer (2)
February - Summer (2)
March - Summer (2)
April - Fall (3)
May - Fall (3)
June - Fall (3)
July - Winter (0)
August - Winter (0)
September - Winter (0)
October - Spring (1)
November - Spring (1)
December - Spring (1)

As the game doesn't show the season in the UI, that calculation was probably a close enough approximation. IIRC SC3KU uses the same calculation.

Regarding SC3K, someone posted part of the design documents for the 3D version of SC3K to the ST Discord (GURU.pdf in the sc3k-and-older channel). In the unlikely event a build still exists, I doubt anyone who has it would be eager to share due to how easy it would be for EA to narrow down potential sources. As much as I would like to get my hands on an internal development build of SC4, those will probably never be leaked for the same reason.

AFAIK Maxis has only had a handful of internal builds leak, Sim Copter, one or two early Sims games, and Spore at the end of last year.

  • Like 1
  • Thanks 1

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