• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Obtaining the SC4 SDK

Started by simmaster07, September 06, 2010, 01:18:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

simmaster07

A while back, Buggi posted the source code for the extra cheats DLL here. However, it became apparent that the DLL would only stay loaded with some type of SC4 SDK, which is true. Maxis has a set of C++ headers defining types and classes used in the DLL.

I was just talking with an EA custom representative. He seemed to understand what I was talking about and said that the developers were still active, and that he'd forward my suggestion of releasing the SDK to the developers, as we've come so far with modding the game. Did he? I don't know, let's wait and see.

Hopefully, Maxis and EA realize that this game is successful because of how much effort we've put into mods, BATs, and tools that we, the community, made, and that we can take this to the next level.

Thoughts? Comments?
(and on an unrelated note, I really hope this is in the right forum)

wouanagaine

That will be really cool , I just saw your thread at ST, some ideas might pop up out of my head :)

However I hope you/we can go further and ask for some internals format :)



New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

HappyDays

This would be an incredible boon to the SC4 modding scene...if SC4 is like the PC version of FFVII, then a .dll could be used to alter virtually anything from the .exe.

But, obtaining the SDK is dependent upon those who have it being legally capable of releasing it. EA owns the rights to the game, after all...

A toast to good luck, eh?

j-dub

Considering Valve Software whose a big gaming company, released an SDK with whoever buys their stuff, I don't see why EA doesn't take their example from working with them and do the same, for the SimCity situation, I mean Valve goes a step up that the big guy will want to learn, even talk to an amount of players you won't believe on improving the experience, why not EA do it for us?

wouanagaine

Valve started HL with the sdk in mind, I'm not sure Maxis started Simcity with a SDK in mind :(

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

smartbylaw

All I got to say is for EA to wake or release the SDK. Ya the version for the Ipad is coming out but still use computer users who cant afford an IPad need some more things to do with sc4.




I BACK U UP 100%

simmaster07

Quote
Nelson ________ to ppedriana | Sep 21

Hey Paul,

I sent an email to Ocean Quigley a day or two ago to figure out who to contact about this, since the customer support representatives weren't much of a help. Ocean told me to send a note to you. If I recall correctly, you were the lead developer for SC4. You see, in the 7 years SC4's been on the market, the community's already come up with brilliant mods and buildings. We just figured out how to get the game to load DLLs, but we need some type of SDK to get it to stay in memory.

So my question is if it would be possible to release this SDK, or who else to talk to about having it released. We've come so far when it comes to modding capabilities, and for our efforts to be in vain would be a large disappointment to the community.

-Nelson
--------------------------------------------------
Pedriana, Paul <<< SC4 LEAD DEV >>> to me | Oct 20

Hi Nelson.

>> We just figured out how to get the game to load DLLs, but we need some type of SDK to get it to stay in memory.

Can you explain what you mean by getting it to stay in memory?

Thanks.
Paul
--------------------------------------------------
Nelson ________ to Paul | 1 minute ago

Well, we know (or at least assume) SC4 has a list of functions that can be overridden or modified in some way, but there's no way to do so. When the Extra Cheats DLL was released, a piece of the source was released, though it relied on classes we also figured needed some sort of SDK to work. Lastly, when we figured out how to get SC4 to load DLLs, we also learned that the game unloads the DLL if there isn't a function of a certain type present. Once again, we needed an SDK to define the enumerated type.

Ryan B.

For the record, I think it's awesome that these people are actually responding and engaging in dialog with you / us.  It could be a great step towards keeping SC4 relevant (and the very best) for twenty more years.

j-dub

So basically the game can not save the after effects of DLL?

This is debatable, I guess one example is the rain tool DLL. There had to be a reason it was then locked out before the game went on the market. While it had been brought back by modding, the effects do not save. Some people who use the rain tool seem to want the effects to stay. However, after using the rain tool, (in my case at least) the rain would eventually flood the city, because for whatever reason, it kept raising the default water level somehow, I did not want to save anyway. While I know some already know this, what I don't get is why the one effect will not, while another effect can.

I am talking about the extra cheats DLL and the moolah cheat, which this is only possible to be enabled by DLL, any money you enter, it seems it will save that city with said amount of cash after you reload the city again, without having to enter the command again, where as it can not remember when you entered the show time command, so you actually have to enter that command every other time, because it can not save that part. It just bugs me that the one effect can work, and be saved, while the other can not again.

I thought by SDK we were talking about developer tools that allowed programing of stuff, like programming new types of cars or making bike automatta get pathed onto the game's roads or something.

I do need to mention this behavior is not a SC4 thing alone, while Valve has their Source SDK, even though you can add DLL, and enter existing cheats, just like SC4, it will not save turned on commands, even the console commands they developed, the next time you load that saved game. At least what I experienced for both so far. Because of this, I don't know if they actually are going to be able to solve the request, but at least they are not completely oblivious towards us.

Blue Lightning

#9
The rain tool isn't a DLL "$Deal"$
Its a DBPF file (your standard plugin file) that simply re-enables (and gives icons to) two terrain tools that have not been enabled in release. It simply contains the menu exemplar, icons, and description keys. You can see bits of the tool itself (mostly the visual effects) in the Effect Directory. From what I gather, it most likely works by increasing the moisture level in the area to match/exceed the moisture level required for sea level, while of course determining the area and power. The reason why it goes away after city reload is due to the fact that (probably) moisture is calculated upon city load and not saved to savegame mapping.

The reason why the moolah (and a few others) stay in effect after reload is due to the fact that they modify statistics that are saved in the city savegame, unlike with the moisture map (and subsequently the water created by rain tool).

Its great to hear that the developers still hear us, though :thumbsup:

And on that note, there's a lot in the EffDir, though I'm having a hard time figuring the thing out (only person I know of who has gained a usable knowledge of it is Gizmo, hence his rain "weather" mod and darker night mod). I've been trying to follow Redlotus's (mostly complete) spec file, but both the Maxis and Gizmo's effdirs are nearly impossible to pick out properly. I suppose I could create one from scratch...
Also known as Wahrheit

Occasionally lurks.

RHW Project

simmaster07

Quote
Pedriana, Paul | Mon, Oct 25, 2010 at 7:13 PM
To: Nelson _____

I just met with Ocean today, coincidentally.

Are you saying that you made an SC4 plug DLL and SC4 recognizes it and tries to load it but decides it isn't right and doesn't use it?
Paul


Nelson _____ | Mon, Oct 25, 2010 at 9:31 PM
To: "Pedriana, Paul"

Exactly. It loads up the DLL, runs whatever's in DllMain->DLL_PROCESS_ATTACH, then doesn't use it and detaches from it.

simmaster07

Quote
The function it calls is GZDllGetGZCOMDirector. Look for that in the attached source code, in particular in the cGZCOMLibrary::Load function.

Paul

EmptyPluginCOMDirector.cpp
GZCOM.cpp
GZCOM.h
RZCOMDirector.cpp
RZCOMDirector.h

Asking nicely does work.  ;D


null45

And there are a few more headers needed before it will compile. :(

Diggis

I believe in the past Paul has been known to help the community.  I would suggest that we don't bug him with lots of questions but this is great work so far guys.

Simmaster, it might pay next time you flick Paul message include a link to SC4D for him to take a look at what his work has become.  ;D

meister1235

VERY well done nelson.  &apls

Let's start to write our own dlls :D

meister

Blue Lightning

It is indeed missing a few more header files, I think we'd need pretty much all the header files (or somewhere close to it) to be able to compile it and such. But I think the providence of these pieces of code are for us to analyze, I already see things that we're missing, and I've noticed them in what shreds we have of the extracheat DLL. Though we would still need them for the types and functions for compliling... or at least, a user-made equivalent of it. But this is awesome news nonetheless. &apls
Also known as Wahrheit

Occasionally lurks.

RHW Project

simmaster07

Quote
That code I sent you is not complete and not self-sufficient for compiling. I would need to go through some formal code release efforts to publish working code for that base system. But I think there should be enough there for you to strip away code and get a DLL loading.

Paul

Jonathan

So now we can without any further files/info create DLLs that stay loaded throughout the game, just we can't do anything useful that connects to the game while they are loaded. It's bit hard to understand all the technical wizardry in here :)

This is an amazing breakthrough  &apls &apls

Thanks Nelson and Paul :)

null45

Quote from: Jonathan on October 26, 2010, 01:57:40 PM
So now we can without any further files/info create DLLs that stay loaded throughout the game, just we can't do anything useful that connects to the game while they are loaded.

In theory that should be the case, but when I tried to run this demo it try's to load the GZDllGetGZCOMDirector and would find something it didn't like and then would unload the dll and terminate the game.  ::)