News:

Huge spam cleanup. I hope, everything important is still in place. :-)

Main Menu

command line feature

Started by xinxilas, September 01, 2009, 09:39:18 PM

Previous topic - Next topic

xinxilas

http://winuo.org/client-mods/1957-editi ... 0-mul.html
I posted this question here, and a brazilian guy posted that:
QuoteYou can just remove the entries and create a new staidx0 or replace them with a black tile with -128, so staidx file size won't change.

To replace them it is quite simple, you read 7 bytes a time from original statics0.mul (which represent a static entry)

Assuming you have a static entry at data (array of bytes) use this procedure to get the item id (java):

int low = data[0] & 0xff;
int high = data[1];
int decimal = 0;
decimal = (short)(high << 8 | low);

"decimal" will represent the id.


These ids in "troca" are those you'd want to replace with stumps.

private int troca[] = { 3230, 3240, 3242, 3243, 3273, 3274,
3275, 3276, 3277, 3280, 3283, 3286,
3288, 3290, 3293, 3296, 3299, 3302,
3320, 3323, 3326, 3329, 3395, 3417,
3440, 3461, 3476, 3480, 3484, 3488,
3492, 3496, 3500, 3501, 3394,
3436, 3457, 3435, 3474, 3458, // vines
4792, 4793, 4794, 4795, // yew tree


// POL specific
//6001, 6003, 6005, 6007, 6009, 6011,
//3237, 3223, 3225, 3226, 3227, 3228,
//3229, 3224, 3238, 3241, 3268

// runuo specific
3225, 3226, 3227, 3228, 3229, 3238, 3237, 3268,


If you want to remove gravestones and some others that winuo patch should make you pass through:

else if (decimal == 3306 || decimal == 3305) { // plantinha -> stump
//data[0] = 86;
//data[1] = 14;
data[0] = (byte)132;
data[1] = (byte)61;
data[4] = -127;
} else if (decimal == 6004 || decimal == 6008 || decimal == 6012) { // pedras q da teto
//data[0] = 86;
//data[1] = 14;
data[0] = (byte)132;
data[1] = (byte)61;
data[4] = -127;
}

And below are those you'd don't want to see (leafes, flowers, mushrooms and so):

private int deleta[] = { 3278, 3279, 3281, 3282, 3284, 3285, // leaves
3291, 3292, 3294, 3295, 3297, 3298,
3300, 3301, 3303, 3304, 3321, 3322,
3324, 3325, 3327, 3328, 3330, 3331,
3397, 3398, 3399, 3400, 3401, 3402,
3403, 3404, 3405, 3406, 3407, 3408,
3409, 3410, 3411, 3420, 3421, 3422,
3423, 3424, 3425, 3426, 3427, 3428,
3429, 3430, 3431, 3432, 3433, 3443,
3444, 3445, 3446, 3447, 3448, 3449,
3450, 3451, 3452, 3453, 3454, 3455,
3463, 3464, 3465, 3466, 3467, 3468,
3469, 3470, 3471, 3472, 3477, 3478,
3479, 3481, 3482, 3483, 3485, 3487,
3486, 3489, 3490, 3491, 3493, 3494,
3495, 3497, 3498, 3499, 6943, 6944,
6945, 6946, 6947, 6978, 6949, 6950,

3391, 3392, // brambles

3287, 3289, // cedar needles
3393, 3396, 3415, 3416, 3418, // partes de tree
3419, 3438, 3439, 3441, 3442, 3460,
3462,
3412, 3413, 3414, 3434, // vines
3437, 3456, 3459, 3473,
3475,
4798, 4799, 4800, 4801, 4802, 4803, // yew tree (folhas)
4804, 4805, 4806, 4807,
4789, 4790, 4791, 4796, 4797, // yew tree (partes)
// flores e outras tralhas (cogumelos)
3127, 3128, 3141, 3142, 3143, 3144,
3145, 3146, 3147, 3148, 3149, 3150,
3244, 3245, 3246, 3247, 3248, 3249,
3250, 3251, 3252, 3253, 3254, 3262,
3263, 3264, 3265, 3340, 3341, 3342,
3343, 3344, 3345, 3346, 3347, 3348,
3349, 3350, 3351, 3352, 3353, 3203,
3204, 3205, 3206, 3207, 3208, 3209,
3210, 3211, 3212, 3113, 3214, 3269,
3270, 3271, 3239, 3220, 3231, 3232,
3233, 3234, 3235, 3236, 3219, 3380,

// runuo
3241, 3224, 3237, 3223, 6003, 6004, 6007, 6008,
6011, 6012,
};

I have made a little program that creates a "landfixed" version of staticsN.mul, if you wan't to try it, just send a PM.

cde

He said in other forum this:
"Uma maneira eficiente de fazer um parser global em java é criando um FilterOutputStream e anexando ele ao OutputStream, assim basta criar no método de escrita a verificação que deseja ao escrever os vetores de 7 bytes."

To made an "parser global" in java you can use an "FilterOutputStream" and joining it o "OutputStream", so you just need to create and metod of writing the veryfing that you desires by writing the vectores of 7 bytes...

But he desapeared... maybe you guys can use this information to upgrade centred, an feature that edit the statics with line comands...

Thank You! Bye Bye...