Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

two commanders not working correctly with assigned units after saving and loading #3571

Closed
wzdev-ci opened this issue Jun 25, 2012 · 24 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by matthewfarmery


I thought I should report the bug with the commanders that I found in its own ticket

basically, as long as you don't save and load, units assigned to the commanders are fine
however, there is a problem when having two more commanders active on the battlefield at any one time

I have include saves and a error report

basically after saving and loading, one of the commanders no longer has any units assigned to it, that is, if you select the effected commander, (commander 1) it doesn't select the whole group, and selecting any of the units that the commander should have, only selects that unit, mission M6 a shows the bug very nicely, and you will get a beep / error as well. what is more, 4 of the units that was attached to commander 1, is now attached to commander 2, as that commander and units seem to be fine

so there is a clear issue with having more then 2 commanders active, I started a new ticket, as I'm not sure if this warrants a new ticket or not,

this bug did turn up after the other commander bug got fixed, as I tested one of the snapshot builds and encountered it there, and still present in beta 11

anyway, if anyone needs more info, please ask, but the saves and error log are included

edit, just tested M6 save, and that does seem to be working fine, so its later on that this bug appears, and certainly after saving and loading a few times. the best way to duplicate the bug is to have two commanders, and assign units to both of them, then keep saving and loading after a while, and them the bug will strike


Issue migrated from trac:3571 at 2022-04-16 09:55:05 -0700

@wzdev-ci
Copy link
Contributor Author

matthewfarmery uploaded file savesand log2.rar (134.6 KiB)

@wzdev-ci
Copy link
Contributor Author

matthewfarmery commented


small update to this, it seems this bug triggers if you save more then once in a given mission, so saving a mission and loading it, things are fine

but if you load a save game, (first one you done of your progress in a mission) then save it again, (I use separate save slots for each save I do) so M6 is my first mission save, save again to another slot then reload the mission, then the bug will hit, so it seems that saving multiple times either to the save same or different save slots triggers this bug

hope that is enough information to track down and fix this bug

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 4, 2012

Staff commented


Thanks for the information.

Everybody is extremely busy these days, and we will try to get to this as soon as we can.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 6, 2012

Stratadrake commented


I think I have this bug too. I recently completed campaign mission 1-5 with commander 1 leading my primary assault group and commander 2 still back at base.

I now have three different savegames, each of which has its own problem:
1 - My saved game from the start of mission 1-6: Commander 1's group (18/18 units) is intact, but commander 2's group (2/2) is nowhere to be found.
2 - Another saved game (after loading from the above, near the start of mission 1-6): Commander 1 says 18/18 units but none of his units are actually attached - they're idling nearby. Commander 2 says 0/6 units.
3 - A saved game from the start of mission 1-7: Commander 1 says 18/18 units but none of his units are actually attached - still idling nearby. Furthermore, Commander 2 says 3/6 units which are actually units from commander 1's group.

I also notice that when I load any of the saved games I hear a "buzz" sound effect. Is that meaningful?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 7, 2012

matthewfarmery changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 7, 2012

matthewfarmery commented


hi Stratadrake, this does sound very similar to what I have experienced, as for the beep on loading, that is an error message that gets displayed, if you go to your my documents folder then find Warzone 2100 3.1 then go into the logs folder, the latest I think are at the bottom, but anyway, mine says

--- Starting log ---
error |04:46:29: [scrValDefLoad:1073] Sound ID not available not found
info |04:46:57: [add:131] grpJoin: Cannot have two command droids in a group
info |04:46:57: [add:131] Assert in Warzone: group.cpp:131 ((type ## GT_NORMAL) && (psCommander NULL)), last script event: ''
error |04:46:58: [scrValDefLoad:1073] Sound ID not available not found
info |04:47:50: [remove:183] grpLeave: droid not found
info |04:47:50: [remove:183] Assert in Warzone: group.cpp:183 (psCurr != __null), last script event: 'N/A'
error |04:47:54: [scrValDefLoad:1073] Sound ID not available not found
info |04:48:30: [add:131] grpJoin: Cannot have two command droids in a group
info |04:48:30: [add:131] Assert in Warzone: group.cpp:131 ((type ## GT_NORMAL) && (psCommander NULL)), last script event: ''
error |04:48:30: [scrValDefLoad:1073] Sound ID not available not found
info |04:49:43: [remove:183] grpLeave: droid not found
info |04:49:43: [remove:183] Assert in Warzone: group.cpp:183 (psCurr != __null), last script event: 'N/A'

another thing you can do is to upload the saves, if you zip the save, (make sure you include the folder and the file of the save name) then you should be able to attach the zip by using the add file button, (were it says attachments on this page, look under my original bug report, it should say attachments and the add file button, if you attach the log and files, that will certainly help the devs when they have the time to fix this, you can see my files that I have attached, so you can download to test, but from your description, your bug and mine are very similar, certainly the units from one commander switching over to another commander, I have seen that, but as I only use two commanders, they not disappeared, I will test with 3 commanders and see what happens, whoops, after rereading, you only use two commanders as well, but neither group has disappeared, but I will see what will happen is I use 3 commanders, or more,

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 8, 2012

Stratadrake uploaded file Commanders problem (Stratadrake).zip (335.8 KiB)

Stratadrake's savegames reproducing the problem behavior.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 8, 2012

Stratadrake commented


Okay, my savedgames are attached. Each successive file was saved after loading the previous one.

This is what happens when you load them:

  • "Cam1-6 Start" - Ignore the warning that pops up. A buzz sound effect also plays when loading. Note Commander 1's group is intact, but commander 2 says "0/6" units. His units are actually clustered nearby, and WERE assigned during the previous mission - but as of now, they are not.
  • "Test - 2Cmdrs A" - Commander 1's units (clustered near his location) are not assigned. Worse, the Commanders panel says he has "18/18" so it is not possible to assign the units back to him. Artillery is not affected - mortar units are still assigned.
  • "Test - 2Cmdrs B" - Commander 1 now says "0/18" units - but Commander 2 says "18/6" units (wtf). No combat units (other than artillery) are actually attached to either commander, and it is impossible to assign anything to commander 2.
  • "Test - 2Cmdrs C" - Same as A. No combat units assigned to either commander, but Commander 1 says "18/18" and Commander 2 says "0/6". It is impossible to attach anything to commander 1.
  • "Test - 2Cmdrs D" - Same as B.

It seems to be alternating between commander 1 and 2 - which is very strange behavior indeed.

Additionally, I do also find the following output in my WZ log file:
info |09:12:59: [add:131] grpJoin: Cannot have two command droids in a group
info |09:12:59: [add:131] Assert in Warzone: group.cpp:131 ((type ## GT_NORMAL) && (psCommander NULL)), last script event: ''
info |09:13:20: [remove:183] grpLeave: droid not found
info |09:13:20: [remove:183] Assert in Warzone: group.cpp:183 (psCurr != __null), last script event: 'winLoseTrig2 (CODE)'

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 9, 2012

matthewfarmery commented


I loaded the saves you provided, and yes this is the same bug and error message, so yes, thanks for confirming the bug, hopefully with yours and my saves, this will allow the devs to track down what is wrong, when someone has the time to fix this

but yes, veery strange behaviour from the commanders, very strange indeed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2012

mastersharp commented


I have a fix but I'm having trouble using git to commit my patch. Any help on how to setup git properly would be greatly appreciated :)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2012

mastersharp changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2012

mastersharp commented


I fixed this bug in my github clone: mastersharp/warzone2100@af44e6a

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 5, 2012

matthewfarmery commented


maybe you could post on the forum on how to commit patches? I don't know myself as I never used git to submit patches, but I'm glad to see this bug fixed, thanks for that, I hope it gets added to the lasted RC when it finally comes out,

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 6, 2012

mastersharp commented


I've only created a patch and uploaded it to my own GitHub rep and linked the commit here. I've not actually committed anything to the active warzone source. By following the tutorials you can get rather far, although I also required some help (go to the IRC channel #warzone2100-dev). Is there already a topic on this on the forum?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 6, 2012

matthewfarmery commented


for committing patches to the warzone2100 source? not sure, you might need permission to upload, I dont know how to commit patches, so I can't really help, but I would like to see this patch make it for the next RC, been playing the 2.3.9 version, as I'm more of a SP gamer, but I do play a lot of games, so I only play WZ a few times,

but if you are having issues trying to upload the patch to the master, then I suggest you ask one of the devs, either on IRC or in the forum, beyond that I can't really help

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Dec 6, 2012

Cyp changed type from bug to patch (an actual patch, not a request for one)

@wzdev-ci
Copy link
Contributor Author

matthewfarmery commented


this bug is now fixed, I can confirm that commanders have the correct number of units assigned to them when saving and loading save games, I loaded up an effected save game, and both commanders in this save have the correct number of units, so this bug is fixed in my testing, awesome job mastersharp , and thanks to the devs adding this in the new build, was a very annoying bug when it came to using commanders

great job in fixing this bug

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp commented


Hmmm, this ticket should probably have been autoclosed when 1263eb28557ae3ef4f7da578a28d0a596ea753d0 was pushed. Thanks for the patch

@wzdev-ci
Copy link
Contributor Author

matthewfarmery changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

matthewfarmery commented


I just noticed one small problem with this fix, trucks get assigned to the commanders if you have a factory assigned to the commander, I dont think that is right? as trucks should be independent right? other then that, I'm not seeing any other issues with the fix

edit

trucks get assigned to commanders even if you don't have any factories assigned to commanders, so this fix isn't working 100% a thing I only just tested, just tested, this includes sensor turrets and mobile repair trucks, so it seems this fix is faulty, and this ticket need to be reopened, damn, so close yet so far,

@wzdev-ci
Copy link
Contributor Author

Stratadrake commented


That is not a bug, you could always assign trucks to a commander.

@wzdev-ci
Copy link
Contributor Author

matthewfarmery commented


update, I was testing an affected save game, and was seeing the above problem, but fresh saves before commander problem starts, and skirmish / MP, works fine, as trucks and other none combat units do not get auto assigned to commanders if the commander has no factory assigned to them, so basically, use fresh save without the commander bug, so the fix DOES work, just not for affected saves,

so the fix does work fine, and this ticket should remain closed

sorry mastersharp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant