logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,576
Total Threads: 8,658
Posts: 94,436

Administrators:
DeeZire, Redemption

There are currently 68 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Member Written Tutorials » [GEN/ZH] Adding your own General to Generals Challenge

Member Written Tutorials A compilation and archive of tutorials written by members. You cant post here, but you can read the threads.

Reply
 
LinkBack Thread Tools
Old 11-11-2004, 01:10 AM   #1 (permalink)
Senior Member
 
Join Date: Oct 2003
Location: Nevada, USA
Posts: 933
Default [GEN/ZH] Adding your own General to Generals Challenge

Files we will be working with:

Location: Data/INI
Campaign.INI
ChallengeMode.INI
PlayerTemplate.INI

Location: Window/Menus
ChallengeMenu.WND

You already have your own General with all the INI's of his/her units, structures, etc. completed. Now you want to be able to select your own General on the Generals Challenge Selection Map (GCSM).

Open up PlayerTemplate.INI and have a look at the existing factions already there. Most of these parameters are self-explanitory. Copy a piece of code from one of the Generals and modify it to suit your needs.

Code:
PlayerTemplate FactionAmericaAirForceGeneral
  Side              = AmericaAirForceGeneral
  BaseSide          = USA
  PlayableSide      = Yes
  StartMoney        = 0
  PreferredColor    = R:0 G:0 B:255
  IntrinsicSciences = SCIENCE_AMERICA
  PurchaseScienceCommandSetRank1  = AirF_SCIENCE_AMERICA_CommandSetRank1
  PurchaseScienceCommandSetRank3  = AirF_SCIENCE_AMERICA_CommandSetRank3
  PurchaseScienceCommandSetRank8  = AirF_SCIENCE_AMERICA_CommandSetRank8
  SpecialPowerShortcutCommandSet  = AirF_SpecialPowerShortcutUSA
  SpecialPowerShortcutWinName     = GenPowersShortcutBarUS.wnd
  SpecialPowerShortcutButtonCount = 11
  DisplayName       = INI:FactionAmericaAirForceGeneral
  StartingBuilding  = AirF_AmericaCommandCenter
  StartingUnit0     = AirF_AmericaVehicleDozer
  ScoreScreenImage  = America_ScoreScreen
  LoadScreenImage   = SAFactionLogoPage_US
  LoadScreenMusic   = Load_USA
  ScoreScreenMusic  = Score_USA
  ;HeadWaterMark    = SCTempSelectPortrait ; don't use unless we add a "generalshead for non selected generals
  FlagWaterMark     = WatermarkUSA
  EnabledImage      = SSObserverUSA
  BeaconName        = MultiplayerBeacon
  SideIconImage     = GameinfoAMRCA
  GeneralImage      = USA_Air
  OldFaction        = No   ; This faction was NOT available in the original Generals and should NOT be available if the oldFactionsOnly flag is set
  ArmyTooltip       = TOOLTIP:BioStrategyLong_Pos0
  Features          = GUI:BioFeatures_Pos0
  MedallionRegular  = AirGeneral_slvr ;<----- Icon for this General on the GCSM.
  MedallionHilite   = AirGeneral_blue
  MedallionSelect   = AirGeneral_orng
End
Also, where it says GUI:Whatever, you can edit that in CSF or String formats. Strings are usually easier, since they don't require the use of a CSF editor.

Now open up ChallengeMode.INI. You will see all the generals used for the Generals Challenge. Keep in mind, that you can't have GeneralPersona12. Use numbers 0-11 ONLY. So if you want to keep the existing Generals, the most you can add is 3 more. You can achieve this by using the piece of code for the boss general and 2 that EA didn't finish. Originally, there were supposed to be "Boss" Generals for each faction, but only the Boss General for China got put into the game. Copy a piece of code from one of the Generals and modify it to suit your needs once again. Same goes for parameters - self-explanitory.

Code:
GeneralPersona0
    PlayerTemplate = FactionAmericaAirForceGeneral
    StartsEnabled = yes
    BioNameString = GUI:BioNameEntry_Pos0
    BioDOBString = GUI:BioDOBEntry_Pos0
    BioBirthplaceString = GUI:BioBirthplaceEntry_Pos0
    BioStrategyString = GUI:BioStrategyEntry_Pos0
    BioRankString = GUI:BioRankEntry_Pos0
    BioBranchString = GUI:BioBranchEntry_Pos0
    BioClassNumberString = GUI:BioClassNumber_Pos0
    BioPortraitSmall = PAAirGen_S
    BioPortraitLarge = PAAirGen
    PortraitMovieLeftName = PortraitAirGenLeft
    PortraitMovieRightName = PortraitAirGenRight
    DefeatedImage = PAAirGen_L
    VictoriousImage = PAAirGen_W
    DefeatedString = GUI:BioDefeatedEntry_Pos0
    VictoriousString = GUI:BioVictoriousEntry_Pos0
    SelectionSound = Taunts_Grainger009
    PreviewSound = Taunts_GCAnnouncer07
    TauntSound1 =Taunts_Grainger061
    TauntSound2 =Taunts_Grainger062
    TauntSound3 =Taunts_Grainger063
    WinSound =Taunts_Grainger064
    LossSound =Taunts_Grainger065
    NameSound = Taunts_GCAnnouncer14
    Campaign = CHALLENGE_0 ;<----- IMPORTANT! This determines what challenge you will play once you select your General. To determine this, look at Campaign.INI
  END
The last part is the trickiest of all, mainly because a lot of people aren't familiar with WND files, but once you know what you're doing, you will see how easy it is. With this in mind, open ChallengeMenu.WND and have a look. Be very careful around WND editing, just like with INI's. One mistake or a typo and there is a high possibility of the game crashing or not even launching.
Now it may look a bit confusing at first, but not to worry, soon enough everything will click into place. When the click is heard, yo will be quite happy and proud of yourself.
Anyways, search the file for "Position0", "Position1", "Position2" and so on through 11. Remember, there is no such thing as "Position12" and never will be, because the game will crash if you use any number more than 11. As far as we're concerned, there is no such number as 12
These positions actually represent each of the icons on the GCSM. Position 0 is the same as Persona0 in ChallengeMode.INI, which is General Granger, the Air Force General. Same goes for all the other 8 Generals. Now then, to add your own General select icon, copy any piece of code where it says GeneralPosition#. I use Position0 here:

Code:
CHILD
          WINDOW
            WINDOWTYPE = PUSHBUTTON;
            SCREENRECT = UPPERLEFT: 152 198, ;<----- Coordinates for Upper Left portion of icon
                         BOTTOMRIGHT: 179 225, ;<----- Coordinates for Bottom Right portion of icon
                         CREATIONRESOLUTION: 800 600;
            NAME = "ChallengeMenu.wnd:GeneralPosition0"; ;<----- Use 0-11 ONLY. Must match this number to the persona number in ChallengeMode.INI
            STATUS = ENABLED+IMAGE+RIGHT_CLICK+CHECK_LIKE;
            STYLE = PUSHBUTTON+MOUSETRACK;
            SYSTEMCALLBACK = "[None]";
            INPUTCALLBACK = "[None]";
            TOOLTIPCALLBACK = "[None]";
            DRAWCALLBACK = "[None]";
            FONT = NAME: "Arial", SIZE: 8, BOLD: 0;
            HEADERTEMPLATE = "LabelSmall";
            TOOLTIPDELAY = -1;
            TEXTCOLOR = ENABLED:  254 254 254 255, ENABLEDBORDER:  0 0 0 255,
                        DISABLED: 192 192 192 255, DISABLEDBORDER: 64 64 64 255,
                        HILITE:   3 196 0 255, HILITEBORDER:   0 66 4 255;
            ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255 0 0 255, BORDERCOLOR: 255 128 128 255,
                              IMAGE: NoImage, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                              IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
            DISABLEDDRAWDATA = IMAGE: PlayerStartDisabled, COLOR: 128 128 128 255, BORDERCOLOR: 192 192 192 255,
                               IMAGE: NoImage, COLOR: 192 192 192 255, BORDERCOLOR: 128 128 128 255,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                               IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
            HILITEDRAWDATA = IMAGE: NoImage, COLOR: 0 255 0 255, BORDERCOLOR: 0 128 0 255,
                             IMAGE: NoImage, COLOR: 255 255 0 255, BORDERCOLOR: 254 254 254 255,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0,
                             IMAGE: NoImage, COLOR: 255 255 255 0, BORDERCOLOR: 255 255 255 0;
          END
Just to be clear, the start of the code for this button (icon) is CHILD and finish is at END.

This is basically your icon on the Generals Challenge selection map. Play around wih the coordinates and you will see that the icon also moves on the GCSM. To get exactly where you want the icon to go, I personally use the GenDev cameo mapper, because it tells you the coordinates really and it is very simple to use. Special thanks to Mastermind2004 for that tool.

You are done. Now you can select your own custom General on the map, and can go challenge other generals with him. That should be fun and exciting.
Mishkin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Generals Challenge, with Boss General. eldiano Generals & Zero Hour Editing 4 01-07-2008 08:04 PM
New Generals challenge KristinVanHorn Generals & Zero Hour Editing 1 02-02-2005 05:20 AM
Map Pic in Generals Challenge Mishkin Generals & Zero Hour Editing 5 11-29-2004 07:07 PM
how to add new general for challenge mode? homura Generals & Zero Hour Editing 9 09-10-2004 10:28 AM
New Generals Challenge Kameiccillo Generals & Zero Hour Editing 1 02-08-2004 02:39 AM


All times are GMT -4. The time now is 02:54 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.