Page 1 of 2

Adding props as playable units

Posted: Mon Nov 24, 2008 8:20 pm
by Fiodis
Does anyone know how to add a clone sniper's autoturret as a playable unit? I've seen it done before, not sure what map.....might've been an early version of WGO v. SotG, not sure.

Re: Adding props as playable units

Posted: Mon Nov 24, 2008 9:15 pm
by Culvar
Change the MSH call.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 3:34 pm
by DarthD.U.C.K.
eh, thats not so easy
if you give it a weapon, it would search for the hp_weapons as example, which are not included in the autoturret
you could look into dann boeings assets, he used other droids as units too

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 4:00 pm
by bokkenblader56
Couldn't that be solved by not giving a weapon any geometry?

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 4:14 pm
by Maveritchell
DarthD.U.C.K. wrote:eh, thats not so easy
Yeah, it really is that easy. As long as you (like the post above mine mentions) don't have any weapon geometry, you're going to be fine just using a plain 'ol mesh as a unit.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 4:30 pm
by Fiodis
Alright, but how do you delete weapon geometry and change the MSH call?

What is a MSH call?

Oh, and I've remembered: the map was an early version of WGO v. SotG; and also I remembered that the GO-TO droid in the Convo Pack's KotOR Tantive IV Hunt mode is also pretty much the same shape.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 4:40 pm
by Maveritchell
This is G0-T0's .odf:
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rvs_inf_default"
GeometryName = "goto.msh"

[Properties]
//Label = "R2D2"

GeometryName = "goto"
ExplosionName = "rvs_t3_exp"
MaxHealth = 1000.0
//MaxShield = 200.0
//AddShield = 8.0
SetAltitude = 0.0

ImmuneToMines = 1

//PointsToUnlock = 12

Forcemode = 1

ExplosionName = "rvs_t3_exp"
HealthType = "droid"

ChunkFrequency = 1.0

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "ffx_weap_inf_grenadethermal"
ChunkNodeName = "dummyroot"
ChunkTerrainCollisions = "1"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = ""
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "ffx_weap_inf_grenadethermal"
ChunkNodeName = "dummyroot"
ChunkTerrainCollisions = "1"
ChunkTerrainEffect = "dirtspray"
ChunkTrailEffect = ""
ChunkPhysics = "FULL"
ChunkOmega = "4.0 4.0 4.0"
ChunkSpeed = 8.0

NoEnterVehicles = 1

//VehicleType = "light"

MapTexture = "troop_icon"
HealthTexture = "HUD_com_probedroid_health_icon"
MapScale = 1.0

MapViewMin = 50
MapViewMax = 50
MapSpeedMin = 0
MapSpeedMax = 100

ForceMode = 1

CollisionScale = 10.0

EnergyAutoRestore = 1.7

ScanningRange = 30.0
TransmitRange = 300.0

Acceleration = 25.0
Deceleration = 3.0
Traction = 22.0
ForwardSpeed = 3.5
ReverseSpeed = 3.5
StrafeSpeed = 0.25

SpinRate = 1.5
TurnRate = 1.5
TurnFilter = 5.0
PitchRate = 2.0
PitchFilter = 5.0
BankAngle = 0.0
BankFilter = 0

EyePointOffset = "0.0 0.5 0.0"
TrackOffset = "0.0 -0.25 1.8"
TiltValue = "5.0"

DestructTrackOffset = "0.0 0.0 18.0"
DestructTiltValue = "10.0"
DestructChargeEffect = "com_sfx_weap_remotedroidcharge2"

PitchLimits = "-50.0 50.0"
YawLimits = "-0.0 0.0"
AimerPitchLimits = "-90 90"
AimerYawLimits = "-90 90"

WEAPONSECTION = 1
WeaponName = "rvs_weap_inf_goto_blaster"
WeaponAmmo = 0

WEAPONSECTION = 2
WeaponName = "rvs_weap_shock_arm"
WeaponAmmo = 0
WeaponChannel = 1

WEAPONSECTION = 3
WeaponName = "rvs_weap_inf_fusioncutter"
WeaponAmmo = 0



AISizeType = "SOLDIER"

AmbientSound = "remotedroid_engine_lp"
Ambient2Sound = "remotedroid_radio"
HurtSound = ""
DeathSound = ""

CAMERASECTION = "STAND"
EyePointOffset = "0.0 1.4 0.0"
TrackOffset = "0.0 -0.25 3.6"
TiltValue = "10"

CAMERASECTION = "STANDZOOM"
EyePointOffset = "0.0 1.4 0.0"
TrackCenter = "0.0 1.4 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "CROUCH"
EyePointOffset = "0.0 1.4 0.0"
TrackOffset = "0.0 -0.25 3.6"
TiltValue = "10"

CAMERASECTION = "CROUCHZOOM"
EyePointOffset = "0.0 1.4 0.0"
TrackCenter = "0.0 1.4 0.0
TrackOffset = "0.4 0.05 2.8"
TiltValue = "3.5"

CAMERASECTION = "SPRINT"
EyePointOffset = "0.0 1.4 0.0"
TrackCenter = "0.0 1.4 0.0
TrackOffset = "0.0 -0.25 4.2"
TiltValue = "10.0"
CameraBlendTime = "0.5"

// Movement defaults
// These are values for an average class - some soldiers will override these
MaxSpeed = 7.0 // base forward speed
MaxStrafeSpeed = 5.25 // base right/left speed
MaxTurnSpeed = 5.0 // base turn speed
JumpHeight = 0.00 // base jump height in meters
// Speed multipliers for various actions
JumpForwardSpeedFactor = 1.0 // boost forward part of velocity by this factor when jumping
JumpStrafeSpeedFactor = 1.0 // boost side/backward part of velocity by this factor when jumping
RollSpeedFactor = 1.0 // in forward arc, boost speed by this factor when rolling
// Apparently contant for all or most classes:
Acceleration = 70.0 // accelerate to full run in about 7/70 = 0.1 seconds
SprintAccelerateTime = 0.35 // accelerate from run to sprint in this time

// ControlSpeed = "<stance> <thrustfactor> <strafefactor> <turnfactor>"
// For grounded states (stand, crouch, prone, sprint) and jet state,
// in which the thrust/strafe stick controls the player's velocity,
// these values are multipliers on the max speed and acceleration.
// For flying states (jump, roll, tumble), in which the thrust/strafe stick
// applies an acceleration, these values only multiply the acceleration.
ControlSpeed = "stand 1.00 1.00 1.00"
ControlSpeed = "crouch 1.00 1.00 1.00"
ControlSpeed = "prone 1.00 1.00 1.00"
ControlSpeed = "sprint 1.50 0.50 0.35"
ControlSpeed = "jet 0.30 0.30 1.00"
ControlSpeed = "jump 0.00 0.00 0.00"
ControlSpeed = "roll 0.00 0.00 0.00"
ControlSpeed = "tumble 0.00 0.00 0.00"

// Energy bar defaults
EnergyBar = 120.0 // Max energy
EnergyRestore = 10.0 // energy regained per second if moving
EnergyRestoreIdle = 15.0 // energy regained per second if not
EnergyDrainSprint = 20.0 // energy spent per second of sprinting
EnergyMinSprint = 20.0 // min energy to start sprinting
EnergyCostJump = 0.0 // energy cost to jump
EnergyCostRoll = 0.0 // energy cost to roll



\\\\\\\\\\\\ Collision \\\\\\\\\\\\\\

BuildingCollision = "p_buildingsphere"
VehicleCollision = "p_buildingsphere"
OrdnanceCollision = "p_sphere"
SoldierCollision = "p_sphere"[/code]
You'll note that he doesn't need any special animations, but you'll also note that several movement values were edited so that things like "crouch" or "roll" don't look too weird. All you need to do to have no geometry for your weapon is either to have the GeometryName = "" or just not have the line there at all (a la "force powers").

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 5:28 pm
by Grev
Or you could replace the remote droid .msh and remove acceleration/ movement capabilities. Thats by far the simplest solution.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 5:32 pm
by Fiodis
Replace it with what?

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 5:35 pm
by Grev
The remote droid: Replace its .msh with the turret .msh, and remove the moving section or place all the stats as zero. Except the entier idea I think is bad, because that leaves your character vulnerable to attack, unless you want just a turret as a unit.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 5:59 pm
by Maveritchell
Grev wrote:Or you could replace the remote droid .msh and remove acceleration/ movement capabilities. Thats by far the simplest solution.
How is that simple? That doesn't make a playable unit and it's basically the exact same thing that he's been told to do already (except what he's already been told to do is for a unit, not a dispensable vehicle).

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 6:08 pm
by obiboba3po
can i switch the question around? is it possible to make playable units props? (or vehicles?) i tried putting a vehicle msh in a prop odf and it didnt work...

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 6:33 pm
by Maveritchell
You can switch the question around but that's also hijacking the topic. The answer is yes, you can, and often it'll have to be an animated prop (look it up).

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 6:48 pm
by Grev
Maveritchell wrote:
Grev wrote:Or you could replace the remote droid .msh and remove acceleration/ movement capabilities. Thats by far the simplest solution.
How is that simple? That doesn't make a playable unit and it's basically the exact same thing that he's been told to do already (except what he's already been told to do is for a unit, not a dispensable vehicle).
Isn't the question how to make a clone snipers auto turret playable? And doesn't that make it playable?

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 6:56 pm
by Maveritchell
Grev wrote:Isn't the question how to make a clone snipers auto turret playable? And doesn't that make it playable?
Fiodis wrote:Does anyone know how to add a clone sniper's autoturret as a playable unit?
Yes, it does, but it doesn't address the original question, and it's not any easier or harder to do it that way, so it's just potentially confusing to the OP.

There seems to be a lot of confusion about making unanimated meshes (or meshes without skeletons) playable; e.g. "OMG I just got R2 playable!" The truth is there's nothing difficult about it, you just set the GeometryName in the unit's .odf to be whatever geometry you want. You're not going to have issues when you're setting that geometry to something simpler, like a model without any skeleton (i.e. a prop). The only time switching unit models can get tricky and cause animation problems is when the model being switched to is more complicated or has a different skeleton, like trying to use a clone trooper with Grievous's animations.

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 7:04 pm
by Grev
So just as a sidenote, this could be used to make pushable objects right?

Re: Adding props as playable units

Posted: Tue Nov 25, 2008 7:11 pm
by Maveritchell
Grev wrote:So just as a sidenote, this could be used to make pushable objects right?
Yep, this is really the only way to do it. Make a bunch of "props" as units, put them on a local team, and force spawn them to whatever locations.

Re: Adding props as playable units

Posted: Thu Nov 27, 2008 12:06 pm
by Fiodis
Well, I suppose for now I'll just edit the recon droid's tga and give it infinite fuel. I'll try that Geometry trick on a later model; despite what Maveritchell says, it sounds complicated, even if it's not.

Well, thanks for the help!

Re: Adding props as playable units

Posted: Thu Nov 27, 2008 1:32 pm
by DarthD.U.C.K.
fuel??
an unit doesnt have fuel

@maveritchell: wow, i didnt know that :o

and its not complicated, maveritchell even posted an odf-reference

Re: Adding props as playable units

Posted: Thu Nov 27, 2008 1:35 pm
by Fiodis
Well, then, I'll try it.

And if not "running out of fuel", what else would you call it when your energy drains if you're a recon droid? I always thought of that as fuel.