What File Format are *.eqp Files?

Post new mods and scenarios here
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

What File Format are *.eqp Files?

Post by 76mm »

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:


Image
Attachments
xml.jpg
xml.jpg (388.79 KiB) Viewed 1480 times
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

And here is an *.eqp file:


Image
Attachments
nonxml.jpg
nonxml.jpg (133.34 KiB) Viewed 1480 times
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 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.
User avatar
larryfulkerson
Posts: 42792
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: What File Format are *.eqp Files?

Post by larryfulkerson »

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.
Russia’s 41st Army COLLAPSED in Pokrovsk — 25,000 Soldiers KILLED After a RIDICULOUS Russian Assault
https://www.youtube.com/watch?v=T_CtW3GqPQg
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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?
User avatar
larryfulkerson
Posts: 42792
Joined: Sat Apr 16, 2005 9:06 pm
Location: Tucson, AZ,usa,sol, milkyway
Contact:

RE: What File Format are *.eqp Files?

Post by larryfulkerson »

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.
Russia’s 41st Army COLLAPSED in Pokrovsk — 25,000 Soldiers KILLED After a RIDICULOUS Russian Assault
https://www.youtube.com/watch?v=T_CtW3GqPQg
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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...
User avatar
cathar1244
Posts: 1299
Joined: Sat Sep 05, 2009 2:16 am

RE: What File Format are *.eqp Files?

Post by cathar1244 »

ORIGINAL: larryfulkerson
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
User avatar
Lobster
Posts: 5555
Joined: Thu Aug 08, 2013 2:12 pm
Location: Third rock from the Sun.

RE: What File Format are *.eqp Files?

Post by Lobster »

I don't suppose anyone has bothered asking Ralph about this? Or maybe Bob? [:)]
ne nothi tere te deorsum (don't let the bastards grind you down)

If duct tape doesn't fix it then you are not using enough duct tape.

Two things are infinite: the universe and human stupidity and I’m not sure about the universe-Einstein.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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...
User avatar
cathar1244
Posts: 1299
Joined: Sat Sep 05, 2009 2:16 am

RE: What File Format are *.eqp Files?

Post by cathar1244 »

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
User avatar
sPzAbt653
Posts: 10116
Joined: Thu May 03, 2007 7:11 am
Location: east coast, usa

RE: What File Format are *.eqp Files?

Post by sPzAbt653 »

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 ?
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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! [:D]

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!
User avatar
Curtis Lemay
Posts: 15095
Joined: Fri Sep 17, 2004 3:12 pm
Location: Houston, TX

RE: What File Format are *.eqp Files?

Post by Curtis Lemay »

ORIGINAL: 76mm
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:

Image
Attachments
XMLEquipment.jpg
XMLEquipment.jpg (228.11 KiB) Viewed 1480 times
My TOAW web site:

Bob Cross's TOAW Site
User avatar
sPzAbt653
Posts: 10116
Joined: Thu May 03, 2007 7:11 am
Location: east coast, usa

RE: What File Format are *.eqp Files?

Post by 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.
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

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.
User avatar
VHauser
Posts: 252
Joined: Thu May 07, 2015 12:23 am

RE: What File Format are *.eqp Files?

Post by VHauser »

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)
User avatar
76mm
Posts: 4766
Joined: Sun May 02, 2004 4:26 am
Location: Washington, DC

RE: What File Format are *.eqp Files?

Post by 76mm »

ORIGINAL: VHauser
Am I close?
Nope, off by a country mile. [8D]

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.
User avatar
cathar1244
Posts: 1299
Joined: Sat Sep 05, 2009 2:16 am

RE: What File Format are *.eqp Files?

Post by cathar1244 »

Duplicate.
Post Reply

Return to “Mods and Scenarios”