• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Replay analysis tool which lists ALL final actions from all computer players

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,689
Hi,
I am trying to analyze map crashes and some of them generate a TempReplay.w3g file. I am pretty sure that the actions from the computer players have caused the crash since it occurs after like 30 minutes or later when the AI did something. I would like to analyze all actions from computer players in the replay since the last action might have caused the crash. Maybe it is not listed anymore in the replay, only the action before but it might give some hint.
I found this tool online which is pretty awesome but it does not list any timing info/actions for Computer players only for users. Is there any way to see all final actions from ALL players?
 
Level 13
Joined
Jun 23, 2009
Messages
299
What about making a trigger that fires on all 3 order events (Immediate, Point and Target) that does call BJDebugMsg(I2S(GetIssuedOrderId())) or call BJDebugMsg(OrderId2String(GetIssuedOrderId()))? That's the first thing I would try out.

Of course you could then expand that function to give you more info, like the unit that has received the order or the target point/widget.
 
A replay wouldn't contain much in regards to computer players. If you are using Lua you can hook every function and operation in the script and create a log via the preload natives and see what runs right before the crash. Of course, the crash could be unrelated to the script but it's worth a shot.

Lua:
function wrapfunction(key, a)
  return function(...)
    Preload(key)
    return a(...)
  end
end

function main()
  PreloadGenClear()
  PreloadGenStart()

  for key, item in pairs(_G) do
      if type(item) == "function" and key ~= "Preload" then
          _G[key] = wrapfunction(key, _G[key])
      end
  end
end

Then, periodically call PreloadGenEnd to generate a new log file.
 
Level 25
Joined
Feb 2, 2006
Messages
1,689
hm and is it possible to read something from the core dumps from Warcraft like a stack trace/passed parameters?

How is the stuff of the AI reconstructed then if the replay does not contain any information about it?

I am not using LUA :(

Maybe logging all the orders would help since I get all the AI orders but I think when it crashes it won't log the crashing order anymore just an order before but that might already help to see what the AI wants to do.
 
Status
Not open for further replies.
Top