Jump to content
Sign in to follow this  
gagagu

HELP - My Ship don't move

Recommended Posts

Hi,

im in the beginning of learning how to make a Ship for ARMA 3. I've taken a look into some tutorials.

I've found a good tutorial for ship making here: http://ofp.gamepark.cz/_hosted/brsseb/tutorials.htm (but only for Arma 2).

I've taken the model from the gunboat tutorial and changed the proxies to existend models in arma 3. Then i've copied a Arma 3 boat and changed some names, and options for the gunboat.

In Arma the gunboat is visible and i can enter it as driver (yes baby....), the driver is visible too (year !!), but when i will control the boat it doesn't move :(

(This is not really correct, it moves only 1 mph or kmh.)

Hopefully someone can help me?

Here is my (not really my) code (it is copied from another original arma 3 boat, i am at the beginning to understand line by line but i'm not good enought to delete not needed lines, now):


#define _ARMA_

//ndefs=13
enum {
destructengine = 2,
destructdefault = 6,
destructwreck = 7,
destructtree = 3,
destructtent = 4,
stabilizedinaxisx = 1,
stabilizedinaxesxyz = 4,
stabilizedinaxisy = 2,
stabilizedinaxesboth = 3,
destructno = 0,
stabilizedinaxesnone = 0,
destructman = 5,
destructbuilding = 1
};

class CfgPatches 
{	class GA_Ships
{
	units[] = {"gunboat"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Boat_F"};
}
};


class CfgVehicles
{
class Ship;
class GA_Ship_F: Ship
{
	class ViewPilot;
	class AnimationSources;
	class Eventhandlers;
};

class gunboat: GA_Ship_F
{
	mapSize = 7.51;																			
	author = "gagagu";
	_generalMacro = "Boat_Civil_01_base_F";
	class Library																			
	{																						
		libTextDesc = "ToDO";																
	};
	displayName = "gunboat";																
	model = "\gunboat\gunboat";																
	picture = "\A3\boat_f_gamma\Boat_Civil_01\data\UI\portrait_civilian_boat_CA.paa";		

	Icon = "\A3\boat_f_gamma\Boat_Civil_01\data\UI\map_civilian_boat_CA.paa";				
	scope = 2;										
	side = 3; 										
	faction = "CIV_F";
	crew = "C_man_1"; 								
	typicalCargo[] = {"C_man_1"}; 					
	vehicleClass="Ship"; 							

	cost = 20000;									
	accuracy = 0.5;									

	supplyRadius = 3;
	precision = 15;
	steerAheadSimul = 0.5;
	steerAheadPlan = 0.35;
	predictTurnPlan = 0.8;
	predictTurnSimul = 0.6;
	brakeDistance = 5.0; 
	acceleration = 15;
	turnCoef = 0.75;
	maxSpeed = 100;
	simulation = "shipx";
	thrustDelay = 0.2;
	overSpeedBrakeCoef = 0.2;
	enginePower = 1085;
	engineShiftY = -0.1;
	waterLeakiness = 55.5;
	waterLinearDampingCoefY = 5;
	waterLinearDampingCoefX = 2.0;
	waterAngularDampingCoef = 1.2;
	waterResistanceCoef = 0.015;
	rudderForceCoef = 0.3;
	rudderForceCoefAtMaxSpeed = 0.02;
	idleRpm = 200;
	redRpm = 1200;	
	class complexGearbox						
	{
		GearboxRatios[] = {"R1",-0.782,"N",0,"D1",2.0,"D2",1.85,"D3",1.75};
		TransmissionRatios[] = {"High",1.0};
		gearBoxMode = "auto";
		moveOffGear = 1;
		driveString = "D";
		neutralString = "N";
		reverseString = "R";
	};			

	driverAction = "driver_mid01";
	driverLeftHandAnimName = "drivingWheel";
	driverRightHandAnimName = "drivingWheel";
	cargoAction[] = {"passenger_low01"};
	cargoIsCoDriver[] = {0};					
	ejectDeadDriver = 1;						
	transportSoldier = 5;						
	armor = 10;
	damageResistance = 0.00882;
	class Turrets{};
	attenuationEffectType = "OpenCarAttenuation";
	insideSoundCoef = 1;

	extCameraPosition[] = {0,1.0,-8.0};
	leftFastWaterEffect = "LFastWaterEffects";
	rightFastWaterEffect = "RFastWaterEffects";
	waterEffectSpeed = 5;
	engineEffectSpeed = 5;
	waterFastEffectSpeed = 28;

};
};

Edited by gagagu

Share this post


Link to post
Share on other sites

I haven't a clue of how to help you I made this account because I discovered an Easter egg in one of the showcases that requires me to message a moderator so... yeah I hope you get some help in the project looks like it'll be good when its finished :)

Share this post


Link to post
Share on other sites

Thx,

I hope someone can help me?

Some sample models from BI would be great, the existing are from arma 2 and not really workingß anymore.

I can zip and upload my boat if someone are want to help to find the error.

Edited by gagagu

Share this post


Link to post
Share on other sites

I am actually in the same boat ;-)

Seriously though, I have the same issue. My engine starts and then stops right away again.

I am going to have a look again tonight after having a break from it for a few days.

Will let you know if I get anywhere as one of the guys on the skype channel gave me some good leads.

Seems the focus needs to be on the memory lods, but as always its information that we need to dig out and find the hard way through trial and error, as nothing has come from BI yet.

---------- Post added at 20:22 ---------- Previous post was at 19:43 ----------

I am actually in the same boat ;-)

Seriously though, I have the same issue. My engine starts and then stops right away again.

I am going to have a look again tonight after having a break from it for a few days.

Will let you know if I get anywhere as one of the guys on the skype channel gave me some good leads.

Seems the focus needs to be on the memory lods, but as always its information that we need to dig out and find the hard way through trial and error, as nothing has come from BI yet.

EDIT:

This is as far as I have got:

lkNiDJW6bYc

Share this post


Link to post
Share on other sites

Read this: http://dev.arma3.com/sitrep-00033

"Primarily included in this first iteration are new versions of packing tools (new binarization for all the PhysX LODs e.g. / new config conversion with the new method of using arrays and all the current functionality). There also will be a new version of Oxygen 2, supporting PhysX and buoyancy LODs, together with some nice samples of models with commented configs. Visitor will not yet be added."

Share this post


Link to post
Share on other sites

Hi,

great. Then i will wait until the new tools and samples are release.

I'm thinking about to make some boats for arma. I think we need some more ships and i have some seabattles from bf1942 in my mind :-)

Share this post


Link to post
Share on other sites

I have exacly same problem with my humvee, almost working - but wont move :(

Share this post


Link to post
Share on other sites

may be a developer could help, or do we need to wait for the new tools?

thx forward

Share this post


Link to post
Share on other sites

you need the new tools...

there is no floating LOD / propper phyx tools

look for the 33th sitrep.

tools still tba comming maybe before the next campain part

Share this post


Link to post
Share on other sites

gotta make sure you use the proper "simulation = " inside the config. As PhysX isn't really usable at this point, it'll be ship, not shipx

Share this post


Link to post
Share on other sites

Firstly, you can work with the PhysX stuff just fine with the current O2. It does require entering some LOD ID's correctly, and you can not bin with the old tools. If you are planning on running things under PhysX, I highly recommend playing around with things. Big differences in how things behave between the simulation classes.

Anyway, regarding the non-moving boat in the OP, assuming you have the correct LODs in place (PhysX GEO = 2e+013, PhysX Buoyancy = 4e+013), do you have mass assigned in the GEO LOD? And how much?

Another kind of important part of this is having the effect points placed and configured properly. An image for illustration purposes.

Relative config entries: (excuse the less than logical naming)

memoryPointsLeftWaterEffect = "engineeffectl";
memoryPointsRightWaterEffect = "engineeffectr";

Hope it helps.

Share this post


Link to post
Share on other sites

Hi,

thx for your help Hatcher_AS. I will test it out and post the result.

Greets

Share this post


Link to post
Share on other sites
....snip....

Yeh, OK, reverse engineering again.

I had stupidly hoped a BI rep had updated a BIKI somewhere ..........

Share this post


Link to post
Share on other sites

Hi,

i've added the Physx Lods into my model and placed the memory namings for the water effect. Then i've changed the simulation="ship" in the .cpp file, and removed some lines from the cpp file (sound, hitpoints, ... will add them later again). Now i't working, i's swimming and moveable !!!!

Many thx to all, specially to Hatchet_AS !!!

I will test out many more and at the end i will make a small tutorial with included sources on my site.

Here is my config.cpp:

#define _ARMA_

//ndefs=13

enum {

destructengine = 2,

destructdefault = 6,

destructwreck = 7,

destructtree = 3,

destructtent = 4,

stabilizedinaxisx = 1,

stabilizedinaxesxyz = 4,

stabilizedinaxisy = 2,

stabilizedinaxesboth = 3,

destructno = 0,

stabilizedinaxesnone = 0,

destructman = 5,

destructbuilding = 1

};

class CfgPatches

{ class GA_Ships

{

units[] = {"gunboat"};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"A3_Boat_F"};

}

};

class CfgModels

{

class Default{};

class Ship : Default{};

class gunboat: Ship{};

};

class CfgVehicles

{

class Ship;

class GA_Ship_F: Ship

{

class ViewPilot;

};

class gunboat: GA_Ship_F

{

mapSize = 7.51; // Used for the map editor to show the icon associated with this model class. (in meters)

author = "gagagu";

_generalMacro = "Boat_Civil_01_base_F";

class Library // This TokenName is associated with the library class of a vehicle (if any).

{ // It is used to give a 'memo' style full screen info on the given object

libTextDesc = "ToDO";

};

displayName = "gunboat"; // For instance when pointing your men to an object while in a mission, it is this displayName that is used

model = "\gunboat\gunboat"; // Location in the addon where the p3d model resides.

picture = "\A3\boat_f_gamma\Boat_Civil_01\data\UI\portrait_civilian_boat_CA.paa"; // is used in config.cpp to display the 128 x 64 graphic file of the unit in the HUD and the bottom of the screen while in game.

// A .pac file can be used also. If using a .pac make your alpha channel pink - RGB 255,0,255. Pink is invisible in .pac file.

Icon = "\A3\boat_f_gamma\Boat_Civil_01\data\UI\map_civilian_boat_CA.paa"; // This value us used by the map editor to show the building or vehicle when editing. The icon can be any jpg, paa, or pac file

scope = 2; // class type: 0=private, 1= protected, 2= public

side = 3; // 0 = east, 1 = west, 2 = guerilla, 3= civilian, 4 = neutral , 5 = enemy, 6= friendly, =7 = logic, -1= no side

faction = "CIV_F";

crew = "C_man_1"; // Reflects whether vehicle is manned, and what with.

typicalCargo[] = {"C_man_1"}; // preloads vehicle with units. Classname of soldier http://forums.bistudio.com/showthread.php?147694-ArmA3-Classnames-no-discussions

vehicleClass="Ship"; // Used for Mission Editor basic category selection

cost = 20000; // This value reflects the attractiveness of the target to the enemy AI

accuracy = 0.5; // accuracy defines how hard it is for the AI to recognise the correct class of a unit. But even if it can't recognise the correct class it can still recognise it as an enemy and engage it.

memoryPointsLeftWaterEffect = "engineeffectl";

memoryPointsRightWaterEffect = "engineeffectr";

leftEngineEffect = "LEngEffectsSmall"; // http://community.bistudio.com/wiki/Arma_3_Particle_Effects:_Config_Parameters#Parameter:_leftEngineEffect_.2F_rightEngineEffect

rightEngineEffect = "REngEffectsSmall"; // http://community.bistudio.com/wiki/Arma_3_Particle_Effects:_Config_Parameters#Parameter:_leftEngineEffect_.2F_rightEngineEffect

supplyRadius = 3;

precision = 15;

steerAheadSimul = 0.5;

steerAheadPlan = 0.35;

predictTurnPlan = 0.8;

predictTurnSimul = 0.6;

brakeDistance = 5.0; // 50 by boat, may be how long it would take to brake ?

acceleration = 15;

turnCoef = 0.75;

maxSpeed = 100;

simulation = "ship";

thrustDelay = 0.2;

overSpeedBrakeCoef = 0.2;

enginePower = 1085;

engineShiftY = -0.1;

waterLeakiness = 55.5;

waterLinearDampingCoefY = 5;

waterLinearDampingCoefX = 2.0;

waterAngularDampingCoef = 1.2;

waterResistanceCoef = 0.015;

rudderForceCoef = 0.3;

rudderForceCoefAtMaxSpeed = 0.02;

idleRpm = 200;

redRpm = 1200;

class complexGearbox // http://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidelines#Complex_gearbox

{

GearboxRatios[] = {"R1",-0.782,"N",0,"D1",2.0,"D2",1.85,"D3",1.75};

TransmissionRatios[] = {"High",1.0};

gearBoxMode = "auto";

moveOffGear = 1;

driveString = "D";

neutralString = "N";

reverseString = "R";

};

driverAction = "driver_mid01";

driverLeftHandAnimName = "drivingWheel";

driverRightHandAnimName = "drivingWheel";

cargoAction[] = {"passenger_low01"};

cargoIsCoDriver[] = {0}; // This token declares which (if any) cargo positions are 'in the front' (Ie front windscreen)

ejectDeadDriver = 1; // eject if dead (ejectDeadCargo , ejectDeadGunner , ejectDeadDriver ,ejectDeadCommander )

transportSoldier = 5; // Number of 'passengers' this vehicle can carry.

armor = 10;

damageResistance = 0.00882;

attenuationEffectType = "OpenCarAttenuation";

insideSoundCoef = 1;

extCameraPosition[] = {0,1.0,-8.0};

leftFastWaterEffect = "LFastWaterEffects";

rightFastWaterEffect = "RFastWaterEffects";

waterEffectSpeed = 5;

engineEffectSpeed = 5;

waterFastEffectSpeed = 28;

hiddenSelections[] = {"camo","camo2"};

hiddenSelectionsTextures[] = {"\a3\boat_f_gamma\Boat_Civil_01\data\Boat_Civil_01_ext_co.paa","\a3\boat_f_gamma\Boat_Civil_01\data\Boat_Civil_01_int_co.paa"};

};

};

Share this post


Link to post
Share on other sites
i've added the Physx Lods into my model ..... changed the simulation="ship" ..... Now i't working, i's swimming and moveable !!!!

Its only moving because of simulation="ship"

The ArmA2 method

What Hatchet described is the PhysX / ArmA3 way, so you can use;

simulation = "shipX";

Share this post


Link to post
Share on other sites
Gnat;2557825']Its only moving because of simulation="ship"

The ArmA2 method

What Hatchet described is the PhysX / ArmA3 way' date=' so you can use;

[b']simulation = "shipX";[/b]

Yes you're right. With shipX the front of my boat is deep into water and the back of by boat is over water (nearly before sinking) and it doesn't move.

Share this post


Link to post
Share on other sites

Ok, that is a good sign if it is sitting uneven in the water. Need to go back and revisit the topic of 'MASS' assigned to the Geometry LOD. The basic concept/goal is to weight the vehicle accurately, so using my MkV as an example (image in higher post) you'll notice I have the 'center of mass' (the dark blue dot, with the X) about center vertically, and towards the rear of the vessel. This makes the vessel sit a little deeper aft when idle. What is important to note, is that the weighting is being applied to the Geometry LOD, but I balance the 'center of mass' around the shape of the PhysX GEO LOD.

What is also important to note is that the amount of weight you enter must counter the 'displacement' of the PhysX GEO LODs. I say LODs because I can't recall exactly if the Buoyancy LOD was actually responsible for that calculation. Either way, one of the PhysX LODs assumes a certain amount of displacement, and your total amount of mass must be balanced against that. So the MkV actually sits just right at it's actual real world weight of around 56,000kg.

Additionally the placement of the water effects is important. They must be below the waterline. Worth noting, if those memory points come out of the water in the simulation ... the engine will shut off (or wont turn on). These points are also where the 'thrust' is applied to the model. So there is a bit of a balancing act that can go on, depending on the speed/size of the vessel and relative weather conditions (eg.. 30 setWaves 1).

If you have the ability to post some images of things in O2, that is always helpful.

Edited by Hatchet_AS
grammatical

Share this post


Link to post
Share on other sites

Hi,

i've played a tittle around with your information but i don't got it. I've reading a little bit around in the http://community.bistudio.com/wiki/Oxygen_2_-_Manual oxygen manual and found this:

Used for physical collision detection Must contain also information about object MASS (gray boxes) and center of gravity (blue cross).

The model should be very simple, defining the basic model shape. Thinner parts than 15cm cannot collide in faster speeds. Better if the geometry is larger than the model shape.

CTRL+A select all. Use MASS dialog to assign total mass. If you want to move the center of gravity, select vertices and change their individual mass. Keep an eye on the “total mass†checkbox.

It is not a problem, if some components do not have any mass. The mass of the whole model is used for collision, gravity and momentum. BUT, the component will not be simulated, if it has no named selection set.

I've changed in vertrex mode the mass of the vertices to balance the model and not IT WORKS !!!!! :-)

juhu....great.....thanks....

It not perfect, i have a tittle bit to trim but thats the way.

Thank you all !

Edited by gagagu

Share this post


Link to post
Share on other sites

Hi,

i need your help again (sry for that). Now my ship is mooving and i want to implement a turret for a gun. I've made two selection (gun_elev and gun_trav) and some memory points (gun_elev_axis, gun_end, gun_beg, gun_trav_axis,gunnerview) in the sample gunboat (loaded from http://ofp.gamepark.cz/_hosted/brsseb/tutorials.htm). I've changed the model.cfg and config.cpp like mankyle posted in his sample model "lcs" does (http://forums.bistudio.com/showthread.php?157367-The-answer-you-were-waiting-for-carriers-are-possible-in-arma-3). On previewing my misssion (only spawn and boat) arma3.exe is crashing without any useful info in report file.

I've uploaded the filed here:

gunboat.zip

I do not understand how CfgSkeletons and Animations works. I've read the arma wiki but i do not really understand it. Following animations i want to make (step by step):

- gun (turret)

- propeller

- radar

- driver (steering wheel)

- custom animation like a ramp

and walking on boat (is not an animation but also a task on my list).

My plan is to make a complete sample ship with material, icons, and a couple of animations. At the ent i want to make a tutorial how to create it.

I want to have sea battles in arma like bf1942 :-)

THX all

Edited by gagagu

Share this post


Link to post
Share on other sites

Glad your ship is moving! I would jump in and help you with the config stuff, but honestly been a year or so since I really got into those things. Others around are probably much more able/capable of explaining these things clearly.

Everything you have listed is doable/reasonably easy, with exception to the 'walking on' part. I'm actively working on that, but it is not functional currently without mad sorcery. Hopefully if I get some attachments out this week I'll update the PhysX thread in the DEV branch forum, with my current test setup. Which has some valuable stuff in it. Probably be the weekend before I get to it though. Busy work week.

Share this post


Link to post
Share on other sites

Hi,

got it. If i deactivate the Binarize option in BinPBO then everything is working without crash.... strange :-)

Share this post


Link to post
Share on other sites

Not strange, you are using a binarize tool for Arma 2, which doesnt recognize those New lods.

Wait until the end of this week for the new tools for binarizing :)

Share this post


Link to post
Share on other sites
Not strange, you are using a binarize tool for Arma 2, which doesnt recognize those New lods.

Wait until the end of this week for the new tools for binarizing :)

ooooohhh i haven't read the latest SITREP. Thx.... i will wait.

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  

×