Jump to content
nathancnc

TFD 1.04 Dev Update (12/05/2012)

Recommended Posts

In no way this is a complete solution for the entire problem. I wanted to add something like a movie list read from the INIs, but for now I always add the TLF file names, so they will always be found. If this is wanted at all and it isn't totally obsolete, then I'll add an ini file option. This would have to be kept in synch with the mission and movies files, but that should be no different for other mod files.

Share this post


Link to post

Ah, you actually add the TLF video names? I thought you said you added any video to the list at the moment they were trying to play... or did you update it now?

Share this post


Link to post

I recreated the entire list. All original IDs are added and all new TLF filenames (I used the filenames in the TFD-MOVS.MIX) are added by default. This has to be done because otherwise the INTROX would not play. Like the original INTRO, SIZZLE and SIZZLE2 it is accessed by index, so there would be no ID to add. All names that aren't in this list will be added dynamically. The fixed IDs will always correspond to the same index, thus savegames might not be a problem for TLF.

Share this post


Link to post

Can this be added to the hi-res launcher somehow? looks like the program included patches ra95.dat dynamically just like hifi's launcher.

Edited by Sonarpulse

Share this post


Link to post

Hifi's launcher uses the Syringe approach with integrated hooks, effectively eliminating the need for additional .dll and .dll.inj files.

Even though the systems are similar/have a common base, Hifi injects assembler instructions directly. I code in C++, which is compiled into a dll and then injected. So it's not a simple copy/paste process (in either direction).

Share this post


Link to post

I don't actually know any assembly or C so know this is all speculation:

Hifi's launcher uses the Syringe approach with integrated hooks, effectively eliminating the need for additional .dll and .dll.inj files.

Even though the systems are similar/have a common base...

Is the code that actually does the "injecting" the same between hifi's patch and syringe.exe? and where does one get the syringe.exe in the first page (in case there's some good documentation I can read up on.)

 

Hifi injects assembler instructions directly. I code in C++, which is compiled into a dll and then injected. So it's not a simple copy/paste process (in either direction).

Wouldn't it be fairly simple to turn your dll into assembly and then inject that via hifi's launcher?

 

Allowing Non Hardcoded Movies & MPEG Option

There is code in the works that will allow any movie filename to be used on mission transitions, currently the game only allows filenames that are defined in a internal list. The game also, from v3.03, has code to play MPEG format videos, but this requires a boolean to be true (it never is because of another logic they introduced). I will recode the whole video searching code to first search for the *FILENAME*.VQA, if this is not located, then it will search for *FILENAME*.MPG, and if neither is found, then no video is played.

Lastly, how similar is what you did to what hyper was attempting?

Share this post


Link to post
Is the code that actually does the "injecting" the same between hifi's patch and syringe.exe? and where does one get the syringe.exe in the first page (in case there's some good documentation I can read up on.)

Hifi's launcher does not load the hooks by name and address from a file; it instead uses the addresses in source code directly. Data isn't kept in functions, but in variables or arrays. The result is the same, the starting point is different.

As far as I know there is no documentation for Syringe. License and source code is here.

 

Wouldn't it be fairly simple to turn your dll into assembly and then inject that via hifi's launcher?

I don't know how complex it is to port it to Hifi's launcher. All changes in the launcher are static, that is, all values are known when the game starts. This dll dynamically allocates memory on its own, processes information not known when it is started. But I don't know whether it is feasible to recreate this in assembly. It might take many many lines.

 

Lastly, how similar is what you did to what hyper was attempting?

This this referring to the DVD mode. Setting a DWORD registry entry called "DVD" to 1 will enable it. The game will then try to play the movie "\Movies\Filename.mpg" (iirc, might be slightly off). I did play around with it, but I didn't enable DVD mode by default. It's trivial and I don't deem it neccessary to reverse the search order from MPG,VQA to VQA,MPG. If you create the registry value in the game's usual path, the dynamic movie name feature in the dll should already work with MPGs. The only undesirable effect is a message box telling you about a missing MPG before falling back to the VQA.

 

I don't know what other things Hyper did so far, I've only seen some screenshots. All I did was to start analyzing RA95. In about three weeks I found out how to deinterlace the videos (also in C&C95), expand the list of videos and add videos dynamically, add a new unit and deactivate the General/Chinook evacuate feature in other modes than campaign. That's about it. Interest was pretty low and I didn't pursue it further. I was experimenting with some other features, but few of them are finished. All in all it's just fundamentals, finding out how to make a unit a radar jammer or a harvester and how to define how many facings a unit has. Dull stuff like that. The video/map interlacing found its way into Nyerguds' patch and I had some fun. Maybe I'll expand upon that someday.

Share this post


Link to post

Hmm it seems the easiest, if somewhat improper way to combine your work with hifi's is to combine the syringe code with hifi's launcher code. I tried The link, and registered on the forum too, but I still don't get permission to view the thread.

 

Good to know about the DVD mode too. First most videos mpeg seems pretty useless cause we only have *.vqas. But for stuff like the lost files I guess it could save an extra conversion. Can the game handle movies on other resolutions?

 

Oneast random question, what triggers the automatic intro and campaign start durring the first time cnc or ra runs?

Share this post


Link to post

Hmm, I should talk to the guys about the license thread... If I find some free time, I can see what I can do about combining the features.

 

I haven't checked which formats the DVD mode supports, can't tell, sorry. Of course the best option would be to enable it and to remove the message box in case the MPEG isn't found. Then modders can decide and the game would support both cases.

 

In redalert.ini there should be a value called PlayIntro= in the [intro] section. If this value is no, you'll go to the main menu, otherwise ("yes", not set, section not there) the intro will play. IIRC the inserted disk will then decide which mission is started (TFD should start the soviet campaign).

Share this post


Link to post

Thanks for looking into the forum issue. Like I said I don't know any real programming, but trying to combine syringe's and hifi's source would be the perfect kind of quasi-reverse-engineering project that I often use to teach myself something new.

 

Well unless a lot of code rendering code is changed I doubt it can handle other resolutions. DVD mode without the message box would be the best, hopefully the error detecting+warning code isn't inherited from something else.

 

PlayIntro in the *.ini . Wow, I definitely learned that before a long time ago. It would be a cool thing to enable by default in the installs for the best nostalgia moment.

Share this post


Link to post

Hey, Nyer. Will hifi's cnc-ddraw come with your next patch release?

Share this post


Link to post
Hey, Nyer. Will hifi's cnc-ddraw come with your next patch release?

I think he said it would. The new Launcher has cnc-ddraw configuration built in.

Share this post


Link to post

Yes, it will. It's too awesome not to include, and it has functions I specifically requested for the patch (like stretching videos, score screens and other 640x400 scenes to fullscreen)

Share this post


Link to post

Suggestion: integrate the Renegade Core Patch 1, the RA2 1.007 Patch and the RA2 YR 1.002 patch into the new TFD 1.04 patch. All these patches keep the original gameplay intact, except for making the game more balanced, strategic, a lot of bug fixes, performance increases, cheat prevention, etc...

 

Even though you guys didn't made those patches, i am sure people will appreciate it to get all the non official Westwood/EA patches in one big fix. Sort of like a Ultimate Fix for TFD.

 

Anyway, keep up the great work, i am really looking forward to the new updates, i love TFD!

 

Share this post


Link to post

I personally dislike adding 3rd party patches that affect balance in any way, mostly because they instantly make it incompatible with the mainstream in multiplayer.

Share this post


Link to post

Ey Nyerguds, thanks for the reply. Just to clarify and explain, both the RA2 1.007 Patch and the RA2 YR 1.002 patch do not change the game files at all, so you can still play RA2 1.006 online, or YR 1.001 online, by starting up the "normal" RA2 or YR .exe files. Both the patches are launched via a seperate launcher startup and load the patch then into the game.

 

The Renegade Core Patch 1 however will patch the Renegade game files so it will permanently change the game.

 

Maybe its an idea to make them optional during the install of the TFD 1.04 patch?

Share this post


Link to post

what did you update nathancnc?

 

also does hyper still not have a computer to develop on? what's his status? is he still interested in Red Alert, Red Alert 2, Yuri's Revenge, etc?

 

how is C&C going Nyerguds?

 

any word guys or anything you need from other people in the community?

Share this post


Link to post

Really, my forum is right below this one in the main list. How hard is it to just click there and read the dev topic? -_-

 

Or, hey, click my sig, brings you right to it.

Share this post


Link to post

THAT is not the problem. The problem is your aforementioned online community. Good luck getting an unofficial patch out and getting people to use it if they see that using the patch makes you unable to play online with people who don't have the patch.

thats not entirely true, i CAN'T play Generals ZH online without this patch.

Share this post


Link to post

Awesome patch, even donated to it some years ago :P

It's a shame that it's still at r4. It would be awesome to see C&C 1.06b r1 updated to 1.06c r3.

 

Nevertheless, awesome patch :) Thanks!

Share this post


Link to post

Once I'm done with school (2014-ish) and I have more time, I will be doing a complete redo of TFD 1.04....a new one right from scratch. Sorry that its so far away though.....

Share this post


Link to post

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.

×