ResidualVM logo Forum Index - ResidualVM website - Contact us - Rules Login    Register     Search curved edge
It is currently Fri Aug 18, 2017 2:20 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Nov 17, 2013 7:06 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 324
Location: aka ThunderPeel2001
I'm currently grappling with the GF assets, trying to think of ways to make sense of everything that we need: 3DO, MAT, CMP and COS files.

Most MAT files that aren't mentioned in COS files (I assume they're referenced in 3DO files), but a few that are.

Usually in COS files CMPs are assigned to 3DOs. Are they ever used in any other capacity? (Being assigned to MATs directly, perhaps?)

My main question is: What are COS files used for? Are there any 3DO files that are used without a COS file, or does a 3DO have to appear in a COS file for it to be used in the game?

Are COS files exclusively used to link (amongst other things) CMPs with their 3DOs?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 17, 2013 9:11 pm 
Offline
ResidualVM Developer
User avatar

Joined: Mon Mar 21, 2011 9:20 am
Posts: 139
Location: Belluno, Italy
Costumes (.cos files) are a thing i found quite hard to grasp when starting to work on the engine, and i still find hard to explain.
Quoting myself from here:
Quote:
Every actor has one or more costume. A costume is a set of components and chores. Each component represents an on-screen object, like an object state, a 3D mesh, a material, or a keyframe animation, or a sound effect; each chore, diminutive for choreography, gives a set of instructions for how to move, change state or activate or deactivate each component at certain times.


Colormaps are never assigned to materials directly.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 18, 2013 12:07 am 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 324
Location: aka ThunderPeel2001
Thanks. I'm finding it tricky building a hierarchy without understanding where the "top" is...

Your explanation is very good though, and really makes it clear. Looking at a COS file now, I can see what you mean about how they're split up.

Do all 3DO and CMP files appear in a COS file somewhere? (Is the COS file the "mother" file?)

---

Hmm. I keep finding odd discrepancies that go against my understanding. For example, in INVENTORY.COS you can see the following:

Code:
#   ID   TagID   Hash   ParentID   Name
    35   4      0      15         eggs.3do
But there's no reference in the file to a CMP that has 35 as its parent ID. How does it know which CMP goes with eggs.3do?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 18, 2013 2:16 am 
Offline

Joined: Tue Aug 23, 2011 9:05 pm
Posts: 15
Location: Iran
Is it possible that there is no pattern to find with these COS files? Or is it that there certainly is a pattern but it's not discovered yet?

What I take from giucam's description is that each of these files were made manually for specific scenarios in the game. As if the devs shoved everything that wouldn't fit in a category into a COS file.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 18, 2013 10:57 am 
Offline
ResidualVM Developer
User avatar

Joined: Mon Mar 21, 2011 9:20 am
Posts: 139
Location: Belluno, Italy
Quote:
Do all 3DO and CMP files appear in a COS file somewhere? (Is the COS file the "mother" file?)


I'm not sure what you mean with "mother file" there. All 3do, cmp, mat, bmp, ... files are referenced by a costume to be shown on screen. Exceptions are lua and wav files (and maybe snd, i'm not sure), which have other mechanisms.

Quote:
But there's no reference in the file to a CMP that has 35 as its parent ID. How does it know which CMP goes with eggs.3do?


item.cmp is the default cmp, and if there is no colormap assigned to a model that is used. Also, a costume may have another one as parent, and may use a colormap defined in the parent costume. You can't see that hierarchy in .cos files though, you'd have to inspect the state of the engine at runtime.



Quote:
What I take from giucam's description is that each of these files were made manually for specific scenarios in the game. As if the devs shoved everything that wouldn't fit in a category into a COS file.


I'm not sure what you mean, costumes have a specific and fundamental role in the game engine. Every object has at least one costume, manny has several of them depending on the year, mainly.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 18, 2013 11:59 am 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 324
Location: aka ThunderPeel2001
giucam wrote:
I'm not sure what you mean with "mother file" there. All 3do, cmp, mat, bmp, ... files are referenced by a costume to be shown on screen. Exceptions are lua and wav files (and maybe snd, i'm not sure), which have other mechanisms.


Hmm. Not all of the MAT files appear to be referenced by COS files. And when they are referenced, it's only in the comments section of Chores. Looking inside 3DO files you seem the list of MATs used by it. Such lists are not mentioned in any COS file that I can see...?

What I really want to know is: Is every 3DO file mentioned in a COS file somewhere? I.e. Is it the COS file which tells the game engine where to find a 3DO file?

GAME ENGINE -> COS -> 3DO

And it never goes:

GAME ENGINE -> 3DO (a direct reference to a 3DO)

Does that make it any clearer? Thanks for your help!

Quote:
item.cmp is the default cmp, and if there is no colormap assigned to a model that is used.


Great. Is that a game-wide default? (Providing the following isn't true in a specific instance, of course...)

Quote:
Also, a costume may have another one as parent, and may use a colormap defined in the parent costume. You can't see that hierarchy in .cos files though, you'd have to inspect the state of the engine at runtime.


Oh man. Things just got more complicated :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 18, 2013 2:48 pm 
Offline
ResidualVM Developer
User avatar

Joined: Mon Mar 21, 2011 9:20 am
Posts: 139
Location: Belluno, Italy
JohnnyWalker2001 wrote:
Hmm. Not all of the MAT files appear to be referenced by COS files. And when they are referenced, it's only in the comments section of Chores. Looking inside 3DO files you seem the list of MATs used by it. Such lists are not mentioned in any COS file that I can see...?


You're right, i recalled incorrectly. They indeed are referenced by the 3dos directly.

JohnnyWalker2001 wrote:
What I really want to know is: Is every 3DO file mentioned in a COS file somewhere? I.e. Is it the COS file which tells the game engine where to find a 3DO file?

GAME ENGINE -> COS -> 3DO

And it never goes:

GAME ENGINE -> 3DO (a direct reference to a 3DO)


That's right. The lua scripts only set some costume on an actor, then the costume loads the 3dos.

JohnnyWalker2001 wrote:
Great. Is that a game-wide default? (Providing the following isn't true in a specific instance, of course...)


Yes. (keep in mind though that there's a point where manny turns orange with residualvm, so the cmap handling is not perfect)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Forum design by ScummVM team, icons by raina, adopted for ResidualVM
curved edge   curved edge