Command & Conquer™ Remastered Collection

Command & Conquer™ Remastered Collection

CFE Patch Redux
Chthon  [udvikler] 22. nov. 2023 kl. 23:32
Test Build 6 for v1.9 Available
Version 1.9 test build 6 for TD is now available on github: link[github.com].

The main goal for this test build is to make sure that damned "sometimes crash when loading a saved game" bug is really, truly dead. If this test build manages to go awhile with no reported crashes (inshallah), I'll upload it to Steam as v1.9 final.

(Totally incompatible with saved games from prior versions and test builds. Sorry!)

That damned bug:
It turns out that the "sometimes crash when loading a saved game" bug was actually two bugs:
  • One bug was a dangling pointer in one of the map layers. Two things were done to fix this:
    • Fixed a bug that caused Map.Remove() to be called using the wrong map layer for animations that ended early when the object they were attached to was destroyed.
    • Implemented a sanitizer for map layers that runs during saving and loading saved games that removes any null/wild/dangling pointers or pointers to valid objects that aren't down on the map. (Please check CnCDLL_Log_16000.txt and let me know if you ever see a line that begins, "SanitizeLayer() found a...")
  • The other bug is limited to loading saved skirmishes.
    • I suspect the actual bug is somewhere in a GlyphX component, due to the fact that this bug can be avoided by starting a fresh skirmish before trying to load the saved skirmish.
    • This bug is worked around by a new ini option LEGACY_RENDER_DISABLE_MODE.

New Ini Options:
  • QUIETER_AIRSTRIPS: 0=vanilla; 1=say "unit ready", silence "reinforcements have arrived"; 1=silence "unit ready", say "reinforcements have arrived" (default); 2=say "unit ready" when the cargo plane lands, silence "reinforcements have arrived"
  • LEGACY_RENDER_DISABLE_MODE: 0=vanilla. (You will need the workaround decribed above to load a saved skirmish.) 1=Force disable legacy rendering only when loading a saved skirmish. (default) (Everything "just works," except that the tactical map is black if you toggle to legacy rendering (via spacebar) during a saved skirmish.) 2=Always force disable legacy rendering.
  • TIB_RESURGE_DELAY: The units is ticks. (Game runs at 15 ticks/sec.) This is the time it takes a tib tree with zero adjacent tiberium to charge a resurgence. A tib tree with a small amount of adjacent tiberium will charge more slowly. (Trees with more than a small amount don't charge at all.)
  • DO_OVERRIDE_MINIGUNNER_RANGE: 0=disabled (default); 1=override minigunner range.
  • MINIGUNNER_RANGE_OVERRIDE: Value to override minigunner range. Unit is leptons (1/256 of a cell). (Vanilla range is 512.)

Changes/Tweaks:
  • Disable Harv Optimization, Harv Load Balancing, and Harv Queue Jumping for CPU in single player. This is necessary to make sure missions designed for "capture the harv along with the refinery" will have a harv using that refinery. (E.g., Nod 9.) Due to the single player CPU credits bug, this doesn't give the player an unfair advantage.
  • If JD_EXTRA_ADJUSTMENTS is enabled, the cost of stealth tanks changes to 800.
  • Changed death's door conditions to > 3x repair step +1 (from 2x +1) to prevent repeated saves.
  • Increased length of contiguous walls that can flip with advanced wall ownership.

Mod bugfixs:
  • Fixed the "no repair" icon on fully repaired buildings. This breaks the fix that resotred the "scold" sound when clicking them, but the icon is more important than the sound.

Vanilla bugfixes:
  • Bugfix for chinooks sometimes failing to load infantry. Also improves APC loading.
  • Fixed chinook/APC doors not opening/closing when they should.
  • Fixed the speed value for units that's passed to GlyphX to account for difficulty and veterancy modifiers.
  • Fixed missing null pointer check in FootClass::Sort_Y().
  • Fixed sorting algorithm in LayerClass:Sort(). (WW probably used a partial sort for performance reasons.)

Other:
  • Remove reclac of placement distances upon loading save game because placement gets canceled anyway. (CFEHunter and Petroglyph fixed same bug two different ways.)
  • Merge two functions that both clean up the map for performance reasons.
  • Other stuff done in hopes of fixing the "sometimes crash when loading a saved game" bug that probably neither helped nor hurt:
    • Adjusted a whole bunch of object sizes to equal the vanilla object sizes, or be larger by a multiple of 8.
    • Made sure every member variable added for the mod is explicitly initialized in the constructor.
Sidst redigeret af Chthon; 19. jan. 2024 kl. 5:59
< >
Viser 1-12 af 12 kommentarer
WakizashiM 23. nov. 2023 kl. 15:20 
Thank you for your continued work on this, Chthon. I super appreciate it.

Also big thank you for implementing my suggestions pertaining to the airstrip announcements and the minigunner range.

So if I want the minigunner range to be like that of Red Alert 1, would the value need to be double that of the default, meaning 1024?
Chthon  [udvikler] 24. nov. 2023 kl. 7:50 
RA minigunners have a range of 768 (3 cells) by default.

Note however that increasing their range disadvantages pretty much all of the other infantry and light vehicles that currently get free shots while minigunners close the distance, or at least don't have to eat free shots while closing the distance.
WakizashiM 24. nov. 2023 kl. 12:03 
Do the other infantry types and light vehicles have the same range as their homologues in Red Alert, or are they also shorter-ranged just like the minigunners are?

Based on your response, it would seem that they'd have shorter range than their RA counterparts if boosting the range of the minigunner puts it at an advantage compared to other infantry and to the light vehicles.

Essentially, my main pain point here is the super short range of the minigunners. It very much bothers me that they can only fire on the tile adjacent to them. If giving them the range of the minigunners from RA gets them an advantage over other infantry, that's a price that I am more than willing to pay. The balance of units in C&C has never been a point of praise so I don't really care if I unbalance further if that can make my playthrough more enjoyable. So the simple fact that the mod now offers that option satisfies me. Thank you again.

That being said, would it be possible (and not too much work) to add more range-modifying options in the .ini, for the other units? I'd love to be able to tailor the range of the units so that they all behave more like their Red Alert homologues. It'd be great if I could eat my cake and have it too in regard to expanding the range of minigunners and avoiding a disbalance. If it's too much work, then forget about it. I'm already happy enough that you added the option for minigunners, and at the end of the day, I only play single player so I can live with a slight disbalance.
SpiritusIgneus 24. nov. 2023 kl. 18:35 
I have resumed my Nod playthrough. So far, saved games seem to work properly.
Chthon  [udvikler] 25. nov. 2023 kl. 5:42 
@WakizashiM: I think maybe you're misunderstanding something here. The vanilla TD minigunners have a range of 2 cells, not 1. A minigunner standing in the center of cell xpos=N can shoot over cell xpos=N+1 and hit something at the center of cell xpos=N+2. So why do you often see minigunners up adjacent to their targets? Two reasons:

First: Units in motion cannot change actions until they arrive at the stopping point in the cell they're moving into. So units often move one cell closer than needed when moving towards each other. Example: Assume Minigunners A and B are trying to fire upon each other. There are two empty cells between them. A has just arrived at the center of his cell; B is is about to arrive at the center of his cell. A does a range check; 3 cells and a little bit; that's too far, so he starts a move into the next cell. B arrives at the center and does a range check; a little bit less than 3; that's too far, so he too starts a move into the next cell. And so they end up stopping in adjacent cells.

Second: There are five stopping points for infantry in each cell. The back two cannot reach the middle of the cell two cells over. So minigunners will move up rather than stopping in those back two spots.

You might want to try 576. That would allow minigunners in the back two spots to hit the center of the cell two cells away. It would also make it more likely for a minigunner to pass he range check on something that's coming into the cell two cells away, but hasn't reached the center of the cell yet.

As for TD vs RA ranges:
Minigunner: TD=2, RA=3
Grenade: TD=3.25, RA=4
Flamer: TD=2, RA=3.5
Jeep: TD=4, RA=4

Flamer really gets screwed if minigunner can outrange him, and you can't just increase flamer's range very far without redoing the fireball animation to match. (Which is probably why WW did redo the fireball animation for RA.)
Sidst redigeret af Chthon; 25. nov. 2023 kl. 5:43
WakizashiM 26. nov. 2023 kl. 8:03 
@Chthon

Thank you for this detailed comment! I will most definitely try a range of 576 for my next playthrough and gauge how it feels.

As always, thank you again for your work on this.
Chthon  [udvikler] 30. nov. 2023 kl. 21:45 
Status Update: In the course of porting 1.9 things to RA, so far I've encountered a few bugs and a few places where a fix that appears to work in TD turns out to be an incomplete solution when ported to RA. So, I will probably adopt the following course: I'm going to finish porting the 1.9 stuff to RA. As I go, I'm going to backport the additional bugfixes and changes I have to make along the way back to TD. Then I'm going to do another test build for both TD and RA.
WakizashiM 1. dec. 2023 kl. 7:26 
Sounds good to me!

Question: is it possible to add to the mod's .ini some parameters regarding difficulty? Like some multipliers for enemy health, enemy damage output, build speed and whatnot?

Other question in the same vein: is it possible to add some cheats to the .ini? Stuff like multipliers for the player's build speed, unit health or damage, tiberium collected by harvesters and the such?

Thank you!
Chthon  [udvikler] 19. dec. 2023 kl. 20:10 
Status update: There will probably be another test build before RA catches up. I found some vanilla bugs in the routine units use to search for a target within a certain range and I am concerned that fixing them might break some missions. Specifically I'm worried about situations where you need to sneak past something and it turns out that only works because its target search radius is bugged. Probably won't be up until after the holidays though.

@WakizashiM: Without looking at it, I suspect can probably get a hold of the variables used for remastered difficulty settings and change them before they're used. Maybe add an else case to some conditionals to mirror them onto the human player. Changing unit maxhp is not possible without a huge overhaul. (The problem is that individual instances of a unit don't have their own maxhp value; instead they have a pointer to a structure shared by all units of that type which contains the maxhp value. (This is one of those things that are crazy by modern coding standards that WW did to make the game work within the RAM limitations of early 90s consumer PCs.))
WakizashiM 23. dec. 2023 kl. 10:04 
Oprindeligt skrevet af Chthon:
Status update: There will probably be another test build before RA catches up. I found some vanilla bugs in the routine units use to search for a target within a certain range and I am concerned that fixing them might break some missions. Specifically I'm worried about situations where you need to sneak past something and it turns out that only works because its target search radius is bugged. Probably won't be up until after the holidays though.

@WakizashiM: Without looking at it, I suspect can probably get a hold of the variables used for remastered difficulty settings and change them before they're used. Maybe add an else case to some conditionals to mirror them onto the human player. Changing unit maxhp is not possible without a huge overhaul. (The problem is that individual instances of a unit don't have their own maxhp value; instead they have a pointer to a structure shared by all units of that type which contains the maxhp value. (This is one of those things that are crazy by modern coding standards that WW did to make the game work within the RAM limitations of early 90s consumer PCs.))
Thanks for the explanation! I'll take what you can do.

As for the routine bugs that you found, I say correct them despite your worries, and if it breaks anything, then we can do something about it. There's also a good chance that it won't break anything.

No worries about the test build waiting until after the holidays. I'm already busy playing 2023 games. I'm just happy that you are still working on this mod.

Happy holidays!
Sidst redigeret af WakizashiM; 23. dec. 2023 kl. 10:05
Nyerguds 19. jan. 2024 kl. 2:12 
You got one of the numbers wrong on "QUIETER_AIRSTRIPS"; there's no "2" in the list.
Chthon  [udvikler] 19. jan. 2024 kl. 5:58 
Sorry, "3" is a typo for "2." Let me see if I can edit that. (Also find time for next test build.)
< >
Viser 1-12 af 12 kommentarer
Per side: 1530 50