Broad leaf tiles fix

The worst monsters in the Hearthlands warp the fabric of space and time..

Broad leaf tiles fix

Postby Xcom » Fri Jul 05, 2013 3:12 am

So after about 2 days of searching for the line that scrues up broad leaf tiles I find the damn line that messes up the tiles and makes it look as if broad leaf tiles are coniferous tiles. Took me hours and hours of sifting through the most thickest of haven code to find the damn bugger.

I know where it fails and unforchantly it needs direct edits in the client to work. The problem lies with the server sending the incorrect info to the client. Might be best if loftar or jorb edits the server to send the correct data to fix the problem. Or if your impatient you can do the edits I did to make it work.

Here is the info the server sends the client on startup:

Code: Select all
id 0   resnm gfx/tiles/water/deep    resver 2
id 1   resnm gfx/tiles/water/water    resver 6
id 2   resnm gfx/tiles/gold/gold    resver 1
id 3   resnm gfx/tiles/brick/red    resver 1
id 4   resnm gfx/tiles/brick/yellow    resver 1
id 5   resnm gfx/tiles/brick/black    resver 1
id 6   resnm gfx/tiles/brick/blue    resver 1
id 7   resnm gfx/tiles/brick/white    resver 1
id 8   resnm gfx/tiles/floor-stone/stone    resver 5
id 9   resnm gfx/tiles/plowed/plowed    resver 5
id 10   resnm gfx/tiles/wald/wald    resver 5
id 11   resnm gfx/tiles/wald/wald    resver 5
id 12   resnm gfx/tiles/dwald/wald    resver 4
id 13   resnm gfx/tiles/grass/grass    resver 4
id 14   resnm gfx/tiles/heath/heath    resver 2
id 15   resnm gfx/tiles/moor/moor    resver 2
id 16   resnm gfx/tiles/swamp/swamp    resver 5
id 17   resnm gfx/tiles/bog/bog    resver 2
id 18   resnm gfx/tiles/fen/fen    resver 2
id 19   resnm gfx/tiles/dirt/dirt    resver 7
id 20   resnm gfx/tiles/playa/playa    resver 5
id 21   resnm gfx/tiles/floor-wood/floor-wood    resver 3
id 22   resnm gfx/tiles/floor-mine/mine    resver 3
id 23   resnm gfx/tiles/mountain/mountain    resver 2
id 24   resnm gfx/tiles/floor-mine/mine    resver 3
id 25   resnm gfx/tiles/mountain/mountain    resver 2
id 26   resnm gfx/tiles/mountain/mountain    resver 2
id 255   resnm gfx/tiles/nil/nil    resver 3


id 11 resnm gfx/tiles/wald/wald resver 5

This is the line that fails. ID of broadleaf tiles are 11 but the server sends the client to load the coniferous res file called wald.res instead of leaf.res.

What it should say is "gfx/tiles/wald/leaf"

The edit to fix the problem can be hotfixed on MCache.java on line 515:

Code: Select all
    public void tilemap(Message msg) {
   while(!msg.eom()) {
       int id = msg.uint8();
       String resnm = msg.string();
       int resver = msg.uint16();
      System.out.println("id "+ id+"   resnm "+ resnm+"    resver "+resver);
      
      if(id == 11){ // new
         resnm = "gfx/tiles/wald/leaf";
         resver = 6;
      }
       sets[id] = loadset(resnm, resver);
   }
    }



If jorb and loftar read this they can edit the server to send the broadleaf res name command instead of the coniferous res name and fix the problem for everyone automatically. If not enders can fix it by adding these few lines and hotfix it for now.

Edit a pick of broadleaf tiles:
With sharp edged tiles
http://i.imgur.com/JO1pHqc.png

Without sharp edged tiles
http://i.imgur.com/OdkD7A6.png

I must say it looks ugleh, sorry jorb
http://i.imgur.com/5lO0Gub.png
Last edited by Xcom on Fri Jul 05, 2013 3:40 am, edited 4 times in total.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Re: Broad leaf tiles fix

Postby Xcom » Fri Jul 05, 2013 3:25 am

If they could help fix the tile update bug would be awesome as well. That one I have no clue how to fix but I think its server side so I cant track it down.

The bug basically consists of tile updates not being sent to the player until a player edits one of the tiles. Only then the server sends an update to the player. Some rare instances like as in mining the tiles still stays un-updated even after the player edits one of the tiles. It consistently stays un-updated until a tile in the same map grid gets updated.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Re: Broad leaf tiles fix

Postby Xcom » Fri Jul 05, 2013 3:31 am

Sorry about the tripple post.

On a sidenote if anyone wants to edit the client to make tiles sharp edged you can do that on the line 909 in MapView.java:

Code: Select all
    private void drawtile(GOut g, Coord tc, Coord sc) {
   Tile t;
      
   try {
       t = getground(tc);
       //t = gettile(tc).ground.pick(0);
       g.image(t.tex(), sc);
       //g.setColor(FlowerMenu.pink);
       //Utils.drawtext(g, Integer.toString(t.i), sc);
       //for(Tile tt : gettrans(tc)) { // [b]comment these 3 lines[/b]
   //   g.image(tt.tex(), sc); // [b]comment these 3 lines[/b]
      // } // [b]comment these 3 lines[/b]
   } catch (Loading e) {}
    }


It should make tiles load faster as well as make it look different. I hate it personally but if anyone wants to do it.

I think its even possible to make it toggle able.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Re: Broad leaf tiles fix

Postby Tonkyhonk » Fri Jul 05, 2013 3:36 am

User avatar
Tonkyhonk
 
Posts: 4501
Joined: Fri Sep 10, 2010 6:43 am

Re: Broad leaf tiles fix

Postby Xcom » Fri Jul 05, 2013 3:45 am

Thats different from this fix. This is the actual fix to make the intended braodleaf tiles show up. One that is in the haven-res.jar.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Re: Broad leaf tiles fix

Postby Arcanist » Fri Jul 05, 2013 7:05 am

I always thought there was no difference between the two types of tiles.
But, since I don't care to screw up my client -again- I'll not bother trying to fix it :)
User avatar
Arcanist
 
Posts: 2664
Joined: Mon Mar 19, 2012 2:01 pm

Re: Broad leaf tiles fix

Postby DDDsDD999 » Sun Jul 07, 2013 6:57 am

I'd do this fix, but it's uglier than sin. Might just change the tiles to a lighter form of the old one.
Image
Image
Image
Image
Image
User avatar
DDDsDD999
 
Posts: 5670
Joined: Fri Jul 02, 2010 12:31 am

Re: Broad leaf tiles fix

Postby Niacide » Tue Sep 17, 2013 3:37 pm

Amazing find, this thread should really be getting more visibility.

Would it be possible for you to post a compiled fix in either Ender or the Standard Client. I haven't had any luck recompiling.

Even just compiling the just compile problematic the class file, so that I could manually put it into the .jar that would make me very happy.
Niacide
 
Posts: 38
Joined: Sun Jun 06, 2010 10:31 pm

Re: Broad leaf tiles fix

Postby borka » Wed Sep 18, 2013 12:27 pm

Compiling with actual files from Ender source and those edits isn't working for me aswell (sorry too lazy to find out the reason...)
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Broad leaf tiles fix

Postby Xcom » Thu Sep 19, 2013 11:00 am

I can try and make a haven.jar with a few modifications and improvements I have found. Dono if Ender wants to place it in his new update though. If that was the case it would probably be easier. Studies in the way right now but after they are over I'll make a standalone jar file with a few modifications and include these changes.
User avatar
Xcom
 
Posts: 1105
Joined: Wed Dec 14, 2011 1:43 pm

Next

Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 5 guests