Animated Model Viewer version 1.1.1.6

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Deleted User

Post by Deleted User »

Currently I just buffer all (most recent version of) files in arrays, with an associated cat, these
are collected up at run-up time, the prog. produces a disk file CatFiles.txt which is this list.

struct structCatFile
{
CString strCatPath; //eg "d:\games\copy of x3 reunion 1.403 test mod downloads\07.cat"
CString strFilePath; //eg "dds\1156_diff.dds" EDIT this is the real location, not necessarily the same as the one in the bod/bob file
long nFileLength; //binary or unpacked, depending on usage
};
class CCatFileArray : public CArray<structCatFile, structCatFile>{};
CCatFileArray m_arrCATFileBuffers[MAXCATS]

Because I'm handling all mod cats that are present, as well as the 01-07.cat standard set,
I have to map each mod (dataset) into the list via other lists:

CStringArray m_arrCATNames;
long m_nStdCatCount; //std set has multiple cat files
long m_nModCatCount; //one cat file per mod
CString m_strDataSetPaths[MAXDATASETS];
plus
char * m_xmlBuffer[MAXDATASETS];//concatenated xml files, temp buffer
char * m_pTShipsData[MAXDATASETS];
char * m_pTCockpitsData[MAXDATASETS];
char * m_pComponentsData[MAXDATASETS];
char * m_pTFactoriesData[MAXDATASETS];
char * m_pDummiesData[MAXDATASETS];

and now
//list of directories for raw install mode
CString m_strTDir, m_strTypesDir; :) (so far)

it's not massively memory efficient, but not too bad & it works, plus there's a lot more as you can imagine.

Each mod is assumed to have only one cat file (apart from false mods), so if anyone makes a mod
with more than one I'll have to re-work it a bit.

If you want some code snips, I suggest going over to PM's cos it could get a bit over the top in a post.

I did notice that post about External Docking, but haven't really looked at it in detail (yet).
User avatar
Earthpilot
Posts: 917
Joined: Sun, 23. Feb 03, 19:43
x3tc

Post by Earthpilot »

Any progress, Dave?

And - btw - have you tried loading X2 scene file No 6070 ?

It is a combined scene file with 40Megs.
Deleted User

Post by Deleted User »

Got a bit diverted with Bala Gi 2.0 :),

I think I'd better push on with this, especially in light of doubleshadow's new editor.

That bob file looks like a brick building, I don't recall seeing it in X2,
perhaps ES were going to do plant landings.
Don't know why it needs to be be that size, they must have got a bit carried away with the vertex count I guess.

Anyway I think I'll get (re)started in ernest cos too many things are outstanding ;)
User avatar
Earthpilot
Posts: 917
Joined: Sun, 23. Feb 03, 19:43
x3tc

Post by Earthpilot »

That file is a cutscene, and if i remember well, it sports people like Julian and saya.

So the size wouldn't be a wonder at all. ;)
Delphis
Posts: 28
Joined: Fri, 25. Aug 06, 03:18
x3

Post by Delphis »

Hi, I downloaded version 1.0.21 but I noticed it does not seem to load the active .mod, so ships added with Cycrow's Ship Installer do not show up. Those are precisely the ones I'm interested :) in since checking out a modification would be much faster if I can just either load the scene file directly or at least make it up to an XSP file as before, install it in the game and view it quick instead of having to load up a save game and script it in only to find my latest goof.

How do I go about incorporating ships from the mod?
Deleted User

Post by Deleted User »

What's the file name of the cat file of the mod you're wanting to load?
If it's in the mod directory & its a .cat file (& it's got an equivalent .dat file), & it's not called ShipCreator.cat,
then it should load OK, regardless of whether it's the 'active' mod.

I'm not sure if I've got this right, but doesn't the ShipInstaller merge
ships to your main game cat files? Or have I got that confused with
'XScript Packager' or 'XScript Installer' or 'Ship Creator ?
Deleted User

Post by Deleted User »

If anyones intersted, there's a new version of my Model Viewer,
now ver 1.1.1.6

More details on:
http://forum2.egosoft.com/viewtopic.php?t=141654
xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon »

Thanks for the update on one of my favorite programs Mr. Toome's :D
Deleted User

Post by Deleted User »

Good, cheers,
glad someone likes it :)
Deleted User

Post by Deleted User »

Phieeel wrote:Dunno if it's been asked, but I've installed several custom ships, and I was attempting to use your program to view them, and it gives me a buffer overrun error. I'm tired and don't feel like trying to figure it out right now, so I'll post asking for help before I collapse.

No, I haven't been playing too much X3, why do you ask? =p
Could you tell me which ships, so I can test them?

Alternately I can give you the phone number for X3aholics anonymous :)
Phieeel
Posts: 12
Joined: Thu, 26. Apr 07, 10:12
x4

Post by Phieeel »

Eep.... quite a few ships, actually. Mainly Star Wars ships, with a few random others from other Sci-Fi universes.

Grouped by author...

*Balogt*
-Ebon Hawk (Made by Balogt and Cycrow) vers 1.00
-Korhlar class Battlecruiser (Starcraft, rebalanced version, made by Balogt and dukesatan) vers 1.01
-Terran Wraith (Starcraft, dukesatan and Balogt, rebalanced) vers 1.00

*DeadlyDa* (Unless noted otherwise, all his ships are version 1.00)
-Imperial Star Destroyer
-Imperial Tie Defender
-Imperial Tie Interceptor
-Rebel A-Wing
-Rebel B-Wing
-Rebel Nebulon-B Frigate
-Rebel X-Wing
-Rebel Y-Wing
-YT-1300 Millenium Falcon
-YT-2400 Corellian Transport
-Serenity (From Firefly)

*Magrathean Monkey*
-Corellian Corvette v1.2
-Firespray w/cockpit (Boba Fett's ship) v2.25
-Imperial Shuttle v1.2
-Imperial Tie Advanced v1.1
-Imperial Tie Bomber v1.1
-YT-1300 v2.07 (Yeah, another Falcon model)

*Tensin* (Collaborative projects)
-Imperial Avenger Star Destroyer (Assisted by DeadlyDa) v2.3.5d
-Imperial Executor Super Star Destroyer (Assisted by YnCofgod) v0.3

*XFP*
-Imperial Super Star Destroyer v0.2.1
-Naboo Transport v0.2
-Rebel Home One v0.2
-Republic Jedi Starfighter v0.2

Phew...

The main reason I want to use the program is to check out to two different Millenium Falcon models and see which one I'd rather have. Also check out all the different Star Destroyer models, and see if I'd want to do without any of them.

That listing is typed from what I have installed according to Cycrow's godly Ship Manager utility. Cycrow's programs have made the mod experience so user-friendly. Not that I couldn't have done it without, as I do have some programming experience, but I am rather grateful for his work. Along with all the awesome scripting work. I'd love to say I'm grateful for your program, and I'm sure I will be, once I get it to run. =p

:EDIT:
To provide a bit more information about the problem... I have the program installed in the main X3 directory. (I'm also reading through this thread at the moment, trying to see if I can figure it out on my own) When I start the program, it appears to go through the base .cat files just fine. It crashes with the buffer overrun error after it appears to finish loading the shipcreator.dat.

Also, I do have some other mods applied as false patches (I should keep a txt file handy listing which number cat/dat set is which mod. D'OH!) I try to use Cycrow's script manager whenever possible to install scripts, as it makes cleanup easier. I have one of the cockpit mods installed, but I can't remember which version. I think it's the X2 cockpits one, from the main site download link.

:RE-EDIT:

Ah, just read... so your program currently does not like the ShipCreator.dat/.cat?
Last edited by Phieeel on Sat, 5. May 07, 19:39, edited 2 times in total.
Gelnak
Posts: 120
Joined: Wed, 29. Mar 06, 10:57
x4

Post by Gelnak »

please can you check it out for the xtm mod because when i try to start the program when it gets to opening xtm it crashes and then closes
any help?
Deleted User

Post by Deleted User »

Phieeel:
Thats a good list, but not excessivly big,
ShipCreator.dat/.cat are now read-in as of version 1.1.1.6 (current),
so far it has worked OK with the many varied cats I & others have made
with Cycrow's ShipInstaller, but it's not impossible there could be a syntax
I'm not coping with during read-in.
Perhaps you could PM me a link to your ShipCreator.cat/.dat, posted on a public
server, or email them to me (see my profile), then I could see what the problem point is.
A lot of those ships exist in various mods that are known to load OK,
but some I've never looked at myself.
Read the below cos it might be relevent.



shadow3:

XTM 0.6
I'm not sure if this is what everyone gets when they install XTM, using Cycrow's ShipInstaller 1.91 :

Xtended_0.6_ModFiles.spk ----> XTM-PB-0.6.cat/.dat in mods directory,
Xtended_Mod_Patch_V0.6b.spk ----> 10.cat/.dat in main X3 dir,
Xtended_Mod_Tships_Fix.spk ----> 11.cat/.dat in main X3 dir.

This presents a difficulty for my program, with this combination of main-mod and extra false-mods/fake-patches,
since it tries to load any mods as individual & self-contained modules (presenting them as 'datasets'),
This is designed so you can easily compare ships across any mods you have in your mod directory.

The false-mods/fake-patches 10 & 11 appear to the program to be part of the 'standard game',
& listed ship parts are not looked for in the mod's files, so you get things like missing hulls etc.
But it shouldn't cause a crash (just tested it myself).

If you could combine 10, 11 and XTM-PB-0.6 into a single mod file (or even a single false-mod/fake-patch .cat file)
you would be able to view everything OK (I'm fairly sure).
I'm not sure how to do this with Ship Installer, assuming it can be done (Cycrow?)

This is similar to what FlyBye has just recently done with XFP4, he installed it as a single 10.cat/.dat pair,
& you see the same ship-set as if XFP4 was installed in the normal manner (ie in the mods directory).
But the new ships are all mixed-in with the 'normal game' ships in the ship-select dialog.

Here's a hot-fix version FlyBye needed 'cos the ship count (in one dataset) rose to 300,
which overloaded my arrays, there's a small chance this version might fix Phieeel's problem as well.
This is just the v1.1.1.7 exe file, you'll have to extract it to you X3 directory & make your own desktop-link
to it:
http://www.Exogenesis.co.uk/XModels3DViewer_1.1.1.7.zip

If this doesn't work, then try turning on 'diagnostic mode' by using regedit to set the entry
HKEY_LOCAL_MACHINE\SOFTWARE\X3Models3DFunfair\DiagnosticMode
to 1 rather than 0, this should give a more precise failure position (ie a specific ship).
Thorbin
Posts: 28
Joined: Mon, 28. Feb 05, 01:24
x3tc

Post by Thorbin »

Your model viewer doesn't seem to like the XFP mod, either. I have tried both the 1.1.1.6 and the 1.1.1.7 versions. Both crash when it tries to load XFP_V41.dat (the latest version of the mod). Oddly enough, the first version of your tool (version 1.0.2.1) is able to load the XFP mod files without an issue. :?
Deleted User

Post by Deleted User »

XFP4 & 4.1 load & view OK for me & others, with 1.1.1.6 & 1.1.1.7,
have you a ShipCreator.cat as well, or any other concurrent mods?
Phieeel
Posts: 12
Joined: Thu, 26. Apr 07, 10:12
x4

Post by Phieeel »

Okay, back from work... Tried the 1.1.1.7 version, to no avail. I also did enable the diagnostic mode, and when I executed it again, it did come up with a diagnostic window telling where exactly within the file it was; however, the error came up again, which ended up closing that window before I had a chance to see where it was at. Does the diagnostic mode dump to a logfile?

As for my shipcreator.dat/cat files, let me put them on my webserver and PM you a link to them. I'm in the middle of trying to alter some of the Star Wars ships a bit more to my taste (giving the X-wing a bit more shield capacity, slowing the A-wing down just a tad, etc... ) and I'm trying to figure out how to get it updated within my save game. That's a topic for another post though. When I do get it re-made, I'll PM you a link to them.

Also, should I try taking out the fake patches I have in place and running it?
Phieeel
Posts: 12
Joined: Thu, 26. Apr 07, 10:12
x4

Post by Phieeel »

Thanks, the version you PMed me did the trick. I managed to weed out some of the ships and hopefully reduce the strain on the processor memory when I play somewhat. Though I did notice some of them were lacking in textures; the Jedi Starfighter and Naboo Transport come to mind most easily.

Question, is there any way to look at the cockpit view of a ship model, assuming it has one?
Deleted User

Post by Deleted User »

These forum->email notification of replies are getting very unreliable
(..... 4 1/2 hours later), think they're being heavily batched.

Anyway Phieeel, excellent :),
I'm afraid there's no cockpit view atm, but I'm thinking about it cos
it was recently raised in the xUniverse thread on the viewer,
along with other things.

Agree about the textures, but I did notice when I extracted your
shipcreator.cat with doubleshadow's modmanager,
that the dds & texture dirs had .txt rather than .dds files,
this may be related?

The version in question is
http://www.Exogenesis.co.uk/XModels3DViewer_1.1.1.9.zip
(fixes a problem with overly long tships ident names, & use of binary turret animation scene files).

shadow3:
if you're still there, XTM can be viewed in full if you rename 11.cat to 12.cat,
10.cat to 11.cat, and XTM-PB-0.6 to 10.cat then move the latter into the
main X3 dir.
This way the whole XTM mod is 'in one place' & nothing is missing from being viewed.
User avatar
halo112358
Posts: 374
Joined: Thu, 16. Feb 06, 07:56
x3

Post by halo112358 »

I'm able to crash the viewer every time viewing the Argon Centaur in this mod. I'd trace it for you but I don't get anything useful when I try.

http://halo112358.googlepages.com/heavmod05-06-07.7z (3.6mb)
*** modified ***

[ external image ]
Deleted User

Post by Deleted User »

Fixed it , very minor change,
there was a blank line in your argon_M6_scene.bod just before P 15
that had some spaces in it, that was being attempted to be read as a valid
'render stage' line. This wasn't in any of the other modded scene files.

btw You appear to have four SS_SH_P_M6 entries in your tships,
only the first is being picked up by the viewer.

http://www.Exogenesis.co.uk/XModels3DViewer1.1.2.0.zip

Return to “X³: Reunion - Scripts and Modding”