Thread: Model Grabbing Simplified

Results 1 to 5 of 5
  1. #1 Model Grabbing Simplified 
    Registered Member

    Join Date
    Jun 2012
    Posts
    204
    Thanks given
    61
    Thanks received
    77
    Rep Power
    104
    First download this: [Only registered and activated users can see links. ]

    You will need to get a model dump yourself (preferably the same as what config you are using, for ex: #700 items, use #700 models, etc)
    I'd suggest using Xaves suite ([Only registered and activated users can see links. ])

    What this does is read the lines of a text file (which will store the model ids for the config you're going to use) and parses the data to a new folder.

    Here's a base for how to create the text file with the model ids:
    Code:
    	public static void writeConfig(int state) {
    		try {
    			String txt = null;
    			FileWriter fw = new FileWriter("./Dump/" + (state > 0 ? txt = "obj" : "models") + ".txt");
    			for(int index = 0; index < totalItems; index++) {
    				ItemDefinition obj = ItemDefinition.forID(index);
    				String quote = ("\"");
    				String model[] = { "groundModel", "maleModel",  "maleArm", "maleDialogue",
    													"femaleModel", "femaleArm", "femaleDialogue"};
    				int model2[] = { obj.groundModel, obj.maleModel, obj.maleArm, obj.maleDialogue,
    													obj.femaleModel, obj.femaleArm, obj.femaleDialogue };
    				try {
    					switch(state) {
    							default://prices.txt
    							//fw.write("0" + "\r\n");
    							//fw.newLine();
    							for(int i = 0; i < model2.length; i++)
    								if(model2[i] != -1)
    									fw.write("" + model2[i] + "\r\n");
    							break;
    					}
    				} catch(NullPointerException ex) {
    					ex.printStackTrace();
    				}
    			}
    			fw.close();
    		} catch (IOException ioe) {
    			ioe.printStackTrace();
    		}
    	}
    Then you add this to the bottom of your unpackConfig / parse method:
    Code:
    	
        public static void unpackConfig(Archive archive) {
            data = new Buffer(archive.getDataForName("obj.dat"));
            Buffer data = new Buffer(archive.getDataForName("obj.idx"));
            totalItems = data.readUnsignedWord();
            streamIndices = new int[totalItems];
    		if(Config.debugPrint)
    			System.out.println("Loaded Items  (obj): " + totalItems);
            int i = 2;
            for(int j = 0; j < totalItems; j++) {
                streamIndices[j] = i;
                i += data.readUnsignedWord();
            }
            cache = new ItemDefinition[50];
            for(int k = 0; k < 50; k++)
                cache[k] = new ItemDefinition();
    		writeConfig(0);
        }
    And run your client, and during startup a file should be created in the new folder "Dump" were your class files are.

    Just copy the text file, put it in the "Config" folder and run it.
    The extracted folder should then contain all the models in the text file, so all thats left to do is just compress and pack them to your cache.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Respected Member

    Revil's Avatar
    Join Date
    Nov 2010
    Age
    27
    Posts
    4,883
    Thanks given
    3,717
    Thanks received
    2,233
    Rep Power
    5000
    Great, shall test this in a short while and give feedback.
    Reply With Quote  
     

  4. #3  
    Registered Member

    Join Date
    Sep 2011
    Posts
    5,142
    Thanks given
    1,333
    Thanks received
    1,795
    Rep Power
    1731
    Great as usual.
    Retired from RSPS. Please don't message me for services, sales or help. Apologies.
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Jun 2012
    Posts
    204
    Thanks given
    61
    Thanks received
    77
    Rep Power
    104
    Lol it's not that great, but thanks
    Reply With Quote  
     

  6. #5  
    The Emperor of the Sands

    Azir's Avatar
    Join Date
    Nov 2008
    Posts
    2,468
    Thanks given
    8
    Thanks received
    487
    Rep Power
    117
    317 looking much better than 667+ atm.. good job


    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. 100% Refactored DrawingArea[Simplified]
    By Stewie in forum Snippets
    Replies: 5
    Last Post: 03-01-2010, 12:23 AM
  2. Big Bang: Fred's Simplified Way
    By blitzduck in forum Chat
    Replies: 9
    Last Post: 10-17-2008, 02:58 AM
  3. Religious Views : Simplified Version
    By Kaji in forum Voting
    Replies: 11
    Last Post: 10-04-2008, 05:55 PM
  4. Glossy Web 2.0 Buttons - Simplified
    By Death Lettuce in forum Tutorials
    Replies: 2
    Last Post: 02-04-2008, 11:52 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •