Creating a new building
#1
Posted 23 October 2011 - 10:13 PM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#2
Posted 23 October 2011 - 11:34 PM
Pay close attention and read everything carefully. I'll try to touch on the more important points.
I need somebody to tell me how to do Building animations.
Sentry towers typically have a very basic buildup anim. So, move the tower down to a point where the top is below the "surface". Then hit the "animate" button, (pictured above) and move the frame slider to a few frames before the last one. I usually go about 2-5 frames before. Depending on the anim length. Then move the tower back up to it's original position. Now move the slider back and forth, and you should see the building go up and down. If it doesn't you did something wrong.
With buildings you can either waste time creating a skl. (I don't recommend)exporting and putting it ingame...
Or, you can animate the model itself, which is what I explained above.
Now then. When animating the model itself there are a few things to keep in mind.
- If it's a building model and it has bones, don't animate the bones.
- Any mesh (model piece) that's animated needs to have the export options:
- If the piece would realistically cast a shadow in real life, then you should also tick "Shadw"
- If it's just a simple bone then the export setting should ONLY be "Export Transform (Bone)"
Now then, if you have the anim all set up and you have checked to make sure EVERY piece in the model has the right export setting. (Hint: Tap H on your keyboard to bring up a "Select by Name" window.)
Then export it, and choose these settings: (Obviously the frame count on your anim might be different)
Also, any .w3d file intended for use ingame should NEVER have more than 15 characters in its name. And a general preference I follow is to make all letters lowercase. I don't know whether that's necessary though.
Now finally, when you reference it in code you need to think of the model as not only a model, but also, as a skl, AND an anim as well.
Meaning that because the model is an anim, you need a model condition state for the anim and every anim like it. For example this is the code for the buildup anim on a wall I made recently:
ModelConditionState = BASE_BUILD Model = HYBCastWall_A End AnimationState = BASE_BUILD Animation AnimationName = HYBCastWall_A.HYBCastWall_A AnimationMode = ONCE AnimationSpeedFactorRange = 1.5 2.5 ; keep range wide to avoid lockstep anims End End
Notice that if this were a unit anim you wouldn't need a model condition state under normal circumstances. Also, in "AnimationName = blahblah" you see that I have the same name before AND after the period. Because the engine is looking for a skl AND an anim. But your model is BOTH.
There, that should be enough to get you started.
Edited by Ganon, 24 October 2011 - 11:45 AM.
#3
Posted 23 October 2011 - 11:37 PM
ok... to fill you in i am using the Zelda "Beamos" model... as a sentry tower... do i need a bone for it to shoot from? on it's eye?
thanks *goes to redo it correctly*
Edited by modboy451, 23 October 2011 - 11:50 PM.
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#4
Posted 24 October 2011 - 12:11 AM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#5
Posted 24 October 2011 - 12:55 AM
;------------------------------------------------------------------------------------------ Object HyruleBeamos SelectPortrait = BPGBattleTower ; *** ART Parameters *** ButtonImage = BGBattleTower Draw = W3DScriptedModelDraw ModuleTag_Draw StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD ExtraPublicBone = ARROW_01 ExtraPublicBone = ARROW_02 ExtraPublicBone = ARROW_03 ExtraPublicBone = ARROW_04 ExtraPublicBone = ARROW_05 ExtraPublicBone = ARROW_06 ExtraPublicBone = ARROW_07 ExtraPublicBone = ARROW_08 ExtraPublicBone = ARROW_09 ExtraPublicBone = ARROW_10 ExtraPublicBone = ARROW_11 ExtraPublicBone = ARROW_12 OkToChangeModelColor = Yes UseStandardModelNames = Yes StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD DefaultModelConditionState Model = ZBBeamos_IdleA WeaponLaunchBone = PRIMARY ARROW_ End ;// Animation state for build placement cursor AnimationState = BUILD_PLACEMENT_CURSOR BeginScript CurDrawableHideSubObject("N_Window") EndScript End ;// Animation state for phantom structure AnimationState = PHANTOM_STRUCTURE BeginScript CurDrawableHideSubObject("N_Window") EndScript End ; IdleAnimationState ;do i undo this? i checked it off to see if that was a glitch i was having.. but... ; StateName = STATE_Idle ; Flags = MAINTAIN_FRAME_ACROSS_STATES ; Animation = IdleA ; AnimationName = ZBBeamos_IDLA.ZBBeamos_IDLA ; AnimationMode = ONCE ; End ; Flags = RESTART_ANIM_WHEN_COMPLETE ; End ModelConditionState = AWAITING_CONSTRUCTION SNOW Model = ZBBeamos ;Texture = GBWorkshop3.tga GBWorkshop3_snow.tga ;Texture = GBVet.tga GBVet_snow.tga End ModelConditionState = AWAITING_CONSTRUCTION Model = ZBBeamos ; ParticleSysBone = NONE BuildingDoughnutCloud End; AnimationState = AWAITING_CONSTRUCTION Animation = ZBBeamos_BLDA AnimationName = ZBBeamos_BLDA.ZBBeamos_BLDA AnimationMode = MANUAL End Flags = START_FRAME_FIRST End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED SNOW Model = ZBBeamos_BLDA ;Texture = GBBtlTwr.tga GBBtlTwr_snow.tga End ModelConditionState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Model = ZBBeamos_BLDA ParticleSysBone = DUSTBONE BuildingContructDust End; AnimationState = ACTIVELY_BEING_CONSTRUCTED PARTIALLY_CONSTRUCTED Animation = ZBBeamos_BLDA AnimationName = ZBBeamos_BLDA.ZBBeamos_BLDA AnimationMode = MANUAL End Flags = START_FRAME_FIRST StateName = BeingConstructed BeginScript CurDrawablePlaySound("GondorBarracksBeginConstruction") EndScript End ;---------------damage states-- garrisoned--------------- ;--damaged building ; AnimationState = GARRISONED DAMAGED ; EnteringStateFX = FX_BuildingDamaged ; End ; ; AnimationState = GARRISONED REALLYDAMAGED ; Animation = ReallyDamagedAnimation ; AnimationName = GBBtlTwrS_D2SK.GBBtlTwrS_D2AN ; AnimationMode = ONCE ; End ; EnteringStateFX = FX_BuildingReallyDamaged ; End ; ; AnimationState = GARRISONED RUBBLE ; Animation = RubbleAnimation ; AnimationName = GBBtlTwrS_D3SK.GBBtlTwrS_D3AN ; AnimationMode = ONCE ; End ; End ; ; ;---------------damage states- non-garrisoned---------------- ; ; ;--damaged building ; ; ModelConditionState = DAMAGED ; Model = GBBtlTwrS_D1 ; ParticleSysBone FireSmall01 FireBuildingLarge ; ParticleSysBone FireSmall02 FireBuildingMedium ; ParticleSysBone FireSmall03 FireBuildingMedium ; ParticleSysBone FireSmall04 FireBuildingMedium ; ParticleSysBone FireSmall05 SmokeBuildingLarge ; End ; ; AnimationState = DAMAGED ; EnteringStateFX = FX_BuildingDamaged ; End ; ; ModelConditionState = REALLYDAMAGED ; Model = GBBtlTwrS_D2 ; ParticleSysBone FireSmall01 FireBuildingLarge ; ParticleSysBone FireSmall02 FireBuildingLarge ; ParticleSysBone FireSmall03 FireBuildingMedium ; ParticleSysBone FireSmall04 FireBuildingMedium ; ParticleSysBone FireSmall05 SmokeBuildingLarge ; End ; AnimationState = REALLYDAMAGED ; Animation = ReallyDamagedAnimation ; AnimationName = GBBtlTwrS_D2SK.GBBtlTwrS_D2AN ; AnimationMode = ONCE ; End ; EnteringStateFX = FX_BuildingReallyDamaged ; End ; ModelConditionState = RUBBLE ; Model = GBBtlTwrS_D3 ; ParticleSysBone SmokeLarge01 SmokeBuildingLarge ; End ; AnimationState = RUBBLE ; EnteringStateFX = FX_StructureMediumCollapse ; Animation = RubbleAnimation ; AnimationName = GBBtlTwrS_D3SK.GBBtlTwrS_D3AN ; AnimationMode = ONCE ; End ; End ; ModelConditionState = POST_RUBBLE ; Model = None ; ParticleSysBone NONE SmokeBuildingMediumRubble ; End ; AnimationState = POST_RUBBLE ; End ; ModelConditionState = POST_COLLAPSE ; Model = None ; ParticleSysBone NONE SmokeBuildingMediumRubble ; End ; AnimationState = POST_COLLAPSE ; End ModelConditionState = SNOW Model = ZBBeamos ;Texture = GBBtlTwr.tga GBBtlTwr_snow.tga End End ; draw Draw = W3DFloorDraw ModuleTag_DrawFloor StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD ModelName = GBBtlTwrS_Bib WeatherTexture = SNOWY GBBtlTwrS_Bib_snow.tga HideIfModelConditions = AWAITING_CONSTRUCTION HideIfModelConditions = PARTIALLY_CONSTRUCTED End Draw = W3DScriptedModelDraw ModuleTag_Draw_HCBanner OkToChangeModelColor = Yes DefaultModelConditionState Model = GBHCBtlTwrS End MultiPlayerOnly = Yes End
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#6
Posted 24 October 2011 - 10:06 PM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#7
Posted 25 October 2011 - 12:15 AM
#8
Posted 25 October 2011 - 12:47 AM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#9
Posted 25 October 2011 - 10:37 AM
#10
Posted 25 October 2011 - 01:53 PM
i will prolly need a skl anyway... but i'm not sure what options to do it as. though i think i can figure it out.
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#11
Posted 25 October 2011 - 03:18 PM
If you want it to rotate constantly, but target anything that moves into it's vision, you'll also need a firing anim. It would just be the model "looking" at the target. Pretty simple, but otherwise it would just keep rotating. That's your best bet.
I don't think it'll be possible to make it only target units that happen to be in front of it, where it can "see".
By the way, I had the same idea for this unit.
Edited by Ganon, 25 October 2011 - 03:25 PM.
#12
Posted 25 October 2011 - 03:24 PM
_SKN (Basic model)
_SKL (Skeleton)
_BLDA (Buildup)
_IDLEA (animation)
correct?
the model name will be zbbeamos
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#13
Posted 25 October 2011 - 03:28 PM
Oh and the thing is... i don't know how it can do where it looks at the enemy anim if the enemy can come from a bunch of different ways.
Well that's simple. If you look at ANY other unit's firing anim, they only face one direction. Why would this be any different?
Edited by Ganon, 25 October 2011 - 03:34 PM.
#14
Posted 25 October 2011 - 03:30 PM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#15
Posted 25 October 2011 - 06:58 PM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#16
Posted 26 October 2011 - 05:03 AM
have to separate the 'Eye' from the tower
The eye must be a unit that is formed after build .... like a trebuthet on the Expansion
then it attacks 'in the correct position ' via the weapon that causes it to look at a target
( the treb does this as well ... facing the object / so do the mountain giants )
then it would need an idle anim of it going in circles / spinning the eye !
#17
Posted 26 October 2011 - 07:26 AM
You see, the way it works, is that there is always an object at the castle upgrade build-site. That's the build plot image thingy.
And when you buy a treb, you actually just buy an upgrade for that existing object.
So, sure, you might be able to make the Beamos work like a wall treb. (i.e. with a static base and a turning object on top.)
But it will likely be a lot of work, and be very complicated. Seeing as, I think, he wants it to be buildable at a normal buildplot.
Edited by Ganon, 26 October 2011 - 07:27 AM.
#18
Posted 26 October 2011 - 02:03 PM
ganon, what buildings do you have so far for Hyrule?
Edited by modboy451, 26 October 2011 - 02:03 PM.
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
#19
Posted 26 October 2011 - 02:12 PM
Well, atm, I only have the Barracks modeled. Modeling the castle has really taken some time. It's all done though, so that's great news. (Just need to fine tune a couple things.)
My next project is to model a farm.
Edit: If you want to see, check out my showcase. If I have anything I wanna show, it'll be there.
Edited by Ganon, 26 October 2011 - 02:14 PM.
#20
Posted 26 October 2011 - 03:38 PM
John 3:16 (NIV)
For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
Psalm 23:1 (ESV)
A Psalm of David.
The LORD is my shepherd; I shall not want.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users