모드 강좌
GEN 제너럴 모드 강좌 035. 폐품 생성유닛 만들기
페이지 정보
관련링크
본문
GLA 서플라이 은닉처에 중국 서플라이 트럭을 추가하고,
자폭시 폐품을 생성하게 만들겠습니다.
1. ChinaVehicle.ini 을 열고, Object ChinaVehicleSupplyTruck 부터 End 까지 복사한다.
INI\Object 폴더에 GLASupplyTruck.ini 이라는 파일을 만들고 복사한 코드를 붙여넣기 한다.
Side = GLA
Prerequisites
Object = GLASupplyStash ;ChinaSupplyCenter
End
CommandSet = GLASupplyTruckCommandSet
로 변경한다.
Behavior = SupplyTruckAIUpdate ModuleTag_03
MaxBoxes = 4
SupplyCenterActionDelay = 400 ; ms for whole thing (one transaction)
SupplyWarehouseActionDelay = 1000 ; ms per box (many small transactions)
SupplyWarehouseScanDistance = 700 ;350 ; Max distance to look for a warehouse, or we go home. (Direct dock command on warehouse overrides, and no max on Center Scan)
SuppliesDepletedVoice = SupplyTruckVoiceSuppliesDepleted
End
위 코드를
Behavior = AIUpdateInterface ModuleTag_03
End
로 변경한다.
WeaponSet
Conditions = None
Weapon = PRIMARY GLASupplyTruckSuicideWeapon
End
위 코드를 추가한다.
2. CommandButton.ini 를 열고, 아래 코드를 추가한다.
CommandButton Command_ConstructGLAVehicleSupplyTruck
Command = UNIT_BUILD
Object = GLAVehicleSupplyTruck
TextLabel = CONTROLBAR:ConstructChinaVehicleSupplyTruck
ButtonImage = SNSupplyTruck
ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipChinaBuildSupplyTruck
End
3. CommandSet.ini 를 열고, 아래 코드를 추가한다.
CommandSet GLASupplyTruckCommandSet
1 = Command_BombTruckDetonateNow
14 = Command_Stop
End
GLA 서플라이 은닉처에
2 = Command_ConstructGLAVehicleSupplyTruck 를 추가한다.
CommandSet GLASupplyStashCommandSet
1 = Command_ConstructGLAWorker
2 = Command_ConstructGLAVehicleSupplyTruck
13 = Command_SetRallyPoint
14 = Command_Sell
End
4. Crate.ini 를 열고, Object SalvageCrate 부터 End 까지 복사한다. 맨 아래에 붙여넣기 한다.
오브젝트 이름을 Object GLACustomSalvageCrate 로 변경한다.
Behavior = DeletionUpdate ModuleTag_03 부터 End 까지 삭제한다. (폐품이 사라지지 않게)
5. ObjectCreationList.ini 를 열고, 아래 코드를 추가한다.
ObjectCreationList OCL_CreateSalvageCrate
CreateObject
ObjectNames = GLACustomSalvageCrate ;SalvageCrate
Count = 3 ;1
SpreadFormation = Yes
MinDistanceAFormation = 20.0
MinDistanceBFormation = 30.0
MaxDistanceFormation = 400.0
End
End
6. Weapon.ini 를 열고, 아래 코드를 추가한다.
FireOCL = OCL_CreateSalvageCrate 코드는 무기 발사시 폐품을 생성하게 한다.
Weapon GLASupplyTruckSuicideWeapon
LeechRangeWeapon = Yes
AttackRange = 1.0
PrimaryDamage = 999999.0
PrimaryDamageRadius = 1.0
DamageDealtAtSelfPosition = Yes ; this is a suicide bomber... remember?
RadiusDamageAffects = SELF SUICIDE
DamageType = EXPLOSION
DeathType = SUICIDED
WeaponSpeed = 99999.0
DelayBetweenShots = 0
ClipSize = 1
ClipReloadTime = 0
AutoReloadsClip = No
FireOCL = OCL_CreateSalvageCrate
End
7. 게임상에서 GLA로 시작한다.
서플라이 은닉처에서 트럭을 생산한다. 자폭하면 폐품이 생기는지 확인해본다.