Hosted Projects - Non-FreeSpace > MechCommander OmniTech

Adding a Mechwarrior

(1/7) > >>

Autohummer:
While there is a guide on adding mechs, warrior brains and modifying purchase files, I cannot seem to find a guide on adding a new Mechwarrior to MCO. I have dug around the MCO files a bit but could not figure out how new Mechwarriors (such as those from MC1) were added. Much thanks for an answer.

Karl:
Hi Autohummer,

I think it can be done easily with the new abl codes of recent releases.

I will have a crack and report back if you would like?

Autohummer:
I have looked a bit at the abl library (this is new to me) and the following concerns pilots:


--- Code: ---25.
New ABL command - hirepilot(pilotFileName)
Effect: Add pilot to players roster; Example: hirepilot("pmwlynx");

26.
addnewpilot(MechID, "pilotFileName", "brainFileName");
MechID - part id for mover (getunitmates(squadID)) from squad ID.
pilotFileName - name of the pilot file (pmwlynx).
brainFileName - name of the brain file (pbrain, dredattack01,...)

Effect: Create new pilot from file and add to selected mech. It also sets the brain file.
If the pilot exists it will overwrite the pilot. DO NOT add pilots that are used in SP campaign before, it will erase
all accumulated experience. Use only to add new pilots. If the pilot is already on players roster, pilot icon will
not change. Must use script to remove mover from player then add it back after calling this command eg.:
   addnewpilot(Commando, "pmwgator", "pbrain");
   addmovertoplayer(Commando, 0, 2); //remove commando from player roster and add to allied team
   addmovertoplayer(Commando, 0, 0); //add commando to player roster

27.
(the same as addnewpilot but can be used for players units only - sets pilot icon correctly)
addnewpilottoplayer(MechID, "pilotFileName", "brainFileName");
MechID - part id for mover (getunitmates(squadID)) from squad ID.
pilotFileName - name of the pilot file (pmwlynx).
brainFileName - name of the brain file (pbrain, dredattack01,...)

Effect: Create new pilot from file and add to selected mech. It also sets the brain file.
If the pilot exists it will overwrite the pilot. DO NOT add pilots that are used in SP campaign before, it will erase
all accumulated experience. Use only to add new pilots. Allied team must exist in mission and must have at least one unit.
--- End code ---

These functions handles adding a pilot existing in the game files to a mech or add it to an existing campaign. What I would like to do is to create a new pilot from scratch and add it to the game.

I have looked at the pmwlynx.fit file for Lynx (IIRC the PMW files are for singleplayer and the PMP files are for multiplayer) in the data/missions/warriors folder. It is directly editable with notepad++ and I think I can use it as a base to make my own new pilot. However, there are a few parameters that I don't understand or am unsure of:


--- Code: ---[General]
st Brain = "pbrain"
st Name =                                                  "Lynx"
l Rank =                                                    1  <--- I suppose 0=Rookie 1=Regular 2=Veteran 3=Elite 4=Ace?
st Callsign =                                              "LYNX"
ul ID =                                                     228   <--- I suppose this has to be an unique ID? How do I know what numbers have been taken?
l NameIndex =                                               29   <--- I think this links to another file somewhere but I don't know which
l DescIndex =     42028 42003   <---  Same as above, but does pilot descriptions even show up in MC2/MCO?
ul HeadIcon =                                               0  <--- Seems to be 0 no matter what
l paintScheme =                                             31  <--- Seems to be 31 no matter what, but does this imply individual pilots can be given a custom paint scheme?
st pilotAudio =                                            "Lynx"   <--- Please help: I found Lynx.pak in the data/sound folder but I have absolutely no idea how to open this file
st pilotVideo =                                            "Lynx"   <--- I found Lynx1.bik-Lynx4.bik in the data/movies folder and it seems only MCG pilots have them, MC2 pilots who does not have movies uses "PILOT29" instead
l PictureIndex = 28   <--- I think this is the portrait for the pilot. The portraits are stored in the pilots_med, pilots_L2 and pilots_high.tga files in the data/art folder and Lynx's portrait is at the 29th if counted from left to right, top to bottom, implying that the "first" portrait has a PictureIndex of 0. However, for MCG pilots, they have another MCL_PR_(callsign).TGA files that has a bigger portrait and for Lynx's case, his description.


[PersonalityTraits]    <--- These four parameters are 50 for everyone. Do they actually do anything?
c Professionalism =                                         50
c Decorum =                                                 50
c Aggressiveness =                                          50
c Courage =                                                 50

[Skills]
c Piloting =                                               50
c Sensors =                                                50
c Gunnery =                                                55
c Jumping =                                                45

[Weapons] <--- What do these parameters do? MCG pilots have them but not the MC2 ones. Are they optional?
l Balistic_miss = 98
l Balistic_hit = 98
l Energy_miss = 242
l Energy_hit = 216
l Missile_miss = 0
l Missile_hit = 0
l lightMech_specialist = 2
l mediumMech_specialist = 1
l heavyMech_specialist = 1
l assaultMech_specialist = 0

[SpecialtySkills]
c LightMechSpecialist= 0
c MediumMechSpecialist= 0
c LaserSpecialist= 0
c LightACSpecialist= 0
c MediumACSpecialist= 0
c SRMSpecialist= 0
c SmallArmsSpecialist= 0
c ReconSpecialist= 0
c ToughnessSpecialist= 0
c HevayMechSpecialist= 0
c PulseLaserSpecialist= 0
c ERLaserSpecialist= 0
c LRMSpecialist= 0
c PPCSpecialist= 0
c Scout= 0
c LongJump= 0
c AssaultMechSpecialist= 0
c GaussSpecialist= 0
c HeavyACSpecialist= 0
c ShortRangeSpecialist= 0
c MediumRangeSpecialist= 0
c LongRangeSpecialist= 0
c Deadeye= 0
c SharpShooter = 0

[Awards]
c CampaignRibbon1 = 0
c CampaignRibbon1WithHonors = 0
c CampaignRibbon2 = 0
c CampaignRibbon2WithHonors = 0
c CampaignRibbon3 = 0
c CampaignRibbon3WithHonors = 0
c PurpleHeart = 0
c Valor = 0
c UncommonValor = 0

[Affinities]     <--- These parameters are 0 for everyone. Do they actually do anything?
c MechClass =                                               0
c MechType =                                                0
c WeaponClass =                                             0
uc[2] WeaponTypes =                                        0,0

[Status]
c Wounds =                                                  0
--- End code ---


EDIT: Found this guide for MCG, don't know how relevant it is to MCO though the file structure look mostly similar http://www.nogutsnogalaxy.net/stuff/Files/Mechcommander/CMunsta/Creating%20Warriors%20for%20MCG.pdf

P.S. The biggest problem I am facing is that I don't know how to work with those audio .pak files. My search suggests I need something called xplist.exe but the links are down.

EDIT 2: Found this tool: http://www.nogutsnogalaxy.net/stuff/Files/Tools.rar from here: http://www.nogutsnogalaxy.net/forum/index.php?topic=694.msg12054#msg12054 and managed to extract a voice .pak into 40 .tmp files that can be directly edited with audacity.

EDIT 3: I am now stuck at another problem, I have no idea what the DescIndex links to in MCO. It is stopping the pilot callsign from showing up properly and the portrait from linking properly. Game crashes when it enters pilot hiring screen, citing my made-up DescIndex number.

wolfman-x:
The abl commands can be used to add a pilot to a mission by script. The pilot needs to exist in the game and that means it needs to have pictures, voices, a skilltable and several declarations inside the system files and the source code. The later can not be done by abl commands.

Autohummer:
The DescIndex links to the mc2rel.dll file in the omnitech main folder. I used a resource editor to open the .dll and fill in the necessary lines. The DescIndex can be made-up as long as it does not conflict with the numbers in the strings already present in the mc2rel.dll file. I entered my made-up DescIndex and filled out the name and the game now reads fine. Next order of business is to import the voice files and portrait I have already prepared beforehand.

EDIT: Mostly got it to work except the audio which I save for tomorrow. I would like to know if there is a set format for the audio files.

Navigation

[0] Message Index

[#] Next page

Go to full version