모드 강좌
[GEN] 토마호크가 무기 모드를 선택하게 만들기
페이지 정보
본문
-
모양은 토마호크면서 스커드 발사기처럼 무기 모드를 선택할 수 있는 유닛을 만들라.
-
첫번째로 토마호크 미사일, 두번째로 스커드 폭발 무기,
-
세번째로 스커드 화학 무기를 선택하게 해야한다.
Object\AmericaVehicle.ini을 열어서 Object AmericaVehicleTomahawk부터
마지막의 End까지 복사해서 새 파일인 TomahawkClone.ini에 붙여넣는다.
붙여넣은 뒤에 AmericaVehicleTomahawk를 GLAVehicleTomahawkClone으로 변경한다.
Object GLAVehicleTomahawkClone
; *** ART Parameters ***
SelectPortrait = SACTomahawk_L
ButtonImage = SACTomahawk
--생략--
Side를 GLA로 변경한다.
; ***DESIGN parameters ***
DisplayName = OBJECT:Tomahawk
Side = GLA
Prerequisites도 GLABarracks로 변경한다.
Prerequisites
Object = GLABarracks
End
CommandSet.ini에서 GLA 막사 커맨드셋에 토마호크 클론을 추가한다.
CommandSet GLABarracksCommandSet
1 = Command_ConstructGLAInfantryRebel
2 = Command_ConstructGLAInfantryRPGTrooper
3 = Command_ConstructGLAInfantryTerrorist
4 = Command_ConstructGLAInfantryAngryMob
5 = Command_ConstructGLAInfantryHijacker
6 = Command_ConstructGLAInfantryJarmenKell
7 = Command_ConstructGLAInfantrySaboteur
8 = Command_UpgradeGLAInfantryRebelBoobyTrapAttack
; camo net
9 = Command_ConstructGLATankSuperPaladin
10 = Command_ConstructGLAVehicleTomahawkClone
11 = Command_UpgradeGLARebelCaptureBuilding
13 = Command_SetRallyPoint
14 = Command_Sell
End
CommandButton.ini에서 토마호크 클론의 생산 버튼을 추가한다.
CommandButton Command_ConstructGLAVehicleTomahawkClone
Command = UNIT_BUILD
Object = GLAVehicleTomahawkClone
TextLabel = CONTROLBAR:ConstructAmericaVehicleTomahawk
ButtonImage = SACTomahawk
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipUSABuildTomahawk
End
TomahawkClone.ini로 돌아와서 WeaponSet을 아래처럼 변경한다.
스커드 발사기에서 WeaponSet을 가져와서
주무기에 토마호크 미사일, 보조 무기에 스커드 폭발 무기,
세번째 무기에 스커드 독소 무기를 넣었다.
WeaponSet
Conditions = None
Weapon = PRIMARY TomahawkMissileWeapon
Weapon = SECONDARY SCUDLauncherGunExplosive
Weapon = TERTIARY SCUDLauncherGunToxin
AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI DEFAULT_SWITCH_WEAPON
AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
AutoChooseSources = TERTIARY FROM_SCRIPT FROM_AI
PreferredAgainst = PRIMARY VEHICLE
PreferredAgainst = SECONDARY STRUCTURE
PreferredAgainst = TERTIARY INFANTRY
ShareWeaponReloadTime = Yes
End
아트 파라미터에서 보조 무기와 세번째 무기의 발사 위치도 지정한다.
DefaultConditionState
Model = AVTomahawk
Turret = TURRET
TurretPitch = TURRETEL
WeaponLaunchBone = PRIMARY WeaponA
WeaponHideShowBone = PRIMARY MISSILE
WeaponLaunchBone = SECONDARY WeaponA
WeaponHideShowBone = SECONDARY MISSILE
WeaponLaunchBone = TERTIARY WeaponA
WeaponHideShowBone = TERTIARY MISSILE
End
AIUpdateInterface 모듈에도 보조 무기와 세번째 무기를 추가한다.
추가안하면 미사일이 일직선으로 나갈 것이다.
Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 60 ; turn rate, in degrees per sec
TurretPitchRate = 60
FirePitch = 70 ; Instead of aiming pitchwise at the target, it will aim here
AllowsPitch = Yes
ControlledWeaponSlots = PRIMARY SECONDARY TERTIARY
End
AutoAcquireEnemiesWhenIdle = No NotWhileAttacking
End
Locomotor = SET_NORMAL TomahawkLocomotor
토마호크 클론의 커맨드셋도 따로 지정해준다.
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 = GLAVehicleTomahawkCloneCommandSet
CommandSet.ini에 커맨드셋을 추가한다.
기존 토마호크와 다른 점은 무기선택 버튼이 3개 추가되었다.
CommandSet GLAVehicleTomahawkCloneCommandSet
1 = Command_ConstructAmericaVehicleBattleDrone
2 = Command_ConstructAmericaVehicleScoutDrone
3 = Command_ConstructAmericaVehicleHellfireDrone
4 = Command_GLATomahawkCloneMissileWarhead
5 = Command_GLATomahawkCloneExplosiveWarhead
6 = Command_GLATomahawkCloneAnthraxWarhead
11 = Command_AttackMove
13 = Command_Guard
14 = Command_Stop
End
CommandButton.ini에도 무기선택 버튼 3개를 추가한다.
스커드 발사기에서 복사해서 버튼명과 무기슬롯만 변경했다.
CommandButton Command_GLATomahawkCloneMissileWarhead
Command = SWITCH_WEAPON
WeaponSlot = PRIMARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:ExplosiveWarhead
ButtonImage = SSExplosiveScud
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASCUDHEWarhead
End
CommandButton Command_GLATomahawkCloneExplosiveWarhead
Command = SWITCH_WEAPON
WeaponSlot = SECONDARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:ExplosiveWarhead
ButtonImage = SSExplosiveScud
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASCUDHEWarhead
End
CommandButton Command_GLATomahawkCloneAnthraxWarhead
Command = SWITCH_WEAPON
WeaponSlot = TERTIARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:AnthraxWarhead
ButtonImage = SSAnthraxScud
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASCUDAnthraxWarhead
End
게임을 실행해서 확인해보자.
토마호크 클론이 스커드 화학 무기를 쏘고 있다.