C3 Frequently-Asked Questions

Application Questions

I have a suggestion for a feature or improvement. Where do I send it?

Send an e-mail to the developer at <gurth@xs4all.nl> and explain as best as you can what you would like the program to do that it doesn't now.

I found a bug. Now what?

Again, e-mail the developer at <gurth@xs4all.nl>, explaining what the bug seems to be and how you found it (that last one is the important bit—if I can't replicate the problem, I can't fix it). Providing a copy of any error reports will also be appreciated—remember that ⇧⌘4 followed by a press on the spacebar lets you take a screenshot of an entire window, that gets stored on your desktop.

If I try to open the same ’Mech more than once, C³ just switches to the window for the one I already opened. How do I open more than one copy of the same ’Mech?

This happens because of the standard way document-based applications in Mac OS X work: it is assumed you only need a single copy of each document, so if you try to open a document for which a window already exists, you probably actually want to work with that one—in other applications, anyway. You would sometimes want to have multiple copies of the same ’Mech, and it must be possible to change this, but I have not yet figured out how.

In the mean time, the solution is to open the ’Mech you want and save it under a new name (click the File menu and then Save As…, or press ⇧⌘S); once you have done this, open the original file again, and you will have two copies of the same ’Mech—just with different filenames. Repeat as necessary.

Certain large items, for example an autocannon/20, can be split over two adjacent hit locations according to the ’Mech design rules. How do I do this in C³?

It is not currently possible to do this in C³ directly, but you can get it to work by editing saved files. It is not recommended you do this unless you have some experience with writing computer programs, however. Please refer to the documentation page for details of how the files are set up: you will need to understand this before attempting to change them.

The way to do it is to first set up the record sheet in C³ the way you need it, except for the item you want to split over multiple locations. Save the ’Mech (⌘S) and using the Finder, go to the folder you saved it in. Right-click (or Ctrl-click) on the document and select Show package contents from the menu; in the Finder window that appears, open the file mechData.py using your favourite text editor (you may have to right-click it and select Open with or drag it onto the editor's icon in your Dock).

Now, in the dictionary inside the file, find the equipment dictionary, and in that, the dictionaries for the locations you want to mount the item in. In the dictionary for the first slot in which the item is to appear, set the value of the key with the slot number to the name of the item, and give the key slots an integer value equal to the number of slots the item is to take up in that location. (If the key slots is not already present, you can add it yourself; the order the keys appear in does not matter.)

For example, if you want to mount an autocannon/20 with eight slots in the left arm, starting in slot No. 3 and the remaining two in the left torso starting in slot No. 5, you would end up with something like this:

'la': {(...), 3: {3: u'Autocannon/20', 'slots': 8, 'destroyed': 0, 'rear': 0}, (...)}, (...) 'lt': {(...), 5: {5: u'Autocannon/20', 'slots': 2, 'destroyed': 0, 'rear': 0}, (...)}

The only problem with this method is that the weapons and equipment inventory would now show two autocannon/20s in the ’Mech: one in the left arm and one in the left torso. However, this should only be a minor inconvenience if you keep it in mind.

Operating System Questions

I downloaded the file and Windows tells me it doesn't know what to do with it! How do I get the application out of this .dmg-file?

That is because the file you downloaded is a disk image file for Mac OS X, which Microsoft Windows doesn't know a thing about—in fact the whole concept of disk images is pretty much foreign to Windows except for making copies of CDs and DVDs. But this is not a problem, since even if you could open it, you wouldn't be able to use C³ under Windows anyway.

Why does C³ not work under Windows?

Because it has been created for Mac OS X, which is an entirely different operating system than Microsoft Windows.

I'm a Linux (or other *nix) user and know I can't run Mac apps, but how do I mount the disk image so I can look at C³ under the hood?

Open a terminal and give the command mount -t hfs -o loop diskImageFilename mountDirectory to mount it. You may have to be root or use sudo (8) to get this to work, though (the usual warnings apply here—largely that, if you don't know what they are, you shouldn't).

And a similar tip for Windows?

As said above, disk images are rather alien concepts to Windows (and its users), so you will have to download an application that can open the DMG file. Although I have no experience with any of them, a little research points to MagicISO, TransMac and UFS Explorer being suitable programs for this purpose.

So how do I get it to run?

Get a Mac—or install Mac OS X on another computer. One of these options typically requires a lot more effort than the other.

Other Applications

Are there alternatives for those of us who are so poor or misguided that we don't use those wonderful Macs?

I know that work is underway on a similar program to C³ (in fact, its developer asked if he could copy C³'s window layout) that runs on any computer that does Java—that's to say, all three of the modern big operating systems: Linux, Mac OS X and Windows, as well as several others. A link will be added here when the program is available for download.

Is C³ an addition for Solaris Skunk Werks?

No, it isn't. All it can do is open saved ’Mech files created by that application, but it doesn't have anything else to do with it.

Language & Ports Questions

Which language is C³ written in?

The actual code of C³ is Python, using PyObjC to link it to the menus and windows created using Apple's Interface Builder.

If it's mostly Python, can C³ be ported to another operating system?

Maybe. Probably not. The reason is because the program is heavily dependent on structures provided by Mac OS X, for example the way the windows are created, so porting it to another operating system would require building those entirely from scratch. Perhaps the only exception consists of OpenStep-compliant systems, but even for those there would probably be a lot of work—if it is possible at all (since OS X is not OpenStep-compliant).

Will C³ work on (or can it be ported to) the iPhone, iPod touch or iPad?

Not without a lot of work. At first sight, it should be fairly simple: all these devices run iPhone OS, which is very similar to Mac OS X. However, the user interface for the program would need to be completely different, so at the very least that part would need to be created from the ground up. The real problem, though, is that iPhone OS does not include Python and PyObjC, both of which are necessary for C³ and come as standard with Mac OS X. This means that the code would also need to be rewritten in Objective C—in which case you're looking at an entirely new program. This would take almost as much effort as creating a Linux/Windows/Java/whatever version.

Should I ever decide to learn Objective C and rewrite C³ in that, an iPhone OS port will probably follow right along. Just don't hold your breath waiting for it …

So if I own an Android/Symbian/Windows Mobile device, I'm really out of luck?

Yes, and to make it even worse, you certainly will not be able to run C³ on it.

This looks great but it's annoyingly Mac-specific! Why don't you (re)write this in Java/JavaScript/REAL Studio/Flash/<insert your favorite language here> so it'll be cross-platform?

There are several reasons for this. One is that my grasp of several of the languages that could be used for such a cross-platform appliction is rather limited (though I don't claim to be a Python-guru either) so I would have to learn one first before I could write this program as a cross-platform one. More important, however, is because Mac OS X provides a variety of frameworks that take a lot of the work of actually creating the application away—put simply, it is frankly easier (though not necessarily less frustrating …) to rely on Cocoa to take care of all the mundane things like managing windows, showing open and save dialogs, etc., than to have to code all this by hand like you would need to do in most other languages.

In addition, I am not a fan of Java (the most frequent suggestion for the language that should be used for C³). I can't really put my finger on it, but I don't like the language, and I think Java programs almost never feel like native programs—regardless of the operating system the original maker used or the one you run them under. I much prefer a program where everything works like in every other program on my computer, than one in which I have to remember that ⌘W doesn't close the current window, for example.

Seeing as how you won't or can't, I would like to create a version of C³ for another platform myself. Is that OK by you?

Yes, it is. You can look at the source to see how C³ works and base your version on it. If you have any questions, contact me so we can talk about it—especially if you want to call your version as well.

Source Code Questions

Where is the source code?

Here is the full Xcode project for the current version.

Additionally, if you have C³ on your computer already, you can examine the source code (but not the NIB files) by looking in the application bundle: on a Mac, right-click or Ctrl-click on the application's icon and choose Show package contents from the menu that appears. Then go to the Contents/Resources folder.

On another operating system than OS X, after opening the disk image you should find a folder called C³.app inside; this is because Mac OS X applications are actually folders (but Mac users see and interact with them as if they were simple files). You can enter this folder normally, and in it, again go to the Contents/Resources subfolder.

How do I unpack the source file?

Some programmer, if you don't even know how to handle bzipped tarballs ;)

Oh, alright, then … On a Mac, just double-click the file's icon and Archive Utility (or BOMArchiveHelper) will take over from there.

Most Unix systems (including Mac OS X) come with a command-line bzip2 and tar already installed. Because of this, the file manager provided by your GUI will likely be able to open the tarball if you doubleclick its icon. You can also use the terminal window: cd to the directory that holds the source, then give the command tar xjf sourceFile to unpack the tarball.

Windows users are probably best off with 7-Zip.

What resources do I need to work with the source?

If you want to run the code, you will need Python; it probably does not matter if you go for version 2.x or 3.x with the current code, though it was written using 2.6. Any Apple Macintosh computer that runs OS X already comes with Python pre-installed, as do many Linux distributions, but on a Windows machine you will have to install it yourself. Due to the way the program is set up, though, you will not gain much from running the Python scripts by themselves.

The Python files (the ones whose names end in .py) can be opened for viewing or editing in any text editor, though I would recommend one that does syntax highlighting (and, for obvious reasons, knows how to do that for Python).

To use the .xib-files (in the xx.lproj folder, where xx is a language name or code, though currently only English.lproj is included), you will need Interface Builder; the latest version of this is available as part of Xcode on the Apple Developer web site (you may have to register as a Mac developer in order to download it, but this is free). Alternatively, all Mac OS X installation DVDs include an installer for Xcode in the Optional Installs folder, though this is probably not the latest version unless you recently bought a Mac or a separate version of OS X.

Why is the code such a mess?/Why is <foo> implemented in such an awkward way?

Because I am (almost) entirely self-taught when it comes to programming/am learning this shit as I go along. As a result, harsher words than that are frequently employed.

Miscellaneous Questions

How do I type the ³?

It depends on your operating system and what you want to use it for.