Jump to content
Sign in to follow this  
PSC

[question] motorcycle class

Recommended Posts

I've got a simple question about the motorcycle vehicle class. I'm working on that Speederbike-addon. You could say it's some kind of scifi motorcycle and should of corse use motorcycle class/simulation as vehicle behaviour. I've done all the necessary LOD's in OË› (at least I hope so, I've done 3 resolution LOD's, a memory LOD, a LandContact LOD, a Geometry and View Geometry LOD, a View Cargo LOD, and a hitpoints LOD). But when I create an addon with a config.cpp which declares the addon as motorcycle, it spins around like crazy. I gave the vehicle a lot of mass in the Geometry LOD, so that cannot be the problem. So what I assum is that I'm missing some vital selection names for vehicle axis (or something else) in the Memory LOD probably (or any other LOD). Therefor my question is: if someone knows about necessary selection names (in example for seat, wheels, front wheel/handlebar axis, etc....), could you then please post a brief list of them? I would try to find them out myself, but I dunno where I could get them. In the demo there was no motorcycle, and the vehicle.hpp does not include such information if I'm not wrong.

speeder2.jpg

Thanks in advance, PSC

Share this post


Link to post
Share on other sites

im not totally sure but there deffinately is a motorbike class in the full game. if you download the config file that the team released in one of them there is the motorcycle class... so obviously its in the game but the problem is as you say to get the correct lods onto the model.

and yes as the demo didn't have a motorbike its a lot harder to find out what lods are needed.

Share this post


Link to post
Share on other sites

Hmmm, motorcycle class is defined in configuration already for long time...

But it appears, the SIMULATION model is not implemented in published EXEs yet...

Maybe, necessary to wait for releasing of O*F:Resistance ...

Share this post


Link to post
Share on other sites

Someone posted an addon called bikesim or something like that, and it was just a jeep with the wheels removed on one side. It definately behaved like a motorbike, so I'm sure you could learn all you need from loading that model into O2 and studying it´s ccp.

GL

Konyak

Share this post


Link to post
Share on other sites

Thanks a lot to you guys, Rob, Alonewolf, Konyak-2. Hubba allready recommended to take a look into that config.cpp from the motorcycle addon. And indeed I already did. And it's definitely descended/derived (what word fits better in this case?) from a jeep. Here is a sample from the addon config.cpp:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">// OFP-Motorcycle Simulator ORGINAL

// By Black Baron

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Air: AllVehicles {};

class Plane: Air {};

class A10: Plane {};

class Cessna: A10 {};

class Land: AllVehicles {};

class LandVehicle : Land {};

class Car: LandVehicle {};

class SkodaHelper: Car {};

class Jeep: SkodaHelper {};

class JeepMG: Jeep {};

class OFP_cycle_SIM: JeepMG {

displayName="Motorcycle Simulator";

simulation="motorcycle";

crew=Civilian2;

icon="car";

nameSound="car";

};

<span id='postcolor'>

The class-hierarchy says it was a jeep. And I guess the importand part is where it says: <span style='color:red'>simulation="motorcycle";</span> if the addon really behaves like a motorcycle. So I probably should just open the jeep-model from the demo and use the selection name for wheels and steering-axis from the jeep. That would probably be the best way at the moment. But I guess aloneWolf is right and the "real" motorcycle-class is not really implemented yet.

But in general it is still a mystery for me how some of you guys found out the selection names for some ODOL models that were not in the demo. For instance Kegetys with his "Hawk" addon. The landing gear probably must have a special selection-name for the folding-axis and for the gear itself. How did you find out those names if you cannot open the models in OË›? Did you hexedit the stuff or did you just guess the names, because they must be kinda similar to other models selections that are available (for instance "kolo" for wheel, etc.)?

Till later, PSC

*edit

And besides. The jeep-motorcycle addon and class is made for a motorcycle with sidecar (it has driver and gunner positions). And not for a singe motorcycle.

Share this post


Link to post
Share on other sites

smile.gif Finally! With the help of the rough motorcycle addon by Kegetys as referrence I made it to import the speederbike into the game. This image I've cut out of a special evaluation-video taken after the construction of the Speederbike from a testdrive at a secret developement-facility in the desert. Actually it was quite risky to obtain that picture material:

speederingame.jpg

But as you can see it is still in some kind of betatest phase. I've found some problems I have to solve first, before I'll be able to release it.

Some of the problems are:

a) The resolution LOD's don't seem to work. I only get the highest detail LOD into the game. Due to that the shadow does not work as well (since it is generated from a less-detail LOD). The resolution steps at the moment are "0.000", "5.000", and "9.000". Probably they have to be exactly the same than at original motorcycle model. I'll try to find out if it is like that.

b) As you can see at the picture there is a grey plane at the end of the vehicle. It is my "clan" selection for custom logos. Actually it should be transparent and not grey if no logo is applied, but I'll try to find that out too.

c) The overall stability of the vehicle is quite bad (unstable). The hoover engine still need some fine-tuning to not spin around the vehicle like a rodeo-bull.

d) It seems to me as if you cannot define new values like speed in the config.cpp. At least the Speederbike does not accelerate faster than 120 km/h. Maybe this is the top-mark for motorcycle class and cannot be changed. In that case it would be difficult to fix (the speederbike should have a topspeed of 450 km/h). And the acceleration itself should be faster than at the moment as well (from 0 to 450 in 2 seconds, hehehe...). I'll try to experiment a bit with some values the config.cpp offers, but I'm not sure what I can alter to make it more "realistic" (if you ignore that the speederbike itself is not that much realistic).

e) And last but not least, the vehicle needs some custom sounds. But that should not be the biggest problem. I hope I can capture/record them from one of the original Star Wars movies (Part 6 to be more exactly).

Till later, PSC

Share this post


Link to post
Share on other sites

Add the "LodNoShadow" parameters with the value 1 to all the higher LODs (more than 300 faces) to get the shadow working.

The max speed cannot be increased from 120, nor can the acceleration be edited, so you propably are stuck with the slow vehicle... You could try adding "TerrainCoef=0" to the config.cpp, which should make it so that the terrain on which its driving on doesnt slow it down at all, but im not sure if that works with the motorcycle class.

Share this post


Link to post
Share on other sites

Ok, I was trying to find out why custom logos don't work, even if the selection is properly named. So I searched in an old topic and found this from Suma. The question was, are custom logos possible with MLOD:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Yes - but it need to be correctly registered in CfgModels config section. I am aware many of you (maybe all?) have problems with this section - I hope we will be able to tell you soon how exactly this should be done.<span id='postcolor'>

Ok. So I was looking into that cfgModels.hpp file from the commented config's. It seems to me as if there is some kind of class-hierarchy as well. For instance class Vehicles: default is the main class which defines some basic sections (like section "clan" for custom logo). class Car: Vehicles is a sub-class in the hierarchy from class vehicle: default. It has some extra sections. And so on...

Furthermore it looks like as if in the last paragraph of the cfgModels the official Update Addons are defined. To be exactly,  which class they belong to (for instance class Trabant: Car).

So I added a part like this to my config.cpp for the speederbike:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgModels

{

class Speederbike: Car {}

};<span id='postcolor'>

But when I start OFP I get an error message which says:

<span style='color:red'>speeder\config.cpp/CfgModels/: Undefined base class 'Car'</span>

What did I do wrong? I would apreshiate any suggestions.

Till later, PSC

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  

×