Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

CSV file reader

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [World War II] >> Norm Koger's The Operational Art Of War III >> CSV file reader Page: [1]
Login
Message << Older Topic   Newer Topic >>
CSV file reader - 2/6/2015 2:18:40 AM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
Hey you guys: I found the link to my CSV file viewer dead so I uploaded it to a file server again just now.

Click here for the CSVviewer.exe file

The CSV file is one of the sitrep files that get output by the game engine when you authorize it by setting
the appropriate switches on the Play->Player Options screen and turn on the sitrep logs. I use that as
the input file and produce something like below.




Attachment (1)

< Message edited by larryfulkerson -- 2/6/2015 6:06:04 AM >


_____________________________

What the earth needs now is a good sized Meteor.
Post #: 1
RE: CSV file reader - 2/6/2015 5:10:44 AM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
I used the CSV file from my PBEM game with Thomas Harvey (he's handing me my head ) and got some spurious results. The problem
is the quotes in the name field(s) in the CSV file. I'm going to change my program to look for the comma between fields instead of the
quote mark. Stay tuned. I'll post another version as soon as I've fixed this bad boy.




Attachment (1)

< Message edited by larryfulkerson -- 2/6/2015 6:11:06 AM >


_____________________________

What the earth needs now is a good sized Meteor.

(in reply to larryfulkerson)
Post #: 2
RE: CSV file reader - 2/6/2015 4:58:33 PM   
tcarusil

 

Posts: 150
Joined: 5/1/2011
From: Indianapolis, IN
Status: offline
Looks like the problem is that the log is adding quotation marks before and after the nickname of the Japanese planes. Compare the "SBD Dauntless" with the "A5M "Claude"". I wonder where those extra quotation marks are coming from. Could it be something in the equipment file? Hopefully, parsing by commas will do the trick.

TomC

(in reply to larryfulkerson)
Post #: 3
RE: CSV file reader - 2/7/2015 12:16:57 AM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
quote:

ORIGINAL: tcarusil
Looks like the problem is that the log is adding quotation marks before and after the nickname of the Japanese planes. Compare the "SBD Dauntless" with the "A5M "Claude"". I wonder where those extra quotation marks are coming from. Could it be something in the equipment file? Hopefully, parsing by commas will do the trick.

I like that idea Tom dude. Maybe the names of the equipment in the equipment file have an extra Quote mark. This is a problem that
could probably be fixed but on the other hand my program has to be able to handle it. So I'm going to come up with a new version.
I was working on it last night and I'm on the cusp of a breakthrough. I couldn't find the source code so I'm recreating it by hand. It's a
laborous process as you can imagine.

_____________________________

What the earth needs now is a good sized Meteor.

(in reply to tcarusil)
Post #: 4
RE: CSV file reader - 2/7/2015 12:28:04 PM   
tcarusil

 

Posts: 150
Joined: 5/1/2011
From: Indianapolis, IN
Status: offline
I've never had cause to use the equipment editor, but this riddle kept nagging me. I downloaded the editor and sure enough unlike the other aircraft, the Japanese aircraft have their "nicknames" in quotes. Not sure which would be easier, rewriting your program or editing the 30 odd Japanese aircraft in the equipment file.

TomC

(in reply to larryfulkerson)
Post #: 5
RE: CSV file reader - 2/7/2015 1:07:21 PM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
quote:

ORIGINAL: tcarusil
I've never had cause to use the equipment editor, but this riddle kept nagging me. I downloaded the editor and sure enough unlike the other aircraft, the Japanese aircraft have their "nicknames" in quotes. Not sure which would be easier, rewriting your program or editing the 30 odd Japanese aircraft in the equipment file.

Whether or not you edit your equipment file I still want my program to handle "dirty" data without crashing. I've not programmed a
computer in about 15 years but I'm rapidly picking it up and making my way. I couldn't find the source code, did I tell you guys that?
So I'm recreating it from fresh scratch and I've gotten to where I'm tweaking the spacing on the various columns. I want to make it
look pretty. I'll keep you guys in the loop and post something soon.

_____________________________

What the earth needs now is a good sized Meteor.

(in reply to tcarusil)
Post #: 6
RE: CSV file reader - 2/7/2015 3:55:44 PM   
shunwick


Posts: 2186
Joined: 10/15/2006
Status: offline
Larry,

Would it be possible to add a table of total losses after every turn? Or is loss information not listed in the csv file?

Best wishes,
Steve

< Message edited by shunwick -- 2/7/2015 4:58:15 PM >


_____________________________

I love the smell of TOAW in the morning...

(in reply to larryfulkerson)
Post #: 7
RE: CSV file reader - 2/7/2015 4:09:09 PM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
quote:

ORIGINAL: shunwick
Would it be possible to add a table of total losses after every turn? Or is loss information not listed in the csv file?

Of course it's possible my friend. I'm only just now getting some output worth publishing. I've gotten it to read the
input data and parse the CSV file and construct some records that look useful. I've got to save the input records in
their processed form so I can do the totals per turn and so on. I'm hopeful I can get the HTML record to have the
equipment pictures and everything. I've been working on it day and night for the past couple of of days now. I'm
learning how to program all over again. It's pretty cool all things considered.




Attachment (1)

_____________________________

What the earth needs now is a good sized Meteor.

(in reply to shunwick)
Post #: 8
RE: CSV file reader - 2/7/2015 8:08:39 PM   
shunwick


Posts: 2186
Joined: 10/15/2006
Status: offline
Great stuff. How about a keeping a running total of all losses throughout the scenario?

Best wishes,
Steve

_____________________________

I love the smell of TOAW in the morning...

(in reply to larryfulkerson)
Post #: 9
RE: CSV file reader - 2/7/2015 8:30:59 PM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
quote:

ORIGINAL: shunwick
Great stuff. How about a keeping a running total of all losses throughout the scenario?

I don't see why that can't be done, in principle. I'd have to invent a separate file to keep the running totals for all the files read in
so far and up-date it to reflect current numbers to date. But that's doable I think.

And by the way, here's the way to turn on these CSV records. On the menu choose Play->Player Options or something like that
and you'll be presented with all the different options. Turn on the one pertaining to the sitrep log files. And then restart TOAW.
You'll start to collect a bunch of them. One for each turn. And then the next thing to try to make happen is the ability to read a
list of files and process all of them at one time and keep a running total of all of them. It's only milli-seconds for processing a typical
turn so doing about 10 of them would take the blink of an eye I'm guessing. And then I could put a checkbox on there if you wanted
the file produced to be presented in your browser. Or presenting the HTML file produced in my own mini-browser built in so that
the output could be checked without going to your external browser to see it.

You guys tell me how you'd like to use it and I'll see if I can't design it to do that. So far I'm getting the idea that running totals would
be a good idea. I'll work on that. Anything else?




Attachment (1)

_____________________________

What the earth needs now is a good sized Meteor.

(in reply to shunwick)
Post #: 10
RE: CSV file reader - 2/8/2015 12:33:35 AM   
larryfulkerson

 

Posts: 31995
Joined: 4/17/2005
From: Vega 32A24
Status: offline
Okie dokie.......I've gotten it to put out all the elements of the loss report now I just need to put a bow on it and put it in the mailbox.
I'm thinking I can put something together to do running totals and stuff.




Attachment (1)

_____________________________

What the earth needs now is a good sized Meteor.

(in reply to larryfulkerson)
Post #: 11
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [World War II] >> Norm Koger's The Operational Art Of War III >> CSV file reader Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.113