This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is the Equipment .class file?
I have unzipped the MegaMek.jar file and wanted to change some of the prices in the game for my own custom price settings.  The weapons were easy enough to find, but I cannot find any of the equipment.  Specifically looking for the C3 Slave, C3 Slave Boosted, and C3 Remote Launcher Ammo.
EquipmentType and MiscType
Thanks!  Found exactly what I was looking for. 

Curious though, is there a better .class editor than one I am using: "ce2.25"?  It doesn't show me all the variables (like tonage, criticals, bv, so on...) but I can fiddle with the one thing that really matters (c-bills cost), matters to me at least, and I cannot do a search of the file.  So I have to manually flip through everything or sort by "class", "double", "fieldref".  This helps, but would be easier if I could just search the file.
Don't edit the class files, edit the sourcode and compile it yourself.
Any chance there is a tutorial out there somewhere on how to compile the sourcecode?

-just so it's clear, I'm not fishing for one of you to teach me step by step how to do it. I don't mind reading up on it - I just have no idea where to look. Can someone point me at the starting line?

Should I be looking here first?
I am in the same boat as Alemnyr.  I find what I can and figure it out as I go.  I have no idea how to find the sourcecode, let alone compile it.  If you want to point in the direction to where the sourcecode is and what I should use to edit it I can try to figure out the rest on my own.
If you go here:

you'll find instructions on how to use Subversion to download the source code.

To get a copy of Subversion as well as info on what it's for and how to use it, check here:

For editing the .java files, you can technically use any plain text editor.  However, I'd recommend using an IDE (Integrated Development Environment) as it makes things much easier.  There are free options available:
Eclipse is extremely popular and what I suspect most of the MM developers already use:
Personally, I prefer Intellij Idea (Community Edition is free) but it's just personal preference:

Once you've made your changes and need to compile the code, you can do so straight from a command line interface:

But you'll probably have an easier time using Ant to process the build file:

One of the nice things about Ant is that there are plug-ins to integrate it into various IDEs:
Intellij Idea:

Overall, that should be enough to keep you busy for a while.

If that all is a bit much (and I can certainly understand that view for a hobby project), you can also go to the MM sourceforge site and submit a feature request for the changes you want and someone already working with the project may take it up:

However, if you do that, you'll need to be patient.
There are step by step directions for building the SVN here


Hope that helps.
Wow. thank you so much. I was just going to try to muddle through it - but I think you just took me from start to finish.
It's awesome to be able to build the SVN.

Took me a couple of tries but I got it working for all the programs.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Class Limits? innocenteric 7 2,018 02-08-2017, 09:15 AM
Last Post: Groggy1
  Your force has no one capable of acquiring equipment. scJazz 3 2,505 01-12-2014, 10:48 AM
Last Post: scJazz
  Missing Equipment for the parts list saracen 20 6,808 01-25-2012, 12:30 PM
Last Post: ralgith

Forum Jump:

Users browsing this thread: 1 Guest(s)