Checkpoint respawn problem / Lua script mod

Started by hans_dampf36, September 02, 2016, 11:00:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hans_dampf36

Hi folks,

you surely know how annoying those frequent spawns of checkpoint mercs were in the past and still are. As far as I know it's a persistent problem that has never been solved so far.

Maybe we have a little chance to do something about it.

I read that Rhynder already tried to figure something out. As far as I understood, a fundamental problem was to even change any Lua script or code that is interpreted at runtime.

Recently, I made some tests if we are generally able to change any code via known tools and patch.dat/fat creation: you can indeed include altered code in the patch!

Here are my results from a tiny experiment: the crate in the weapons storage is gone due to changed code.
Please see the picture.

Guests are not allowed to view images in posts, please Register or Login

/downsized the image /Art

Any suggestions how to cope with the spawns are welcome.

hans_dampf36

I would like to add some background on the problem first. This is what I think about Far Cry 2's game engine architecture:

I believe the problem is that Far Cry 2's engine has very limited state memory; it only considers the current zone the player is currently located at. Only the very immediate surroundings are loaded (or generated?) without any interruption. You do not notice the borders as they fade seamlessly.
Therefore, whenever the player leaves a certain zone or travels a distance the checkpoints are re-occupied with new mercs.
In order to prevent this from happening, I think we need to change the Lua scripts and introduce some additional state data. With that data the already visited guard posts or checkpoints could be memorized on a per day basis (or more game days) so that these would only spawn once a day and no longer unlimited. The player then would have to remember where he has already gone on a specific day.

There are limitations though:
The spawning problem could only be solved when the function to spawn mercs at guard posts is intercepted and evaluated against the new introduced state memory. However, I believe we will not be able to save the damage and carnage we left behind in guard posts when clearing them of mercs. In other words, the burned areas, destroyed cars and objects will hardly be remembered by the game engine. There simply is too much to remember. Far Cry 2 runs so smoth without loading since it just keeps only a little of the map active at once.

Anyway, it would be helpful if at least the mercs would not appear each time. Then you just rush through.

What do you think?

OWGKID

Well, the game utilized the first version of the Dunia engine and I don't know if Ubi pushed the PS3/Xbox 360 to its limit on that time (maybe they did?). Both consoles had 512 MB RAM on that time and it wouldn't surprise me if that was a console limitation. Graphically, the game looked very good on the consoles in 2008, considering the generation where almost 3 years old on that point. I guess they probably increased the state memory for Dunia 2, there is no loading screen when crossing the ocean between islands in FC3.

It is noticeable how stuff pops in, especially when you mod your jump height, player sped and gravity when flying in mid-air. :laugh: Very noticeable on GTA V, Lampposts seems to respawn every time they are not rendered (>20-30 meters).
LEGACY

hans_dampf36

After reading some threads in this forum I have learned that mercs do not respawn endlessly like they do in the two main towns. This was new to me. I thought they would infinitely spawn in Sefapane, too.

To be able to analyse this behavior in the game files I need to know if the mercs in Sefapane are already present with their full numbers or if they do spawn for a while and then simply run out of reinforcements, so that spawning stops after a counter is reached.

Has anyone observed the actual spawning in Sefapane?

Art Blade

no. As far as I can tell (using a scope, for instance) they're always there until you've killed them. Obviously they will respawn after you left the area but they're always the same as far as I remember. Same goes for other towns except the "cease fire" zones which is where they will spawn endlessly.
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

OWGKID

Actually, you have to clear that town for enemies when you do a faction quest (blowing up the nitrous oxide tanks). If you follow your buddy's path, you drive that truck into a garage. After that, you need to clear out Sefapane. If the enemies were infinitely respawning, how would you be able to finish that mission? 8-X



LEGACY

PZ

Many times I have gone to Sefapane and killed all the mercs, then was able to stroll the town at will. The only endless spawn are in the main towns. I recall using the high jump toggle in Bowa and sitting on a rooftop picking off mercs. There is a basement staircase on the east side of town where the mercs kept coming, and never stopped. It was kind of fun to keep picking them off with the silent AS50

hans_dampf36

Hi folks,

after going in the internals of FC2 for a while I can tell you that solution exists that eliminates the merc respawn at checkpoints.

However, that means mercs stay dead forever once you have cleared a checkpoint. All checkpoints you have visited on the map will never be occupied again. Whenever you kill a merc, he will stay dead. Exceptions are mercs of patrols and inside free fire zones / cities.

There can hardly be a solution that just keeps them away for a day or two. I doubt it.

What is your opinion?

nexor

I don't know about everyone else but I prefer the mercs to respawn, I cannot imagine passing through a deserted checkpoint, wouldn't know what to do with myself    :o
No one to shoot!!!!   :'(

fragger

I agree nex, having respawning checkpoint mercs ensures plenty of action. If they didn't respawn, the game world would quickly become empty and monotonous. Having said that, it might have been better if the respawn interval was longer, instead of the mercs respawning almost as soon as you go around the next bend in the road.

I think I'm also one of the few players who actually likes the weapon degradation. I see it as a crude form of weapon maintenance - if you don't maintain a firearm (if you're using it regularly and often) it will eventually jam and/or misfire. Watching a guy sit down, strip and clean a weapon would be pretty boring in a game however, so they did it the way they did. I thought it added an extra element to the game's immersion and was something else you had to plan for.

Binnatics

I agree with you Fragger, the weapon degradation wasn't annoying me either. It also gave extra value to the golden guns 8)
"Responsibility is not a matter of giving or taking, responsibility is something you share" -Binnatics

fragger

Talking about the golden weapons reminded me of my most memorable FC2 experience, which was when I played through on Infamous level without buying any weapons at all, except for the Makarov pistol - as I recall, you have to buy one weapon as part of the tutorial/introductory part of the game. No mods or cheats. In fact, I didn't buy anything at all - no upgrades, no manuals, no equipment. I relied solely on the golden AKs and whatever I could scrounge off dead mercs. It was tough, but it was very rewarding to finally get through the game that way :-X I had 996 unspent diamonds at the end.

Admittedly, I didn't do any buddy missions, just the main ones and a few necessary sides, such as the malaria pill ones.

[smg id=3531 align=center width=600]

I found that the golden AKs will last the whole game, if you use all of them, i.e. don't get the next one until the current one is spent, and be economical with your ammo. I think that was why my accuracy rating was so low - I was trying to save wear and tear on the AKs by going for headshots and taking down bad guys with as few shots and from as far away as possible, meaning that I would miss a lot of the time then have to bolt out of sight of those seemingly radar-equipped mercs.

mandru

I didn't mind the weapons degrading too much other than the part where one would blow up in your hands as you are sighting in on a target and your "...face looks like a baboon's butt."  :laugh:
- mandru
Gramma said "Never turn your back 'till you've cut their heads off"

OWGKID

LEGACY

PZ


OWGKID

Quote from: mandru on October 29, 2016, 08:46:58 PM
..blow up in your hands as you are sighting in on a target and your "...face looks like a baboon's butt."  :laugh:

IMFDB who has a page for the FC2 weapons had this line: "By the end of the game, Frank probably has so many of these things sticking out of his head he looks like some kind of NRA-sponsored Sonic the Hedgehog"  :laugh:
LEGACY

fragger


Tags:
🡱 🡳

Similar topics (5)