Jump to content
Sign in to follow this  
Valherran

Regeneration Option

Recommended Posts

I was browsing through the editor to see what I could modify, and I noticed that TibEd does not have the option to make Inf/Veh/Building regenerate to half HP like a Mammoth Tank or Harvester. There was an editor I used way back in the day on the original game to do that, but is now gone. I am kind of surprised I did not see it on the TibEd editor. If anyone one knows how to get that implemented, please tell me how, thank you.

Share this post


Link to post

Koen doesn't drop by every day, you may have to wait a bit for him.

 

Nyerguds might be able to help you, but I don't think he browses the TibEd forums much. You can try sending him a PM if this is important to you.

 

I am no expert on either TibEd or C&C1, but I think the problem is that C&C1 was not made in a way that can easily be modded and the game has not been broken down to the extent yet that all of its innards are fully understood, specifically at the time TibEd was constructed for it. Basically, the codes all exist, but whether you can change them, or even find them, is iffy.

Share this post


Link to post

Sorry, but you must be confusing it with RA1. Only the mammoth in C&C1 has autoheal, and C&C1 never had such an option in the editable unit/structure data. What enables the autohealing is probably a hardcoded exception in the game running logic that filters out all mammoth tanks, rather than an option in the unit's data.

 

In fact, I haven't even found the actual autohealing code in C&C1. If I had, I could make it an option... but that would require me to implement the whole ini editing stuff for units anyway, making it all a breeze to edit.

Share this post


Link to post

If I had more time to look for that missing editor I would send it to you. It had ALOT of opions to mess with, and the regeneration to half health on any unit or structure was one of them.

 

Edit: Nevermind, I think Enker-Zan found it for me, but I do not have a system that runs the original C&C 95. This editor is old as hell, but the code for the regeneration may be in there, along with other stuff that may have not been found. Here is a link to it if you want to take a look:

 

http://www.cheaters-heaven.com/component/cheaters/2773/PC/command-and-conquer-editor-v14-allows.html

Edited by Valherran

Share this post


Link to post

Hehe, an old version of CCEdit. I kinda collect C&C1 utilities. Seen that one ages ago, and the much updated v4.0 of it too. Andrew Griffin, who made CCEdit, is pretty much the guy who started all C&C hacking smile.png

 

The unit options in DOS C&C and C&C95 are exactly the same though. I researched all of those on DOS C&C before I had C&C95, so I'm very very sure of this. Autoheal has never been editable in C&C1.

 

This shows all identified vehicle options in C&C. And even after looking through all existing editors, quite some of those were still found by me.

http://nyerguds.arsaneus-design.com/junk/unit_opts_launcher.png

(This isn't some C&C editor, by the way. This data comes straight from my disassembler. What you see are the bare CPU commands inside the exe file)

 

I could get a screenshot from the mammoth tank too, but you'd see there is no unidentified option that is 1 on the mammoth and 0 on the rest, so no autoheal. If there was, I'd probably have noticed that about 7 years ago.

  • Upvote 1

Share this post


Link to post

Hi Nyerguds, I didn't evaluate your post. I thought the button was a "go to the top" button ... Eheheh

Share this post


Link to post

I told Sonic those options were confusing :P

 

Anyway, final proof... the data of the Mammoth and Medium tanks.

 

http://nyerguds.arsaneus-design.com/junk/unit_opts_mammoth.png

http://nyerguds.arsaneus-design.com/junk/unit_opts_medtank.png

 

As you can see, the only 1/0 option that differs is the fact the Mammoth has Fires Twice enabled.

Share this post


Link to post

Unknown data... but seeing as it's not a 1/0 (true/false) option, the chances of it being in any way related to the regeneration are pretty slim. Especially since the other units have different numbers there, and not 0, ruling out things like regeneration rate. Though seeing as "autoheal" is one single true/false option in the RA1 rules, I doubt it'd be more customizable in C&C1 if it were in these data. Which, as I said, it isn't :P

 

btw, "push" is the command to feed arguments into a function. So all of these are processed by the eventual execution of the unitTypeClass_SetVariables function (which I should really rename; it's a constructor, should be unitTypeClass_CTOR)

 

...I should really turn this stuff into ini options -_-

 

On a related note, this is the editor I used for all my research in DOS C&C:

ccedt.png

Compared to all other editors out there, it had the huge advantage of displaying absolutely all options, including all of these unknown ones (CCEdit 4.0 later copied this feature. Unfortunately it uses some obscure DOS graphics library that absolutely refuses to run on anything but pure DOS), which is why it allowed me to find stuff like building capturability, infantry infiltration ability, airplane immunity, etc.

 

On assembler level, it basically just shows the arguments of all commands between the 'Call' commands that determine the end of each unit section. This way of working, combined with a pretty smart scan feature, allowed it to edit all versions of DOS C&C. In fact, with some tweaks from the programmer I'm fairly sure it might even have supported C&C95...

Share this post


Link to post

Well, seeing as how the regeneration is not a togglable option as it is only belonging to 1 unit, it probably has it's own command line that was not meant to be put on anything else. I KNOW I have done this somewhere, and that editor in the pic looks like the one I used a long time ago... What does it take to figure out what those unkown variables do exactly?

Share this post


Link to post

About the options, it's just the programmer's choice really. Stealth is also for one single unit, but it's still amongst the options. Though this might be related to the fact ALL C&C stuff supports Stealth internally, as seen by multiplayer crate effects.

 

Take some other examples... one is the gunboat's patrolling logic. There's no indication of that on the unit data, and no way to reproduce it with any other unit. Copy all options from the gunboat on another one, and it still won't do the patrolling thing. Another is that the destruction of a Mobile HQ unit triggers the global destruction of all that house's stuff on the map. Again, not an option in the unit data. And yet it happens. It's simply some code in the game's actual running logic that filters it out. Heck, I had to change code just to make any unit other than the original APC able to use the Transport logics. In a similar case, I still haven't found out how to make any weapon warhead other than the original "fire" one actually set stuff on fire.

 

Normally, I could quite easily look for the regeneration code by looking through the exe for all stuff using the unit's ID, but seeing as the Mammoth tank is the very first unit internally, its ID is 0... and 0 is used so much in normal programming I can't possibly find it from that.

 

Even if I found it though, without serious code changes, the only thing you could do with it is changing the ID, effectively moving the autoheal ability to another unit.

 

 

As for figuring out the effects, well, there are generally 2 ways; one is to compare the data of all units and see which units with common behaviour have certain options in common. Another is to simply change one of the options and see if the change has any effect ingame.

 

A third way, of course, is disassembling the whole thing, and seeing what code checks which specific data from the unit, and just see how it's used in that function. But that takes loads of time :P

Share this post


Link to post
Take some other examples... one is the gunboat's patrolling logic. There's no indication of that on the unit data, and no way to reproduce it with any other unit. Copy all options from the gunboat on another one, and it still won't do the patrolling thing. Another is that the destruction of a Mobile HQ unit triggers the global destruction of all that house's stuff on the map. Again, not an option in the unit data. And yet it happens. It's simply some code in the game's actual running logic that filters it out. Heck, I had to change code just to make any unit other than the original APC able to use the Transport logics. In a similar case, I still haven't found out how to make any weapon warhead other than the original "fire" one actually set stuff on fire.

 

IIRC, the Gunboat patrol was a map trigger, was it not? Same with the Hovercrafts, they are not a useable unit due to it being on the water, so it uses a map trigger to bring in other units and go away.

Share this post


Link to post

Nope. Any gunboat put on a map patrols between the left and the right side, without any triggers, and, oddly, ignoring all terrain in its path. Any hovercraft put on the map does nothing but move south off the map, leaving the map much like a transport helicopter that dropped off its delivery. I tested making waterbound units in C&C, and they worked perfectly, much like ships in RA. But the gunboat and hovercraft don't act like normal water units. They can go straight over cliffs, rivers, bridges, even buildings and units. They ignore all terrain completely to get where they need to go.

 

 

If you take a look at GDI mission 1's triggers, you'll see there's nothing about the gunboat in there.

 

In fact, only recently did someone find triggers to make a gunboat's patrol area smaller than the full map width.

Share this post


Link to post

Just a small note: I found some of my newer research data on units and updated the images with the new options: an option to refresh a larger area for the unit graphics (which my patch enabled on all units), the option that makes the rocket launchers barely ever turn their turret, the unit's death animation, the name ID for the strings file, and the actual internal unit ID.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×