Just add a new definition with phat modelid etc
|
|
Hey guys say I have only 6 different colored party hats in game and I want like 10 how would I go about getting more so I can make some new ones with other colors..
Will thanks and rep thanks guys!!!!
I know how to change colors just need to know how to add more party hats





Just add a new definition with phat modelid etc




no u shouldn't make a diff one like "1039" cuz that id is probably used already, use a ID that is not used currently.
Also if i were u i would just simply create a method which takes 3 params,EG: i just wrote a simple method that copies all the defs of the item u want to copy from, and also allows u to change colorsCode:int itemId, int[] originalColours, int[] newColours
https://gyazo.com/d632d7e50555170985744e039830539b
withNote: u can even make a method that doesn't even ask u for the originalcolors but gets em itself, and the only thing u gotta specify is the dest/new color u want it to have.Code:case 19941: recolorItem(itemDef, 1042, new int[] {926}, new int[] {3801}); break;

This. however to fix the inventory icon, you must change the equip and inv models, not just the item id, for example. but this is only needed if the original model's inv icon is messed up.
This above is the old way, and not recommended unless you aren't a very good programmer, but you should still try and learn how to change models via colours, and not models.Code:case 0002: <----ID of model to spawn ingame via ::item 0002 1 itemDef.name = "Black Party Hat";//model name itemDef.groundModel = 1000;//drop model/inv model itemDef.modelZoom = 900; itemDef.modelRotationY = 165; itemDef.modelRotationX = 99; itemDef.offsetX = 3; itemDef.offsetY =-7; itemDef.maleModel = 71030;//equip model male <----change this model id (the raw dat file id number goes here) itemDef.anInt200 = 71030;//equip model female <----change this model id (the raw dat file id number goes here) itemDef.actions = new String[5]; itemDef.actions[1] = "Wear"; break;




The method i wrote completely copies defs of the target item which includes inv/drop models [modelID]
heres the method i wrote in a few mins that i used for the above example @KushKings
Code:public static ItemDef copyAndRecolor(ItemDef itemDef, int id, int[] originalColor, int[] newColor) { ItemDef target = ItemDef.forID(id); itemDef.modelID = target.modelID; itemDef.maleEquip1 = target.maleEquip1; itemDef.femaleEquip1 = target.femaleEquip1; itemDef.modelZoom = target.modelZoom; itemDef.rotationX = target.rotationX; itemDef.rotationY = target.rotationY; itemDef.modelOffset1 = target.modelOffset1; itemDef.modelOffsetX = target.modelOffsetX; itemDef.modelOffsetY = target.modelOffsetY; itemDef.actions = target.actions; itemDef.maleEquip2 = target.maleEquip2; itemDef.maleEquip3 = target.maleEquip3; itemDef.femaleEquip2 = target.femaleEquip2; itemDef.femaleEquip3 = target.femaleEquip3; itemDef.maleXOffset = target.maleXOffset; itemDef.maleYOffset = target.maleYOffset; itemDef.femaleYOffset = target.femaleYOffset; itemDef.maleDialogue = target.maleDialogue; itemDef.maleDialogueModel = target.maleDialogueModel; itemDef.femaleDialogueModel = target.femaleDialogueModel; itemDef.editedModelColor = originalColor; itemDef.newModelColor = newColor; return itemDef; }
thanks guys going to try this stuff out

| « Invisible NPC when adding npc to client/cache [RUSE] | Adding items to Aeros (Ruse base) » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |