Home   Help Search Login Register  

Author Topic: Seek answers for .WRP file  (Read 812 times)

0 Members and 1 Guest are viewing this topic.

Offline Baron von Beer

  • Members
  • *
  • I'm a llama!
Seek answers for .WRP file
« on: 15 Sep 2003, 21:12:45 »
*Disregard*

Hmm, seems I have joined the ranks of those I've read have a misplaced object in a .WRP map. (Prompting the dreaded access violation  in *insert adress* message) So, I did some hunting for info, and got a plan.  I made a backup of the "corrupt" WRP file. I loaded the file up in WRP Buddy. I then removed EVERY object from the map. This left 3 objects. 1 building each, of 3 types. These were the ones that I apparently removed a decimal from in their X,Y placement coordinates. So, I saved this file as well. I then used Ultra Edit 32 (hex editor) and went to the 56 byte clusters for each of these. This is where I need help, if anyone can.

To my understanding, each object has a 56byte placement cluster. (These come after the last entry for .p3d files. I was able to identify the 3 quite easy, as they were the ONLY objects in the edited file. (168 bytes after the final .p3d entry, and the FFFF file end.)  So, I searched for each 56 byte string in the corrupt WRP with everything as was. I found each cluster.  Now, I read that the last 8 bytes of the string are the X,Y placement coordinates. (4 for each) and that the minimal value in hex is 00 00 00 40.  I tried placing these settings for one, increasing the final by 5 for the other 2. I still got an access violation upon loading though.  Is the minimal value something else, or is there more to their placement than the last 8 bytes? (I know the Y (height) is the preceding 4 bytes before those, but the height was set to lock to ground)  Sinc I have only spent about 20 minutes in my repair attempt, I don
't mind spending a few more. The work I had to this point was modifying a previous .wrp, and half the time spent was refamiliarizing myself with the proggy... so should only take 4 or so hours to get back to where I was. But, If I can revive the file in less time, would much prefer that option. :)

Many thanks for any and all info and help.

BvB

Edit: Forgot to ask... I imagine no further version of WRP edit will be released.. but if one is, can there not be a flag that is set if invalid placement coordinates are input? Seems since the map works of a defined size, this would be quite simple to implement, and IMO, was a blatantly obvious feature to have in the first place. (Especially with people like ME using it, who seem to remove decimal points uknowingly... :)  all that is needed is a simple check against map boundaries, if less than or greater than boundaries, a msg displays sayting coordinates are invalid, and object window remains open to correct.

Edit2: I fixed it. I got the coord order wrong in my notes. *IS* X,Z,Y. I had written down, and then in hex edit did, X,Y,Z.  (Last 12 bytes in objects 56byte string)
« Last Edit: 15 Sep 2003, 22:44:54 by Baron von Beer »