Tool to export messages in MDATAn.DAT

There is where you can ask Cherek anything that's on your mind.

Moderators: BitMask, Havok

Super Tech
Posts: 69

Tool to export messages in MDATAn.DAT

Post#1 » Thu Jan 23, 2014 9:19 pm

I need a tool or method to export my game message to a text file. Once in text, I can parse the messages with an algorithm to glean useful information. Right now I have to manual parse the messages in VPA to get the “hidden” intelligence.
I opened the file that I think is messages and it not very ASCII friendly.

Thanks,
Super Tech

User avatar
BitMask
Site Admin
Posts: 2318
Contact:

Re: Tool to export messages in MDATAn.DAT

Post#2 » Fri Jan 24, 2014 1:45 am

Echoview might have something like that. I remember that it can export messages, but I might be wrong.

User avatar
Fonz
Posts: 36

Re: Tool to export messages in MDATAn.DAT

Post#3 » Fri Jan 24, 2014 3:18 am

I'm not 100% certain, but I think PCC might be able to do this, too.

User avatar
FireAge
Posts: 424

Re: Tool to export messages in MDATAn.DAT

Post#4 » Fri Jan 24, 2014 3:22 am

PCC2 can save your messages. At least one by one. Probably possible to script saving all at once somehow, I'll wait for Stefan to comment on that :P

User avatar
streu
Posts: 232
Contact:

Re: Tool to export messages in MDATAn.DAT

Post#5 » Fri Jan 24, 2014 3:17 pm

PCC or PCC2: W in the message reader to save one message, Ctrl+W to save all.

From the command line: use mgrep (16-bit) or c2mgrep (32-bit, included with PCC2) to search for a string that appears in every message, so you export them all. For example,

Code: Select all

c2mgrep "(" path\to\game\player7.rst
(every message contains "(" in the header).

Finally, there is an old DOS tool of mine: viewmess. It runs in text mode, and also has W to save one, Ctrl+W to save all.


--Stefan

Super Tech
Posts: 69

Re: Tool to export messages in MDATAn.DAT

Post#6 » Fri Jan 24, 2014 6:00 pm

Thanks everyone. =D> This will definitely help. Lots of new code to write and test this weekend. :D

Super Tech
Posts: 69

Re: Tool to export messages in MDATAn.DAT

Post#7 » Fri Jan 24, 2014 7:57 pm

Also found c2export which will replace my clumsy method of parsing the F4 report text in VPA to get ship and planet data.
This will mean rewriting stuff that already works, but it'll be worth it in the long run.

On second thought; c2export will help get start of turn data but I'll need to use something else to get end of turn data to make my mistake warning report (Like setting ships to Colonize instead of Cloak). Maybe the scripting language will work here as I expect it looks at the current game data instead of RST.

User avatar
streu
Posts: 232
Contact:

Re: Tool to export messages in MDATAn.DAT

Post#8 » Sat Jan 25, 2014 12:29 pm

Super Tech wrote:On second thought; c2export will help get start of turn data but I'll need to use something else to get end of turn data to make my mistake warning report (Like setting ships to Colonize instead of Cloak). Maybe the scripting language will work here as I expect it looks at the current game data instead of RST.
c2export always gives you current data. It's the same data the scripting language would give you.

However, for doing things like a mistake warning I'd use the scripting language. So there's no need to implement any data parsing, just implement it completely as a script.

Code: Select all

ForEach Ship Do
  If Played And Mission$=6 Then Print "Hey, you set mission Colonize on ship " & Id
Next

--Stefan

Return to “Ask Cherek”

Who is online

Users browsing this forum: No registered users and 2 guests

cron