:mode -> :d Decodes file(s) given throguh ARGS key by list of pathnames
default output folder: dout/
-> :e Encodes file(s) given through ARGS key by list of pathnames
default output folder: dres/
-> :da Decodes a set of files within a specified directory into another
-> :ea Encodes a set of files within a specified directory into another
-> :cache->res Renames a set of files within a specified directory from *.cached to *res
:skip-old -> t Skip processing old files
-> nil (Default-value: t)
:verbose -> t Be verbose when decoding/encoding
-> nil (Default-value: t)
:print-skip -> t Print skipped files
-> nil (default-value: nil)
:layers "path-to-layers" Tells salem-layer-util what layers to load in for decoding/encoding
(default-value: "layers/salem")
:args -> '(...) A list of arguments based on given mode
if :d or :e, :args -> '(file1 file2 file3 ...)
if :da or :ea, :args -> '(input-folder output-folder)
if :cache->res -> '(input-folder)
Note: pathnames to files or folders can be absolute or relative
(slu:run :mode :d
:args '("res/1.res" "res/2.res"))
(slu:run :mode :da
:skip-old nil
:verbose nil
:args '("salem/res" "salem/dec"))
(slu:run :mode :da
:skip-old nil
:verbose nil
:layers "layers/hnh"
:args '("salem/res" "salem/dec"))
(slu:run :mode :ea
:args '("salem/dec" "salem/new-res"))
uint8 - version
if version == 1 || version == 2:
CString - ID
If version == 2:
uint16 - bvol (base volume?)
Rest of data buffer is the audio clip (ogg format?)
CString - NM (name)
Until data buffer empty do:
uint8 - opcode
if opcode = 0: (position data -> glTranslate?)
float - x
float - y
float - z
if opcode = 1: (angle data -> glRotate?)
float - ang
float - ax
float - ay
float - az
if opcode = 2:
CString - bonenm (bone name)
if opcode = 3:
float - rx1
float - ry1
float - rz1
CString - orignm (original name)
CString - tgtnm (target name?)
Until data buffer empty do:
uint8 - t
if t = 1:
while(true):
CString - en (widget type string?)
CString - cn (class constructor?)
if en.length -> 0 => exit while(true)
if t = 2:
while(true):
CString - ln
if ln.length -> 0 => exit while(true)
uint16 - version
uint8 - version
if version = 1:
uint8 - type
if type = 0:
Rest of data buffer -> truetype-font data
int16 - id
floatx4 - amb (GL_AMBIENT)
floatx4 - dif (GL_DIFFUSE)
floatx4 - spc (GL_SPECULAR)
Until data buffer empty:
uint8 - t
if t = 1:
float - ac
float - al
float - aq
if t = 2: (positional data?)
float - x
float - y
float - z
if t = 3:
float - exp
uint16 - id
Until data buffer empty:
CString - thing
if thing = "col":
floatx4 - amb (GL_AMBIENT)
floatx4 - dif (GL_DIFFUSE)
floatx4 - spc (GL_SPECULAR)
float - shine (GL_SHININESS)
floatx4 - emi (GL_EMISSION)
if thing = "linear":
no data, but it makes linear = true -> sets minfilter in TexGL to GL_LINEAR_MIPMAP_LINEAR
if thing = "mipmap":
no data, but it makes mipmap = true -> sets magfilter in TexGL to GL_LINEAR
if thing = "nofacecull":
no data, but it adds nofacecull as a state (GL_CULL_FACE)
if thing = "tex":
uint16 - id
if thing = "texlink":
CString - nm (name)
uint16 - version
uint16 - id
if thing = "light":
CString - light
uint8 - fl
uint16 - num
uint16 - matid
if (fl&2) != 0:
uint16 - id
if (fl&4) != 0:
uint16 - ref
if (fl&~7) != 0 : ERROR
for 0 -> (num * 3)-1:
uint16 - ind[i]
uint16 - cc(x)
uint16 - cc(y)
SKIP OFFSET 4->15
uint8 - en
for 1 -> en-1:
uint8 - epid
uint16 - cn
for 1 -> cn-1:
uint16 - ep[epid][o][x]
uint16 - ep[epid][o][y]
uint8 - t
if t = 0:
CString - meshnm (mesh name)
uint16 - meshver
int16 - meshid
CString - matnm (mat name)
uint16 - matver
int16 - matid
if t = 1:
CString - nm (name)
uint16 - version
uint16 - id
uint8 - fl
uint8 - mode
float - len
if (fl&1) != 0:
float - nspeed
Until data buffer empty:
CString - bnm (bone name?)
uint16 - frames.length
for 1 -> frames.length-1:
float - tm
floatx3 - trans (translation?)
float - rang (gl_rotate angle?)
floatx3 - rax (gl_rotate specifications?)
Until data buffer empty:
CString - bnm (bone name?)
floatx3 - pos (position)
floatx3 - rax (gl_rotate specification?)
float - rang ( gl_rotate angle?)
CString - bp
uint8 - fl
uint16 - num
Until data buffer empty:
uint8 - id
if id = 0:
for 0 -> (num*3)-1:
float - vertex
if id = 1:
for 0 -> (num*3)-1:
float - normal
if id = 2:
for 0 -> (num*2)-1:
float - texels (tex coordinates?)
if id = 3:
uint8 - mba
while(true):
CString - bone
if bone = "": exit from while(true)
while(true):
uint16 - run
uint16 - st
if run = 0: exit from while(true)
for 0 -> run-1:
float - w
How to run the damn thing.txt wrote:To get a fresh and up to date copy of salem-res.jar, download from:
http://plymouth.seatribe.se/java/salem-res.jar
Extract the files to the main directory of the SLU. (winrar ftw!)
Run the ABCL thing, and then to get started, type
(slu:run)
parentheses included!
To decode the contents of the gfx folder, type the following:
(slu:run :mode :da :args '("res/gfx/" "decoded/gfx/") )
mind the parantheses at the end!
A folder named "decoded" will now contain all of the decoded graphics.
To re-pack/encode the files you modified, type the following:
(slu:run :mode :ea :args '("decoded/gfx/" "custom_res/gfx/") )
Now, a folder named "custom_res" will contain all of your modified and re-packed files. This can be pasted directly into the "[Username]\Salem\" folder that is used by Ender's Client.
Hans_Lemurson wrote:It is also apparently necessary for the string of any new file-path to end in a /, otherwise the program has an error. If all the named directories already exist though, then this is not required.
(slu:run :mode :e :args '("dout/beach.res") )
IN:dout/beach.res
OUT:dres//beach.res
Encoding dout/beach.res
Hans_Lemurson wrote:For now, so long as run-abcl.bat "makes it go" I'm content. The most important feature of a program or utility is a "Make it go" button.
Another question: How do you run the :e mode? Your target for the source files is a folder, so how do you make sure to designate this properly? I tried to test a modification to the beach texture, and it produced a 10 byte beach.res file which, needless to say, caused a client crash.
I used
- Code: Select all
(slu:run :mode :e :args '("dout/beach.res") )
and it said
- Code: Select all
IN:dout/beach.res
OUT:dres//beach.res
Encoding dout/beach.res
Given that the folder itself was called beach.res, might this have caused some ambiguity? Also, what does the // in the "OUT" destination signify?
I believe it is probability of flavor objects (like some random grass bits on plains) to spawn on this tile set. Those flavor objects are spawned client-side.Hans_Lemurson wrote:Any idea what that the "flavprob" variable means in: res\gfx\tiles\apath.res\tileset
Hans_Lemurson wrote:Any idea what that the "flavprob" variable means in: res\gfx\tiles\apath.res\tileset
if(rnd.nextInt(set.flavprob) == 0){
Resource r = set.flavobjs.pick(rnd);
double a = rnd.nextDouble() * 2 * Math.PI;
Gob g = new FlavObj(c.add(tc).mul(tilesz).add(tilesz.div(2)), a);
g.setattr(new ResDrawable(g,r));
Coord cc = c.div(cutsz);
fo[cc+x + (cc.y * cutn.x)].add(g);
}
Hans_Lemurson wrote:Also, your description about the Layers in your first post on this thread seems to be missing the Tiles and Tileset portion. I looked there for clarification, but found them missing.
Users browsing this forum: No registered users and 2 guests