Site hosted by Angelfire.com: Build your free website today!
Star



Blender3D

DcModding

Upload Your Movies

Get Paint.NET!

DeviantArt Page

Banner

Part 2, Appending Entire Groups

The second part assumes you read the first part. Read First Part

We know how to append Objects to your blender session, but what else can appending do? Append groups.

MED (The Movies Game Editor) allows us to make new sets out of existing sets. We can change the image textures of a Movies game set to get a new set. Medieval brick walls can turn the hotel bedroom into a castle bedroom. But MED leaves something out of sets that is very important to them. The extrainfo file. In the data/meshes folder is another sub-folder called "Extrainfo". Here is a collection of files with the same names as the mesh files. Their purpose is to activate the advanced portions of the mesh file with the same name. The pistols and lasers have special effects activated by this file. Sets have doors and other layer items that are activated by this file.

MED does not give a new or custom set this file. Chances are, if you have downloaded a set from 8eyedbaby, it did not come with this extrainfo file. The most annoying problem when this happens is you can not remove the set from the studio lot. Or move it around. Because you can not place a builder on the icon to have it moved or destroyed. If this happens to you, find a set extrainfo file, like set_stage.inf and rename it to the same name as the custom set mesh file. Start your game and you can now drop a builder on the icons. After the set is gone go ahead and delete the renamed extrainfo file. Problem solved.

A good update to MED would be the option to copy and rename an extrainfo file for your set. Saving you the work of doing it yourself. What's the big deal? Not everyone knows about the extrainfo file. And this would give them the opportunity to learn and not make the mistake later.

This would also work with new weapons. Another blend group for weapons decides what special effect the game needs. The name of the pivot and group decides where and what special effect happens. The extrainfo activates this stuff. And does so for sets, too.

Another great update would be to give new sets lightmaps. I don't mean baking them for you. I mean, if all you did was exchanged some textures around then the lightmaps would be still good for the set. But a set needs to have lightmaps that match the name of the set. It is also possible to make 4x4 pixel solid color images that serve as lightmaps. These could be applied to a set that does not match the layout of a movies game set.

An actual bug of MED is how you extract a set from the game. If you are working on one in MED and save it to workspace or commit it to game, all of the shapes will be removed from the shape empty. However, if you extract a set with mesh extractor, then the shapes stay inside the shape empty. It's not a big problem. When you import such a set into Blender, you will get a python error. All you have to do is parent the shapes to the shape empty. Or just delete them.





Much of the stuff for the sets is in other layers. For instance, the outline of the set when it is placed on the studio lot. zHeight, which is where actors really stand. If you edit the zHeight of a set, you could make people start walking in mid air. Why? Actors can't walk up stairs. Actors can walk up zHeight and collision. The outline of the set to prevent it from being placed on or near another set (this can be changed, lol.) Or the shape that knows what is around it adds or decreases the value of the set once it is built on the studio lot. None of this stuff is active without the extrainfo file.

For this tutorial I will extract a Sci-Fi corridor. I opened it in MED and saved it to workspace, but you could also use mesh extractor, which would be better as the shapes will be in the shape empty and no python error when importing in Blender. Use file extractor to extract also the extrainfo file.

The idea of this tutorial is to append all of the extra layer items to your custom set. You can do this simply by appending the groups that this stuff is already assigned to. This way you do not have to build them from scratch. You can of course. Often I will replace a collision object and zHeight with others. The problem with doing this however is the extrainfo file is designed to accommodate the original shape of a set. Keeping that in mind you can do it anyways and still make fine custom sets. You could add more plains to the collision and zHeight to expand the boundaries of the set. What I do is after selecting the Collision in the second Blender layer, go into edit mode and add some more plains, lining them up where they need to be. But here is an important tip. The script breaks all quads into tris upon import and on export converts all tris back into quads. Except the second layer faces. Those end up losing a tri. Why? A bug maybe. I don't know. To prevent this, before export, convert all quads in the second layer into tris yourself and then the script will export them properly.

The other reason to use an original set as a source of extra layer data, besides having to do it yourself, is that scenes are designed to fit in a set's shape. If you make a set that goes beyond the boundaries of a normal set then no actors will ever visit that part of the set. For those areas you would have to make your own scenes with FLM Reader Zero. Which is time consuming but sometimes the only way to achieve what you are after. The other method for that is to make more then one version of your set. One where the dimensions appear for scenes on one side and another where scenes appear on the other side. Let's assume you want to make a set use only the scenes from an existing set. Your new set would have to resemble the shape of the game's original set. And everything would fit nicely. Thatís what this tutorial will do.

The example I will give here is to make a dungeon set that is the same shape as a Sci-Fi corridor set. I won't make sliding doors, which would be nice but this isn't going to be a mod, just a way to show you how to append groups. All of the walls and backdrop and floors and stuff belong to one group. In part 1 of this tutorial you know how to see the group name in the buttons window Hotkey F-7. The names match the names of the green arrow objects to which all of these objects are parented to. The sliding doors of the Sci-Fi corridor set belong to their own group. The green arrows are targeted by the game. And activated by the extrainfo file mentioned earlier. What ever objects are parented to the green arrows of the doors, will move when the scene for those doors is run. If you parented a 3D elephant object to them then the elephant, too, would slide sideways when the doors opened.

Here is a very important point about set group names. They follow an order. There are numbers in the name. These numbers and names can not change if you are going to use the extrainfo file. Another important point is just because you are not going to use sliding doors does not mean you should get rid of those empty arrows or their groups. Removing them will renumber all of the rest of the objects and your new set will loose functionality in the game. All names and numbers must remain the same. Therefore you must append every group to your new set.

There is a trick here. We do not want any of the set's walls or doors, or floors or anything. You can keep the actor lift if you want, (if your set hides the object like the original does.) We only want the items found in the extra layers. After importing the set, I am going to delete all of these objects. You may join them all together and delete their materials, then set their appearance to wire view and also set them to X-ray. You can use this as a dummy object so that you know where everything is. The problem with deleting them is they are not really gone. If you delete them, then saved the set as a .blend file, then appended the group they belong in, all of the objects show up again. Why? Blender is so powerful that it remembers things it no longer needs to remember. Sometimes a real problem. What can we do? Save over the .blend file three times and load it three times. In other words save it. Restart Blender and load that same .blend file again. Then repeat. Save and load three times. And this will clear away Blender's memory. Moooost of the time. This tutorial will do that.

First I extract set_corridortz3_v2.msh using MED. Then import it into Blender.



In the outliner we can see the pivot empties. We also know that each has a group that has the same name. Only one of these contain items we do not need: 06.opacity. The stuff from the set we don't need is parented to this empty. Expand it by clicking the triangle. Object.021 is that backdrop. I want to keep that so I'll turn it's visibility off. To delete everything else listed under the 06.opacity just right click it in the outliner and select delete. I will also delete the sliding doors. They are parented to the items called: 01.tz3_slidingdoor#_s. I won't delete the green arrow objects they are parented to. Never delete any groups or pivot empties. Just 3D objects.





Here is what the model now looks like. And what the outliner looks like. The actor lift is still there and it is set to the lightmap that originally came with the game. You don't have to but you can exchange it for your custom set's lightmap, which is what I did. Also kept is the backdrop. Also changed it's lightmap to my custom set's lightmap. Both in the uvmap and in the material button settings.

The next step is to save it as a .blend file. Something like "Temp Append Set Stuff.blend".

By this time you should already have your own set. And let's assume your set is like mine in this tutorial, meaning that it matches the shape and layout of the Sci-Fi corridor. The corridors are a bit higher then the ground. If you are using the Sci-Fi set then you would have the floor a bit higher then the ground. This tutorial is for appending, not how to build sets.

So open you custom set's blend file.



Now go up to file and from the drop down menu select "Append or Link"



Navigate the browsers to the Sci-Fi set .blend file, or whatever Movies game set you are appending from.



Another menu. Select "Group." From the next menu select all of the names in the list. These are all of the Blender groups for the Sci-Fi corridor set. There are no more set objects save a few. But all the groups are still there and so are the remaining objects assigned to these groups. They all will be appended just by selecting the group they are assigned to. After selecting them all click the "Load Library" button.



There are 5 objects to my custom set titled 111, 222, 333, 444, 555. All Movies game object names need a number in them. It can just be a number, too. What the number is in this case is not important. It would be if I had a window or something transparent. Such an object needs to be rendered last in the game during rendering so that the other objects show up on the other side of the window. I have a fire object but it is so small I don't care about it for now. 555 is the last number in the list anyways.



Now that the groups have been appended, I need to parent my own custom set's 5 objects to one of the empty pivot green arrows thing. I will select all five of them at the same time. Using shift button while clicking allows for more then one item to be selected at the same time. The last item I will select is the green arrows empty pivot object I need my set to be parented to. The same one the set's original back drop is already parented to, which is: 06.opacity. 06.opacity will be selected last in the multi-selecting using shift key.



Now under the name 06.opacity.



The next step is to enter the custom sets objects into the group with the same name as:06.opacity. Do so in the buttons window Hotkey F-7. Click the first object, in this case 111, and down at the bottom and click the button "Add To Group." The group to choose, in this case is 06.opacity. Do this for all of the objects. 111 - 555.



Or... You can do it faster. With a custom set that has 20, 40 or even a hundred objects, you can do it all at once.



From here I would run the Movies Game Preflight script to see if anything went wrong or still needs to be. Then export it to the game. Mesh files go in the game's data/meshes folder. Using MED I would select the Sci-Fi corridor and replace it's mesh file with the set I just made. Change the unique identifier to a new name and commit the new name. Make a thumbnail. Then commit the whole thing to the game. Also making sure it has an extrainfo file, which is to copy one of the Sci-Fi set corridorís .INF file found in the data/meshes/extrainfo folder. You would extract one using MED's file extractor. The set .MSH file and the .INF file must have the same name. Like set_(name of set).msh and set_(name of set).inf.



Again this is not a tutorial for making sets. It was a tutorial for how to use the append function to append entire groups. The benefit for sets is that we can utilize all of a game set's advanced features without having to make them ourselves from scratch.

To summarize:

1)Have your set ready and save it as it's own .blend file

2)Restart Blender

3)Import a Movies game set that closely matches your own, delete unwanted objects

4)Save it as a .blend file, something like "Append from this.blend"

4)Restart Blender

5)Open your custom set's blend file again

6)Append all of the groups from the Movies game set's .blend file

7)Enter your own set's objects into one of the groups

8)Parent the objects to the empty pivot with the same name as the group

9)Run preflight check

10)Export to game





Return To Tutorials Page