모드 강좌
GEN 라이더 변경 모듈 분석(고급)
페이지 정보
작성자 크래커 아이디로 검색 0건 4,028회 작성일10-02-05 13:36본문
콜드워나 베트남 모드의 보병들은 엎드릴 줄 안다.
제로아워에서 GLA의 컴뱃 사이클에 보병을 태우면 탑승자에 따라 상태가 바뀐다. 어떻게 한걸까?
제로아워에는 라이더 변경 모듈이 있는데 라이더의 뜻은 타는 사람, 차를 모는 사람이라는 뜻이다.
사실 라이더 변경 모듈만 추가해서는 안되고 여러가지 관련된 코드들도 추가해야 한다.
콜드워 모드의 INI를 추출해서 돌격 보병의 ini(CWCruInfAssault.ini)를 열어봤는데, 흥미로운 코드들이 보인다.
그래픽을 담당하는 아트 파라미터를 살펴보면 라이더2(엎드림), 라이더3(유탄)에 따라서 그래픽이 다르다.
이게 평소에 서있는 모습이고,
DefaultConditionState
Model = CWCruInfAssaul1
IdleAnimation = AIInf1_SKL.AIInf1_STN
IdleAnimation = AIInf1_SKL.AIInf1_IDA
IdleAnimation = AIInf1_SKL.AIInf1_IDB
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY MUZZLE
WeaponLaunchBone = PRIMARY MUZZLE
TransitionKey = TRANS_AK74_Standing
HideSubObject = AK74_APA GP25_APA
ShowSubObject = AK74_AMA_ASA GP25_AMA_ASA
End
AliasConditionState = RIDER1
AliasConditionState = REALLYDAMAGED
AliasConditionState = RIDER1 REALLYDAMAGED
라이더2는 엎드린 그래픽이다.
ConditionState = RIDER2
Model = CWCruInfAssaul1
IdleAnimation = AIInf1_SKL.AIInf1_APA3
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_FIRST
WeaponFireFXBone = PRIMARY MUZZLE
WeaponLaunchBone = PRIMARY MUZZLE
TransitionKey = TRANS_Prone
HideSubObject = AK74_AMA_ASA GP25_AMA_ASA
ShowSubObject = AK74_APA GP25_APA
End
AliasConditionState = RIDER2 REALLYDAMAGED
라이더3은 유탄 발사기를 들고있을 때 그래픽이다.
ConditionState = RIDER3
Model = CWCruInfAssaul2
IdleAnimation = AIHERO_SKL.AIHERO_STA2
IdleAnimation = AIHERO_SKL.AIHERO_IDA2
IdleAnimation = AIHERO_SKL.AIHERO_IDB2
AnimationMode = ONCE
WeaponFireFXBone = PRIMARY MUZZLE
WeaponLaunchBone = PRIMARY MUZZLE
TransitionKey = TRANS_GP25_Standing
HideSubObject = AK74_PARA GP25_PARA
ShowSubObject = AK74_ATA GP25_ATA
End
AliasConditionState = RIDER3 REALLYDAMAGED
뒷부분에도 라이더마다 움직이고, 쏘고, 죽는 그래픽이 지정되있는다.
웨폰셋에서는 라이더마다 무기가 다르다.
WeaponSet
Conditions = WEAPON_RIDER1
Weapon = PRIMARY CWCruInfAK74AssaultRifle_Stand_Assault
End
WeaponSet
Conditions = WEAPON_RIDER2
Weapon = PRIMARY CWCruInfAK74AssaultRifle_Prone_Assault
End
WeaponSet
Conditions = WEAPON_RIDER3
Weapon = PRIMARY CWCruInfGP25GrenadeLauncher
End
커맨드셋도 자세히 살펴봐야 한다.
CommandSet = CWCruInfAssaultStandCommandSet
CommandSet.ini을 열어보면 아래 코드가 있다.
Prone이 엎드리기, Stand는 일어서기, Stand_GR은 유탄 발사기같다.
CommandSet CWCruInfAssaultStandCommandSet
1 = Command_CWCruFakeRider_Inf_Prone
2 = Command_CWCruInfantryCaptureBuilding
3 = Command_CWCruFakeRider_Inf_Stand
5 = Command_CWCruFakeRider_Inf_Stand_GR
11 = Command_CWCruGuardWithoutPursuit
12 = Command_CWCruAttackMove
13 = Command_CWCruGuard
14 = Command_CWCruStop
End
CommandButton.ini에서 Command_CWCruFakeRider_Inf_Prone을 검색하면
일반 버튼과는 다르게 스폐셜 파워가 있는걸 알 수 있다.
CommandButton Command_CWCruFakeRider_Inf_Prone
Command = SPECIAL_POWER
SpecialPower = SpecialAbilityCWCruFakeRider_Inf_Prone
Options = NEED_SPECIAL_POWER_SCIENCE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:CWCgenFakeRider_Inf_Prone
ButtonImage = CWCruProne_Command
ButtonBorderType = SYSTEM
DescriptLabel = CONTROLBAR:Command_CWCgenFakeRider_Inf_Prone
END
스폐셜 파워는 뭐하는데 쓰는가 하면, 콜드워에서 보병을 엎드리게 하려면
컴뱃 사이클처럼 보병에 보병을 태우는게 아니라 자체적으로 라이더를 생성해야 한다.
Behavior = OCLSpecialPower ModuleTag_12
SpecialPowerTemplate = SpecialAbilityCWCruFakeRider_Inf_Stand
OCL = OCL_CWCruSpecialAbilityFakeRider_Inf_Stand
End
Behavior = OCLSpecialPower ModuleTag_13
SpecialPowerTemplate = SpecialAbilityCWCruFakeRider_Inf_Stand_GR
OCL = OCL_CWCruSpecialAbilityFakeRider_Inf_Stand_GR
End
Behavior = OCLSpecialPower ModuleTag_14
SpecialPowerTemplate = SpecialAbilityCWCruFakeRider_Inf_Prone
OCL = OCL_CWCruSpecialAbilityFakeRider_Inf_Prone
End
엎드리기 버튼을 누르면 스폐셜 파워에 의해 OCL이 가짜 라이더를 생성하면서
라이더 변경 모듈이 라이더에 따라서 상태를 바꾸는 것이다.
(컴뱃 사이클은 보병을 태우면 되니 OCL 생성을 쓰지 않는다.)
결국 엎드리는 보병을 만들려면 스폐셜 파워와 OCL도 복사해야 한다.
라이더 변경 모듈을 살펴보자. 라이더에 따라서 그래픽, 무기, 커맨드셋을 변경하게 되있다.
Behavior = RiderChangeContain ModuleTag_11
;A list of each valid rider that is allowed to ride this object. Each rider is
;assigned a modelcondition state, a weaponset flag, an object status bit, and
;a commandset override. The actual object is hidden inside the container so the
;visible rider is fluff. Also riders are deleted (not killed) when the bike is
;destroyed, so all deaths must be OCLs on the bike.
Rider1 = CWCruFakeRider_Inf_Stand RIDER1 WEAPON_RIDER1 STATUS_RIDER1 CWCruInfAssaultStandCommandSet SET_NORMAL
Rider2 = CWCruFakeRider_Inf_Prone RIDER2 WEAPON_RIDER2 STATUS_RIDER2 CWCruInfAssaultProneCommandSet SET_SLUGGISH
Rider3 = CWCruFakeRider_Inf_Stand_GR RIDER3 WEAPON_RIDER3 STATUS_RIDER3 CWCruInfAssaultStand_GRCommandSet SET_NORMAL
;Rider4 = None RIDER4 WEAPON_RIDER4 STATUS_RIDER4 GLAVehicleCombatBikeDefaultCommandSet SET_NORMAL
;Rider5 = None RIDER5 WEAPON_RIDER5 STATUS_RIDER5 GLAVehicleCombatBikeDefaultCommandSet SET_NORMAL
;Rider6 = None RIDER6 WEAPON_RIDER6 STATUS_RIDER6 GLAVehicleCombatBikeDefaultCommandSet SET_NORMAL
;Rider7 = None RIDER7 WEAPON_RIDER7 STATUS_RIDER7 GLAVehicleCombatBikeDefaultCommandSet SET_NORMAL
ScuttleDelay = 1500
ScuttleStatus = TOPPLED
;Standard TransportContain stuff
Slots = 1
;InitialPayload = CWCruFakeRider_Inf_Stand 1
ScatterNearbyOnExit = No
HealthRegen%PerSec = 0
DamagePercentToUnits = 0%
BurnedDeathToUnits = No
AllowInsideKindOf = INFANTRY
ExitDelay = 0
NumberOfExitPaths = 1
GoAggressiveOnExit = No
DoorOpenTime = 0
OrientLikeContainerOnExit = Yes
End
라이더에 따라서 죽는 효과도 지정해줄 수 있다.
Behavior = SlowDeathBehavior ModuleTag_Death012
DestructionDelay = 0
DeathTypes = ALL -EXPLODED
FX = INITIAL FX_CWCgenInfDeath
OCL = INITIAL OCL_CWCruInfAssaultDeathRider2
ProbabilityModifier = 75
RequiredStatus = STATUS_RIDER2
;ExemptStatus = STATUS_RIDER1 STATUS_RIDER3
End
ObjectCreationList.ini에서 라이더를 생성하는 OCL을 살펴보자.
이게 서 있을 때고,
ObjectCreationList OCL_CWCruSpecialAbilityFakeRider_Inf_Stand
CreateObject
ObjectNames = CWCruFakeRider_Inf_Stand
Count = 1
ContainInsideSourceObject = Yes
InheritsVeterancy = Yes
End
End
유탄을 발사할 때,
ObjectCreationList OCL_CWCruSpecialAbilityFakeRider_Inf_Stand_GR
CreateObject
ObjectNames = CWCruFakeRider_Inf_Stand_GR
Count = 1
ContainInsideSourceObject = Yes
InheritsVeterancy = Yes
End
End
엎드린 상태,
ObjectCreationList OCL_CWCruSpecialAbilityFakeRider_Inf_Prone
CreateObject
ObjectNames = CWCruFakeRider_Inf_Prone
Count = 1
ContainInsideSourceObject = Yes
InheritsVeterancy = Yes
End
End
역시 라이더별로 OCL이 있다는 것을 알 수 있다.
SpecialPower.ini도 살펴보자.
SpecialPower SpecialAbilityCWCruFakeRider_Inf_Stand
Enum = SPECIAL_CIA_INTELLIGENCE
ReloadTime = 5000 ; in milliseconds
PublicTimer = No
;InitiateSound = CIAIntelligenceActivate
End
SpecialPower SpecialAbilityCWCruFakeRider_Inf_Stand_GR
Enum = SPECIAL_CIA_INTELLIGENCE
ReloadTime = 5000 ; in milliseconds
PublicTimer = No
;InitiateSound = CIAIntelligenceActivate
End
SpecialPower SpecialAbilityCWCruFakeRider_Inf_Prone
Enum = SPECIAL_CIA_INTELLIGENCE
ReloadTime = 5000 ; in milliseconds
PublicTimer = No
;InitiateSound = CIAIntelligenceActivate
End
대충 이렇다.
CWCruFakeRiders.ini를 열면 라이더들을 찾을 수 있다.
유닛, 건물도 아닌 탑승자 역할만 수행하는 가짜 객체이다.
Object CWCruFakeRider_Inf_Stand
Side = Russia
TransportSlotCount = 1
EditorSorting = SYSTEM
KindOf = CLICK_THROUGH DRONE IGNORED_IN_GUI INFANTRY PRELOAD
IsTrainable = Yes
Body = ActiveBody ModuleTag_02
MaxHealth = 1
InitialHealth = 1
End
ArmorSet
Conditions = None
Armor = CWCgenFakeRider_Inf_Armor
DamageFX = None
End
Behavior = AIUpdateInterface ModuleTag_03
End
Locomotor = SET_NORMAL CWCgenFakeRiderLocomotor
Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
KillWhenRestingOnGround = Yes
AllowBouncing = No
End
Behavior = FireWeaponUpdate ModuleTag_KillRider
Weapon = CWCgenSuicideWeapon
End
Behavior = SlavedUpdate ModuleTag_05
GuardMaxRange = 1 ;How far away from master I'm allowed when master is idle (doesn't wander)
GuardWanderRange = 1 ;How far away I'm allowed to wander from master while guarding.
AttackRange = 1 ;How far away from master I'm allowed when master is attacking a target.
AttackWanderRange = 1 ;How far I'm allowed to wander from target.
ScoutRange = 1 ;How far away from master I'm allowed when master is moving.
ScoutWanderRange = 1 ;How far I'm allowed to wander from scout point.
StayOnSameLayerAsMaster = Yes
End
Behavior = DestroyDie ModuleTag_08
DeathTypes = ALL
End
End
라이더도 상태별로 있으나 생략.
결국, 보병이 엎드리게 하려면 라이더 변경 모듈을 써야하고 관련된 모든 것들을 추가해야 한다.