Jump to content
Sign in to follow this  
Pilinir

Using custom models in custom terrain

Recommended Posts

Hello all, I have built myself a custom terrain file and I would like to add my custom buildings into the map. I can load and place the buildings in the Visitor 3 editor, and can even preview them in buldozer; however, when I load the map in the in-game editor and try to preview the world I receive the following crash:

Bad version 50 in p3d file 'myProject\warehouse\warehouse.p3d'

I have my warehouse.pbo and testMap.pbo in the same addon directory. Is there some step I am missing? I am also having a problem with creating my models, could they be related somehow?

I can load my map without the custom buildings successfully so I know I am screwing something up, just no idea what lol.

Thanks in advance for the help!

Share this post


Link to post
Share on other sites

I too get a problem like the one described above, however I don't get no errors and it loads the map just no models show up?

Dave,

Share this post


Link to post
Share on other sites

When you load your model into Visitor 3, is it from a file in the directory P:\AddonPBO\warehouse\warehouse.p3d". I believe that if file structure is not correct then problems may occur (from what I have read elsewhere).

Share this post


Link to post
Share on other sites

Its strange the pair of you get the model 50 error not sure what's going on with you as I have your model in game fine no errors.

When I create a model I use for example p:\wall\wall.p3d 1 folder inside is the model makes for less mistakes when repathing textures or configs for me anyway are you sure the model is fit for the engine as things will show in visitor but when it comes to in game may not work and how complicated is the model points faces count is it over 20,000 are all textures pathed right and folders pathed right for the config.

make a new folder for the warehouse path all textures to that model in the new folder in p drive and do the same for config.

I have all my addons seperate from my terrains, terrain set up is different for me I use a main smoke folder then all my terrains are in that folder all my addons are seperate in p drive sm_rocks\ sm_plants \sm_afghan objects if you get me.

Edited by SmokeDog3PARA

Share this post


Link to post
Share on other sites

I have a project directory where I try to keep all my work:

p:\myProject\testMap\all my visitor stuff

p:\myProject\warehouse\warehouse.p3d

p:\myProject\Wall\Wall.p3d

etc...

Is there some kind of config I need to set to tell the terrain where to get the models?

the faces for the warehouse are 7,739. I can load the model into the game and place it using the editor, but only if I set the model path in the config to be p:\myProject\warehouse\warehouse.p3d. If I try to give it a relative path or try to binarize the model from anywhere other then this exact path I encounter the same problems I am having in my other post. Do these toolsets have problems with windows 7? Is there a newer toolset then 2.5.1?

Share this post


Link to post
Share on other sites

2.5.1 are the latest tools, If your model is in your my project folder how have you shown it to visitor when adding model to the vis list as normally all models bis or custom sit in the p drive and are pathed to that so the game can find them as p drive is like a copy of the game and it is where vis looks for addons so not sure if going the way your going is ok or not as i have not tried the way you are doing it it must have to look for terrain and model from the main my project folder you have if all fails pm me a link of your source files for terrain and model and I don't mind having a look to get to the bottom of this

Share this post


Link to post
Share on other sites

So when I add a model in visitor I go to tools->artificial objects... In that window I click on the add/browse button and select the p3d I want to use. The warehouse model for example sits in p:\myProject\warehouse\warehouse.p3d. Should this instead be placed in the CA folder I made?

When I binarize my map it goes into:

C:\Program Files\Bohemia Interactive\ArmA2\@myProject\Addons

I also have all my model PBOs placed in \@myProject\Addons as well

So the inside of @myProject\addons looks like:

testMap.pbo

warehouse.pbo

wall.pbo

Edited by Pilinir

Share this post


Link to post
Share on other sites

Hi mate I have not done my terrains and addon set up like yours in my project folder I have 7 terrains and all the configs from the addons I have used like mbg buildings, and all the models I have made they sit just in the p drive in their own folders as separate addons.

Then I load them in vis3 like they are in my p drive p:\sm_ied\ied.p3d I can only advise you on the way I have done mine i use a project folder for terrains but I don't for addons it works for me some guys use the project folder and some don't.

p:\smoke\wazirstan

\hellskitchen

\stanta

p:\sm\ied

Share this post


Link to post
Share on other sites

So, per your suggestion, I directed vis to p:\wall\wall.p3d. This looks like it fixed the bad version 50 crash; however, I now receive the message:

cannot open object wall\wall.p3d

Do I need the pbo version of the wall available when I package my terrain? Or is a pbo of the model made when I package the terrain?

And if so, where do you put the .pbo versions of your addons? currently I put them in my \Bohemia Interactive\ArmA2\@myProject\Addons directory.

should I put them in the same place I am directing vis3 to?

like:

p:\wall\wall.p3d

p:\wall\wall.pbo

Share this post


Link to post
Share on other sites

Hi mate yes you need to binerize both the model and the terrain and use both pbo's when starting arma easiest way or what i do in my folder for island @waziristan\addons\wazir.pbo+sm_ied.pbo+afghan_objects.pbo if you see were I am going if you need to talk on ts jump on my ts channell 7XBRF-gu ip is 46.32.228.189 and it would be easier to talk about it and get it sorted.

Share this post


Link to post
Share on other sites

Ok, that's what I was doing initially. So am I right in assuming then that visitor tells my map where to find the models I am using when I add them through the artificial objects browser? In other games I have modded you had to add the objects to an asset list for the game to read from when it loaded the map.

It seems to me the problems I am having described in that other post are probably effecting me here. This would make sense considering the only way I can get the model to work currently is to give it an absolute path, which means when the map tries to load the model it cant find it even though the pbo is in the correct place. I also know its not the map itself, as I can load it without any of my custom models without an issue, and I can load it with all the default ArmA models.

Share this post


Link to post
Share on other sites

So, after finding out that the permissions for my P:\ were messed up somehow I was able to finally load my custom models without a problem and with a relative path. This also fixed the problem I was having loading them into my custom map. I can finally load my map with my models, huzzah!

One final problem seems to remain though, I can walk around and interact with my models, but if I open up the in-game map none of my models are displayed. Is there some setting I need to change to get these to show up on the game's map?

Share this post


Link to post
Share on other sites

you need to give it an in game image line of code like the square with a question mark most objects have in editor sorry cant show you as i have no hard drive left with an example on.

glade you got it up and running mate now comes the hard part the of months of work to get it how you want it.

Share this post


Link to post
Share on other sites
if I open up the in-game map none of my models are displayed. Is there some setting I need to change to get these to show up on the game's map?

Take a look at the "map=" named properties Wiki info HERE

Pick the most suitable one and add it as a "map=whatever_you_chose" Named Property in the GeoLod of your model...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Sorry about the delayed response, was out of town all weekend. That works perfectly, thanks for the help Bushlurker! Is there a way to get the displayName of the model to show up when I mouse over the objects that are created from that map named property? Or will I need to label each of the buildings in the in game editor?

Share this post


Link to post
Share on other sites

Getting a little out of my depth now.... ;)

displayName = "Name Of Thing";

should be in your object config class definition and will show up in the in-game editor if you set up the rest of that stuff correctly in the config, but for the "DisplayName" to actually show on map mouseover.... eeeh.... someone correct me if I'm wrong, but you might have to class your object as "House" to get that to work.....

...well - stuff classed as "house" shows the displayName on mouseover... whether there's other classes that also do, or whether there's another way to achieve it, I'm not sure...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

For most of the models I want this to display on, the "house" class would be fine. It sounds like you got it to work for stuff classed as house, it does not work for me though, is there something I am missing in the config?

Snippet from my warehouse config:

class cfgVehicles
{
   class HouseBase;
   class House : HouseBase{};

   class Warehouse : House
    {
       displayName = "Armory";
       icon = "\ca\misc2\data\Icons\guardshed_ca.paa";
       mapSize = 10;
       model = "\Warehouse\Warehouse.p3d";
       scope = public;
       vehicleClass = "Warehouse";
    };
};

Share this post


Link to post
Share on other sites

class cfgVehicles
{
   class HouseBase;
   class House : HouseBase
    {
       class DestructionEffects;
    };

   class [color="#FF0000"]Land_[/color]Warehouse : House
    {
       displayName = "Armory";
       icon = "\ca\misc2\data\Icons\guardshed_ca.paa";
       mapSize = 10;
       model = "\Warehouse\Warehouse.p3d";
       scope = public;
       nameSound = "house";
       accuracy = 0.2;
       armor = 200;
       destrType = "DestructBuilding";
       vehicleClass = "Warehouse";
    };
};

should work.....

I'd suggest you take a look inside any competently-made buildings pack... any of Mondkalbs Building packs, for example... you can unbin the config and take a look...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

I'd suggest you take a look inside any competently-made buildings pack... any of Mondkalbs Building packs, for example... you can unbin the config and take a look...

For some reason I made the assumption that those files were encrypted but we all know what happens when you assume things. Wouldn't hurt to look at these anyways to help refine my configs lol.

Share this post


Link to post
Share on other sites

If you wanted to look inside the models themselves - which WILL be "binarized/encrypted" then you'd need to ask the author themselves, but config.bins can be "derapified/unencryped" easily enough - with Mikero's "Eliteness" for example, and it's perfectly legit to take a look for learning purposes...

We all spend a lot of time looking at BI's configs to see how they do stuff... that's fine, and it's a completely different matter from copying the models themselves - which IS breaking the rules...

Sometimes of course, it'd be REALLY helpful to see inside a BI model - to see all those tricky "map=" properties and all that confusing stuff actually in-place in a working model...

Unlocked Arma 2 models are a little thin on the ground, but BI DID release a huge amount of Arma 1 models in unlocked mlod form...

You can get those HERE...

Grab the "environments models" pack and - READ THE EULA!

Then take a look at some of the buildings models... you should find properly set up and working examples with ladders, doors... all the tricky stuff...

Great learning material... and perfectly legitimate to use - WITHIN ARMA 2 PROJECTS only...

What's not included is textures, config.cpp's or model.cfg's... you'll need to research those separately...

*edit*

I'll just correct myself before someone else does... ;)

config.cpp's and model.cfg's are included with the Arma 1 sample models...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Thanks man! This will be extremely useful, these sample models alone will keep me busy for quite awhile. I have been avoiding doors...animations in general for that matter, will be good to have some resources on that as well as the configs. I appreciate all the help, I would have been totally lost otherwise lol.

Edited by Pilinir

Share this post


Link to post
Share on other sites

Yes...

The Sample Models are hugely useful...

As far as things like basic buildings, walls, fences, huts etc are concerned, virtually nothing has changed models-wise since Arma 1, so they're still very relevant as examples. Doors, windows, ladders, stairs - they all work in exactly the same basic way in the model itself...

The one thing that HAS changed which you must be aware of for this sort of class of objects, and which confused us all a little in the early A2 days, we've already covered in this thread... that "Land_" prefix I added at the beginning of your Warehouse class definition... remember...?

In a nutshell...

If your building has any kind of animation - doors, ladders, windows, rotating satellite dishes - then....

The model itself MUST have the "class=house" named property

In it's config entry, it MUST inherit from "House" (but see ** below)

It's classname MUST be prefixed by "Land_"

The rest of the classname should be IDENTICAL to the actual .p3d modelname

ie:

class Land_MyNewHouse: House

model= \in\my\new\folder\mynewhouse.p3d;

For specific detailed modelling questions you're probably usually best asking in the dedicated "O2 Modelling" thread, but there are occasional weirdnesses like the above which you need to be aware of - purely for models destined to be embedded IN a terrain, as opposed to stuff which is placed ON a terrain later, via the editor, for example...

**

(Told you I was a little out of my depth here ;))

I've just been informed by Synide (who does know about these things), that - technically, you don't have to inherit from "House", but you do have to inherit from a CfgVehicles class that has the class attribute/property... simulation="house";

Thanks to Sy for that additional info...!

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

Heh well... looks like I have a lot to learn yet, at least I think I have the basics down now. I was just about to ask for clarification on the "Land_" prefix, thanks for clearing that up for me, its one of those things that looks like its easily missed, but is critical for success. I obviously still have lots of questions but it looks like most, if not all of them can be answered by breaking down these sample models. Thank you all for the help getting started on this, now its time for the fun part!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×