모드 강좌
GEN 2. 변장 기능 추가
페이지 정보
본문
폭탄 트럭처럼 변장하는 기능을 넣어보자.
일단 폭탄 트럭으로 가서 뭐가 변장 기능인지 알아보았다.
다른 유닛에 클로킹으로 사용되던 스텔스 업데이트가 변장 기능을 하고 있다.
Behavior = SpecialAbility ModuleTag_20
SpecialPowerTemplate = SpecialAbilityDisguiseAsVehicle
UpdateModuleStartsAttack = Yes
InitiateSound = BombTruckVoiceDisguise
End
Behavior = SpecialAbilityUpdate ModuleTag_21
SpecialPowerTemplate = SpecialAbilityDisguiseAsVehicle
StartAbilityRange = 1000000.0
ApproachRequiresLOS = No
End
Behavior = StealthUpdate ModuleTag_22
StealthDelay = 1
DisguisesAsTeam = Yes
RevealDistanceFromTarget = 100.0f
OrderIdleEnemiesToAttackMeUponReveal = Yes
DisguiseFX = FX_BombTruckDisguise
DisguiseRevealFX = FX_BombTruckDisguiseReveal
InnateStealth = Yes
DisguiseTransitionTime = 2000
DisguiseRevealTransitionTime = 1000
End
이 모듈들을 복제한 슈퍼 팔라딘에 붙여넣는다.
주의할 점은 ModuleTag_XX의 번호가 다른 곳과 중복되지 않아야 한다.
ModuleTag_New01 식으로 알파벳을 써도 된다.
각각 분석해보면 SpecialAbilityDisguiseAsVehicle라는 스폐셜 파워를 쓴다.
스폐셜 파워는 특수무기나 특수기능과 관련되는데, SpecialPowers.ini에서 수정된다.
그밖에 신경쓸 것은 없어서 커맨드 버튼만 넣으면 된다.
슈퍼 팔라딘 탱크가 팔라딘 탱크의 커맨드셋을 공유하고 있으니,
CommandSet.ini에서 따로 커맨드셋을 만들어주자.
NewUnits.ini에서 커맨드셋을 따로 지정해준다.
IsTrainable = Yes ;Can gain experience
CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles
CommandSet = GLATankSuperPaladinCommandSet
CommandSet.ini를 열어서 슈퍼 팔라딘 탱크의 커맨드셋을 추가한다.
폭탄 트럭의 커맨드셋에서 4번에 있는 변장 버튼을 가져왔다.
CommandSet GLATankSuperPaladinCommandSet
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_ConstructAmericaVehicleHellfireDrone
4 = Command_DisguiseAsVehicle
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End
다시 게임상에서 테스트한다.
슈퍼 팔라딘 탱크가 미국 불도저로 변장한 모습이다.