Jump to content


Photo

Creating a new building


  • Please log in to reply
24 replies to this topic

#1 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 23 October 2011 - 10:13 PM

I need somebody to tell me how to do Building animations, exporting and putting it ingame... i'm making a sentry tower... model is done... i want the build up anims and also an Idle anim... i kinda have it named... but it isn't working... so can sombody please walk me through exporting... what i need to name them or whatever and what it all is... settings and everything?! that would be gr8 ^_^

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.


Posted Image
Posted Image
Posted Image
Posted Image

#2 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 23 October 2011 - 11:34 PM

Well, that's a lot to ask for. :p
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.

Capture.JPG
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.

exporting and putting it ingame...

With buildings you can either waste time creating a skl. (I don't recommend)
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:
    Capture3.JPG
  • If the piece would realistically cast a shadow in real life, then you should also tick "Shadw"
    Capture2.JPG
  • 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)
Capture4.JPG

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. :good:

Edited by Ganon, 24 October 2011 - 11:45 AM.


#3 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 23 October 2011 - 11:37 PM

THANKS!!!

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.


Posted Image
Posted Image
Posted Image
Posted Image

#4 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 24 October 2011 - 12:11 AM

Oh and how would i go about "damaged" anims? like cutting and everything

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.


Posted Image
Posted Image
Posted Image
Posted Image

#5 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 24 October 2011 - 12:55 AM

Oh and i got it to work :D and it is fine now... but... the idle Anim doesn't work... xD it doesn't spin.

;------------------------------------------------------------------------------------------
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.


Posted Image
Posted Image
Posted Image
Posted Image

#6 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 24 October 2011 - 10:06 PM

*bump*

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.


Posted Image
Posted Image
Posted Image
Posted Image

#7 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 25 October 2011 - 12:15 AM

What happens if you uncomment the lines of the idle animation?
Ridder Geel

#8 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 25 October 2011 - 12:47 AM

after the buildup anim is done, it still doesnt turn and takes the bottom two peices of the model and sticks them on top of the upper piece.

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.


Posted Image
Posted Image
Posted Image
Posted Image

#9 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 25 October 2011 - 10:37 AM

Did you split the skl and the actual "skin" of the model into 2 files? Or not?
Ridder Geel

#10 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 25 October 2011 - 01:53 PM

no I didn't use a SKL... i have the idle Anim that just animates the model itself. and i have the bldup, and then just one of the building not moving for when it is half visible waiting to be constructed.

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.


Posted Image
Posted Image
Posted Image
Posted Image

#11 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 25 October 2011 - 03:18 PM

For this you may want to use a skl. In this case your unit will be changing anims constantly, and it's better to not have to switch models with each anim change. Less latency. ;) (Remember that if you use animated models - (i.e. without a skl) - then you need a model condition state for each and every anim that's designed that way.)

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. :p

Edited by Ganon, 25 October 2011 - 03:25 PM.


#12 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 25 October 2011 - 03:24 PM

nice. 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... since this is a personal mod... i will just stick with it turning all the time. and ok... so the models i need to make alltogether are.

_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.


Posted Image
Posted Image
Posted Image
Posted Image

#13 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 25 October 2011 - 03:28 PM

Yep that looks good. Just be sure not to cross that 15 character limit. :good:

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? :p

Edited by Ganon, 25 October 2011 - 03:34 PM.


#14 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 25 October 2011 - 03:30 PM

because i only want the top half to spin to see him. In attacking anims... the whole model moves.

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.


Posted Image
Posted Image
Posted Image
Posted Image

#15 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 25 October 2011 - 06:58 PM

ok and do i have to redo the Idle animation so it is done with the SKL?

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.


Posted Image
Posted Image
Posted Image
Posted Image

#16 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 26 October 2011 - 05:03 AM

This may be a long shot but to get the 'Tower' to look at the unit and fire then you
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 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 26 October 2011 - 07:26 AM

That might actually be a little too complicated. And I type this as I work on my own castle upgrades. :p

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 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 26 October 2011 - 02:03 PM

this is actually for BFME 2... :PPPP so i want it to come from a porter build... xD and the looking at the whatever isn't that important. :p soooooo..

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.


Posted Image
Posted Image
Posted Image
Posted Image

#19 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 26 October 2011 - 02:12 PM

Well, if you're fine with not having proper attacking anims that's your choice. :good:

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. :good:

Edited by Ganon, 26 October 2011 - 02:14 PM.


#20 modboy451

modboy451

    A small Big-time Modder!

  • Project Team
  • 783 posts
  • Location:U.S.A
  •  Experienced INI Coder, Advanced Rigger/Binder.

Posted 26 October 2011 - 03:38 PM

Ok... next time you get a chance check your PM's... And i was wondering (since you are already making the buildings) if i could use them? plz *puppy eyes* Cause i am not very good at Modeling those types of things and can't do skinning if my life depended on it. xD unless of course you wrote an intricate tutorial on creating Building textures.

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.


Posted Image
Posted Image
Posted Image
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users