Thread: Need Help Adding Custom Items

Results 1 to 4 of 4
  1. #1 Need Help Adding Custom Items 
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    177
    Thanks given
    97
    Thanks received
    217
    Rep Power
    241
    Hi, so I kinda need help on two different revisions, one being Vencillio and the other being ScapeSoft 667. I'd probably need more indepth help with scapesoft as I realistically don't even know where to start there. I would like be able to implement custom items and models however the cache editor will not work and refers to directories and several different caches that aren't present in the project, if anyone has successfully cache edited/added customns to scapesoft and could help me out with that, that would be awesome. However I think (or am hoping) the issue I am having with Vencillio has a simple solution so I will direct this thread towards that.

    What I've done:
    I've followed the necessary steps to adding custom items based on other threads I have read.

    1. I created a directory within the cache folder named "index1" and placed the test model in there (I have tried a couple different models but for reference sake I'll refer to this model [Only registered and activated users can see links. ] I placed the zipped file (14140.gz) within the index1 folder

    2. I un-commented "repackCacheIndex(1)" within Client.Java

    3. I added the items case with the appropriate ints given in the models release within the switch statement in ItemDef.Java:
    Code:
    			case 20999: 
    				itemDef.itemActions = new String[5];
    				itemDef.itemActions[1] = "Wear";
    				itemDef.itemActions[4] = "Drop";
    				itemDef.modelID = 32799;
    				itemDef.name = "Twisted Magma Bow";
    				itemDef.modelZoom = 2000;
    				itemDef.modelRotationX = 720;
    				itemDef.modelRotationY = 1500;
    				itemDef.modelOffset1 = 3;
    				itemDef.modelOffset2 = 1;
    				itemDef.anInt165 = 14140;
    				itemDef.anInt200 = 14140; 
    				itemDef.description = "A fiery bow forged from the core of the Great Olm.".getBytes();
    				break;
    4. I also added the definitions within ItemDefinitions.xml

    So upon running the client I get this in console:
    Code:
    Started repacking index 1.
    Unable to locate index 14140.
    Finished repacking 1.
    Alright, so I tried unzipping the file "14140.gz" within the index1 folder which extracted the file "14140.dat" and upon running the server after that, according to the console, it repacked successfully. I attempted to spawn the item, and an invisible item spawned to my inventory with the appropriate name "Twisted Magma Bow" and the correct examine definition. When attempting to wield the item, it does go to the weapon slot however the model is invisible and my console begins to spam this:
    Code:
    Failed to unzip model [14140] type = 0
    java.util.zip.ZipException: Not in GZIP format
    	at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
    	at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    	at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    	at OnDemandFetcher.getNextNode(OnDemandFetcher.java:324)
    	at Client.processOnDemandQueue(Client.java:3315)
    	at Client.processGameLoop(Client.java:2794)
    	at ClientEngine.run(ClientEngine.java:285)
    	at Client.run(Client.java:5081)
    	at java.lang.Thread.run(Unknown Source)
    I am assuming it is referring to the .dat version of the file considering that is not in gzip format. I do have the .gz in there as well though. I still get the same error if I remove the .dat and leave only the .gz in there (but it will fail to repack as stated above). I did try a couple of other models, so I don't know if the issue is with the models? This magma bow one I'm testiing with only contains the wielded model and not the drop/inventory model if that would make a difference.

    Anyway, any help would be much appreciated with either this or getting customs added onto scapesoft. I consider myself a "decent" programmer, but I'm fairly new to the RSPS scene and this is my first time messing with anything model and cache related, so spoon feeding is welcome. Thank you!

    [EDIT: FIXED:]

    So I fixed it myself I guess, still need to figure out how to add stats and what not, but the model now appears in the players hand when wielded and no more errors are in the console. For anyone else running into this issue, on line 8158 of Client.java, this method:
    Code:
    	public String indexLocation(int cacheIndex, int index) {
    		return "C:/Users/Admin/Vencillio/Client/Cache/index" + cacheIndex + "/" + (index != -1 ? index + ".dat" : "");
    	}
    replace ".dat" with ".gz" and you should be good to go. So it will look like this:

    Code:
    	public String indexLocation(int cacheIndex, int index) {
    		return "C:/Users/Admin/Vencillio/Client/Cache/index" + cacheIndex + "/" + (index != -1 ? index + ".gz" : "");
    	}
    be sure to change the cache path to your own, if that's not super obvious.

    I'm still looking for help on ScapeSoft 667 cache editing though if anyone is willing.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Sep 2019
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    can you message me and tell me how you figured it out? i cant seem to manage to get it working, thanks
    Reply With Quote  
     

  3. #3  
    Owner of Zerion
    robstever's Avatar
    Join Date
    Jun 2013
    Posts
    142
    Thanks given
    51
    Thanks received
    20
    Discord
    View profile
    Rep Power
    60
    Quote Originally Posted by Stugger View Post
    Hi, so I kinda need help on two different revisions, one being Vencillio and the other being ScapeSoft 667. I'd probably need more indepth help with scapesoft as I realistically don't even know where to start there. I would like be able to implement custom items and models however the cache editor will not work and refers to directories and several different caches that aren't present in the project, if anyone has successfully cache edited/added customns to scapesoft and could help me out with that, that would be awesome. However I think (or am hoping) the issue I am having with Vencillio has a simple solution so I will direct this thread towards that.

    What I've done:
    I've followed the necessary steps to adding custom items based on other threads I have read.

    1. I created a directory within the cache folder named "index1" and placed the test model in there (I have tried a couple different models but for reference sake I'll refer to this model [Only registered and activated users can see links. ] I placed the zipped file (14140.gz) within the index1 folder

    2. I un-commented "repackCacheIndex(1)" within Client.Java

    3. I added the items case with the appropriate ints given in the models release within the switch statement in ItemDef.Java:
    Code:
    			case 20999: 
    				itemDef.itemActions = new String[5];
    				itemDef.itemActions[1] = "Wear";
    				itemDef.itemActions[4] = "Drop";
    				itemDef.modelID = 32799;
    				itemDef.name = "Twisted Magma Bow";
    				itemDef.modelZoom = 2000;
    				itemDef.modelRotationX = 720;
    				itemDef.modelRotationY = 1500;
    				itemDef.modelOffset1 = 3;
    				itemDef.modelOffset2 = 1;
    				itemDef.anInt165 = 14140;
    				itemDef.anInt200 = 14140; 
    				itemDef.description = "A fiery bow forged from the core of the Great Olm.".getBytes();
    				break;
    4. I also added the definitions within ItemDefinitions.xml

    So upon running the client I get this in console:
    Code:
    Started repacking index 1.
    Unable to locate index 14140.
    Finished repacking 1.
    Alright, so I tried unzipping the file "14140.gz" within the index1 folder which extracted the file "14140.dat" and upon running the server after that, according to the console, it repacked successfully. I attempted to spawn the item, and an invisible item spawned to my inventory with the appropriate name "Twisted Magma Bow" and the correct examine definition. When attempting to wield the item, it does go to the weapon slot however the model is invisible and my console begins to spam this:
    Code:
    Failed to unzip model [14140] type = 0
    java.util.zip.ZipException: Not in GZIP format
    	at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
    	at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    	at java.util.zip.GZIPInputStream.<init>(Unknown Source)
    	at OnDemandFetcher.getNextNode(OnDemandFetcher.java:324)
    	at Client.processOnDemandQueue(Client.java:3315)
    	at Client.processGameLoop(Client.java:2794)
    	at ClientEngine.run(ClientEngine.java:285)
    	at Client.run(Client.java:5081)
    	at java.lang.Thread.run(Unknown Source)
    I am assuming it is referring to the .dat version of the file considering that is not in gzip format. I do have the .gz in there as well though. I still get the same error if I remove the .dat and leave only the .gz in there (but it will fail to repack as stated above). I did try a couple of other models, so I don't know if the issue is with the models? This magma bow one I'm testiing with only contains the wielded model and not the drop/inventory model if that would make a difference.

    Anyway, any help would be much appreciated with either this or getting customs added onto scapesoft. I consider myself a "decent" programmer, but I'm fairly new to the RSPS scene and this is my first time messing with anything model and cache related, so spoon feeding is welcome. Thank you!

    [EDIT: FIXED:]

    So I fixed it myself I guess, still need to figure out how to add stats and what not, but the model now appears in the players hand when wielded and no more errors are in the console. For anyone else running into this issue, on line 8158 of Client.java, this method:
    Code:
    	public String indexLocation(int cacheIndex, int index) {
    		return "C:/Users/Admin/Vencillio/Client/Cache/index" + cacheIndex + "/" + (index != -1 ? index + ".dat" : "");
    	}
    replace ".dat" with ".gz" and you should be good to go. So it will look like this:

    Code:
    	public String indexLocation(int cacheIndex, int index) {
    		return "C:/Users/Admin/Vencillio/Client/Cache/index" + cacheIndex + "/" + (index != -1 ? index + ".gz" : "");
    	}
    be sure to change the cache path to your own, if that's not super obvious.

    I'm still looking for help on ScapeSoft 667 cache editing though if anyone is willing.
    for cache editting on a 667, I most likely can help you, DM me on discord
    pancakepal #4318
    Reply With Quote  
     

  4. #4  
    Registered Member
    Stugger's Avatar
    Join Date
    Apr 2016
    Posts
    177
    Thanks given
    97
    Thanks received
    217
    Rep Power
    241
    Quote Originally Posted by robstever View Post
    for cache editting on a 667, I most likely can help you, DM me on discord
    pancakepal #4318
    I have since figured out how to edit what I needed to edit, but thank you for your kindness
    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. Replies: 1
    Last Post: 12-24-2014, 08:10 PM
  2. Help adding custom items to ErasedPkz/Hybrid PvP?
    By CursedOrionScape in forum Help
    Replies: 12
    Last Post: 05-07-2012, 01:31 AM
  3. Replies: 11
    Last Post: 01-13-2011, 01:52 AM
  4. Replies: 1
    Last Post: 11-15-2010, 06:22 PM
  5. need help adding an item
    By Ichigo1019 in forum Help
    Replies: 1
    Last Post: 07-09-2010, 10:36 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
  •