Making body style ignore palette

evilpuncker

vai se tratar garota
Messages
2,178
Points
0
Age
109
Location
bronzil
Github
EPuncker
Emulator
Client Version
2019-05-30a MAIN
I was messing with palette and noticed that the costume ones have different palettes path and since I'm using the shared palette diff, it doesn't support it. So I remembered that we have the:

wedding_ignorepalette etc etc settings, but we don't have one for body styles (costumes), I even tried to edit the clif_changelook function but no success (I always try to solve things before creating a topic 😁) , here is what I did:

case LOOK_CLOTHES_COLOR:
if (val && sd != NULL) {
if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true)
val = 0;
if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true)
val = 0;
if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true)
val = 0;
if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true)
val = 0;
if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true)
val = 0;
if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true)
val = 0;
if (vd->body_style != 0) // this is what I added, but still gravity error
val = 0;
}
vd->body_style = 0; // yes I even tried to reset body style to zero when changing colors but it still give palette error
vd->cloth_color = val;
break;




How do I get an error:

- get any 3rd class

- change cloth color to anything (I'm using the 500+ something pack that has been around for years)

- change body style to anything higher than 0 (either by @bodystyle command or stylist npc)

- palette error and gravity

How do I get an error (number 2):

- get any 3rd class

- change body style to anything higher than 0 (either by @bodystyle command or stylist npc)

- change cloth color to anything (I'm using the 500+ something pack that has been around for years)

- palette error and gravity

(I'm avoiding to use the Ignore missing palette diff because reasons)

 
Last edited by a moderator:
you do know that ... int type ......

static void clif_changelook(struct block_list *bl, int type, int val)


when do `@bodystyle` the atcommand did say

pc->changelook(sd, LOOK_BODY2, body_style);


so WHY are you looking at case LOOK_CLOTHES_COLOR: ??

go look at case LOOK_BODY2: ....

case LOOK_BODY2:
if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING)
val = 0;
vd->body_style = val;
break;



I'm avoiding to use the Ignore missing palette diff because reasons)
https://rathena.org/board/topic/75755-i-would-like-to-report/?do=findComment&comment=164148

hmm ... so bad that those pictures are gone, that neon pack

 
Last edited by a moderator:
so WHY are you looking at case LOOK_CLOTHES_COLOR: ??
idk, I was just guessing 😁

but yes I thought it would not matter but I also changed to this:

case LOOK_BODY2:
if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING)
val = 0;
vd->cloth_color = 0;
vd->body_style = val;
break;


but guess what

f5LDBi3.png


what am I doing wrong? 😓

(what I want in case it wasn't clear: when changing body style -> reset cloth color to zero)

 
Last edited by a moderator:
look below a bit and you'll see clif->sendlook command
clif->sendlook also needs to update BODY2

I'll try not to give out too much ... oh wait, this is request section,

honestly I want to make this a long thread and let you learn step by step process, but nah, request section ... spoon feed

NEXT ---- you'll soon discover clif->changelook isn't the function you'll looking for,

src/map/clif.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/map/clif.c b/src/map/clif.c
index 54c9869c3..0204baefc 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3784,6 +3784,7 @@ static void clif_changelook(struct block_list *bl, int type, int val)
case LOOK_BODY2:
if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING)
val = 0;
+ clif->sendlook(bl, bl->id, LOOK_CLOTHES_COLOR, 0, 0, AREA);
vd->body_style = val;
break;
}


`@bodystyle 1`

yes this will temporary change the look, but `@go 0` you'll soon see the cloth color change back to original value

because doing like this is equivalent to *changelook script command

NEXT -----
(what I want in case it wasn't clear: when changing body style -> reset cloth color to zero)
correct answer is just make changes to the stylist script

prontera,170,180,1 script Stylist#custom_stylist 2_M_DYEINGER,{
.@choose = select( "Hair Style", "Hair Color", "Cloth Color", ( !(eaclass() & EAJL_THIRD) || BaseJob == Job_SuperNovice )? "": _("Body Style") ) -1;
if (.@choose == 3) // JUST ADD THIS FUCKING SIMPLE LINE
setlook LOOK_CLOTHES_COLOR, 0;
.@lookpart = .@part = .look[.@choose];
if ( BaseClass == Job_Summoner )
.@part += Job_Summoner;




btw I have at least 4 paid service line up right now so .... that reply you made on my stylist script, takes time to write so yeah ........

 
Back
Top