Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome to SimCity 4 Devotion. Please login or sign up.

September 30, 2022, 09:10:59 AM

Login with username, password and session length

Downloads

Reverse engineering SC4, help welcome.

Started by speeder, January 20, 2016, 03:52:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankU

Does this open new possibilities for modding and editing the game?

vester

speeder: That is good news.

Frank: Possible, all depends on what is discovered.

Pat

Speeder you gotten my attention and intrest here on this.... Even though i cant code to save my life, I like to watch and give support where possible

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

speeder

Quote from: Pat on February 10, 2016, 07:21:56 PM
Speeder you gotten my attention and intrest here on this.... Even though i cant code to save my life, I like to watch and give support where possible

Thanks!

Unfortunately for now the only thing to do is code heavy lifting, and nagging EA.

And the nagging EA I think for now I am enough :) I managed to nag lots of people (there are 2 ex-EA employees nagging EA for me, and 1 current EA employee, also I sent e-mail to their board of directors, spammed their support system, their forums, Steam, reddit...)

I am hopeful that one of the ex-EA employees will reply soon, last I talked to him he was going to see if he could put me in touch with the TheSims 4 team (that currently have all Maxis stuff).

"Unfortunately" those employees are related to EASTL, so they are probably swamped with e-mails (with people congratulating, nagging, asking for help, and so on...) and are probably eager to code (they all were nagging EA to release EASTL because they wanted to maintain it... I imagine they are diving into code right now to add all updates that they wanted).

As for me I decided to take a different approach for now:

Instead of butting my head against SC4 itself, I decided to see if I can instead re-create the cheats DLL... If I succeed in that, there will be two important results:

1) We will have my own version of SC4 SDK (meaning that people will be able to make their own DLLs).

2) I will be able to call arbitrary objects from the game and see what they do. << this is my focus, but I am sure most of the community will appreciate number 1 instead.

InvisiChem

I see why you are banging your head against the wall here. lol. I loaded up IDA and disassembled the SimCity 4 executable.

I now remember why I hate looking at assembler code.  :angrymore:   Anyways, once I discover something new I'll let you know and you can post it. Right now, at least the variables listed in the LUA script are accurate. I did not find any for current IR demand or the IR CAP.

I'm kind of casually on this right now, working on CAM pretty hard right now still, but I'll still play around more.
Everyone has something to offer, most do not possess the courage to offer it.

speeder


InvisiChem

In SimCity_1.dat TGI ca63e2a3 4a5e8ef6 ffbf9ccf is an LUA script that lists several variables that can be used by building queries, different tutorials, etc. They have a name structure of game.g_city_ir_population  These are used by the Census Repository to read the data for city and region, extrapolated values among others.

I was looking through the disassembled code and noticed they have these values set in the exe to allow external plugins to read the values, as stated, but still did not include the IR demand or IR CAP variable. (sad, especially since the new CAM makes IR CAP work like all other industrial CAPs now).

From the disassembled code, it seems as though these variables are programmer designed structures. A little more clear would be the standard C Struct statements. Hopefully this does help a little.
Everyone has something to offer, most do not possess the courage to offer it.

speeder

Quote from: InvisiChem on February 11, 2016, 07:32:53 AM
In SimCity_1.dat TGI ca63e2a3 4a5e8ef6 ffbf9ccf is an LUA script that lists several variables that can be used by building queries, different tutorials, etc. They have a name structure of game.g_city_ir_population  These are used by the Census Repository to read the data for city and region, extrapolated values among others.

I was looking through the disassembled code and noticed they have these values set in the exe to allow external plugins to read the values, as stated, but still did not include the IR demand or IR CAP variable. (sad, especially since the new CAM makes IR CAP work like all other industrial CAPs now).

From the disassembled code, it seems as though these variables are programmer designed structures. A little more clear would be the standard C Struct statements. Hopefully this does help a little.

Ah, those!

I did saw it, but I kinda ignored it, since I am concerned about other things now :)

Also what CAM changed in IR cap?

InvisiChem

IR CAP has been added to growable IR Buildings, removed from the other RCI types and added to the Industrial Connections for CAP Relief.

The CAP Relief is fully functional, but unfortunately this deprecates the ability of the Repository Facility and Repository Vault to accurately report the CAP Level now.

Everyone has something to offer, most do not possess the courage to offer it.

Barroco Hispano

Barroco Hispano

speeder

Yes sorry, ended having to abandon this at the time.

I am seeing if I can nag EA again, SC4 for Mac got updated and all.

What happened is that the game source used C++ to its full capabilities, it is full of vtables, polymorphism, custom allocators and other crazy funky stuff, it is basically too hard to reverse engineer, so the actual source is needed.

At least something good came out of it at the time, EA actually released EASTL, that was originally created for SC4 (didn't even had that name at the time, it was just STL modified for SC4)

https://github.com/electronicarts/EASTL