Page 1 of 2

Unit Viewer Mod

Posted: Tue Jan 24, 2012 12:49 pm
by dazoline II
Hello,

At Junk's request I've decoupled the unit viewer from my next version MoreRandomOptions mod as it was mostly complete and just sitting waiting for me to complete the version.

Install:
The zip file contains an hta file and several css and js files. Place the UV.hta file in the root of the PCO folder (where you see the other hta files) and the rest of the files in the Editor folder. To run the unit viewer double click on the UV.hta file or open it using IE 6.0 or higher (Tested with IE 8).

Notes:
- The unit field uses autocomplete to display the entire XML file list of units. Type in 'p' in the field to start.
- The date field only affects the ammo types display as they are available, it doesn't modify the autocomplete list of units.
- I haven't checked every single file to ensure it displays but there are some that have files missing (could be my lookup procedure) German Fsjager 41.xml or missing info 150mm Towed Artillery.xml has no description. I'm sure there are others and hopefully wider use of this viewer and the files will bring all issues to light.

Change List:
v 1.0.2
- Fixed lookup for FJ MGs and Rifle gernades.
- Added Junk2Drive's UV icon for shortcuts.

v 1.0.1
- Unit list had incomplete list of all units, fixed.


Please notify me of any issues you have.
Enjoy!

RE: Unit Viewer Mod

Posted: Tue Jan 24, 2012 2:46 pm
by Mad Russian
Thanks for all the work you've done on this.

Good Hunting.

MR

RE: Unit Viewer Mod

Posted: Tue Jan 24, 2012 10:41 pm
by junk2drive
Thanks for taking your valuable time for this. It may help us ferret out some errors and make the game better.

RE: Unit Viewer Mod

Posted: Wed Jan 25, 2012 11:03 am
by junk2drive
The FJs have the wrong gun id.

RE: Unit Viewer Mod

Posted: Wed Jan 25, 2012 11:41 am
by dazoline II
So its an issue with the xml rather than with the lookup?

ORIGINAL: junk2drive

The FJs have the wrong gun id.

RE: Unit Viewer Mod

Posted: Wed Jan 25, 2012 11:46 am
by junk2drive
Correct.

And the 150 Towed does not have a description in the xml. We will fix that and the FJs for the next update.

RE: Unit Viewer Mod

Posted: Wed Jan 25, 2012 6:40 pm
by rickier65
I haven't checked every single file to ensure it displays but there are some that have files missing (could be my lookup procedure) German Fsjager 41.xml

Daz,

I've looked at the FSJager unit xmls but didn't see a problem with the unit file or gun file. The unit xml makes reference to a gunid. That gunid should match one and only one "type" attribute in a gun xml. for example, the German FSjager 41 unit references a gunid of "1941 Fsjager w/MG-34". That gunid matches a "type" attribute in the gun xml 1941 Fallschirmjager Squad with MG-34.xml.

Thanks
rick

RE: Unit Viewer Mod

Posted: Wed Jan 25, 2012 10:43 pm
by dazoline II
Your right Rick.
Looks like the lookup routine is not getting those files for some reason. I'll have to look at it.

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 11:44 am
by junk2drive
Daz is the UV preloaded with the units in PCO? I have a Japanese Chi Ha xml, as German, using a Soviet tank model. It displays in the Scenario editor with the PID button but not in UV.

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 12:18 pm
by dazoline II
The UV browses the Data/ArmoredUnits and Data/Infantry folders and picks up all the xml files located in thoses areas. The dropdown menu displays the name of the file not necessarily the name of the unit id.



ORIGINAL: junk2drive

Daz is the UV preloaded with the units in PCO? I have a Japanese Chi Ha xml, as German, using a Soviet tank model. It displays in the Scenario editor with the PID button but not in UV.

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 12:28 pm
by junk2drive
My xml name is Chi Ha and the type= is Chi Ha, nothing shows in UV no matter how many letters I type in.

Is there a year limit or something else I could look at?

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 1:37 pm
by dazoline II
Attach the file and I'll see if I can load it up in mine or at least debug it.

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 4:51 pm
by junk2drive
JSGME ready, unit, gun, test scenario

Thanks

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 6:10 pm
by dazoline II
I've uploaded version 1.01 in the original post above.
Seems I was over writing part of the options for the autocomplete list.

Thanks for the heads up.

RE: Unit Viewer Mod

Posted: Fri Jan 27, 2012 11:21 pm
by junk2drive
Thanks for the quick fix.

Any word on the FJ guns error?

RE: Unit Viewer Mod

Posted: Sat Jan 28, 2012 12:45 am
by junk2drive
Looking at the code where I get the error, it looks like you are replacing file names with gun names. In that case try Fallshirmjager and Fsjager.

RE: Unit Viewer Mod

Posted: Sat Jan 28, 2012 1:00 am
by junk2drive
I tried that and still get an error that it can't open the Fsjager /MG-34 file, then the error for the generator.js no loadout section.

The 1941 FJ has two weapons

<guns>
<gun gunid="1941 Fsjager w/MG-34" rof="11"/>
<gun gunid="GG/P 40" rof="2">
<ammo date="12/31/1945" loadout="HEAT=5" />
</gun>
<gun gunid="Smoke Grenade" rof="1"/>
</guns>

but only the rifle grenade GGP40 has an ammo amount.

RE: Unit Viewer Mod

Posted: Sat Jan 28, 2012 11:57 am
by junk2drive
I don't think the name replacing works well as I removed the ammo loadout from the 1941 FJ xml and then I got a UV error for the model set. It may be a quick workaround for things that are common but not so elegant for names that are mangled through the xmls.

RE: Unit Viewer Mod

Posted: Sat Jan 28, 2012 1:47 pm
by junk2drive
Here is an icon for your desktop shortcut.

RE: Unit Viewer Mod

Posted: Sat Jan 28, 2012 5:45 pm
by dazoline II
Version 1.0.2 uploaded.
Check the first post in this thread, change log now in place there as well.