Jump to content
Sign in to follow this  
icebreakr

[Solved] Converting OFP model - Bulldozer works, ingame CTD

Recommended Posts

Thanks for the "todo" list Synide, really great. I've rechecked, everything is as you've said. Its inheriting House class that is basically:

class HouseBase;

class House: HouseBase

{

class DestructionEffects;

};

Will try again if it works now, recompiled the island.

Hmmm, while inheritance is often an issue with people's config's in your particular case it may not be. It depends whether or not you are defining

ladders[] = ....;

in your buildings' config class or not.

If you are defining it in your class then any previous inheritance value for ladders[] will be irrelevant to the engine irrespective of whether you actually had your buildings' inheritance setup correctly or not.

On the other hand if you are not defining ladders[] in your buildings' class then it's inherited value will be of importance.

For the purposes of your problem we only need to be interested in where you have ladders[] defined (or not defined as the case may be).

Seeing your config.cpp would help.

Although you've checked, perhaps you have a name-mismatch 'tween the ladder names start/end points in the config & the MemLoD... Have you triple checked it?

Sometimes when working on stuff one often is staring directly at some blatant error and missing it... I'd suggest firing the lot of to a mate for a look... they might see what you're missing.

Also, where in relation to the ladder you have modelled in the ResLoD's is your start/end points in your MemLoD - Just out of curioisity.

Often I've seen peoples buildings with ladders and they've just slapped a start/end point 'somewhere near the ladder' and when you use it in-game the characters climbing anim means his hands are hitting every gap between the ladder rungs or his forearms are sticking into the wall etc. Looks at bit yuck.

Oh, and also... if your buildings' class inherits from class House; you only need to forward reference this class... not class HouseBase as well. In inheriting you only need to forward reference the class your inheriting from.

Eg.

If somewhere else in the system is defined...

class HappyFeet {
  NoOfWidgets = "30";
  class InstantNoodles {
      HasLargeShoes = true;
  };
};

... and in your config you wanted your class to inherit from 'HappyFeet' and override the NoOfWidgets value only then you'd have...

class HappyFeet;

class MyFeet : HappyFeet {
   NoOfWidgets = "17";
};

If however, you wanted to override 'HasLargeShoes' in HappyFeet's subclass 'InstantNoodles' you have to forward reference it as well...

class HappyFeet {
   class InstantNoodles;
};

class MyFeet : HappyFeet {
   NoOfWidgets = "17";
   class InstantNoodles : InstantNoodles {
        HasLargeShoes = false;
   };
};

Edited by Synide

Share this post


Link to post
Share on other sites

I had a problem the other day with a viewtower's ladder. The "start" memory point was too low compared to the ground level (it was sometimes under the ground, depending on the island topology), and thus the action menu didn't appear.

Share this post


Link to post
Share on other sites

4th day.... still no luck. :/ did everything as you told me, Synide. Any more clues? I absolutely hate this undocumented crap...

Share this post


Link to post
Share on other sites
4th day.... still no luck. :/ did everything as you told me, Synide. Any more clues? I absolutely hate this undocumented crap...

Oh dear... hmmm... would you like to send me your model, config, model.cfg, last build.log.

synide at rocketmail dot com

Share this post


Link to post
Share on other sites

Sent. Tnx, lemme know if you find what is causing the crashing & non working ladder. I even got proxies to show in game at one time, but I think I lost that modificated p3d :/

Share this post


Link to post
Share on other sites

Yes, it is.

ladderclimb.jpg

Edited by IceBreakr

Share this post


Link to post
Share on other sites

double, tripple check that the config is correct when you binarize.

A tip, name it different, like "Ice Hotel". It should say Ice Hotel in the editor when you put the mouse over the object. Otherwise the "config" isn't used.

What you mean with "texture format"?

Share this post


Link to post
Share on other sites

Ahh... ok, made it work now.

I had to make an export to BIS TXT and reimport.

Pic:

airportice.jpg

... but it does(!) display name of the object on the map Granq, so config *is* used. Dunno why ladder is not working. I'll try to figure it out now.

p.s. any tutorials how to add a simple new 3d text to O2? :]

Edited by IceBreakr

Share this post


Link to post
Share on other sites

Hi Icebreakr

Don't know if this will help you any, but found it on the wiki

VIEW Geometry

This LOD is used for AI view occlusion – what can the AI soldier see. It is also used for occlusion detection for scene drawing optimisation.

WARNING: If there is no component in view or fire geometry, players cursor will be not able to activate action menu (for example climb ladder)

Share this post


Link to post
Share on other sites

Hi IceBreaker,

Had a quick look at the model. Been a long time since I've seen that OFP model. Memory is a bit gray... was it always that size? Did you add some cubic meters of poly's to it? Perhaps it was that size originally... dunno.

Of the stuff you sent... In your config you have...

ladders[]={{"Start1","End1"}};

In the main models MemLoD you have...

ladder_start
ladder_end

... as the point names. Altering these to match did not get it to work. But nevertheless they should match.

Was this model always that big? S'Been a long time since I've seen that OFP Airport. And, did it always have that many proxy's? Or, did you add a whole lot more?

Personally, I've always made it a rule to not proxy in user-interation model portions.

As a quick test... I re-integrated your ladder proxy into your main model, correctly sync'd up the ladder start/end point names with the config.

Re-built... result = Ladder didn't work.

Then I sliced your main model in two deleting the portion that didn't include the ladder. The intention being to 1. reduce the linear dimensions to under 50m and 2. to reduce the number of proxied objects present in the main model.

Re-built... result = Ladder worked.

So, I'd suggest that you split the 'ibr_terminal.p3d' into 2 portions. And, don't proxy in your ladders.

Cheers, Sy.

PS. Oh, btw I'd go through all those proxy models and fix up all the point/face properties & user values. They should all be 'Normal' and Uservalue 0 in all LoD's.

Edited by Synide

Share this post


Link to post
Share on other sites

Thanks, you've been a great help.

Yes, its the original size. Ahh, spliting it up could be a bit problematic for my O2 knowledge :) Will see what I can do. I might even add a ramp instead of ladder, much easier heh :) and there's a "non functional" staircase with locked doors, might use that. I've sent u a working version.

Edited by IceBreakr

Share this post


Link to post
Share on other sites

Ok, it seems I have something wrong with my island.

Synide sent me his tweaked version and told me that is works on a empty map. I also noticed that if I put this building down in in-game editor the ladder WORKS(!?). So, I need to figure out why this building ladder doesn't work when I put it down via visitor3 as a part of map.

Day 6. :)

Edited by IceBreakr

Share this post


Link to post
Share on other sites

Ok, perhaps you could send (or post) your build.log for your island. Binarize.exe needs to collate lots of info regarding island placed models. So, perhaps it's not finding what it needs when your doing your build.

Share this post


Link to post
Share on other sites

After 6 days finally....

ladderworks.jpg

Synide: guess what I did - I just moved p3d to a new folder (p:\ibr\ibr_airport) and made a new config (same as in old config!). I even left textures and proxies in old folder... works! Cannot believe it. Damn undocumented stuff, drives me crazy and I lost a week....

Share this post


Link to post
Share on other sites

Already did that days ago. Tnx.

Mods, please add [solved] to the topic start name.

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  

×