Reskinning and Image Modding

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

Re: Reskinning and Image Modding

Postby DarkConvict » Sat Mar 20, 2010 4:52 pm

theTrav wrote:
loftar wrote:Yeah. Isn't that a pest? :-/

Actually I don't really understand the benefit of unsigned bytes very well... Some sort of storage/networking optimization so you can send large numbers over the wire with less overhead?

I guess in your case bandwidth is an issue so it's probably worth it...


I hope i am right about this.

An signed byte is a 'normal' byte, 8 bits long.

An unsigned byte is only 7 bits long, so smaller.
The bit that was taken away is used to decided if the number is positive or negative.
So
00000001 = 1
00000011 = 3
10000011 = -3

Say you only need positive numbers, the the minus can be skipped to save space

0000001 = 1
0000011 = 3
-- = -3 (not possible)

Also, thanks so showing us how to extract them i was going to look into this in February and did very briefly but didn't get around to it, come May im going to have a bit more of a play with them. I totally agree to a new set of images for buildings, whilst only 5-10pixels high so we can see behind them, rather than just make them totally invisible.
DarkConvict
 
Posts: 114
Joined: Sun Feb 07, 2010 7:19 pm

Re: Reskinning and Image Modding

Postby DarkConvict » Sat Mar 20, 2010 5:29 pm

Ha, have a look at
C:\Users\Jonathan Willis\Desktop\New folder\haven-res\out\res\gfx\kritter\cow\fuckanim.res_0.png

I am curious though, is it part of your implementation why your graphics have 7 animations for each direction. I understand each direction, (N, NE, E, SE, S, SW, W, NW). So you have 49 (7x7) images for each animation even if they are static. Seems to be overkill to me. But i guess its easier to keep everything the same than program differently for those that do need animation and those that don't.
DarkConvict
 
Posts: 114
Joined: Sun Feb 07, 2010 7:19 pm

Re: Reskinning and Image Modding

Postby theTrav » Sun Mar 21, 2010 1:06 am

Edited initial post, converting from .png back to .res is now possible.
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Reskinning and Image Modding

Postby DarkConvict » Sun Mar 21, 2010 1:13 am

This should be fun. :) TY Trav

Ok, made a new palisade, i have ran the encode. i assume i need to compress this folder back into a .Jar.

How do you then make use of the new graphics, i know pachos client had a folder with it all in, but even if you download the full client from here http://www.havenandhearth.com/java/haven.jnlp , there is no big haven-Res.Jar file on the pc.
DarkConvict
 
Posts: 114
Joined: Sun Feb 07, 2010 7:19 pm

Re: Reskinning and Image Modding

Postby theTrav » Sun Mar 21, 2010 2:12 am

DarkConvict wrote:i assume i need to compress this folder back into a .Jar.

I thought I mentioned that in my instructions... In any case, yes this is correct.

DarkConvict wrote:How do you then make use of the new graphics

I have not tackled this bit yet, it will probably take some time to get a good reliable mechanism for this.


DarkConvict wrote:I know pachos client had a folder with it all in, but even if you download the full client from here http://www.havenandhearth.com/java/haven.jnlp , there is no big haven-Res.Jar file on the pc.

Running the client from local sources is probably the easiest. If you're super sold on the easy way learn how jnlp works, and cruft up your own launcher file that loads haven-res.jar from an alternative source.

I don't know it super well myself, but from the little playing around I did it did not seem like it would be terribly difficult.
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Reskinning and Image Modding

Postby Spiff » Sun Mar 21, 2010 4:46 am

It doesn't appear to export valid .reses, java threw several errors on trying to load the images. Also, the encoder ignores filepaths and just dumps all of the encoded res files in the base res directory, which means that alot of them get overwritten.
User avatar
Spiff
 
Posts: 356
Joined: Sun Jul 12, 2009 9:33 pm

Re: Reskinning and Image Modding

Postby theTrav » Sun Mar 21, 2010 4:55 am

Spiff wrote:It doesn't appear to export valid .reses, java threw several errors on trying to load the images. Also, the encoder ignores filepaths and just dumps all of the encoded res files in the base res directory, which means that alot of them get overwritten.

DOH, I was briefly looking for that. I'll fix it today or romorrow.

Can you PM me the errors you get from the invalid reses?
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Reskinning and Image Modding

Postby theTrav » Mon Mar 22, 2010 8:39 am

Ok, so fixed the bug where it was disregarding folder structure,
Fixed the bug where it wasn't writing the byte length of the layer

Ran head first into another bug where for some reason the first 11 bytes of the image layer appear to be used for "something"

Fairly irritated at myself for not realizing that earlier, just spent a ton of time investigating the length value which was perfect the whole time.

Should be able to get it working tonight or tomorrow then
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Reskinning and Image Modding

Postby theTrav » Mon Mar 22, 2010 10:25 pm

v5 uploaded, link in initial post.

This one should work ok, I've also added console output so you can see a heap of relatively useless information while it's working FUN TIMES!
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Reskinning and Image Modding

Postby Spiff » Thu Mar 25, 2010 7:46 am

i call this experiment a success

Image

:colbert:
User avatar
Spiff
 
Posts: 356
Joined: Sun Jul 12, 2009 9:33 pm

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 2 guests