Post tutorial RSS MechCommander - Starting conditions - *.pkk work

This article contains informations about modding the start files for MechCommander. The information contains infos about *.pkk, *.mpk, *.sol & *.sav files!

Posted by on - Basic Starting a mod

Modding BannerDOWNLOAD MCG Darkest Hours v4.2 here
(Remastered MechCommander)

MechCommander Gold - Download Collection


*.sol/*.pkk/*.mpk files & PKK work!
DEFINITION: What are PKK-Files?You can find those files into your MC Gamefolders "Data\Savegame". PKK files are starting conditions for solo campaigns. SOL files are starting conditions for Solo-Missions. MPK files are starting conditions for Multi-Player Scenarios. All those are compressed with the same *.fit file format index. The files are compressed chronologically following its alphabetical order of filenaming. One Start.pkk may contain Masterpurchase (initstore) and Mastercampaign (masterdefinition) file and one file for each warrior, mech, vehicle. So a PKK file with three warriors, three mechs and one vehicle always contains nine indexes. Each warrior/mech/vehicle more means one more index file into PKK/SOL/MPK file. The only difference between *.pkk and the other two extensions is that *.sol & *.mpk always have only two indexes by default. Only master and initstore. The reason is that in those game modes the players actually have a blank inventory and an unlimited shop to purchase a crew of choice instead of having certain mechs and warriors at the beginning. For that reason those doesnt contain indexes for Warriors, Mechs or Vehicles. But technically it would be possible to do so.
Klick here - to see how indexes are stored in detail for this example. This is the original development thread of my first Mod-Version Ultimate.

PKK WORK - How to by Martin Bryant, April 2000

Martin Bryant
Apr-23-00, 12:10 PM (EST)
"xStart0.pkk - How It's Done"

The 'xStart0.pkk' file in the 'savegame' folder is the initial purchasing file for the expansion campaign. (Similarly 'Start0.pkk' is for the original campaign.) This is the file you need to replace if you wish to setup any starting conditions (mechs/warriors/components/vehicles already owned and/or mech/warrior/component/vehicle restrictions in the purchasing list) for your own custom campaign.

In this article I will outline the procedure to create your own 'xStart0.pkk' for your own campaign, highlighting some of the pitfalls and difficulties involved. Please follow all steps carefully. The procedure works for me on a number of test missions linked into a campaign but I cannot guarantee your success if you miss anything out. Nor has the method been tested on the endless possibilities you guys will no doubt now throw at it. However I'm sure there'll be enough info here for you to iron out any creases yourselves. Also backup your original xStart0.pkk if you haven't already done so.

(I will not go into the hacking of sol.txt and issolo.pur (or clansolo.pur) here, as many of you know how to do this already. )

OK, so you've got your campaign planned and you have your missions built and have customised the sol.txt and issolo.pur to give you the starting conditions for the first mission of the campaign. You've saved all your missions, generated the .DPK files and extracted them. Let's assume you've called your first mission 'mycamp01'. When you saved the mission in the normal editor it will have generated a 'mycamp01.sol' file from your customised sol.txt and issolo.pur. This is the purchasing file used when you play the mission solo.
Now the first major realisation is that the format of '.sol' files is the SAME as 'xStart0.pkk' and ALSO any '.sav' files.

So COPY 'mycamp01.sol' OVER 'xStart0.pkk'. Is that it? Unfortunately no

If you now run MC and click on 'Expansion Campaign' you should succesfully get into the main mission logistics area. Ignore the map for the moment (and certainly don't try to launch the mission!) and click on 'Purchasing'. You should see that your customised initial conditions and purchasing list are indeed in place. Now click 'Briefing/Deployment' to switch back to the map. Now one of two things will be apparent here. If your mycamp01 mission is based on Port Arthur, then you should see the map of the first mission of the original MC campaign. If your mycamp01 mission is based on Cermak you should see your own mycamp01 map.

Why is this? Well, I guess the logic programmed into MC is along the lines of "if I have a Port Arthur purchasing file then run the original campaign missions, else run the expansion missions UNLESS they are overridden by the presence of an xMechCmdr1.FIT file". So if you have a Cermak mission you're alright but if you have a Port Arthur mission you have to jump through an extra hoop...

Close MC for the moment.

To get a Port Arthur campaign started you must precede it by a dummy Cermak mission (don't worry, I'll show you how to skip this when the campaign starts so it's no problem). So create a dummy (i.e. does nothing, no fancy terrain, minimum one enemy mech and one drop point) Cermak mission (say 'mycamp00') to be the first mission of your Port Arthur campaign and apply your purchasing hacks and save it and DPK it and extract it. Now copy 'mycamp00.sol' over 'xStart0.pkk'. Now run MC and confirm that when you go into 'Expansion Campaign' you too can now see your own purchasing list and dummy Cermak map. Now close MC.

Now create a new 'xMechCmdr1.FIT' campaign file (either manually or using the editor 'Extender') for the missions in your campaign (include the dummy Cermak mission if applicable) and copy it into your missions folder.

Now run MC and select 'Expansion Campaign'. You should still see your own purchasing list and map. Select the pilots/mechs you want for the mission and click 'Begin Mission'. You should get into your mission ok. If you don't then there's probably an error in the 36-character mission ID string in your xMechCmdr1.FIT file. Complete the mission either by playing it or using the CTRL-ALT-W cheat. You should get back to the logistics screen and see your second mission in the map area. Your pilots/mechs/salvage will be carried over from the first mission. Close MC.

Now, if you had to add a dummy Cermak mission this is what you do to skip having to play it each time you run the campaign. MC will have created a 'CermakAfter_Op1_Mis1.sav' file. Remember I said that '.sav' files have the same format as 'xStart0.pkk'? OK, so copy 'CermakAfter_Op1_Mis1.sav' over 'xStart0.pkk'. Now run MC and click 'Expansion Campaign'. This time the 'xStart0.pkk' file has a pointer within it to start at the 2nd mission in the 'xMechCmdr1.FIT' file i.e. your first real Port Arthur mission. So you should get straight into your first real mission this time having skipped the dummy Cermak one. I guess this is exactly what WolfCross did for his DSCRaid campaign as if you look at his 'xMechCmdr1.FIT' file he has the first two mission ID's duplicated.

OK, that should get you started in the campaign with your own purchasing setup. However you should bear in mind that the pre-programmed addition of purchasing items between missions (i.e. the "add 2 more of these and 3 more of those and one of the other, and make pilot X available..." whatever...) may cause you some problems. I do not currently believe that we will ever be able to customise this pre-programming completely, although some of it may be overridden (e.g. by totally excluding an item), so you'll have to cater for it through your campaign.

Good Luck!

And I look forward to playing all the wonderful campaigns that are in the works.
(If you have any questions for me regarding this article then please post it here but ALSO send it via email to martinbr@colossus.demon.co.uk as I don't get back here as often as I pick up my email.)



PKK WORK THREAD
In this thread the main objectives are just two ( single-player campaign related) files. These are the two files defining the starting conditions on both playable campaigns (original & expansion merge). They are in games savegame folder, here is the path they should have:

C:\Games\MCGfolder\data\savegame\Start0.pkk -> Original start files compressed into one pkk
C:\Games\MCGfolder\data\savegame\xStart0.pkk -> Expansion start - see above

C:\Games\MCGfolder\data\savegame\XXX.mpk -> Multi-Player Scenario purchase starting conditions
C:\Games\MCGfolder\data\savegame\XXX.sol -> Solo-Missions Scenario starting conditions

Quote from cMunsta

bbc_standard_quote wrote: From original cMunsta extract

Just a quick note to say what the format for the file list
used by MAKESOL and MAKEFST is as follows:

u filename
c filename

The first letter is a command to say if the file should be
compressed or not. (u = uncompressed, c = compressed).

The filename can be any file relative to the directory to tool
is in. That is, if the tool is in the MechCommander Gold game
directory, the the tool will have access to all files in this
dir and all subdirs below it.

Do not use a ".\" in front of the filenames. If you wanted to
access say, "test.abi" in ".\data\missions", then the filename
to use would be data\missions\test.abi

Note that this precludes having spaces in the filenames.

The list should have one command/filename pair per line, the
command should be at the start of the line.

____________________

*.pkk files are same format as *.sol / *.sav files in MCG.


You can find them on your
"MCG-Gamefolder\DATA\SAVEGAME"
In order to edit starting mechs you need to edit campaigns starting mech teams. You find them in the folder above.


Another example
four warriors + three mechs + master + init = nine indexes again, one more warrior and one less vehicle then in example above:Quote

bbc_standard_quote wrote: Start0.pkk -> original campaign starting crew including index *.fit files:
- index0.txt - masterdefinition
- index1.txt - warrior 0
- index2.txt - warrior 1

- index3.txt - warrior 2
- index4.txt - warrior 3
- index5.txt - mech1
- index6.txt - mech2
- index7.txt - mech3
- index8.txt - initstore = purchase00.fit


(XStart.pkk would be Expansion campaign starting crew)


While working on pkk files for a day now I think I found out why all user campaigns have a not working mission / scenario 0. It seems as if game only accepts the vanilla start0.pkk in the first mission. By introducing a number 1 fake mission without any functions they skipped it and worked around the crashes which are caused using start0.pkk as first mission file. So actually when you work on sol files keep that info in your mind.My theory is that all user campaigns actually get start0.pkk working by fooling game as if it was start1.pkk. I'm trying to reverse that at the moment but come to the conclusion that I need to use vanilla warriors,mechs and vehicles at campaign start. Also there might be a hard-coded max of warriors and units u can own in mission one. This means I try to work on vanilla start pkk now trying to use and edit original fit files from mission fst file.


When I started my modding my intention wasn't to change starting conditions. While trying to do that now and being limit in acting by borders game dictates I think it is easier to leave starting conditions 80% vanilla. I think it is better in the end the way I try to build around these limits. I include missions in which you can build your team of wishes on our own.Like in my first campaign mission, which is the 1st original campaign mission I can introduce other units or warriors by getting them in missions or make them available in shop and adding new missions with enough rp gain to use shop through hole campaign. One big disadvantage of user campaigns was the missing shop data or corrupted purchase links. This is what I fixed in my mod. So you will have mostly vanilla start formation with ur mechs and warriors but u can gain alot mechs in the campaign missions by salvaging like a mad cat j in mission 1 for example.


The biggest start0.pkk I found in exodus campaign files. It is an argument that exodus needs more equipment to play from the beginning cause exodus missions are the hardest challenge of all mods. To compensate that having only vanilla start formation in my campaign I put the other user campaign missions in front of exodus. Means u first play 1 original,3 xray missions and 2 from xenocide before you play first exodus missions. So in my campaign it won't be the small crew of the start when u entering first hard missions but the team u formed in the first 6 missions. Later I can add other original missions in campaign to compensate imbalances related to the order of missions and it's individual difficulty.


Obvious question but where are you finding these pkk files? I can't find half the files I know I had this time last year. Are they in one of the .PAKs?


Download MechCommander Gold Original or Darkest Hours v4.2 - for full potential & Extracted-Game-Files from my download link collection.

When you mod MCG in general you need those folders:Gamefolder\data\art -> all art files u work on save here including pictures for pilots in missions
Gamefolder\data\art\artlog -> pictures for pilots and nameplates
Gamefolder\data\missions -> all mission and campaign files including purchase files and mission data
Gamefolder\data\missions\warriors -> warrior files and mission brain data
Gamefolder\data\objects -> pilot descriptions, units descriptions
Gamefolder\data\terrain -> all mission map data

The *.pkk / *.sav (both single-player campaigns) / *.sol (solo-missions) / *.mpk (Multi-player scenarios) files you find in:
Gamefolder\data\savegame\...
How to edit startfiles

bbc_standard_quote wrote: Shell commands:

[GENERAL]
Code: [Select]dir /a-d/b/s >list.txt
-> Generates a textfile with including list of files from root directory (where command is started from). But how do i extract the files before making a list to compress them when edited? Read below!

SOLEXTRACT (extracting *.pkk, *.sol file extensions based on compressed indexes):



Code: [Select]solextract start0.pkk -1 index.txt
-> Shows you how many files are compressed in the related *.sol index library
In my example i use original start0.pkk containing indexes 0-8 (9 single text {fit} files )


Code: [Select]for /L %n in (0,1,8) do solextract start0.pkk %n index%n.txt
-> orders shell to extract index 0,1, till 8 so it creates 9 *.txt files including all fit-data from the extracted start0.pkk. If it works right you should have 9 new files looking so:

List of created files:
index0.txt
index1.txt
index2.txt
index3.txt
index4.txt
index5.txt
index6.txt
index7.txt
index8.txt

The data stored in this file you can see as above (file name isn't important just the order). When will be compressed is important to keep that order dictated by the first file (the masterdefinition) so u can rename them, but when creating the list.txt file later do compress and create new *.pkk in correct ORDER. I rename them, so you know what data you have in that start0.pkk:masterdef.txt
Hawk.txt
Lynx.txt
Hunter.txt
Beast.txt
CommandoA.txt
CommandoW.txt
FstarterW.txt
initstore.txt





masterdef.txt -> is like a rules.ini having all starting crew information with links (Pack order) to the existing files in same *.pkk. It also dictates the order the following txt files need to be packed.

Warriors, Mechs, Vehicles -> are the following *.fit/*.txt files. If you add one or take one out or change order you also need to update this in masterdefinition file otherwise game will crash because the order of masterdefinition needs to be the exact order like above. For more take a deeper look into masterdefinition file. Study it and make small changes to see what effect it has. It works a bit complicated needs time to find out how.
initstore.txt -> Needs always to be a copy or same data like purchase00, the initial store at the campaign beginning. Keep these two files always synchronized.You can change it or making a self made pkk with that files now. In order to do so use the makesol.exe. This requires a list where the files you want to pack are listed. This list has to be the order as above shown, here an example that works quite well with the original files:
Content of list.txt for makesol (be sure the files are in the same folder):

c masterdef.txt
c Hawk.txt
c Lynx.txt
c Hunter.txt
c Beast.txt
c CommandoA.txt
c CommandoW.txt
c FstarterW.txt
c initstore.txt

This simple list orders makesol.exe from cmunsta to create a new start0.pkk, therefore use this command:

C:\workfolder\makesol list.txt start0.pkk
(be sure there is no start0.pkk anymore in same folder otherwise it can crash or problems overriding file with same name).If everything worked fine you have a new start.pkk now... - or to be exactly u made a copy of the original. Now copy that into game folder and try if it works. If you can play like before it was succesful and you can begin making changes (only a few per step recommended to reduce lack of searching for bugs and mistakes), save the txt file, pack/create new *.pkk, copy it to game folder and test again.If no other way found to handle problems by creating start files for campaign. Also manually writing the files is much work and humans do mistakes, so it is a hard challenge handling these files - making them work at the end with my experience.



That's a simple reminder i wrote while working on pkk files which are actually savegames. No real difference but file extension is different all in all *.sav, *.sol, *.pkk & *.mpk are in same way compressed index files and, that's why u can edit them with cmunsta's sol tools.
The *.FST and *.DPK files are compressed with file names and folders (sub-folders) as libraries. But actually .dpk and .fst are actually the same file format too (its shape file format with 6bytes added at the beginning).


Old Thread Content - MCG Darkest Hours Full version 3.0 is released and working fine!
If there are any wishes for starting mech teams this is the time to gimme ur personal wish list of mechs and vehicles on campaign start of my MCG merge. At the moment there is:- original startup with mechs and warriors vanilla (hard)
- ultimate start0.pkk (to download where mod files are) -> starting with more mechs, including jagermech and some refit trucks (normal/easy)

Planned are all existent user campaign start-ups to be in final mod. To change your starting crew at major campaign merge then you only need to backup start0pkk in games savegame folder and then replacing with other start0.pkk by copy and paste or renaming the other start pkk file. So players can decide with what startup mechbay they wanna play.
---

Newer content
mod version 2.0 contains 3 pre-installed new start.pkk files. Two files optional for original overriding campaign (look your mods savegame folder start0.pkk=original overriding xstart0.pkk=expansion overriding) and one for expansion.Ultimate startup normal (overriding original):
4 pilots
3 mechs unassigned
3 light mechs assigned
3 refit trucks
Ultimate startup hard (look above):
4 pilots
3 assigned light mechs (vanilla startup)
To play hard style go to your savegame mod 2.0 folder and rename the matching start0.pkk to start0.pkk (backup or rename the other startup before overriding).
To understand
All starting warriors, mechs and vehicles in player mech bay are saved in start0.pkk for original campaign and xstart0.pkk for expansion (later start-ups will follow to dynamic decide on your own with what combo you wanna start to make it a challenge or fight with your dream team).

Ultimate expansion startup
Several new pilots in shop
Solid mechbay with two mad cats in starting team formation.


Hi RizZen and anyone else.

I've been enjoying Darkest Hours v3 for a couple of weeks now.
It's an amazing release and I'm so happy and grateful this old game still gets such love, I've been playing it on and off for almost 20 years :D

Thought I'd share my custom start0.pkk in case anyones interested.
Drive.google.com

Changes:
All four starting pilots are green.
3000 RP
Starting mechs are two Commando-A and one Firestarter-J with heavy flamer and large laser (I'm pretending it's two COM-2D's and an FS9-K).
No components in inventory and none available for purchase at the start.

I like playing the campaigns sticking to MCG interpretations of canonical variants and then "selling" extra pilots (personal) to represent man hours for reasonable modifications :p
Along with a slew of other compulsive rules made up, it makes the game more interesting and immersive for an old battletech lore buff lol

Anyways, thank you so much for the awesome release!!!


Hi,
thank you for your gift. Nice to see someone is working on my files. I wanted to create more starting files too but am very happy to see this. When you have more things to release or ideas/wishes to share your free to publish it for darkest hours ;).
Have funRizZ

Here are mine:
Modding starting conditions - customers choice!

RizZen's MechCommander Modding start files workfolders download!


While walking through the original campaign merge i further analyzed the problem mission that causes one pilot to be randomly removed after the battle.

We are talking about OrgMrg Operation 4, Mission 16!



In the first place you have to clean the map north side the river in order to deactivate the rocket-turrets of the enemy base south side.

With your condor you have to kill three air-strike tanks and some elementals. When you did right you can enter the south side of the enemy base and the north side cleaning without using your air strikes. Try to get next to the south side of the base while the enemy tanks use air-strikes against you - use their airstrikes to get entrance to the base.

When you succesfully got two new pilots you can clean the rest and head for the extraction marker.

Now the issue:
After the mission you will loose one pilot randomly. For now there is no comfortable solution for this issue.
After further analyzing the savegame (after mission) i found out that there is no pilot missing. It seems as if one pilot (in the Mad-Cat) joins your lance, the other takes place in the mech you had one of your own warriors in. This warrior isnt shown anymore ingame.
In savegame the warrior still exists. After cleaning mechbay (put all mechs/pilots back to storage) i saved the game and extracted the save file. Right now i had 38 warriors. Ingame it shows only 37. In savegame there are 37 warriors in my base. But there is although ONE pilot assigned - which is just assigned - but not in a mech anymore. This is the missing pilot. I could "repair" the savegame to make it possible to play on with ALL warriors.
You can find the savegame (repaired version) as attachment below. In this case it was me who was missing. I was assigned in a Turkina-J (as first warrior in list) - but vanished after mission. Instead RizZen - there was Outlaw in my Turkina and the "Shadow Cat" seems to be vanished.
The savegame contains although new mechpaints for all pilots. It's my "black" edition.


In order to solve this bug finally i need to work on the mission source again. That isn't priority right now but i just would like to keep you informed about the issue. I think it will be possible to save this (one of the last remaining) bug of v4.0.


(c) by RizZen (2017-2020) - recovered webarchive wayback machine information

Comments
Cyber_Lord
Cyber_Lord

Nice!

Reply Good karma Bad karma+3 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Related Games
Modding MechCommander
Modding MechCommander Real Time Strategy
Related Groups
MechCommander Gold Modding
MechCommander Gold Modding Developer & Publisher
RizZen
RizZen Publisher