Your game log names a contract file as the first error, so ksp contract mods are the place to start. You open your project folder in CellHalo and ask the agent to read the log. It finds the line, opens the file, and points to a missing closing brace. The diff shows the one line that changes. You accept it, start the game and check the log again. If another error remains, you repeat the same four steps with the next file, and you keep the earlier version until the game loads cleanly. Work in small steps, because one change per load tells you exactly which edit helped. This guide uses a part file as the example, since contracts and parts share the same readable format. At the end of each round, write one line in your notes: which file you changed, which line the log named, and whether the error disappeared. Read the whole diff each time, even when it is only one line long.
01
Open the folder
Open the project folder that holds your add-on in CellHalo, so the file tools work there and the agent can list, read and search every .cfg file inside it. Keep the folder small, because a smaller folder means fewer files to search. You can also ask the agent to list the folder first, which gives you a map of the add-on before you search anything.
02
Read the log
Ask the agent to search KSP.log for the first error line and to name the file it points to, then read the line yourself before you continue. The card shows the real search result, not a summary.
03
Fix the file
Let edit_file change the line, read the diff in the chat, and accept only what you understand. In Ask first mode the agent waits for your OK. Keep a copy of the original in a second folder. If a line looks wrong to you, reject the change and ask for another suggestion.
04
Test in the game
Start the game yourself and read the log again to see whether the error is gone. CellHalo never runs inside the game, so this check is yours. Repeat from the log step if a new error appears.
Example part configuration
CellHalo · Fix contract error● Ask first
Find the first error in KSP.log and fix the missing brace in the file it names.
grepERROR1 match
read_filecontract.cfgread
edit_filecontract.cfgsaved
grepERRORno match
waiting for your OK before the next stepRejectAccept
part.cfg
PART
{
name = examplePart
module = Part
title = Example Part
description = A placeholder part
mass = 0.5
cost = 100
}
This is a placeholder part in the plain-text config format of the game. It has a PART node, an opening brace, key = value lines for name, module, title, description, mass and cost, and a closing brace. The most common error in such files is a missing closing brace, which stops the add-on from loading, and grep plus edit_file can find and fix it. Replace every value with your own before you use it, and keep a copy before you edit anything. Contract and tech-tree files follow the same readable pattern, so the method in this guide applies to them too. Compare the mass and cost lines of two parts when you want a quick sense of balance. Add one key at a time and load the game between changes.
A ksp modding guide for safe edits
Read the log file
Start with the log, because the first error line usually names the cause. You ask the agent to search KSP.log. read_file loads the log and grep returns the first line that contains an error, together with the file it mentions. The card shows the line itself. Many add-on problems are findable this way: a folder in the wrong place, an add-on built for a different game version, or a missing dependency add-on. Do not change anything yet. Read the line, decide which file it points to, and write down the name so you can check it in the next step. If the log has many lines, ask for the first error only, because later errors are often a result of the first one. Ask for the line number if the card does not show it.
Find the contract file
Use list_dir and glob to map your project folder so you can find the contract file without guessing. list_dir shows the folders in GameData, and glob lists every .cfg file under the add-on that you are working on. Confirm that the file named in the log is really inside your own add-on and not inside someone else's. People who ask for help to find missing ksp mods usually just have a folder in the wrong place, and this step shows it. Write the path in your notes. Then ask the agent to open the file with read_file and read its lines aloud in the chat, so you know what the contract definition contains before you edit it. Confirm the list before you move on.
Edit the contract file
Now you let edit_file fix the line. The agent opens the contract file with read_file, finds the missing brace or the typo, and prepares the change. A diff appears in the chat with the old line and the new line, and in Ask first mode the agent pauses before it writes. If you want to shrink an add-on, scale down part mods by changing the numbers on the mass and cost lines yourself and comparing them in the diff. Accept only changes that you understand. Keep a copy of the original file in case you want to go back, and save the copy under a new name with write_file if you want the agent to do it. Then load the game.
Load the game and check
CellHalo cannot run the game for you, so you check the fix yourself. Start the game and look at the log again. Ask the agent to run the same grep search on KSP.log, and the card tells you whether the error line is still there. Add-ons for planet packs can fail for the same reasons, which is why troubles with planet pack mods often start with a missing dependency add-on. Add-ons that change graphics, such as performance friendly graphics mods, follow the same rule: change one thing, load the game, read the log. When the log is clean, write the date and the change in your notes, so you can find the last working state later.