Posted: Tue Sep 08, 2020 7:36 am Post subject:
New Tiberian Sun engine hacks are now available!
Subject description: Smarter AI harvesters, vehicle transports, oil derricks and things beyond the vision of Kane!
We have some interesting resources on our Tiberian Sun Research Center (registered users only) that was recently posted by Rampastring. Thanks to the source code from Red Alert, Rampastring was able to tweak areas of Tiberian Sun that had identical code (or almost identical). And, with that knowledge, he has posted some interesting patches to improve the TS engine. Here's his words on it:
With the release of the RA source code, I've studied the TS code more as well and noticed that a lot of the game logic code is identical between TS and RA. This has made it a lot easier to write hacks for the TS engine, as when researching something I can take a look at the equivalent logic in RA and figure out how it works from the documented C++ source code and then match the code to x86 ASM instead of having to figure out the ASM from the ground up. That is when an equivalent logic exists in RA; if a logic does not exist (like particles), then the RA source is of no help.
So far I've written the following notable bugfixes and enhancements in the past few months:
Smarter harvester AI (demonstration: https://www.youtube.com/watch?v=7G_IQiQ346Q )
Smarter AI fire-sale
Sidebar cameo sorting
Mechanics (like in RA1)
Fixing AI unit scatter when the AI produces vehicles from a factory that has WeaponsFactory=no
Oil Derricks (like in RA2)
Vehicle transports (like in RA1)
You are free to use these enhancements in any projects. Although if you do, it's appreciated if you credit myself and Dawn of the Tiberium Age. To make use of these with your mod, you have to compile the spawner with these source files included in the Makefile.
Also, big thanks to CCHyper for providing me information that has helped with many of these hacks.
More are likely coming.
The smarter AI video was posted on the DTA news below, but we can repeat it here:
If you are interested, register on our forums. You won't get spammed ro anything, so don't worry. Once you are logged in, visit this topic to view all the recent asm codes.
yeah, that's some awesome work there.
it's one thing to understand and change the C++ code, but a whole new level of amazing when being able to understand and translate that into the equivalent assembler code, necessary for the disassembled TS engine. _________________ SHP Artist of Twisted Insurrection: Nod buildings
It doesn't quite work that way with these patches, they're not simple hex changes. Instead you need to clone and compile the CnCNet TS-patches project.
Technically, when compiling the project, the vanilla TS 2.03 game.exe is broken into sections, extended with a new code section, all the new code is compiled and added to the new section and then the EXE is "re-compiled" with that section included and the original code modified in the right places to point to code in the new section. The hacks that this system allows to make would be impossible to implement with pure hex changes as the new logic in the hacks takes up more bytes and wouldn't fit in the original, non-extended TS executable. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
You cannot post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum