Jump to content

New experts for XCOM 3 Bugfix


Mutonbrain

Recommended Posts

Hello !

 

I found a serious bug in the XCOM 3 ( Apocalypse ) turn based engine and need your help to fix it.

 

The bug kills reaction fire in TB mode, as it maxes out TU's on turn end by 25%.

 

Looking at a savegame at the very first turn of any mission, an Alien should have 100% TU's.

Using "Apoc'd" I've seen value "unknown32" is holding the TU's at turn start.

It is used for calcing TU cost for actions during that turn.

The current TU's are maxed out at "unknown32" / 4.

 

Example: Having 60 TU's

Keep 15 fine - keep 30 -> have only 15 for reaction fire.

The excess is wasted. This means you will never be able to reaction fire a gun that needs > 25% TU for a shot.

This does not apply to new born hyperworms, so it must be done at the end of a turn.

 

There must be a "divide by 4" somewhere in the turn end routine, but my ASM is not good enough to find it.

If that can be replaced with "divide by 1" the bug will be fixed.

 

I tried IDA yesterday, but I'm too stupid to figure out the location of that process.

 

The old XCOM3 DEMO does work just fine, not maxing out remaining TU's.

 

So how to fix it ?

 

Edit: My IDA does not display the entire code. I read that I have to remove the 32 bit extender from the exe. Can someone tell me how to do that ?

Link to comment
Share on other sites

OK, bug fixed !

 

Thanks to info by J'ordos posted somewhere else, I got IDA to open the Tacp.exe.

It needs to be stripped by PMWBIND.exe to remove the 32 bit extender.

 

The fix:

Offset 112 8249 points to truncating TU's at mission start

Offset 113 9101 points to truncating TU's at turn end

 

I just set the pointer 5A (90) to store the value in one of the "unused xx" locations and now all units have full TU for reactions.

Depending on how many you kept at turn end.

 

Was very interesting to see, once renewing TU's was stopped, that units start out with 1/4 TU's the next turn.

Reaction fire is now intense, as it should be. Units are fireing back at each other.

 

I may make a tool for fixing the bug, if there is any desire for it.

Link to comment
Share on other sites

Thanks for this.

 

I haven't been playing the game for awhile, and I just found this thread by chance, but I'm very interested to try this next time I play the game. It might have a large effect on tactics and balance, and I might have to readjust my balance mode if I include this fix.

 

I wonder if this was actually a 'bug' (as in unintended behaviour), or whether it was a deliberate design decision by the developers - perhaps they thought it would be a good idea to encourage people to use their TUs each turn, or thought it would be unfair if stationary units could have a full turn worth of reaction fire or something like that... In any case, I think it's definitely a bad thing that weapons with > 25% TU cost can never be used in reaction fire; and reaction fire in general is weak in this game compared to in XCom 1 and 2.

 

Anyway, as I said, thanks for the fix - and I look forward to trying it next time I get back into the game.

Link to comment
Share on other sites

I do not think it was intended. The bug also cuts down stamina regain at turn end. Now all TU's left give stamina back.

5 to 6 points for saving all TU's in a turn. Previously I did always only get 1 to 2 points back at most per turn.

 

IIRC, security stations where only doing reaction fire in TB. So this should also be boosted.

Yet it would need an attack on my base to confirm that.

 

And I already had to change tactics a bit. If you try to use a teleport to gun down a group'o hostiles the very first turn you tend to get ripped up. Also got butchered by a pair of cultists I tried to dice up with the powersword. Seemed they saved most of their turn for reaction fire. Charging enemies to fire at point blank does still work most of the time, but sometimes they give you a surprisingly warm welcome.

 

Given the other side effects mentioned, I think this was a "debugging feature" to test unknown parts of the engine rather than intention.

Link to comment
Share on other sites

While you are at it - can you check what causes when in TB mode if you leave soldier in running animation at end of the turn his whole stamina is gone on the next turn ?

 

It probably only happens where there are no TU's left to finish the move - if you cancel the move the stamina is still there.

Link to comment
Share on other sites

It looks like it is caused by the routine that moves the hostiles during their turn.

All of them move at the same time. It seems the movement system is just looping through all units and deducts stamina for being in run animation.

So the cause may be a missing check for the team of the unit currently calculated, leading to stamina being deducted every loop even if it's not the units turn.

Link to comment
Share on other sites

Fixing this one is above my skill. I just started with ASM to fix that TU bug. I think it would need a compare of the unit team to the current team in charge and a jump to skip the unit if false. Inserting new instructions is very tricky, as it would shift all function, data and jump locations.

I wont be much of a help here, sorry.

Link to comment
Share on other sites

  • 5 months later...
  • 6 months later...
  • 4 years later...
  • 2 weeks later...

I just checked our local copy of A Patcher and the latest date stamp is from 4/25/2010 so that means the patch was not incorporated. I tried looking for a newer copy somewhere, but there's nothing out there as far as I can see. Maybe j'ordos still has it, or possibly the OP. dntknw.gif

 

- Zombie

Link to comment
Share on other sites

  • 1 year later...

OG turret bug fix

 

In OG turret does not fire. The game just doesn't give it a go.

It only has a quarter point return fire at the start of the first turn.

This is because the turn function is:

start_turn(AI_control_FULL, side). The game gives a move only for alien whose AI = 99 and XCOM AI = 0, but the turret has AI = 1 and never call.

I was able to fix this by simply removing the AI condition, leaving only the side in the function to restore turn points. The turret now restores turn points on an XCOM turn.

As for the aliens, they also set the full turn points, but at the end of the hidden turn they are divided by 4 (for return fire during the xcom turn).

Link to comment
Share on other sites

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
×
  • Create New...