모드 강좌

GEN 1. 유닛 복제하기

페이지 정보

작성자 크래커 아이디로 검색 댓글 0건 조회 6,388회
작성일10-02-04 20:18

본문

구상

  • 폭탄 트럭처럼 적 유닛으로 변장하거나 자폭할 수 있으며,
  • 코만치의 로켓 포드를 발사할 수 있는데,
  • 평상시에는 팔라딘 탱크와 동일한 기능을 하는 유닛.

팔라딘 탱크와 비슷한 유닛을 구상했으니 팔라딘을 복제하자.

INI 폴더가 복잡하면 별도로 폴더를 만들고, NewUnits.ini를 넣어도 된다.


Object\AmericaVehicle.ini을 열어서 Object AmericaTankPaladin부터
마지막의 End까지 복사해서 새 파일인 NewUnits.ini에 붙여넣는다.


붙여넣은 뒤에 AmericaTankPaladin를 GLATankSuperPaladin으로 변경한다.

Object GLATankSuperPaladin

  ; *** ART Parameters ***
  SelectPortrait         = SAPaladin_L
  ButtonImage            = SAPaladin
--생략--

디자인 파라미터 근처에 Side 옵션이 있다.
생산과 직접적인 관련이 없지만 월드빌더에서 중요하니 GLA로 변경한다.

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Paladin
  Side = GLA

조금 더 내려가면 Prerequisites가 있는데
Object에는 유닛을 만들기 위해 필요한 Object를 지정한다.
주로 건물을 지정하지만 이론상 유닛도 가능하다.

  Prerequisites
    Object = GLABarracks
  End

Science는 필요한 제너럴 스킬인데 삭제하자.

이제 GLA 막사의 커맨드셋을 수정해서 생산 버튼을 달아줘야 한다.
(무기상은 12버튼이 가득 차버려서)

Object\FactionBuilding.ini를 열어서 Object GLABarracks를 검색한다.
CommandSet을 검색하면 GLABarracksCommandSet가 있을 것이다.

  ; ***DESIGN parameters ***
  DisplayName      = OBJECT:Barracks
  Side             = GLA
  EditorSorting    = STRUCTURE
  BuildCost        = 500
  BuildTime        = 10.0           ; in seconds
  EnergyProduction = 0
  CommandSet       = GLABarracksCommandSet
  VisionRange      = 200.0           ; Shroud clearing distance
  ShroudClearingRange = 200

이번에는 CommandSet.ini와 CommandButton.ini을 연다.
CommandSet.ini에서 GLABarracksCommandSet을 검색하면
번호=버튼명으로 저장되어 있다.

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
  11  = Command_UpgradeGLARebelCaptureBuilding
  13 = Command_SetRallyPoint
  14 = Command_Sell
End

;+--+--+--+--+--+--+--+ 
;|01|03|05|07|09|11|13|
;+--+--+--+--+--+--+--+
;|02|04|06|08|10|12|14|
;+--+--+--+--+--+--+--+

커맨드바에서 번호의 위치는 이렇다.
값은 반드시 CommandButton.ini에 존재하는 버튼으로 지정해야 한다.

비어있는 9번 자리에 추가할 생산버튼의 이름을 적어주자.
Command_ConstructGLATankSuperPaladin이라는 다소 긴 이름이다.

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
  11  = Command_UpgradeGLARebelCaptureBuilding
  13 = Command_SetRallyPoint
  14 = Command_Sell
End

CommandButton.ini를 연다.
TankPaladin을 검색하면 팔라딘 탱크의 생산버튼을 찾을 수 있다.
통째로 복사한다.

CommandButton Command_ConstructAmericaVehiclePaladin
  Command       = UNIT_BUILD
  Object        = AmericaTankPaladin
  TextLabel     = CONTROLBAR:ConstructAmericaTankPaladin
  ButtonImage   = SAPaladin
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildPaladin
End

Object는 GLATankSuperPaladin으로 바꾸고,
Command_ConstructAmericaVehiclePaladin은 CommandSet.ini에서 지정해준
Command_ConstructGLATankSuperPaladin로 바꿔준다.

CommandButton Command_ConstructGLATankSuperPaladin
  Command       = UNIT_BUILD
  Object        = GLATankSuperPaladin
  TextLabel     = CONTROLBAR:ConstructAmericaTankPaladin
  ButtonImage   = SAPaladin
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildPaladin
End

이제 게임에서 테스트를 해서 생산되는지 확인한다.

댓글목록

모드 강좌

334건 17 페이지
모드 강좌 목록
번호 제목 글쓴이 조회 날짜
94 GEN 크래커 아이디로 검색 6360 02-05
93 GEN 크래커 아이디로 검색 6259 02-05
92 GEN 크래커 아이디로 검색 8177 02-05
91 GEN 크래커 아이디로 검색 7526 02-05
90 GEN 크래커 아이디로 검색 6300 02-05
89 GEN 크래커 아이디로 검색 7448 02-04
88 GEN 크래커 아이디로 검색 7195 02-04
87 GEN 크래커 아이디로 검색 5665 02-04
86 GEN 크래커 아이디로 검색 6316 02-04
85 GEN 크래커 아이디로 검색 6610 02-04
84 GEN 크래커 아이디로 검색 6329 02-04
83 GEN 크래커 아이디로 검색 5738 02-04
82 GEN 크래커 아이디로 검색 6389 02-04
81 GEN 크래커 아이디로 검색 10125 02-04
80 GEN 크래커 아이디로 검색 6217 02-04

검색