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?
#1
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.
Reply
#2
EquipmentType and MiscType
Reply
#3
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.
Reply
#4
Don't edit the class files, edit the sourcode and compile it yourself.
Reply
#5
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? https://sourceforge.net/apps/trac/source...Subversion
Reply
#6
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.
Reply
#7
If you go here:
https://sourceforge.net/scm/?type=svn&group_id=47079

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:
http://subversion.tigris.org/

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:  http://www.eclipse.org/
Personally, I prefer Intellij Idea (Community Edition is free) but it's just personal preference:  http://www.jetbrains.com/idea/download/

Once you've made your changes and need to compile the code, you can do so straight from a command line interface:
http://docs.oracle.com/javase/1.4.2/docs...javac.html

But you'll probably have an easier time using Ant to process the build file:
http://ant.apache.org/

One of the nice things about Ant is that there are plug-ins to integrate it into various IDEs:
Intellij Idea: http://www.jetbrains.com/idea/features/ant_maven.html
Eclipse: http://www.eclipse.org/eclipse/ant/

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:
https://sourceforge.net/tracker/?group_i...tid=448397

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

http://megamek.info/forums/index.php?top...781#msg781

and

http://megamek.info/forums/index.php?topic=25.0

Hope that helps.
Reply
#9
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.
Reply
#10
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.

Enjoy.
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)