Jump to content

Map file ini deciphering:


Operon

Recommended Posts

I recently stumbled across CnCNet here and I'm really impressed at what's been done for the original C&C.  With all the improvements made to allow the new Internet multiplayer, does someone actually have the source code now for C&C:TD?

 

Reason I ask:  My bro and I spent a fair amount of time building single player missions back in the late 90s and we'd like to do so again.  If the source code or a reverse engineered equivalent is available we'd like to take a look and try to decipher some of the previously unknown map ini commands.  If that's not possible, does anyone who worked on updating the client have any time to clarify for us here?

 

For instance, what the heck does "Attack Tarcom" really do?  How is Rampage an improvement over Hunt, and why does All To Hunt sometimes not cause all units to actually attack?  Why do reinforcement gunboats just blindly patrol and not shoot anything such as in GDI mission 9 where they are supposed to help you but don't?  What is the exact relationship between autocreate, create always, replace destroyed, and the max creation counter?

 

Understanding some of the details about how the single player mission AI works could lead to some very intricate and creative missions.  I’ve already got a ton of ideas, but implementation is problematic without some of the above questions getting answered.

 

Thanks!

 

Link to comment
Share on other sites

Welcome to C&C Comm Center

 

The Source Code was never made avalible for any of the CnC games, I know (or think) Nyerguds (the creator of the unofficial CnC patch) and Hyper use a tool called IDA Pro to Dissemble the cnc exe's (personally i dont know much about it, im just a novice who has the tools but lacks the knowledge/experiance)

 

Asking Nyerguds would be your best bet at this moment (hopefully he will pop by soon)

Link to comment
Share on other sites

No one has the C&C1 source code. There is a chance that it doesn't even exist anymore.

 

For for the questions you ask.

 

What Attack Tarcom does is unknown

 

The Gun Boat thing is a bug I believe.

 

I cannot answer the rest but Nyerguds surely can! :)

Link to comment
Share on other sites

well, as I already said in the chat...

 

http://nyerguds.arsaneus-design.com/cncstuff/cctxt/ccmanual.txt ;)

 

Yeah, thank you for that, it is the most comprehensive source I've seen so far...

 

As I read through, I got the impression much of your analysis on map making was done through trial and error and perhaps only a few specific identifiers came from studying the executable.  How exactly does the reverse compiling process work for you in the case of C&C?  Some of the IDA Pro websites I read through had explanations that lead me to believe it is more like a "reverse-interpreter" type thingy that would show you what the executable was doing at a specific time in a high-level language.  Does that mean you can't really get a sense of what the executable is doing unless the behavior you are trying to investigate is occurring at the time you're running this decompiler?

 

I guess what I'm getting at:  Is it possible to fully investigate or improve the base artificial intelligence, path finding, etc?  For instance, when an all to hunt trigger fires, how does a particular unit decide what to attack and how?  Could it be as simple as a left to right, top to bottom scan of each cell row and the 1st one an enemy vehicle or structure is located in becomes the target?  Even if you knew this, could you ever improve it?

 

I had 2 years of programming in high school - 12 years ago, so I don't claim to be even a novice at this stuff, but I'd love to understand it in a bit more detail.

Thanks!

 

Link to comment
Share on other sites

I've written a pathfinding algorithm myself for school... it took ages to find its way through a 15x15 maze, in a static environment. I doubt I'm ready to improve WW's pathfinding in any way.

 

As for how debugging works, well, you can't debug a certain thing you know ingame. You can find a function that seems related to what you're trying to find, put a break point there, run the game with the debugger, make the game execute the action you're trying to figure out, and see if your breakpoint fires. If not, keep looking... if it does fire, you confirm that the code you find is for a specific purpose, and you can see exactly what it has stored in memory and what actions it executes on that data.

 

But not all findings require debugging. There's a lot that can be traced without debugging anything, especially if it has strings linked to it.

 

 

I got a bit of info on some of the stuff related to firing triggers in the exe, but that text file is way older than my first hacking experience.

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...