Renegade Projects Network Forums

Full Version: Patching extra functionality into <gamemd.exe>
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thanks, I just waded through the registry and changed the version number and the patch worked fine.
NonVehicle=Yes does stop the thief but what I am talking about is a tag specific for stopping the thief.

Stopping vehicles repairing on a repair depot (especially the bit about the AI using repair depots when they shouldnt) isnt something I will be looking into at this point.

Ditto for the DetectDisguise stuff.
Checking the code for the Tank Bunker check, it checks the following items:
1.Bunkerable=Yes
2.Turret=Yes
3.SpeedType is 3 (not sure how the numbers match to the names in the rulesmd.ini file)

And also a few other tests at the end that I dont yet understand the purpose of.
So, next up is to match speed type numbers to the strings in the ini file (I think PaD may know that) and then figure out which speed type numbers we are interested in allowing/which we dont want to allow.
Also, we dont want to allow anything with PoweredUnit=Yes to go into the tank bunker (should be easy enough to accomplish)

Someone got details of what settings I need on a building to give it cloaking/sensors through veterancy?
jonwil Wrote:Someone got details of what settings I need on a building to give it cloaking/sensors through veterancy?
  • SensorArray=yes (definitely)
  • DetectDisguise=yes (not sure if this is necessary, might only be so sensors detect disguised units. Is this what we want? Probably yes).
  • SensorsSight=n (This is tricky. Could set to the same as Sight= as with units, but Sight= seems short for a building. The game's Psychic Sensor (YR Psy Radar) uses a value of 15).
  • DetectDisguiseRange=n (same as above, but relates to disguise. Also as you remember from what I said before, it really doesn't work. For compatibility with possible future fixes I think it should probably be included also. Again the game uses a value of 15).
  • PsychicDetectionRadius=n (This makes the dotted lines get drawn so you see where a unit is going. Without this there is no point to the rest. Logically the area covered should be the same as SensorsSight=. Again game default is 15).
Now it would seem logical that a building, which does not start out being a SensorArray, could carry the SensorsSight= and other range tags in anticipation of its possible promotion. That would solve the range value problem. But from my research (concerns units though, not buildings), giving a unit SensorsSight=>0 automatically gives the unit sensors! IMO this should be fixed, so that SensorsSight= is ignored if Sensors=no; and the same fix should apply so that SensorsSight= is ignored for buildings if SensorArray=no.

This again brings up the idea of new veterancy abilities. While I'm sure everyone has a favorite, the most asked-for on the official forums by regular players was MC_IMMUNE. Always seemed cheap that elite Apocs could be mc'ed for example. One sticking point is what happens to a mind-controlled rookie who gets promoted? Does he break the mind control, or doesn't he?
I thought SensorArray=yes did nothing on buildings in YR.

Anyway, the intention is to make Sensors=Yes do the same thing for buildings as it does for units.
Ditto for Cloaked=Yes
Someone said that you cant use Sensors=Yes or Cloaked=Yes for buildings but that you CAN grant these abillities via veterancy.
What lines do I add to make these abillities visible through veterancy (I know nothing about veterancy in RA2 so explain it to me Smile

Also, I have found the code for tiberium spawning from tiberium trees.
The plan is to have a new setting for Terrain Types called TiberiumToSpawn= (just like in Firestorm). The default will be 0 (for the first tiberium in the list, same as it is now)

I just need to consult with PaD and find a way to expand the data storage for a TerrainTypeClass object so there is enough room to store the new setting.

I have looked at the mouse cursor stuff and I am just as puzzled by how it works as PaD is. When I talk to PaD, I will find out everything he knows about muose cursors in YR and see if that helps me.

No luck finding the refinery dock location.
Not sure yes what code to change to deal with the VehicleThief=Yes issues (i.e. where you need Thief=Yes in order for it to work)
Once I figure this out, finding the code that actually does "capturing" should be possible and from there I can add the Capturable= tag that it was suggested I add.
Making UseOwnName= work on vehicles will mainly require finding extra space in the vehicle data.
Granting stuff through veterancy:
[GAPILL] ;pillbox
VeteranAbilities=CLOAK
EliteAbilities=SENSORS
I got the HoverPad=Yes IE to trigger.
Unfortunatly, that doesnt help since the code it crashes in is nowhere near any code I know anything about.

Also, I looked at the Abilities=CLOAK/Abilities=SENSORS stuff, right now I need to find out what the relationship is between the strings (i.e. CLOAK) and the numbers that the game stores (PaD may know)

Also, I am going to look at destroyable cliffs to see if they can be made to destroy with any weapon (like in TS)

Plus, I am looking into new theaters.
I am not 100% sure how the new theater logic would work yet but it would be configured by an ini file.

Guest

Has anyone thought of reenabling the service depot sell logic? I mean it worked in RA2...
There is a Sell superweapon or something.
But, there is a bug where if you sell something thats in a tank bunker, the tank bunker walls will stay up. And if that tank bunker is then sold, the game gives an IE.
@jonwil:
Abilities
Abilities are listed at 8463B8.
The function to get a string's number in the abilities enumeration is at 74FEF0.

The abilities are stored in a way I didn't figure out yet, in a type which is 0x12 bytes long (maybe you can figure out what it is).
Veteran abilities are stored at [UnitType]+0x29C, Elite abilities at [UnitType]+0x2AE.

They get read from the INI at 4776A4.

SpeedTypes
Check 476FC0, explains everything Tongue

Stored at [UnitType]+0x67C.

TerrainTypes
Check 71E2A0.

At 71E2F6, memory for the TT class is allocated.
Just increase the argument 0x2BC and you got more space for new stuff.

Mouse cursors
Dunno really much about it.
Original actions are listed at 7E4C50,
my patch references to my own list at BA3210.

They get stored at [SuperWeaponType]+0xBC (search for 0xBC and you'll get tons of results).
6CEA9B reads it from the INI.

That's all I could figure out about them Unhappy
What we need to find: the assignments of the frames, probably (not sure) an array like MouseCursor[], so that the Action is just the element number
(like MouseCursor[SuperWeapon.Action])
For the tank bunkers, whats notable is that the only SpeedType it disallows is Hover.

There is a function at 0070FB50 that does bunker testing.
I have noticed that infantry, aircraft and boats (i.e. the boomer but not the transport) dont even trip this function.
Everything else does.
inside the function, we have a test for Bunkerable=, if No, fail function
Then another test for Turret, same again
Followed by a test that I cant identify (but it seems to be turret related I think)
Then a test that blocks speedtype 3 (Hover)
And finally a couple other unknown tests.

I suspect that (unless there is some reason why hover units generally shouldnt be allowed in tank bunkers) simply changing the test from "if unit has SpeedType=Hover" to "if unit has PoweredUnit=Yes" should do what is wanted.

No idea what the other unknown tests are though.

So if I change 2BC for terrain types to 2C0, I can then write the integer I want at 2BC?

For actions, what we need to find is the code that reads SuperWeaponType+0xBC and does stuff with it.
One way to do that is to debug it, break on the code at 006CEAAF that fills in the super weapon action. From there, do a memory breakpoint on the value of ebp+0xBC at that point and then run it.
Then trigger the super weapon (and the related action) and it will stop on the memory breakpoint. From there you can see which pieces of code read the action number and follow those through.

As for abillities, we need to find where they get read from the unit type and checked, from there we can locate what the game does when you get the sensor and cloak veteran abillities.
Do you get the CloakSound sound played if you get cloak via veterancy?
jonwil Wrote:There is a Sell superweapon or something.
But, there is a bug where if you sell something thats in a tank bunker, the tank bunker walls will stay up. And if that tank bunker is then sold, the game gives an IE.

I'm aware of that, but it's nothing like the service depot sell, In case someone doesn't know (highly doubt it) service depot sell is when you click the sell button and sell any unit being repaired on the depot, it works in every C&C, even RA2, but for some reason was disabled in YR.

Oh and, that guest was me Tongue.
sensorarray= definitly doesn't give the structure sensors, and neither does sensors=, so currently, there is no way to give a structure cloaking sensors... and in ROTC, we really need stuctures to have sensors, theres a few things that don't work properly, currently the only way to detect stealthed objects is with command tanks, apoc class tanks(apoc, prism, 666, mastermind) robot tanks, heros(some need to be elite) and elite super class tanks(DEUR, Chrono eradicator, lestech, sonic), also a veriaty of allied units including engineers and hovercraft, and the sensor drone, which when deployed looses its sensors(its suposed to increase range) not to mention navel units for detecting subs...

sure thats enough units, but there are no structures...
Another point to note here is the sight/sensors bug that currently exists (when a unit dies, sometimes it's sight range (and sensors range) remains active forever).
jonwil Wrote:As for abillities, we need to find where they get read from the unit type and checked, from there we can locate what the game does when you get the sensor and cloak veteran abillities.
Do you get the CloakSound sound played if you get cloak via veterancy?

AFAIK, yes, the cloak sound gets played if a unit gains cloak by veterancy. Really the cloak sound needs to be definable on a unit level rather than being a global value since you want cloaking units to sound different on land to in water. It would also be nice if you could make 2 classes of sensors, one that detects naval cloaked units (such as subs) and one that detects land based cloaked units.