Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

What File Format are *.eqp Files?

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

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV >> Mods and Scenarios >> What File Format are *.eqp Files? Page: [1]
Login
Message << Older Topic   Newer Topic >>
What File Format are *.eqp Files? - 3/30/2019 2:23:08 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
I'm working on how to add new equipment to TOAW OOBs with TOAWxml and am a bit stumped by the *.eqp files... At first glance I thought they were XML files, but do not seem to be so, or at least none of the XML techniques I've been using with the rest of TOAWxml work at all with the *.eqp files...

For example, here is the XML from a TOAW *.gam file:





Attachment (1)

< Message edited by 76mm -- 3/30/2019 2:25:18 AM >
Post #: 1
RE: What File Format are *.eqp Files? - 3/30/2019 2:24:01 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
And here is an *.eqp file:





Attachment (1)

(in reply to 76mm)
Post #: 2
RE: What File Format are *.eqp Files? - 3/30/2019 2:28:03 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
In particular, the data in the *.eqp files does not seem to be hierarchical, and does not seem to include XML features such as attributes.

So can anyone suggest how to work with the data in these files in C#? I guess I can use Regex? Or is there a better way to proceed? At least at this stage, I think I only need read-only access, if that matters.

(in reply to 76mm)
Post #: 3
RE: What File Format are *.eqp Files? - 3/30/2019 2:44:55 AM   
larryfulkerson

 

Posts: 38267
Joined: 4/17/2005
From: Tucson, AZ
Status: offline
quote:

ORIGINAL: 76mm
....in particular, the data in the *.eqp files does not seem to be hierarchical, and does not seem to include XML features such as attributes.

So can anyone suggest how to work with the data in these files in C#? I guess I can use Regex? Or is there a better way to proceed? At least at this stage, I think I only need read-only access, if that matters.


IIRC early in the design process many years ago when the separate output files were being designed I seem to remember the combat losses being output in XML and I needed to parse the file to get values I needed but then CSV style came along and it was a tiny bit easier to parse. I got the impression that the EQP files weren't true XML but rather a really handy way to designate the various values for each item of equipment describing them as a collection of parameters handled as a group. Don't think of it so much as an XML file but a new way of describing disperate pieces of equipment. The file isn't going to be read as true XML but rather as just another input file. Think of the XML tags as commas separating the values. [ Also, the CSV files aren't true CSV files because the column headers are missing from the output stream. ]. I've learned to just edit the contents and not worry so much about keeping it a true XML document.


< Message edited by larryfulkerson -- 3/30/2019 2:45:51 AM >


_____________________________

Thailand is the world's biggest producer of rubber.

(in reply to 76mm)
Post #: 4
RE: What File Format are *.eqp Files? - 3/30/2019 3:14:10 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

Think of the XML tags as commas separating the values.

Hey Larry, thanks, that's really helpful, and more or less confirms what I'm seeing. So when you were "just editing the contents" (:-)) were you doing it manually or programatically? Do you know if there is there an easy way to work with XML tags-as-commas? I'm sure it I could make it work with Regex, but my understanding is that Regex is fiendishly difficult and I'd rather avoid it if possible...

[EDIT] Maybe LINQ would work?

< Message edited by 76mm -- 3/30/2019 3:15:03 AM >

(in reply to larryfulkerson)
Post #: 5
RE: What File Format are *.eqp Files? - 3/30/2019 3:35:07 AM   
larryfulkerson

 

Posts: 38267
Joined: 4/17/2005
From: Tucson, AZ
Status: offline
quote:

So when you were "just editing the contents" (:-)) were you doing it manually or programatically?


When I was writing my combat reporter application I remember using JAVA's primitive string functions because I didn't know of an easier way. And when I was building the output file ( HTML ) I built the tags by hand. It's not hard that way just tedious. This thing you're talking about "Regex", if you've used it before it's probably easier than doing it by hand. I wouldn't know that was after I retired. I lost a lot of interest in programming after having done it for so long. I needed to build something with my hands that I could hold and point to and say I helped build this. Some thing physical. And not just digital code stored as magnitized areas on a tiny area of a hard disk. Something ephemiral and not-quite-real. I don't have anything I can point to after having worked decades in the industry. I should have been a carpender.


< Message edited by larryfulkerson -- 4/9/2019 6:20:31 AM >


_____________________________

Thailand is the world's biggest producer of rubber.

(in reply to 76mm)
Post #: 6
RE: What File Format are *.eqp Files? - 3/30/2019 3:49:33 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
After a bit more research, I think that LINQ is the way to go, although haven't gotten very far down the road yet, so we'll see...

(in reply to larryfulkerson)
Post #: 7
RE: What File Format are *.eqp Files? - 3/30/2019 5:30:48 AM   
cathar1244

 

Posts: 552
Joined: 9/5/2009
Status: offline

quote:

ORIGINAL: larryfulkerson

quote:

ORIGINAL: 76mm
....in particular, the data in the *.eqp files does not seem to be hierarchical, and does not seem to include XML features such as attributes.

So can anyone suggest how to work with the data in these files in C#? I guess I can use Regex? Or is there a better way to proceed? At least at this stage, I think I only need read-only access, if that matters.


IIRC early in the design process many years ago when the separate output files were being designed I seem to remember the combat losses being output in XML and I needed to parse the file to get values I needed but then CSV style came along and it was a tiny bit easier to parse. I got the impression that the EQP files weren't true XML but rather a really handy way to designate the various values for each item of equipment describing them as a collection of parameters handled as a group. Don't think of it so much as an XML file but a new way of describing disperate pieces of equipment. The file isn't going to be read as true XML but rather as just another input file. Think of the XML tags as commas separating the values. [ Also, the CSV files aren't true CSV files because the column headers are missing from the output stream. ]. I've learned to just edit the contents and not worry so much about keeping it a true XML document.



Yeah, I XML-imported an .eqp file into Excel. The troublesome bit is that all of the "items" are uniquely numbered, so I had to strip off the numbers and reduce them all to "item" with the numeric suffix. Excel could then easily import the file. A bit of DP necessary to make the .eqp a malleable beast. In a Unix environment, Nawk could easily handle this but I don't know if there is a version of Nawk that works under Win10.

Cheers

(in reply to larryfulkerson)
Post #: 8
RE: What File Format are *.eqp Files? - 3/30/2019 10:31:36 AM   
Lobster


Posts: 3127
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline
I don't suppose anyone has bothered asking Ralph about this? Or maybe Bob?

< Message edited by Lobster -- 3/30/2019 10:32:02 AM >


_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to cathar1244)
Post #: 9
RE: What File Format are *.eqp Files? - 3/30/2019 10:38:06 AM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

I don't suppose anyone has bothered asking Ralph about this? Or maybe Bob?

Nope. Ralph has been very helpful on the couple of topics that I've asked him about, but his attention is a scarce resource so I'd prefer to only ask him about stuff as a last resort. Larry and cathar have provided helpful info, so not sure I'll turn to Ralph on this one.

[EDIT] And Bob seems to monitor the forum pretty closely and jump in as necessary, so generally I don't address specific issues to him either...

< Message edited by 76mm -- 3/30/2019 11:48:02 AM >

(in reply to Lobster)
Post #: 10
RE: What File Format are *.eqp Files? - 3/30/2019 12:46:16 PM   
cathar1244

 

Posts: 552
Joined: 9/5/2009
Status: offline
quote:

I had to strip off the numbers and reduce them all to "item" with the numeric suffix.


Sorry, I meant to write without the numeric suffix vice "with". Everything then started with <ITEM> and closed with </ITEM>. Since the import read the records in sequential order, it didn't trouble me. I suppose one could write a brief program in VBA behind excel to import .eqp files and write them back out.

Cheers

(in reply to 76mm)
Post #: 11
RE: What File Format are *.eqp Files? - 3/30/2019 2:50:55 PM   
sPzAbt653


Posts: 8831
Joined: 5/3/2007
From: east coast, usa
Status: offline
quote:

ORIGINAL: Lobster
I don't suppose anyone has bothered asking Ralph about this? Or maybe Bob?

Really ? They don't have the time needed to work on the game and you want them to contribute to a third party program that will eventually become as useless as Bio-Ed, Scenario Viewer and OOD ?

(in reply to Lobster)
Post #: 12
RE: What File Format are *.eqp Files? - 3/30/2019 3:17:25 PM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: cathar1244
Sorry, I meant to write without the numeric suffix vice "with". Everything then started with <ITEM> and closed with </ITEM>. Since the import read the records in sequential order, it didn't trouble me. I suppose one could write a brief program in VBA behind excel to import .eqp files and write them back out

Yeah, I understood

I think I'll be able to use LINQ (in C#) to read and manipulate the data directly in the eqp files, although it's gonna take some learnin' on my part.

(in reply to cathar1244)
Post #: 13
RE: What File Format are *.eqp Files? - 3/30/2019 3:21:24 PM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: sPzAbt653
Really ? They don't have the time needed to work on the game and you want them to contribute to a third party program that will eventually become as useless as Bio-Ed, Scenario Viewer and OOD ?

Whoa, dude, all the negative waves!

So far I've only reached out to Ralph once (about a missing XML attribute), and he was very responsive and helpful. I'd like to keep it that way!

(in reply to sPzAbt653)
Post #: 14
RE: What File Format are *.eqp Files? - 3/30/2019 3:34:48 PM   
Curtis Lemay


Posts: 11453
Joined: 9/17/2004
From: Houston, TX
Status: online

quote:

ORIGINAL: 76mm

quote:

I don't suppose anyone has bothered asking Ralph about this? Or maybe Bob?

Nope. Ralph has been very helpful on the couple of topics that I've asked him about, but his attention is a scarce resource so I'd prefer to only ask him about stuff as a last resort. Larry and cathar have provided helpful info, so not sure I'll turn to Ralph on this one.

[EDIT] And Bob seems to monitor the forum pretty closely and jump in as necessary, so generally I don't address specific issues to him either...


XMLPad doesn't seem to have any issue with them:




Attachment (1)

_____________________________

My TOAW web site:

Bob Cross's TOAW Site

(in reply to 76mm)
Post #: 15
RE: What File Format are *.eqp Files? - 3/30/2019 3:35:42 PM   
sPzAbt653


Posts: 8831
Joined: 5/3/2007
From: east coast, usa
Status: offline
Glad you are happy with your project, I am supportive. Keep it to yourself and the community and leave development out of it. Fixing TOAW IV and moving on to TOAW V are the priority, we don't need you imposing on the limited time available for development. You think you are better than that, and Bio-Ed, Scenario Viewer or ODD ?

Like and respect you Tom, don't take it the wrong way. I was chastising Jack for missing the obvious.

(in reply to 76mm)
Post #: 16
RE: What File Format are *.eqp Files? - 3/30/2019 5:09:22 PM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: Curtis Lemay
XMLPad doesn't seem to have any issue with them:

Sure, Notepad++ can open them too, but if you look at the file, it is not "real" XML.

As mentioned in previous posts, it is not hierarchical and does not use XML elements such as child nodes, attributes, etc (as do the *.gam files). As Larry mentioned, it is like a CSV file that uses XML tags instead of commas. As cathar mentioned, each equipment item has its ID number baked into its name ("ITEM_1", etc), rather than as a separate child or attribute.

< Message edited by 76mm -- 3/30/2019 5:10:02 PM >

(in reply to Curtis Lemay)
Post #: 17
RE: What File Format are *.eqp Files? - 3/30/2019 8:21:51 PM   
VHauser


Posts: 250
Joined: 5/7/2015
Status: offline
I'm not sure I understand what is being discussed in this thread.

I think what I'm reading is that each individual equipment is hard-coded to a specific ID (e.g., ITEM_1). And that each individual equipment slot is hard-coded with certain attributes that are hidden from the basic game-supplied equipment editor.

And that using the in-game equipment editor to copy the contents of, say, a Tiger tank, and paste into a "non-tank" section (say, trying to overwrite a biplane fighter you don't need in the Fixed-Wing Aircraft section) will produce unforeseen consequences because the Fixed-Wing Aircraft section has hard-coded (and evidently hidden) values that are not changed for each individual item in that section regardless of cut-and-paste attempts using the in-game editor.

Am I close?



_____________________________

Member since May 2000 (as VictorHauser)

(in reply to 76mm)
Post #: 18
RE: What File Format are *.eqp Files? - 3/30/2019 9:04:36 PM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: VHauser
Am I close?

Nope, off by a country mile.

Different file formats can be read/manipulated outside of the in-game editor in different ways, so you can't read/manipulate data properly until you understand what format the data is in. The data in the *.eqp files is in a format I've not seen before (not surprising, since I'm not a programmer), so I asked the kind people on this forum to let me know their experience, and they did so. That is all.

< Message edited by 76mm -- 3/30/2019 9:05:25 PM >

(in reply to VHauser)
Post #: 19
RE: What File Format are *.eqp Files? - 3/31/2019 6:35:50 AM   
cathar1244

 

Posts: 552
Joined: 9/5/2009
Status: offline
Duplicate.

< Message edited by cathar1244 -- 3/31/2019 6:37:45 AM >

(in reply to 76mm)
Post #: 20
RE: What File Format are *.eqp Files? - 3/31/2019 6:36:22 AM   
cathar1244

 

Posts: 552
Joined: 9/5/2009
Status: offline
VHauser,

I've never tried to put equipment in another section, but I don't think the game would care. My guess is that it is ordered that way in the equipment file for the convenience of scenario designers.

Now, there -are- some unseen things that go on regarding equipment values. One of them I think you have seen are the default defense values given to guns and so forth. Another is how the antipersonnel rating is interpreted depending on the equipment type. So, yeah, there is still some "mystery meat" in the equipment file. But those aspects are apart from 76mm's comments regarding the file's logical structure.

Cheers



< Message edited by cathar1244 -- 3/31/2019 6:37:18 AM >

(in reply to cathar1244)
Post #: 21
RE: What File Format are *.eqp Files? - 4/9/2019 6:29:49 AM   
larryfulkerson

 

Posts: 38267
Joined: 4/17/2005
From: Tucson, AZ
Status: offline
quote:

VHauser,

I've never tried to put equipment in another section, but I don't think the game would care. My guess is that it is ordered that way in the equipment file for the convenience of scenario designers....

Now I'm wondering if we can introduce entirely new sections to the list of equipment categories. Real Mines, land and sea, or particle beam weapons, unmanned drones, the list could go on. Is there a fixed size for the list in terms of categories and the associated equipment thereof.


< Message edited by larryfulkerson -- 4/9/2019 6:30:16 AM >


_____________________________

Thailand is the world's biggest producer of rubber.

(in reply to cathar1244)
Post #: 22
RE: What File Format are *.eqp Files? - 4/9/2019 11:12:48 AM   
Lobster


Posts: 3127
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline
quote:

ORIGINAL: sPzAbt653

Glad you are happy with your project, I am supportive. Keep it to yourself and the community and leave development out of it. Fixing TOAW IV and moving on to TOAW V are the priority, we don't need you imposing on the limited time available for development. You think you are better than that, and Bio-Ed, Scenario Viewer or ODD ?

Like and respect you Tom, don't take it the wrong way. I was chastising Jack for missing the obvious.


The desired editor is one that is not a part of the game at all. Completely removed from it. Done by a third party. That is a fact. The more people working to that end the sooner a real editor will be made. It will most certainly involve input from the people who are developing TOAW. Competing versions would be nice.

< Message edited by Lobster -- 4/9/2019 11:19:39 AM >


_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to sPzAbt653)
Post #: 23
RE: What File Format are *.eqp Files? - 4/9/2019 4:40:14 PM   
sPzAbt653


Posts: 8831
Joined: 5/3/2007
From: east coast, usa
Status: offline
I don't see that as a fact. I'd rather use a Ralph-made New and Improved Editor using the TOAW UI instead of the others that I've seen. I don't like them aesthetically, and there always seems to be difficulty in the TOAW > XML > 3rd Party > back to XML > back to TOAW data transfer that creates issues. But what is really important, and the reason I pointed this out, is what should be a fact that:

If developers are working on a new TOAW Editor, it doesn't make sense for them to work on a TOAW Editor and a completely separate community based Editor [given the limited time that can be devoted to TOAW development]. However, if developers are not working on a new or improved Editor, then yes it would make sense for them to participate in a community effort [and would actually be a requirement in order to provide the best level of support].

(in reply to Lobster)
Post #: 24
RE: What File Format are *.eqp Files? - 4/9/2019 5:09:09 PM   
Lobster


Posts: 3127
Joined: 8/8/2013
From: Third rock from the Sun.
Status: offline
What I'm saying is that Ralph wants it that way. His words not mine. All that's missing is someone to make it. I asked a few people but go no where. Maybe if it's a bit more common knowledge someone or a group will step forward.

Personally I think it's a good idea. Gives Ralph and Bob more time to work on the game and not have to worry about an editor too. You want a TOAW V, this will hurry it along.

< Message edited by Lobster -- 4/9/2019 5:15:02 PM >


_____________________________

http://www.operationbarbarossa.net/

"Getting back to reality...I'll only go as a tourist!"

(in reply to sPzAbt653)
Post #: 25
RE: What File Format are *.eqp Files? - 4/10/2019 6:45:00 PM   
76mm


Posts: 3751
Joined: 5/2/2004
From: Washington, DC
Status: offline
quote:

ORIGINAL: larryfulkerson
Now I'm wondering if we can introduce entirely new sections to the list of equipment categories. Real Mines, land and sea, or particle beam weapons, unmanned drones, the list could go on. Is there a fixed size for the list in terms of categories and the associated equipment thereof.

Larry, not sure that I've understood you correctly, but as far as I understand it, you can create as many categories in the equipment DB as you want, by entering equipment with Flag0 set to 1. The bigger problem would seem to be whether the existing flags and other unit factors would allow you to create units with the desired features of particle beams, drones, etc.

(in reply to larryfulkerson)
Post #: 26
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> The Operational Art of War IV >> Mods and Scenarios >> What File Format are *.eqp Files? 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.176