Thread: [REL] FOTRS Ultimate Project
View Single Post
Old 02-04-19, 04:38 PM   #7358
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,129
Downloads: 452
Uploads: 4


Default

Quote:
Originally Posted by KaleunMarco View Post
this is what i am referring to...from PatrolObjectives.upc
[Section 300]
ID=ID315
FileName=data/Campaigns/Campaign/PatrolObjectives/Sink Kurile 01/Sink Kurile 01.mis
StartDate=19420101
EndDate=19450901


[Section 315]
ID=ID315
FileName=data/Campaigns/Campaign/PatrolObjectives/Patrol Kuriles 06/Patrol Kuriles 06.mis
StartDate=19420608
EndDate=19450915

i believe that they (and their 12 brother-duplicates) are getting in each others way....once they are assigned by the Flotillas et.al. logic. the way it figures to work out is that the Flotilla-Objective-Date logic chooses an Objective "suggestion"...this one relates to me.
[Flotilla 7.UserPlayerUnitType 4.Objective 11]
ID= MI4Obj11
NameDisplayable= MidwayPC2
AvailabilityInterval=1943-05-01, NULL
ObjectiveCode= MidwayPC2

then it heads to the PatrolObjectives, matches the ObjectiveCode, and selects a MissionID, then inserts that into the CareerTrack.upc for CurrentMission....which remains static until the mission is completed or you are dead or retired or whatever. The problem arises when and if the player exits the game and reloads the savegame and the MissionID goes to the PatrolObjectives and performs a key-search for the FIRST OCCURRENCE of that MissionID. when there are dupes, there is the risk that the first match will not be the same actual mission as previously displayed in the SaveGame file because MISSIONID is the key that is stored.

i PM'd you a couple of weeks ago about this issue but i wasnt able to figure it out until it happened the second time.
in the first episode (PM) i was assigned
ID=ID311
FileName=data/Campaigns/Campaign/PatrolObjectives/Patrol Kuriles 02/Patrol Kuriles 02.mis


i exited and reloaded and then i was presented with this mission instead
ID=ID311
FileName=data/Campaigns/Campaign/PatrolObjectives/Sink Komandorski 01/Sink Komandorski 01.mis

because the Komandorski ID311 appears before the Kurile ID311 in the PatrolObjectives file.

the PatrolObjectives file is built into an internal table with ID as the key and when there are duplicate key, the logic selects the first match. classic bulls#it table coding. what should have happened is that when SH4 went through the table-build step, the code should have recognized the attempted (and wrong) use of duplicate key entries and terminated with an error message to fix the offending build file (PatrolObjectives). THAT would have caught the root cause of the problem. anyway, i digress.


does that explain the issue better?
remember this is a discussion/conversation...not an indictment or accusation. we are all on the same side here.
By jove - I think I got it (finally) - but to top it all off, I do believe ~YOU~ got it, and found a sneaky problem with the mod. This is similar to what Front Runner found with the "Base Time" - and "yes" both issues can cause troubles of undesirable proportions. First thing that comes to mind with this ID= stuff, is a CTD... such as has been experienced by several folks. It would depend upon the number of patrols, and where they have already been sent... I did find similar in the DynamicMiss.cfg file, so I've got a little more to go through that file with, and we'll then have PatrolObjectives and DynamicMiss both with "unique" ID numberings that are also sequential. What it looks like happened in both cases was a state of confusion with the modder ( ) during the renumbering process after moving some of the missions to other parts of the same file... - Thanks for the detective work there KaleunMarco!
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote