Jump to content

Mesh vs Meshfile vs Model - What are they all?


dbat

Recommended Posts

Hi,

Starting a little modding in a17. Keep seeing different words for what seem like the same thing:

 
<property name="Meshfile" value="Items/Crafting/Metal/IronBucketWaterPrefab"/>
<property name="Mesh" value="water"/>
<property name="Model" value="water_full"/>

 

What is a Meshfile vs a Mesh vs a Model?

 

Aside:

<property name="Shape" value="Water"/>

And what is Shape all about?

 

Sorry if this is old news. I have searched, but the terms crop-up everywhere.

Link to comment
Share on other sites

Hi,

Starting a little modding in a17. Keep seeing different words for what seem like the same thing:

 
<property name="Meshfile" value="Items/Crafting/Metal/IronBucketWaterPrefab"/>
<property name="Mesh" value="water"/>
<property name="Model" value="water_full"/>

 

What is a Meshfile vs a Mesh vs a Model?

 

Aside:

<property name="Shape" value="Water"/>

And what is Shape all about?

 

Sorry if this is old news. I have searched, but the terms crop-up everywhere.

 

I can tell you what "my" understanding is, but it is only practical information not technical.

 

Shape is the type of block being referenced. New, ModelEntity, Ext3dModel, Terrain, Invisible, Water, maybe missed some. Player made blocks used as game are ModelEntities.

 

Model is the specific unity prefab that is being referenced.

 

So: <property name="Shape" value="ModelEntity"/>

<property name="Model" value="Entities/Plumbing/wall_hung_sinkPrefab"/>

Puts that sink prefab into the game. This is what modders use to add new blocks and entities to the game

 

Or: <property name="Shape" value="Ext3dModel"/> <property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="CampingGear/cooking_pot" param1="main_mesh"/>

Does the same thing, but for a cookingpot. This seems to be an older way to call prefabs, maybe ones licensed by TFP rather than made.

 

Meshfile is like Model, but for items, which you could think of as all being the shame shape "Items"

 

Entities like zombies use a similar system but with more detail like Model type, Entity type, mesh, prefab etc, and depends on the type of entity. Modders use something like: <property name="Mesh" value="#@modfolder:Resources/Polarbear.unity3d?Polarbear_X" /> with type=Animal to add new animals to the game.

 

 

I hope this helps.

Link to comment
Share on other sites

Hello xyth. Your various tuts have been a boon. Many thanks.

 

Lemme summarize:

 

Shape:

Is a type. One of (possibly) New, ModelEntity, Ext3dModel, Terrain, Invisible, Water, ...

Player made blocks are "ModelEntity" (See below for questions.)

Used mainly in blocks.xml

 

Model:

Model is a specific Unity prefab name.

Used mainly in blocks.xml

The variant use with param1: <property name="Model" value="CampingGear/cooking_pot" param1="main_mesh"/> is possibly only for use by TFPs.

 

Mesh:

(Is found mostly in blocks.xml, entityclasses.xml)

[entityclasses.xml is where you find the player, zombies and animals.

 

Meshfile

DropMeshfile

HandMeshfile:

(Found in mostly items.xml)

Seem to be the same as Model, but for use in items.xml

 

I hope this helps.

 

Reckon it did fine. Thank you!

 

Can you throw any light on the various Shape types?

New (No idea.)

ModelEntity (You said "player-made" blocks. Do you mean blocks craftable in-game or blocks that modders make?)

Ext3dModel (Seems like it should be what ModelEntity is?)

Link to comment
Share on other sites

Meshfile

DropMeshfile

HandMeshfile:

(Found in mostly items.xml)

Seem to be the same as Model, but for use in items.xml

 

Can you throw any light on the various Shape types?

New (No idea.)

ModelEntity (You said "player-made" blocks. Do you mean blocks craftable in-game or blocks that modders make?)

Ext3dModel (Seems like it should be what ModelEntity is?)

 

The Meshfile, Handmesh and Dropmesh are typically the same Unity model, but with different orientations. Take my salvaged Bats mod for an example. You will notice the various weapon modifier meshes, say the heads, all appear on the top of the bat. They are positioned by me to be that way. There is also a handmesh version that shows the heads sitting on the players open hand. Again, positioned by me in Unity. The drop mesh is used to lay the mesh properly on the ground. Without one it will be oriented like the mesh is, usually standing up rather than laying down. These are nice to have but im too lazy to always bother as they will disapear in 1 minute anyways. All these meshes are made in Unity by modders.

 

New: "New" shapes "seem" to be models dynamically made by code out of mesh pieces rather than a pre built model like modelentites or the old 3D ones. Just my guess but it seems correct.

ModelEntity: blocks that modders and TFP make in Unity

Ext3dModel: Another guess, models like ModelEntity but are older ones perhaps licensed by TFP and loaded differently. These seem fewer every release

Link to comment
Share on other sites

The Meshfile, Handmesh and Dropmesh .. seem fewer every release

Magic! Thanks.

 

And to make it easy to id "New" shapes in game, see if you can paint them. If so they're made by code, so are "New".

Ah, that's a great trick.

 

Thanks all. Notes made!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...