Thread: Universal Profile Editor

Results 1 to 8 of 8
  1. #1 Universal Profile Editor 
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    Hi here is the initial download of my Universal Profile Editor tool.

    For those who havn't seen my project thread, the aim off this is to build a unique and universal tool for editing .dat files written using an ObjectOutputStream. The tool makes use of reflection found within the java api. The use of reflection enables the tool to be as universal as it is.

    The project thread can be found here.

    My Universal Profile Editor tool can be downloaded from here.
    Version is now 1.1 Version 1.1 allows for selecting of profile loading class from any directory. Using this version you do not need to manually specify the file name as an argument and the file can be loaded from anywhere.

    This is only the initial release and there are other things I will be implementing such as array expanding, custom profile creation (accounts with pre set settings) and more. There are a couple of interface changes I will be making aswell. The source is fully open source although I havn't included any licencing thats because I havn't got time for that shit.

    Spoiler for How to use can be found here.:


    The tool uses reflection to gather information about veriables within a class. It then displays this information and allows you to edit it from simple to use interface.

    Firstly you need to create a class which implements ProfileImpl which can be found within the download. This class is the fundimental loading/saving class and its up to you to load the values within your save files. The ProfileImpl interface contains three methods. load(ObjectInputStream), save(ObjectOutputStream) and prepare(). there is no need to open new files etc because the tool handles that. Hence why its giving you an Object stream in the parameter. Now for each value you need to load, create a new local veriable with the correct type. and then load them. This may sound hard but its really not. Its just how I've explained it really.

    Spoiler for Example:

    Code:
    public class TestProfile implements ProfileImpl {
    
    	/*
    	 * Our variables we are going to read from our save file
    	 */
    	public char testChar;
    	public float testFloat;
    	public double testDouble;
    	public String testString;
    	public int testInt;
    	public long testLong;
    	public boolean testBoolean;
    	public byte testByte;
    	public short testShort;
    	
    	public Item[] inventoryItems;
    
    	@Override
    	public void load(ObjectInputStream in) throws IOException {
    		testChar = in.readChar();
    		testByte = in.readByte();
    		testFloat = in.readFloat();
    		testDouble = in.readDouble();
    		testString = in.readUTF();
    		testInt = in.readInt();
    		testLong = in.readLong();
    		testBoolean = in.readBoolean();
    		testShort = in.readShort();
    	
    		for (int index = 0; index < inventoryItems.length; index++) {
    			int id = in.readInt();
    			if (id > -1) {
    				int amount = in.readInt();	
    				inventoryItems[index] = new Item(id, amount);
    			}
    		}
    	
    	}
    
    	@Override
    	public void save(ObjectOutputStream out) throws IOException {
    		out.writeChar(testChar);
    		out.writeByte(testByte);
    		out.writeFloat(testFloat);
    		out.writeDouble(testDouble);
    		out.writeUTF(testString);
    		out.writeInt(testInt);
    		out.writeLong(testLong);
    		out.writeBoolean(testBoolean);
    		out.writeShort(testShort);
    		
    		for (int index = 0; index < inventoryItems.length; index++) {
    			Item item = inventoryItems[index];
    			if (item == null) {
    				out.writeInt(-1);
    			} else {
    				out.writeInt(item.getId());
    				out.writeInt(item.getAmount());
    			}
    		}
    	}
    
    	@Override
    	public void prepare() {
    		
    		/**
    		 * Here we can initialize values that may possibly be overwritten when loading.
    		 * This is particually useful when loading a couple of values and then the
    		 * rest off the values can be initialized to there default state here. This
    		 * method is called immediately before load().
    		 */
    		
    		inventoryItems = new Item[28];
    		
    	}
    
    }


    Once you've made the loading/saving class add it within the source file and make sure that it compiles into the bin directiory. The class can be compiled on its own and then you can manually coppy the compiled .class file into the bin folder. Open up the Run.bat file and add the file name as an argument.

    Spoiler for Example:

    Code:
    @echo off
    title Profile Editor
    java -Xmx800m -cp bin; ProfileEditor Profile
    pause
    Where Profile is the name of the class we just made.


    Now once you've made the class, added the class name as an argument then you can run and edit your save files.

    Now there is a demo class called TestProfile within the source. It is there for an example and it won't load any profiles. There is also another example class called Profile.java and it is a working example. add 'Profile' as the argument and then you can load the 'lolol.dat' file I've included. The Profile class has been coppied directly from my server.



    Here are a couple of the latest pictures





    Visit Rune Miracle Here
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member derpscape's Avatar
    Join Date
    Jul 2011
    Posts
    212
    Thanks given
    37
    Thanks received
    20
    Rep Power
    43
    First. This looks really nice, going to check it out and hope to see further development.
    Reply With Quote  
     

  4. #3  
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    Quote Originally Posted by derpscape View Post
    First. This looks really nice, going to check it out and hope to see further development.
    There is going to be further development. Any bugs just please post. Its supported by my main server project. So if that needs extra features then I'm going to implement them.
    Visit Rune Miracle Here
    Reply With Quote  
     

  5. #4  
    Web Developer
    Ben2's Avatar
    Join Date
    Oct 2010
    Posts
    663
    Thanks given
    157
    Thanks received
    70
    Rep Power
    118
    I see the potiental usefulness, but I think it kind of impractical. Looks nice though, good work! :cookie:


    Formerly Crimson.
    Reply With Quote  
     

  6. #5  
    Registered Member
    Join Date
    Apr 2012
    Posts
    18
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Look good may even use just because how it looks
    Reply With Quote  
     

  7. #6  
    Registered Member Darrenrulez1's Avatar
    Join Date
    Apr 2012
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    please update to 637 verson or create alternative pl0x would be amazing! i would even be willing to pay for it! add the ability to make players honor or premium , moderator , administrator etc. like i said , i would pay for it dude. hmu and let me know (=
    Reply With Quote  
     

  8. #7  
    Registered Member Dr Noob PhD's Avatar
    Join Date
    Nov 2011
    Posts
    308
    Thanks given
    18
    Thanks received
    18
    Rep Power
    33
    Quote Originally Posted by Darrenrulez1 View Post
    please update to 637 verson or create alternative pl0x would be amazing! i would even be willing to pay for it! add the ability to make players honor or premium , moderator , administrator etc. like i said , i would pay for it dude. hmu and let me know (=
    some one is excited
    Reply With Quote  
     

  9. #8  
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    Quote Originally Posted by Darrenrulez1 View Post
    please update to 637 verson or create alternative pl0x would be amazing! i would even be willing to pay for it! add the ability to make players honor or premium , moderator , administrator etc. like i said , i would pay for it dude. hmu and let me know (=
    Its not restricted to any revision. As long as you do as I have said within my first post then any revision is possible. It uses reflection and therefore has nothing to do with client versions.
    Visit Rune Miracle Here
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Universal Profile Editor
    By craig903 in forum Projects
    Replies: 5
    Last Post: 05-13-2012, 06:48 PM
  2. Replies: 75
    Last Post: 07-02-2011, 06:27 AM
  3. RS2 Map editor (Cache Editor)
    By T X Loves Myself in forum Show-off
    Replies: 58
    Last Post: 04-25-2011, 12:51 AM
  4. Map editor, model editor, animater leaked!
    By Echo` in forum RS2 Client
    Replies: 14
    Last Post: 02-10-2010, 01:11 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •