Download haven-jar.res with edited neg files:
http://www.sendspace.com/file/gy1y6v
Download short walls, cheeseracks, cubs with edited neg files:
http://www.sendspace.com/file/02bkgm
To use it simply replace the haven-res.jar with the one in the ender directory.
To get the the short walls, cheeseracks, cubs. Simply extract them into the costum_res folder.
Edit: Boshaw's salem-layer-util can now fix the hit-boxes. Look at page 3 post nr 29 for more details.
Being inspired by MvGulik's player res collection I thought of making a nice haven-res.jar hit-box editor to fix all the hit-boxes in that collection.
I tried tinkering with Bowsha's Haven LayerUtil with very little success. Being a total noob in coding I gave up and picked up this task several times. I also contacted MvGulik for assistance. But as he had very little java coding experience and my nooblet coding we didn't manage to get much done.
I am posting this and hoping someone out there with the skills and knowhow can help bring this up to speed and help find a solution for the problem.
The hit-box editing was done by me and drenyy during the lag around December. We ran around for a week bumping into objects checking what objects had the correct hit-box data and what didn't. After a week or so we made a nice collection of hit-box edits that would complement the already existing hit-box data that is in the haven-res.jar. With these edits we managed to make a very nice filter for getting the correct hit-boxes of all objects in the game. Using this you can make a very nice pathfinder but the issue is the current system is very messy and looks horrible.
If someone can help with the coding of the haven-res.jar editor. What would be needed would similar be a editor to the Bowsha Haven LayerUtil but instead of extracting and such it would simply go in and do some edits to the hit-boxes.
This is the edits we made in code form. It looks horrible and its overall to slow. The help needed would be simply to make a filter where it would check what object it would need editing and based on its name would do the edits so this would not be needed to get done when the game were running.
- Code: Select all
ArrayList<Rectangle> getAllNegs(){
long time = System.currentTimeMillis();
int meOffcet = -2;
int meSize = 4;
if(boatBol){
meOffcet = -14;
meSize = 26;
}
Gob player = getPlayerGob();
ArrayList<Rectangle> negRec = new ArrayList<Rectangle>();
synchronized(m_hPanel.ui.mainview.glob.oc){
for(Gob g : m_hPanel.ui.mainview.glob.oc){
if(m_memGobs.contains(g) ) continue;
//m_memGobs.add(g);
String name = g.resname();
//g == target
if( g == player ) continue;
if( g.getc().equals(player.getc() ) ) continue;
if( name.contains("/tiles/") ) continue;
if( name.contains("/plants/") ) continue;
if( name.contains("/items/") ) continue;
if( name.equals("gfx/terobjs/trees/log") ) continue;
if( name.equals("gfx/terobjs/blood") ) continue;
if( name.equals("gfx/terobjs/herbs/chantrelle") ) continue;
if( (name.equals("gfx/terobjs/hearth-play") && g.getattr(KinInfo.class) == null) ) continue;
if( (name.contains("/gates/") && g.GetBlob(0) == 2) ) continue;
Coord offcet = new Coord();
Coord size = new Coord();
if(!editFilter(g, offcet, size) ){
Resource.Neg neg = g.getneg();
if(neg == null){System.out.println("Error neg"); continue;}
offcet = neg.bc;
size = neg.bs;
}
if(size.x != 0){
Rectangle rect = new Rectangle(g.getc().x + offcet.x + meOffcet,
g.getc().y + offcet.y + meOffcet,
size.x + meSize,
size.y + meSize);
negRec.add(rect);
}
}
}
System.out.println("Neg compleate. " + (System.currentTimeMillis() - time) );
return negRec;
}
boolean editFilter(Gob g, Coord offcet, Coord size){
String name = g.resname();
if( name.contains("/terobjs/") ){
if( name.contains("/ridges/") ){
if( name.contains("/grass/") ){ // 5
if( name.equals("gfx/terobjs/ridges/grass/ss") ){
size.x = 14;
size.y = 7;
offcet.x = -10;
offcet.y = -4;
return true;
}
if( name.equals("gfx/terobjs/ridges/grass/e") ){
size.x = 5;
size.y = 21;
offcet.x = -2;
offcet.y = -11;
return true;
}
if( name.equals("gfx/terobjs/ridges/grass/e2s") ){
size.x = 23;
size.y = 22;
offcet.x = 0;
offcet.y = -21;
return true;
}
if( name.equals("gfx/terobjs/ridges/grass/es") ){
size.x = 7;
size.y = 16;
offcet.x = -5;
offcet.y = -6;
return true;
}
if( name.equals("gfx/terobjs/ridges/grass/ee") ){
size.x = 7;
size.y = 14;
offcet.x = -4;
offcet.y = -10;
return true;
}
}
if( name.contains("/mountain/") ){ // 6
if( name.equals("gfx/terobjs/ridges/mountain/we") ){
size.x = 22;
size.y = 11;
offcet.x = -11;
offcet.y = 0;
return true;
}
if( name.equals("gfx/terobjs/ridges/mountain/ws") ){
size.x = 22;
size.y = 11;
offcet.x = -11;
offcet.y = -11;
return true;
}
if( name.equals("gfx/terobjs/ridges/mountain/ne") ){
size.x = 11;
size.y = 22;
offcet.x = -11;
offcet.y = -11;
return true;
}
if( name.equals("gfx/terobjs/ridges/mountain/ns") ){
size.x = 11;
size.y = 22;
offcet.x = 0;
offcet.y = -11;
return true;
}
if( name.equals("gfx/terobjs/ridges/mountain/ss") ){
size.x = 10;
size.y = 11;
offcet.x = -10;
offcet.y = 0;
return true;
}
if( name.equals("gfx/terobjs/ridges/mountain/ee") ){
size.x = 11;
size.y = 10;
offcet.x = 0;
offcet.y = -10;
return true;
}
}
}
if( name.contains("/furniture/") ){ // 5
if( name.equals("gfx/terobjs/furniture/coffer") ){
size.x = 10;
size.y = 8;
offcet.x = -5;
offcet.y = -4;
return true;
}
if( name.equals("gfx/terobjs/furniture/leanto") ){
size.x = 21;
size.y = 10;
offcet.x = -9;
offcet.y = -5;
return true;
}
if( name.equals("gfx/terobjs/furniture/wardrobe") ){
size.x = 20;
size.y = 9;
offcet.x = -8;
offcet.y = -3;
return true;
}
if( name.equals("gfx/terobjs/furniture/bed-sturdy") ){
size.x = 18;
size.y = 13;
offcet.x = -8;
offcet.y = -5;
return true;
}
if( name.equals("gfx/terobjs/furniture/cclosed") || name.equals("gfx/terobjs/furniture/copen" ) ){
size.x = 7;
size.y = 4;
offcet.x = -3;
offcet.y = -3;
return true;
}
}
// 7
if( name.equals("gfx/terobjs/vclaim") ){
size.x = 27;
size.y = 8;
offcet.x = -12;
offcet.y = -4;
return true;
}
if( name.equals("gfx/terobjs/htable") ){
size.x = 7;
size.y = 12;
offcet.x = -2;
offcet.y = -5;
return true;
}
if( name.equals("gfx/terobjs/crate") ){
size.x = 14;
size.y = 7;
offcet.x = -6;
offcet.y = -3;
return true;
}
if( name.equals("gfx/terobjs/trough") ){
size.x = 21;
size.y = 10;
offcet.x = -7;
offcet.y = -4;
return true;
}
if( name.equals("gfx/terobjs/dframe2") ){
size.x = 4;
size.y = 18;
offcet.x = -3;
offcet.y = -8;
return true;
}
if( name.equals("gfx/terobjs/mining/ladder") ){
size.x = 9;
size.y = 2;
offcet.x = -4;
offcet.y = -1;
return true;
}
if( name.equals("gfx/terobjs/lbox") ){
size.x = 10;
size.y = 15;
offcet.x = -6;
offcet.y = -7;
return true;
}
}
if( name.contains("/arch/") ){ // 9
if( name.contains("/gates/") ){
if( name.contains("-ns") ){
size.x = 10;
size.y = 21;
offcet.x = -5;
offcet.y = -11;
return true;
}
if( name.contains("-we") ){
size.x = 21;
size.y = 10;
offcet.x = -11;
offcet.y = -5;
return true;
}
}
if( name.equals("gfx/arch/sign") ){
size.x = 10;
size.y = 10;
offcet.x = -5;
offcet.y = -5;
return true;
}
if( name.equals("gfx/arch/stairs-inn") ){
size.x = 12;
size.y = 23;
offcet.x = -7;
offcet.y = -11;
return true;
}
if( name.equals("gfx/arch/door-inn") ){
size.x = 19;
size.y = 5;
offcet.x = -11;
offcet.y = -2;
return true;
}
}
if( name.contains("/kritter/") ){ // 10
if( name.equals("gfx/kritter/plow/s") ){
size.x = 6;
size.y = 6;
offcet.x = -3;
offcet.y = -3;
return true;
}
if( name.equals("gfx/kritter/cow/s") ){
size.x = 11;
size.y = 11;
offcet.x = -4;
offcet.y = -4;
return true;
}
if( name.equals("gfx/kritter/cart/s") ){
size.x = 10;
size.y = 10;
offcet.x = -5;
offcet.y = -5;
return true;
}
if( name.equals("gfx/kritter/rat/s") ){
for(String secondName : g.resnames() )
if( secondName.equals("gfx/kritter/dragonfly/dragonfly") )
return false;
size.x = 1;
size.y = 1;
offcet.x = 0;
offcet.y = 0;
return true;
}
if( name.equals("gfx/kritter/deer/s") ){
size.x = 11;
size.y = 11;
offcet.x = -4;
offcet.y = -4;
return true;
}
if( name.equals("gfx/kritter/bear/s") ){
size.x = 16;
size.y = 16;
offcet.x = -8;
offcet.y = -8;
return true;
}
if( name.equals("gfx/kritter/fox/s") ){
size.x = 7;
size.y = 7;
offcet.x = -3;
offcet.y = -3;
return true;
}
if( name.equals("gfx/kritter/troll/s") ){
size.x = 16;
size.y = 16;
offcet.x = -8;
offcet.y = -8;
return true;
}
}
if( name.equals("gfx/borka/s") ){ // 4
for(String secondName : g.resnames() ){
if( secondName.contains("gfx/borka/body") )
return false;
}
size.x = 1;
size.y = 1;
offcet.x = 0;
offcet.y = 0;
return true;
}
return false; // edit size 46
}