It's a bit nerve-wracking introducing yourself to a forum with a tutorial, but there seem to be a few people wanting this info, so here goes...
What follows are directions for turning a 3D mesh called 'book_a.x' into a plain static entity in FPSC. I can't offer advice on creating characters or weapons as I haven't managed to do either of those things yet!
Okay, so the modelling and texturing is done and you have an .x mesh and a .tga file.
For the purposes of this tutorial, these are 'book_a.x' and 'book_a_D2.tga'
One thing to consider before starting - is your model big enough? FPSC meshes are huge. If your modelling software works in real-world measurements and you made your nice new chair 3' tall, you're going to need a magnifying glass to see it in FPSC. I imported the WW2 thug mesh into Amapi 3D and it measured 233' tall.
If the problem you're having is that your models appear in the entity library, but don't seem to be showing up in the editor, it could be that they're just too small to be visible.
To get the book model into FPSC I need two more files:
'book_a.bmp'. This is a 64x64 bitmapped image for use as the entity library thumbnail.
'book_a.fpe'. This is the entity script that tells FPSC where everything is and what to do with it all.
The main thing you need to know here is that .fpe files are plain text - you can open and edit them with any word processor. All you have to watch out for is that your chosen word processor doesn't try and stick a .txt extension on your .fpe file when you save it, for instance 'book_a.fpe.txt'.
This is what 'book_a.fpe' looks like:
;header
desc = book_a
;ai
aiinit = appear1.fpi
aimain = default.fpi
aidestroy = disappear1.fpi
;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;orientation
model = meshbank\user\scenery\furniture\book_a\book_a.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
defaultstatic = 1
materialindex = 4
collisionmode = 1
;visualinfo
textured = texturebank\user\scenery\furniture\book_a\book_a_d2.tga
effect =
castshadow = 0
This is pretty much a standard static entity file. Open up a few of them and you'll see that only a few lines change from one to another:
desc - the name of the entity as it will appear in the library, and when you hold your mouse over it in the editor.
model - where the required .x mesh is located.
defaultstatic - 1 means static, 0 means dynamic.
materialindex - 1= the entity is made of stone/cement and will produce chips and dust when hit
2= as above, but with a bigger hole
3= the entity is metal, and will produce sparks when hit
4= the entity is wooden, and will produce splinters when hit
textured - where the required .tga or .dds texture file is located
(Note that if you use a .tga file, FPSC will automatically create a .dds file from this the first time you load the entity. Remember this if you decide to alter the .tga file later - you must delete the existing .dds file with the same name, or FPSC will continue to use that instead of the new .tga file and you wont see any alterations)
So you've told FPSC where the file are - but at the moment those locations don't exist. Time to create the necessary folders:
(I used the default install options, so the initial path is C:\Program Files\The Game Creators\FPS Creator)
'book_a.fpe' and 'book_a.bmp' both go into: '\Files\entitybank\user\furniture'
'book_a.x' goes into '\Files\meshbank\user\scenery\furniture\book_a'
'book_a_D2.tga' goes into: '\Files\texturebank\user\scenery\furniture\book_a'
For the sake of consistency I've chosen to duplicate the filing system used by the program developers, but it does mean a lot of sub-folders! Note that the entitybank only goes as far as '/furniture', with no sub-folder for the actual item, while both the meshbank and texturebank use an additional folder with the same name as the item. This still catches me out now and then.
Of course, you can devise your own system of folders if you'd prefer.
Launch FPSC, place a prefab, then switch to the entity library and select 'user' > 'furniture'.
You should see the book thumbnail image with the name 'book_a' underneath. If you've got the default 'brain in a bell jar', then check to make sure that 'book_a.bmp' is in 'Files/entitybank/furniture
Click on the book_a thumbnail.
If FPSC shuts down with the following message - 'Runtime Error 7008 - Object does not exist at line 13349' - then the editor couldn't find the .x mesh. Check that the meshbank file path is correct in the .fpe file.
What you should get is a yellow book - if you can see in the editor that it's white instead of yellow, then FPSC hasn't located the texture. This isn't as serious as not finding the mesh and won't crash the program. Again, check your file paths.
Finally, place the book wherever you want it
The attached zip file contains all the files mention above. BTW, once you've installed the book entity, you can use it in any game, commercial or free, with no need for any credit. Just don't redistribute the model and/or texture files separately.
Hope this is helpful.
Cheers
- Graham