MarkShot Posted April 24, 2016 Share Posted April 24, 2016 It does not happen all the time, but I guess a mission (playing the original campaign) will get corrupted. If the mouse rolls over a certain point on the command map, it will CTD reproducibly.I don't know what causes it or how to avoid it. I have tried all permutations of game play, in game graphics, video card graphics, ... but no luck.Anyone seen this?Any suggestions?Thanks! Quote Link to comment Share on other sites More sharing options...
wombat50 Posted April 24, 2016 Share Posted April 24, 2016 I think Apex knows about this. NPC actors have not been given a name in their .atr file.When the mouse rolls over them on the command map this causes the CTD because there is nothing for the engine to display on the CM.If the NPC's were given a name in this line of the .atr: <ActorName></ActorName>there would be no CTD.NPCs include pilots, hostages, peace keepers and friendly AI soldiers. When the mouse passes over a ghost there is not a CTD because all ghost actors have been given a name in their .atr file. Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 Although fixing the problem would be best. At least, maybe I have a chance to avoid CTDs.I knew it was important to practice safe sex.But at my age to find out I need to practice safe mousing! Thanks! Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 (edited) So, seriously?If I just write a script to read all *.atr files and then: "<ActorName></ActorName>" -> "<ActorName>NPC</ActorName>" There would be no more CTDs? (because this is some easy coding)Thanks! Edited April 24, 2016 by MarkShot 1 Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 Yes. All the RSE has text.I will wait to the next time I have a save game with a repeatable crash. Then code my NPC zapper, and test it.Thanks! Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 I already have the code to do this. Just need a few tweaks.This code was written to customize back up definitions flipping between FULL and DIFFERENTIAL to enhance the functionality of a commercial product: TISTemplate=StrCat(CurrentPath, "*.TIS") TISFileList=FileItemize(TISTemplate) TISCount=ItemCount(TISFileList, @TAB) For TISIndex = 1 to TISCount TISFileName=ItemExtract(TISIndex, TISFileList, @TAB) TISFileNameBase=StrSub(TISFileName, 1, StrLen(TISFileName)-4) TISFileNameTmp=StrCat(TISFileNameBase, ".tmp") FileRename(TISFileName, TISFileNameTmp) If IniValue=="long" then SedScript="SedSetShrt.txt" Else SedScript="SedSetLong.txt" Endif ArgList=StrCat(SedScript, " ", TISFileNameTmp, " ", TISFileName) RunShell("SedExecute.bat", ArgList, "", @hidden, @wait) FileDelete(TISFileNameTmp) NextIt uses the UNIX stream editor (very simple):sed -f %1 <%2 >%3# Usage: sed -f SedCmdON.txt <test.txt >test2.txt# Note: piping requires execution from a BAT file## zap TIS XML to a long backup#s/increment_type="differential"/increment_type="full"/---The main changes I need are a list of directories to iterate over, a different file extension, and a different string replace. A couple of hours to fix at most.Thanks again! 1 Quote Link to comment Share on other sites More sharing options...
wombat50 Posted April 24, 2016 Share Posted April 24, 2016 (edited) So, seriously?If I just write a script to read all *.atr files and then: "<ActorName></ActorName>" -> "<ActorName>NPC</ActorName>" There would be no more CTDs? (because this is some easy coding)Thanks!That is the jist of it but the name can be anything and not limited to NPC. I think the problem only occurs with friendly AI units as OPFOR by default will not show names when scrolled over on the command map. I checked a few OPFOR .atr's and none I checked had names. I guess this is not a problem as when notified in the chat on killing a opfor this has never caused a issue. In the vanilla game the opfor are named in .atr's and that name appears in the chat when they are killed. For example in the vanilla game I would get a message in the chat that I killed a Georgian Rebel or a Russian. Edited April 24, 2016 by wombat50 Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 Well, there are about 2,000 files to be processed. By hand ... days. By scripts (1-2 hours to code and test) and then 5 minutes to execute.I feel a new HU mod to sit on top of the stock HUb8 in on its way. {It doesn't matter that the OPFOR is extraneous. BTW, RSE did for the OPFOR.} Quote Link to comment Share on other sites More sharing options...
wombat50 Posted April 24, 2016 Share Posted April 24, 2016 I can't remember exactly but Apex may have omitted names for OPFOR just so kills would not show in chat. I think he did some other tweaks to make it harder for the player to tell if enemies were killed or not when he had shot at them. Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 24, 2016 Author Share Posted April 24, 2016 Well, whatever, it is not worth CTDs. 1 Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 25, 2016 Author Share Posted April 25, 2016 I wrote the zap code. It executed in under a minute and processed 2000+ files.I will apply the results as a higher priority mod than HUb8 and see if that stops the CTDs.I am willing to make it available to the community. By that I mean, not the zap code, but an actor mod NPC fix for HUb8. 1 Quote Link to comment Share on other sites More sharing options...
MarkShot Posted April 25, 2016 Author Share Posted April 25, 2016 I can confirm that the problem is fixed.Originally, I used the string "NPC". That was very obtrusive (only showed for friendlies, but had no other impact).Then, I tried " " just a space character. If you are a programmer, then you probably know that this might be considered a zero length string. The CTDs returned.Finally, I settled on ".", the period. It appears really as almost a pixel. It is the least obtrusive solution to the CTD problem. I must have launched 20 of the problem mission with this and not seen it occur.First, how do I make this available to others? It's 1.65Mb.Second, I give all credit to HU. I hope there is nothing offensive about me attempting to patch someone else's work and posting it. 1 Quote Link to comment Share on other sites More sharing options...
Rocky Posted April 26, 2016 Share Posted April 26, 2016 (edited) Wow, very ingenious to create a script to resolve this issue! Thank You!DOWNLOAD LINKAlso added a link to this CTD fix on the Heroes Unleashed download page! Edited April 26, 2016 by Rocky 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.