Jump to content

GRHU (PC) v1.4 GOG + Expansion --- map CTDs


MarkShot

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by MarkShot
  • Like 1
Link to comment
Share on other sites

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)
        Next

It 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!  :)

  • Like 1
Link to comment
Share on other sites

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 by wombat50
Link to comment
Share on other sites

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.}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...