Home » PLAYER'S HQ 1.13 » v1.13 Solutions,Tips & Spoilers » What to do about 'Invisible armies'
|
Re: What to do about 'Invisible armies'[message #343185 is a reply to message #343182]
|
Thu, 12 November 2015 18:46
|
|
Torres |
|
Messages:171
Registered:June 2010 Location: Canary Islands |
|
|
Happened to me a lot in 7991, I had luck with the following.
1) One time I moved mobile militia in there and the army spawned (the strategic battle event started and since I had mercs in there I was able to take part), both sides spawned, this happened to me as well when the invisible army invaded Drassen but there was no battle, had to get to the tactical view in order for them to spawn and start the fight.
2) So far I've learned that they are possibly "moving" so therefore they are and not are in the sector, I had that happen when attacking a group that was close to my Drassen SAM, I launched a night assault, the strategic map said there were like 60 soldiers in there... there were maybe 20 red shirts, the rest were moving to attack the SAM site. I had to move my mercs to the edge of the map to retreat to see this happen as time passed.
3) As I said in the last quote... well... kill the ones that are in there, retreat via map edge and get back to the same sector, they always respawn for me.
4) One time IF I remember it right, I just had to switch from strategic to tactical but I'm having no luck replicating that.
Report message to a moderator
|
Staff Sergeant
|
|
|
Re: What to do about 'Invisible armies'[message #344278 is a reply to message #343185]
|
Mon, 29 February 2016 09:59
|
|
Sekthet |
|
Messages:11
Registered:February 2016 |
|
|
Same thing is happening to me, using the latest stable version(confirmed by pressing V in-game).
I find it quite gamebreaking for a supposed stable version.
On two seperate games, on two seperate computers, I've taken Drassen and - while I'm doctorin', repairing and waiting for Bobby Ray's shipment - I inevitably get attacked by a small force. The trouble is, they don't actually show up once the battle begin. I have to fast forward 3-4 hours, while periodically checking the map every 30 minutes, and THEN the enemy will suddenly appear. However, when they actually spawn, they spawn as if they are the ones defending Drassen. I.e. around the helicopter and plane, right behind my defensive line, and next to the two guard houses and the barriers.
Meanwhile my merc's are falling asleep on their feet due to being locked in combat for so long.
If anyone has any solutions for this bug, I'd greatly appreciate it.
Report message to a moderator
|
Private
|
|
|
|
Re: What to do about 'Invisible armies'[message #344285 is a reply to message #344278]
|
Mon, 29 February 2016 19:46
|
|
tais |
|
Messages:656
Registered:February 2008 Location: NL |
|
|
Sekthet wrote on Mon, 29 February 2016 08:59Same thing is happening to me, using the latest stable version(confirmed by pressing V in-game).
I find it quite gamebreaking for a supposed stable version.
On two seperate games, on two seperate computers, I've taken Drassen and - while I'm doctorin', repairing and waiting for Bobby Ray's shipment - I inevitably get attacked by a small force. The trouble is, they don't actually show up once the battle begin. I have to fast forward 3-4 hours, while periodically checking the map every 30 minutes, and THEN the enemy will suddenly appear. However, when they actually spawn, they spawn as if they are the ones defending Drassen. I.e. around the helicopter and plane, right behind my defensive line, and next to the two guard houses and the barriers.
Meanwhile my merc's are falling asleep on their feet due to being locked in combat for so long.
If anyone has any solutions for this bug, I'd greatly appreciate it.
Try saving and loading, same effect though, the enemy is all over the map, so be ready to fight at the spot
DiscordReport message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: What to do about 'Invisible armies'[message #344728 is a reply to message #344709]
|
Sat, 26 March 2016 20:52
|
|
Sekthet |
|
Messages:11
Registered:February 2016 |
|
|
Alright, here's a link to the savegame. That's all that's needed, right?
xxx.dropbox.com/s/tqsgiuzteohqetn/SaveGame12.sav?dl=0
I dit some edits to the options.ini as well. Don't know if it'd make any difference, but here it is anyway.
xxx.dropbox.com/s/s4msxiwsnna6eek/Ja2_Options.INI?dl=0
Just replace x's with w's.
Edit
One more:
xxx.dropbox.com/s/22tzp7b6z4bspod/SaveGame13.sav?dl=0
[Updated on: Sat, 26 March 2016 23:11] Report message to a moderator
|
Private
|
|
|
|
|
Re: What to do about 'Invisible armies'[message #344788 is a reply to message #344786]
|
Tue, 29 March 2016 00:21
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
Oh boy. This is confusing.
First of all, that these soldiers are treated as reinforcements is ok. Any force attacking a sector from the outside is treated as 'reinforcements', so far so good.
- At 17:32: 4 dudes invade from the south. As silversurfer says, PrepareEnemyForSectorBattle calls HandleArrivalOfReinforcements calls AddPossiblePendingEnemiesToBattle.
- Because MIN_DELAY_ENEMY_REINFORCEMENTS is 5 (Sekthet's ini), we now DELAY these reinforcements. Which is technically correct but will be disastreous. We set the delay in
guiReinforceTurn = guiTurnCnt + gGameExternalOptions.sMinDelayEnemyReinforcements + Random(gGameExternalOptions.sRndDelayEnemyReinforcements+1);// first possible reinforcement
which also adds a random penalty the delay. - The intention, it seems, it that the game now updates its turn counter and then at some point decides to add the reinforcements. This is indeed what happens if you set all that reinforcement stuff to 0 in the ini.
This should happen in HandleTacticalEndTurn(), where the turn counter guiTurnCnt can be increased, and where AddPossiblePendingEnemiesToBattle is called. - First really, really bad stuff: This does not happen. Because HandleStrategicTurn does not call HandleTacticalEndTurn. Why is that?
void HandleStrategicTurn( )
{
UINT32 uiTime;
UINT32 uiCheckTime;
// OK, DO THIS CHECK EVERY ONCE AND A WHILE...
if ( COUNTERDONE( STRATEGIC_OVERHEAD ) )
{
RESETCOUNTER( STRATEGIC_OVERHEAD );
// if the game is paused, or we're in mapscreen and time is not being compressed
if( ( GamePaused() == TRUE ) ||
( ( guiCurrentScreen == MAP_SCREEN ) && !IsTimeBeingCompressed() ) )
{
// don't do any of this
return;
}
...
We already break in there... because the game is paused. Why? I don't know. There are each about 30 to 50 calls of PauseGame and UnPauseGame. I guess we somehow skipped the last UnPauseGame(). I don't know how or where. - With the unholy power granted to me by the powerful artifact that is the debugger, I set the pause state to false. We get to HandleTacticalEndTurn and this part:
if(gGameExternalOptions.gfAllowReinforcements)//dnl ch68 100913
{
((gTacticalStatus.Team[ENEMY_TEAM].bTeamActive || gTacticalStatus.Team[MILITIA_TEAM].bTeamActive) ? (guiTurnCnt++) : (guiTurnCnt = 0));
//Check for enemy pooling (add enemies if there happens to be more than the max in the
//current battle. If one or more slots have freed up, we can add them now.
AddPossiblePendingEnemiesToBattle();
AddPossiblePendingMilitiaToBattle();
}
What should happen is that guiTurnCnt is increased. But it doesn't. We have no militia here, so gTacticalStatus.Team[MILITIA_TEAM].bTeamActive is FALSE, and the enemy isn't here yet (remember, we delayed them in the first place), so gTacticalStatus.Team[ENEMY_TEAM].bTeamActive is also FALSE.
Thus guiTurnCnt is always set to 0.
This means that, in this case, reinforcements not being here prevents reinforcements from arriving. - Luckily, we also know whether reinforcements are pending, so we can fix that:
if(gGameExternalOptions.gfAllowReinforcements)//dnl ch68 100913
{
if ( gTacticalStatus.Team[ENEMY_TEAM].bTeamActive || gfPendingNonPlayerTeam[ENEMY_TEAM] ||
gTacticalStatus.Team[MILITIA_TEAM].bTeamActive || gfPendingNonPlayerTeam[MILITIA_TEAM] )
++guiTurnCnt;
else
guiTurnCnt = 0;
//Check for enemy pooling (add enemies if there happens to be more than the max in the
//current battle. If one or more slots have freed up, we can add them now.
AddPossiblePendingEnemiesToBattle();
AddPossiblePendingMilitiaToBattle();
}
With this change, the turn counter increases as it should. After 6 turns, reinforcements arrive. Hooray!
We could also ask ourselves whey we don't simply increase guiTurnCnt all the time, like we do in void EndTurn( UINT8 ubNextTeam ). But not now, I'm tired. - I've committed the above fix in r8130.
- If you have an older exe and don't want to upgrade (or rather, don't want to wait for the next SCI ), set MIN_DELAY_ENEMY_REINFORCEMENTS and RND_DELAY_ENEMY_REINFORCEMENTS to 0 in JA2_Options.ini. This should stop the reinforcements from being delayed in the first place.
- This does not address the weird state from above, where the game was paused even though it shouldn't. With luck, this was a consequence of me messing with the debugger (and running several pre-features alongside). Otherwise, well, shit.
- Side note: We seem to reroll the delay times during the load routine:
if(guiReinforceTurn)
guiReinforceTurn = guiTurnCnt + gGameExternalOptions.sMinDelayEnemyReinforcements/2 + Random(gGameExternalOptions.sRndDelayEnemyReinforcements+1);
if(guiMilitiaReinforceTurn)
guiMilitiaReinforceTurn = guiTurnCnt + gGameExternalOptions.sMinDelayMilitiaReinforcements/2 + Random(gGameExternalOptions.sRndDelayMilitiaReinforcements+1);
It seems to me we should rather store them in the savegame itself. Me go sleep now.
[Updated on: Tue, 29 March 2016 00:29]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: What to do about 'Invisible armies'[message #344793 is a reply to message #344790]
|
Tue, 29 March 2016 13:20
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
If the pause issue indeed persists, one would have to unpause the game by hand. I'm not at the code for now, not sure if this even is the kind of pause that one can set by key commands. I guess the easiest way to unforce it would be to cause any explosion or combat. 'If in doubt, shoot someone' is after all tried and true problem solving strategy
I agree with you, silversurfer - the delay seems mighty odd if the entire enemy force is delayed (and could cause a lot of trouble if we manage to then load a different sector). Perhaps a simple check would be enough - if no hostile force is currently present, lower delay or sth like that.
What confuses me after sleeping over it - if we don't allow reinforcements... how would this attack even start? I'll have to read the code this evening. I hope I didn't misinterpret it and initial attacks aren't treated as reinforcements but something in between. It's complicated enough already.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: What to do about 'Invisible armies'[message #344796 is a reply to message #344795]
|
Tue, 29 March 2016 15:49
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
silversurfer wrote on Tue, 29 March 2016 12:13If we don't allow reinforcements it doesn't matter. "HandleArrivalOfReinforcements( gpBattleGroup )" is called before the check.
Phew. Good to know.
silversurfer wrote on Tue, 29 March 2016 12:13
I was thinking about a possible fix for the initial delay. What if we just increment "guiTurnCnt" by "guiReinforceTurn" as long as there are no enemies on the map? This would make sure that the next turn spawns the enemy forces. The real reinforcement functionality wouldn't be affected because for real reinforcements there has to be an enemy force present on the map already which is not the case in an invasion scenario.
In "AddPossiblePendingEnemiesToBattle()":
if(gGameExternalOptions.sMinDelayEnemyReinforcements)//dnl ch68 080913
{
if(gTacticalStatus.Team[ENEMY_TEAM].bAwareOfOpposition == TRUE)
{
if(guiReinforceTurn == 0)
{
guiReinforceTurn = guiTurnCnt + gGameExternalOptions.sMinDelayEnemyReinforcements + Random(gGameExternalOptions.sRndDelayEnemyReinforcements+1);// first possible reinforcement
ubSlots = 0;
// silversurfer: If there are no enemy troops in the sector yet we will spawn the incoming troops without delay. In this case they are not reinforcements but the initial attack group.
if( !gTacticalStatus.Team[ENEMY_TEAM].bTeamActive )
guiTurnCnt += guiReinforceTurn;
}
else if(guiTurnCnt >= guiReinforceTurn)
{
But... guiReinforceTurn isn't 0, so your fix won't run, won't it?
silversurfer wrote on Tue, 29 March 2016 12:13
Now I need to find out where this pause happens in order to terminate it.
edit:
Ok, "PauseGame()" is called in function "PrepareForPreBattleInterface" which is ok. We need to stop the clock here before presenting the pre-battle interface.
Unfortunately the pause is not terminated once we enter the tactical screen and the player doesn't know that the game is still paused. So now where best to place the "UnPauseGame()"...
It's likely the Unpause exists at the right place but we just miss it. You could perhaps see whether an enemy attack elsewhere correctly unpauses the game (might have to break in PauseGame and UnpauseGame for that).
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: What to do about 'Invisible armies'[message #346909 is a reply to message #346907]
|
Thu, 15 September 2016 03:19
|
|
Panzer |
|
Messages:89
Registered:February 2016 Location: Altis, Sometimes Tanoa |
|
|
had trouble getting that one working, but ill try it again I suppose.
Got it working just fine now, didn't fix it. yay, fixed issues I cant experience. It's like bugfixing a game you cant play. hahaha. I guess ill change the INI information and see if someone finds a way.
Well, I have no clue what's going on, after changing all of this, I can't tell why it isn't working. Only thing I can think of is maybe it's my save game.
[Updated on: Thu, 15 September 2016 12:06]
I have no Wife, Children, or real Job. This also means I have 24 hours a day and 7 days a week to think of a rebuttal. You have been warned.
"I got another problem: I am being overrun by Dinosaur Nazis on Hoverboards!" -Ravenhugger
"Before you judge a man, walk a mile in his shoes. After that who cares? He's a mile away - and you've got his shoes!" - Unknown Criminal
Report message to a moderator
|
Corporal 1st Class
|
|
|
Goto Forum:
Current Time: Fri Mar 29 07:09:32 GMT+2 2024
Total time taken to generate the page: 0.02947 seconds
|