Asgarath83 Posted November 24, 2016 Posted November 24, 2016 It's more complicated than an Icarus script, I think. Apparently in my tests I couldn't get a custom skin working at all, due to it exceeding MAX_QPATH or something like that, and even in that case I'm not sure it would work.The only half-possible workaround to this would be to use the little script glitch, //(BHVD) set ( /*@SET_TYPES*/ "SET_VIDEO_PLAY", "DEFAULT" ); which allows a console command to be executed just writing it after a (non)existing .roq video cutscene. The only problem is that I think changing skin would need cheats to be activated.You could make it more complex; creating a whole load of conditionals IF commands, checking for every possible skin used, and, using the SET_VIDEO_PLAY glitch, activate cheats, set the new playermodel, head, torso and lower skins, and then deactivate cheats. It might work. //(BHVD) set ( /*@SET_TYPES*/ "SET_VIDEO_PLAY", "kkk;helpusobi 1;playermodel <model> <head> <torso> <legs>;helpusobi 0" ); It would overall be a daunting task. there is also the problem that the changing of skin and playermodel info need to affected g_char of character for become definitive, if not, i doubt it load kor1_dark with sith skin... pity there is not a menu transistion between taspir2 and kor1 levels, that can make the changing more easy.i tryied in past with original JKA client, not openjk to use SET_SKIN for changing skin of human mercs on t1_sour level.i maked two custom red and blue skin for mercs, and that works: mercs npc was spawned one with blue and other with red dresses, i edited an icarus ibi dialogue. so is possible to change skin with icarus script.i not know if this work for if \ else variables. never tried. i noticed however in original JKA change too many skins can cause load crash of save games of a level. not know why. however now i cannot check this complicated thing.is a bad period and i pass through an hellish hospital esperience for an infection. really i am not in condition of modding, now.
Asgarath83 Posted November 24, 2016 Posted November 24, 2016 It's more complicated than an Icarus script, I think. Apparently in my tests I couldn't get a custom skin working at all, due to it exceeding MAX_QPATH or something like that, and even in that case I'm not sure it would work.The only half-possible workaround to this would be to use the little script glitch,//(BHVD)set ( /*@SET_TYPES*/ "SET_VIDEO_PLAY", "DEFAULT" );which allows a console command to be executed just writing it after a (non)existing .roq video cutscene. The only problem is that I think changing skin would need cheats to be activated.You could make it more complex; creating a whole load of conditionals IF commands, checking for every possible skin used, and, using the SET_VIDEO_PLAY glitch, activate cheats, set the new playermodel, head, torso and lower skins, and then deactivate cheats. It might work.//(BHVD)set ( /*@SET_TYPES*/ "SET_VIDEO_PLAY", "kkk;helpusobi 1;playermodel <model> <head> <torso> <legs>;helpusobi 0" );It would overall be a daunting task. there is also the problem that the changing of skin and playermodel info need to affected g_char of character for become definitive, if not, i doubt it load kor1_dark with sith skin... pity there is not a menu transistion between taspir2 and kor1 levels, that can make the changing more easy.i tryied in past with original JKA client, not openjk to use SET_SKIN for changing skin of human mercs on t1_sour level.i maked two custom red and blue skin for mercs, and that works: mercs npc was spawned one with blue and other with red dresses, i edited an icarus ibi dialogue. so is possible to change skin with icarus script.i not know if this work for if \ else variables. never tried. i noticed however in original JKA change too many skins can cause load crash of save games of a level. not know why. however now i cannot check this complicated thing.is a bad period and i pass through an hellish hospital esperience for an infection. really i am not in condition of modding, now.
JaceSolarisVIII Posted November 24, 2016 Posted November 24, 2016 @@JediBantha, @@Ramikad, @@JaceSolarisVIII, @@Asgarath83 If I can get the textures sorted and the designs in place on all the Jaden heads, do you think any of you guys could sort out the code, to get this mod in place.. Then I can get it released and I'll credit your name in the mod, for the coding part (If you wanna be featured)? I can have a look at the code and see if I can figure anything out. I was thinking about the hoth change code and also I think there may be some code that changes Rosh to Rosh_dark model at some point in the game. Maybe I can find away for the code to use a Jaden_Dark if on KORRIBAN and is set as dark side user.No promises but I will look in to it this weekend and see if I can find a solution. Darth Sion and Asgarath83 like this
Darth Sion Posted November 24, 2016 Author Posted November 24, 2016 Hmm.. Well, I was thinking, that even though they pretty much have nothing to do with STAR WARS, now.. Do you think it's worth giving RAVEN Software a call and asking them if could help in any way? Considering, y'know.. It is their game. They might know something we don't.. Alright, good luck, @@JaceSolarisVIII!I'm using the JK Enhanced version of the game. I guess I only really use the base game version, to test out things like this. All that really needs changing, is the head. I don't know if you'd need the full body skin. I do know, however, that JK Enhanced has a few more garment/body clothes options, than the base game (additional Jedi Robes and such), which is primarily why I'm looking at just trying to get the head/s changed, if it can be done.
Tempust85 Posted November 24, 2016 Posted November 24, 2016 You can't just edit the dark side scripts (that are run after choosing dark side path) to add in a skin change?
Asgarath83 Posted November 24, 2016 Posted November 24, 2016 I can have a look at the code and see if I can figure anything out. I was thinking about the hoth change code and also I think there may be some code that changes Rosh to Rosh_dark model at some point in the game. Maybe I can find away for the code to use a Jaden_Dark if on KORRIBAN and is set as dark side user.No promises but I will look in to it this weekend and see if I can find a solution.smart idea check the hoth skin for example. is loaded after an academy cutscene, and not a menu (i know how to change playermodels basically with menus) if i remember fine, it loaded two files of jaden body folder: torso_g1.SKIN and lower_e1.SKIN not idea of how exactly work. otherwise, this work for all jaden races. sith eyes are just for humans male and female (okay also for twi'lek and zabrak i guess) so is more complicated. the change affected only some species and is a facial change, not a standard body reskin common for all species of game (also aliens skins of jaden get hoth skin)but yes, can get some suggest. mmm ehi, a good idea maybe should be also to check how work tavion possessed by marka ragnos? effectoley, she change player model and eyes color after a cutscene, remember? when ragnos ghost enter into her in korriban light side final fight.
Darth Sion Posted November 24, 2016 Author Posted November 24, 2016 smart idea check the hoth skin for example. is loaded after an academy cutscene, and not a menu (i know how to change playermodels basically with menus) if i remember fine, it loaded two files of jaden body folder: torso_g1.SKIN and lower_e1.SKIN not idea of how exactly work. otherwise, this work for all jaden races. sith eyes are just for humans male and female (okay also for twi'lek and zabrak i guess) so is more complicated. the change affected only some species and is a facial change, not a standard body reskin common for all species of game (also aliens skins of jaden get hoth skin)but yes, can get some suggest. mmm ehi, a good idea maybe should be also to check how work tavion possessed by marka ragnos? effectoley, she change player model and eyes color after a cutscene, remember? when ragnos ghost enter into her in korriban light side final fight. Yeah, I'm not that fussed about the Twi'leks or Zabrak species, that much. This is mainly just for the human species. The others can be done at a later date, if need be. First thing's first.. But I do think it'd be a little easier, maybe to do the Zabrak species, than the Twi'leks. Twi'leks will be the hardest, I'd imagine. But I think the majority of people go with human Jaden, anyway.
Darth Sion Posted November 24, 2016 Author Posted November 24, 2016 You can't just edit the dark side scripts (that are run after choosing dark side path) to add in a skin change?I dunno if that's directed at me, but if it is.. I'm not familiar with the scripting/coding part, so that's why I'd prefer to leave that to someone who has more knowledge about it and knows what they're doing.
dark_apprentice Posted November 24, 2016 Posted November 24, 2016 The only simple idea that comes to my mind is (if possible of course), to make a simple .cfg file in your base folder, that could change the base Jaden head from let's say "head_a1" to use the one in "head_a2.skin" file in other words the CFG can change the skin from Jaden regular to Jaden Dark Side using the sith eyes, bind it to a key and when turning to the dark side - boom.
Ramikad Posted November 24, 2016 Posted November 24, 2016 You can't just edit the dark side scripts (that are run after choosing dark side path) to add in a skin change? Not quite. As it's been discussed through the thread, apparently you can only set a "whole" skin, not custom skin pieces. And this means that, smart idea check the hoth skin for example. is loaded after an academy cutscene, and not a menu (i know how to change playermodels basically with menus) if i remember fine, it loaded two files of jaden body folder: torso_g1.SKIN and lower_e1.SKIN not idea of how exactly work. otherwise, this work for all jaden races. sith eyes are just for humans male and female (okay also for twi'lek and zabrak i guess) so is more complicated. the change affected only some species and is a facial change, not a standard body reskin common for all species of game (also aliens skins of jaden get hoth skin)but yes, can get some suggest. mmm ehi, a good idea maybe should be also to check how work tavion possessed by marka ragnos? effectoley, she change player model and eyes color after a cutscene, remember? when ragnos ghost enter into her in korriban light side final fight. as Asgarath mentioned, Tavion can freely switch to the tavion_possessed.skin because it's a single .skin, and not a set of three .skin files. There's a specific script command to give the player the Hoth gear, the bool SET_WINTER_GEAR, and that suggests that if it could have been done with a simpler SET_SKIN it maybe would have been done. Asgarath83 likes this
Asgarath83 Posted November 24, 2016 Posted November 24, 2016 The bad problem is that jaden skin is not rigid: is done with a head_*, torso_*, lower_* combination, at second of choice of player on character menu. i not know how is possible to manage with this variable. for what i remember, set_skin command require the complete path of SKIN file that you want to load to the model. mmm Otherwise... i ask to myself if is possible to load simply a set_skin command that load a new head_sith_a1.SKIN, a2.SKIN etc, with an if \ else case related about if jaden get head_a1, head_b1 or head_c1 face.if this work is not necessary to fully update the body. can works maybe just with an update of head? i remember that jadens skins files are not completed with all body parts, they contains only the mesh and texture path istruction of head, torso and lower pants parts.so, head_a1 not get torso and lower info, torso not get head info... maybe this can make all stuff more simple.with only the head to change there are less variables to change. Darth Sion likes this
Tempust85 Posted November 25, 2016 Posted November 25, 2016 Probably wouldn't be too hard to whip up a "eyes.skin" to go along with the head, torso, legs. Then make a "SET_SKIN_EYES" something in the code for icarus. Something like that. JaceSolarisVIII likes this
JaceSolarisVIII Posted November 26, 2016 Posted November 26, 2016 Ok i think i may have located the area of code that would need to be edited. static void G_SetSkin( gentity_t *ent ) { char skinName[MAX_QPATH]; //ok, lets register the skin name, and then pass that name to the config strings so the client can get it too. if (Q_stricmp( "hoth2", level.mapname ) == 0 //hack, is this the only map? || Q_stricmp( "hoth3", level.mapname ) == 0 // no! ;-) ) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1" ); } else if(Q_stricmp(g_char_skin_head->string, "model_default") == 0 && Q_stricmp(g_char_skin_torso->string, "model_default") == 0 && Q_stricmp(g_char_skin_legs->string, "model_default") == 0) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/model_default.skin", g_char_model->string ); } else { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string ); } // lets see if it's out there int skin = gi.RE_RegisterSkin( skinName ); if ( skin ) {//what if this returns 0 because *one* part of a multi-skin didn't load? // put it in the config strings // and set the ghoul2 model to use it gi.G2API_SetSkin( &ent->ghoul2[ent->playerModel], G_SkinIndex( skinName ), skin ); } //color tinting if ( g_char_color_red->integer || g_char_color_green->integer || g_char_color_blue->integer ) { ent->client->renderInfo.customRGBA[0] = g_char_color_red->integer; ent->client->renderInfo.customRGBA[1] = g_char_color_green->integer; ent->client->renderInfo.customRGBA[2] = g_char_color_blue->integer; ent->client->renderInfo.customRGBA[3] = 255; } if ( g_char_color_2_red->integer || g_char_color_2_green->integer || g_char_color_2_blue->integer ) { ent->client->renderInfo.newCustomRGBA[0][0] = g_char_color_2_red->integer; ent->client->renderInfo.newCustomRGBA[0][1] = g_char_color_2_green->integer; ent->client->renderInfo.newCustomRGBA[0][2] = g_char_color_2_blue->integer; ent->client->renderInfo.newCustomRGBA[0][3] = 255; } } I'm no expert coder,but I'm thinking something like this may help or at least get a better coder started. static void G_SetSkin( gentity_t *ent ) { char skinName[MAX_QPATH]; gclient_t *client = ent->client; //ok, lets register the skin name, and then pass that name to the config strings so the client can get it too. if (Q_stricmp( "hoth2", level.mapname ) == 0 || Q_stricmp( "hoth3", level.mapname ) == 0)//hack, is this the only map? { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1" ); } else if(Q_stricmp("kor1", level.mapname) == 0 || Q_stricmp("kor2", level.mapname) == 0 && client->playerTeam == TEAM_ENEMY )// using a kor 1 or 2 map and not a good guy ??????????????? { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1");//I think this is where we would set the new dark models ????????? } else if(Q_stricmp(g_char_skin_head->string, "model_default") == 0 && Q_stricmp(g_char_skin_torso->string, "model_default") == 0 && Q_stricmp(g_char_skin_legs->string, "model_default") == 0) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/model_default.skin", g_char_model->string ); } else { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string ); } // lets see if it's out there int skin = gi.RE_RegisterSkin( skinName ); if ( skin ) {//what if this returns 0 because *one* part of a multi-skin didn't load? // put it in the config strings // and set the ghoul2 model to use it gi.G2API_SetSkin( &ent->ghoul2[ent->playerModel], G_SkinIndex( skinName ), skin ); } //color tinting if ( g_char_color_red->integer || g_char_color_green->integer || g_char_color_blue->integer ) { ent->client->renderInfo.customRGBA[0] = g_char_color_red->integer; ent->client->renderInfo.customRGBA[1] = g_char_color_green->integer; ent->client->renderInfo.customRGBA[2] = g_char_color_blue->integer; ent->client->renderInfo.customRGBA[3] = 255; } if ( g_char_color_2_red->integer || g_char_color_2_green->integer || g_char_color_2_blue->integer ) { ent->client->renderInfo.newCustomRGBA[0][0] = g_char_color_2_red->integer; ent->client->renderInfo.newCustomRGBA[0][1] = g_char_color_2_green->integer; ent->client->renderInfo.newCustomRGBA[0][2] = g_char_color_2_blue->integer; ent->client->renderInfo.newCustomRGBA[0][3] = 255; } } I will investigate further... Darth Sion likes this
Darth Sion Posted November 26, 2016 Author Posted November 26, 2016 Ok i think i may have located the area of code that would need to be edited. static void G_SetSkin( gentity_t *ent ) { char skinName[MAX_QPATH]; //ok, lets register the skin name, and then pass that name to the config strings so the client can get it too. if (Q_stricmp( "hoth2", level.mapname ) == 0 //hack, is this the only map? || Q_stricmp( "hoth3", level.mapname ) == 0 // no! ;-) ) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1" ); } else if(Q_stricmp(g_char_skin_head->string, "model_default") == 0 && Q_stricmp(g_char_skin_torso->string, "model_default") == 0 && Q_stricmp(g_char_skin_legs->string, "model_default") == 0) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/model_default.skin", g_char_model->string ); } else { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string ); } // lets see if it's out there int skin = gi.RE_RegisterSkin( skinName ); if ( skin ) {//what if this returns 0 because *one* part of a multi-skin didn't load? // put it in the config strings // and set the ghoul2 model to use it gi.G2API_SetSkin( &ent->ghoul2[ent->playerModel], G_SkinIndex( skinName ), skin ); } //color tinting if ( g_char_color_red->integer || g_char_color_green->integer || g_char_color_blue->integer ) { ent->client->renderInfo.customRGBA[0] = g_char_color_red->integer; ent->client->renderInfo.customRGBA[1] = g_char_color_green->integer; ent->client->renderInfo.customRGBA[2] = g_char_color_blue->integer; ent->client->renderInfo.customRGBA[3] = 255; } if ( g_char_color_2_red->integer || g_char_color_2_green->integer || g_char_color_2_blue->integer ) { ent->client->renderInfo.newCustomRGBA[0][0] = g_char_color_2_red->integer; ent->client->renderInfo.newCustomRGBA[0][1] = g_char_color_2_green->integer; ent->client->renderInfo.newCustomRGBA[0][2] = g_char_color_2_blue->integer; ent->client->renderInfo.newCustomRGBA[0][3] = 255; } } I'm no expert coder,but I'm thinking something like this may help or at least get a better coder started. static void G_SetSkin( gentity_t *ent ) { char skinName[MAX_QPATH]; gclient_t *client = ent->client; //ok, lets register the skin name, and then pass that name to the config strings so the client can get it too. if (Q_stricmp( "hoth2", level.mapname ) == 0 || Q_stricmp( "hoth3", level.mapname ) == 0)//hack, is this the only map? { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1" ); } else if(Q_stricmp("kor1", level.mapname) == 0 || Q_stricmp("kor2", level.mapname) == 0 && client->playerTeam == TEAM_ENEMY )// using a kor 1 or 2 map and not a good guy ??????????????? { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, "torso_g1", "lower_e1");//I think this is where we would set the new dark models ????????? } else if(Q_stricmp(g_char_skin_head->string, "model_default") == 0 && Q_stricmp(g_char_skin_torso->string, "model_default") == 0 && Q_stricmp(g_char_skin_legs->string, "model_default") == 0) { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/model_default.skin", g_char_model->string ); } else { Com_sprintf( skinName, sizeof( skinName ), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string ); } // lets see if it's out there int skin = gi.RE_RegisterSkin( skinName ); if ( skin ) {//what if this returns 0 because *one* part of a multi-skin didn't load? // put it in the config strings // and set the ghoul2 model to use it gi.G2API_SetSkin( &ent->ghoul2[ent->playerModel], G_SkinIndex( skinName ), skin ); } //color tinting if ( g_char_color_red->integer || g_char_color_green->integer || g_char_color_blue->integer ) { ent->client->renderInfo.customRGBA[0] = g_char_color_red->integer; ent->client->renderInfo.customRGBA[1] = g_char_color_green->integer; ent->client->renderInfo.customRGBA[2] = g_char_color_blue->integer; ent->client->renderInfo.customRGBA[3] = 255; } if ( g_char_color_2_red->integer || g_char_color_2_green->integer || g_char_color_2_blue->integer ) { ent->client->renderInfo.newCustomRGBA[0][0] = g_char_color_2_red->integer; ent->client->renderInfo.newCustomRGBA[0][1] = g_char_color_2_green->integer; ent->client->renderInfo.newCustomRGBA[0][2] = g_char_color_2_blue->integer; ent->client->renderInfo.newCustomRGBA[0][3] = 255; } } I will investigate further...Ok, so that's the Hoth part, then.. Would it have the same sort of parameters, when Jaden turns to the Dark Side?
Tempust85 Posted November 26, 2016 Posted November 26, 2016 EDIT: I think I've found a way to do this: else if (Q_stricmp("kor1", level.mapname) == 0 || Q_stricmp("kor2", level.mapname) == 0 && player->client->sess.mission_objectives[LIGHTSIDE_OBJ].status == 2) //pulled this from elsewhere in the game code, so should be legit. { //Go through and check what head skin the player has selected, and load the appropriate sith version. if(Q_stricmp(g_char_skin_head->string, "head_a1") == 0) //head_a1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a2") == 0) //head_a2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a3") == 0) //head_a3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a4") == 0) //head_a4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b1") == 0) //head_b1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b2") == 0) //head_b2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b3") == 0) //head_b3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b4") == 0) //head_b4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c1") == 0) //head_c1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c2") == 0) //head_c2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c3") == 0) //head_c3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else (Q_stricmp(g_char_skin_head->string, "head_c4") == 0) //head_c4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } } Need to do checks to see what head skin we are currently using in order to change to the correct one. This should cover all base heads, but can always add support for more. Darth Sion and JaceSolarisVIII like this
Darth Sion Posted November 26, 2016 Author Posted November 26, 2016 EDIT: I think I've found a way to do this: else if (Q_stricmp("kor1", level.mapname) == 0 || Q_stricmp("kor2", level.mapname) == 0 && player->client->sess.mission_objectives[LIGHTSIDE_OBJ].status == 2) //pulled this from elsewhere in the game code, so should be legit. { //Go through and check what head skin the player has selected, and load the appropriate sith version. if(Q_stricmp(g_char_skin_head->string, "head_a1") == 0) //head_a1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a2") == 0) //head_a2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a3") == 0) //head_a3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a4") == 0) //head_a4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b1") == 0) //head_b1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b2") == 0) //head_b2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b3") == 0) //head_b3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b4") == 0) //head_b4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c1") == 0) //head_c1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c2") == 0) //head_c2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c3") == 0) //head_c3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else (Q_stricmp(g_char_skin_head->string, "head_c4") == 0) //head_c4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } } Need to do checks to see what head skin we are currently using in order to change to the correct one. This should cover all base heads, but can always add support for more.So, if that ^^ works.. Is all that'd be needed to be done is to copy and paste that code into the script/file or w/e? I know JK Enhanced has a coupla' additional heads, which are mainly the base heads, but with the Jedi Robes (hood up) and what not..
MagSul Posted November 26, 2016 Posted November 26, 2016 Got some skinning to do then! Darth Sion likes this
Tempust85 Posted November 26, 2016 Posted November 26, 2016 Copy it in and compile, it should work but it's untested. Like I said, can always add more support for additional head files. Darth Sion likes this
Darth Sion Posted November 26, 2016 Author Posted November 26, 2016 Ok, well just got to wait for MagSul's work on it, when he's ready and then if someone can compile the code into a script, once the files are in place.. I'll test it out. I'm not exactly sure where everything needs to go, so it's a bit confusing .
Tempust85 Posted November 26, 2016 Posted November 26, 2016 Needs to be put into OpenJK or jk enhanced game code, no Icarus scripting required.
Darth Sion Posted November 26, 2016 Author Posted November 26, 2016 Needs to be put into OpenJK or jk enhanced game code, no Icarus scripting required.Well, that's redsaurus's area of expertise, then. Could it be done as an Icarus Script, for outside of JK Enhanced or as a separate mod?
Tempust85 Posted November 27, 2016 Posted November 27, 2016 Can absolutely do it on a fresh copy of OpenJK's code, doesn't need JK enhanced specifically. It also cannot be scripted.
Tempust85 Posted November 27, 2016 Posted November 27, 2016 A much better way is to add a sith eyes set type to icarus, like the winter gear: Under case SET_WINTER_GEAR in Q3_interface.cpp, put this: case SET_SITH_EYES: { // If this is a (fake) Player NPC or this IS the Player... if (entID == 0 || (ent->NPC_type && Q_stricmp(ent->NPC_type, "player") == 0)) { char strSkin[MAX_QPATH]; // Set the sith eyes Skin if true, otherwise set back to normal configuration. if (Q_stricmp("true", ((char *)data)) == 0) { //Go through and check what head skin the player has selected, and load the appropriate sith version. if (Q_stricmp(g_char_skin_head->string, "head_a1") == 0) //head_a1.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a2") == 0) //head_a2.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a3") == 0) //head_a3.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a4") == 0) //head_a4.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b1") == 0) //head_b1.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b2") == 0) //head_b2.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b3") == 0) //head_b3.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b4") == 0) //head_b4.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c1") == 0) //head_c1.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c2") == 0) //head_c2.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c3") == 0) //head_c3.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c4") == 0) //head_c4.skin { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } } else if (Q_stricmp(g_char_skin_head->string, "model_default") == 0 && Q_stricmp(g_char_skin_torso->string, "model_default") == 0 && Q_stricmp(g_char_skin_legs->string, "model_default") == 0) { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/model_default.skin", g_char_model->string); } else { Com_sprintf(strSkin, sizeof(strSkin), "models/players/%s/|%s|%s|%s", g_char_model->string, g_char_skin_head->string, g_char_skin_torso->string, g_char_skin_legs->string); } int iSkinID = gi.RE_RegisterSkin(strSkin); if (iSkinID) { gi.G2API_SetSkin(&ent->ghoul2[ent->playerModel], G_SkinIndex(strSkin), iSkinID); } } break; } Then find SET_WINTER_GEAR again in Q3_interface.cpp and add ENUM2STRING(SET_SITH_EYES) under it like this: ENUM2STRING(SET_FORCE_RAGE), ENUM2STRING(SET_FORCE_PROTECT), ENUM2STRING(SET_FORCE_ABSORB), ENUM2STRING(SET_FORCE_DRAIN), ENUM2STRING(SET_WINTER_GEAR), ENUM2STRING(SET_SITH_EYES), ENUM2STRING(SET_NO_ANGLES), ENUM2STRING(SET_SABER_ORIGIN), ENUM2STRING(SET_SKIN), Then add SET_SITH_EYES under SET_WINTER_GEAR in Q3_interface.h. Then copy the updated Q3_interface.h to your "SourceForBehavEd" directory so BehavED.exe has the update. Do a script like this: //Generated by BehavEd rem ( "comment" ); affect ( "player", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_SITH_EYES", /*@BOOL_TYPES*/ "true" ); } And load it in your map using the scriptrunner ent. You will need to run this simple script everytime the level starts. Download my test that includes a test level (map test in console)with its source, test sith skins and compiled code: https://dl.dropboxusercontent.com/u/16660487/JKA/Sith_Eyes_Test.zip axanik, Asgarath83, Merek and 4 others like this
JaceSolarisVIII Posted November 27, 2016 Posted November 27, 2016 EDIT: I think I've found a way to do this: else if (Q_stricmp("kor1", level.mapname) == 0 || Q_stricmp("kor2", level.mapname) == 0 && player->client->sess.mission_objectives[LIGHTSIDE_OBJ].status == 2) //pulled this from elsewhere in the game code, so should be legit. { //Go through and check what head skin the player has selected, and load the appropriate sith version. if(Q_stricmp(g_char_skin_head->string, "head_a1") == 0) //head_a1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a2") == 0) //head_a2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a3") == 0) //head_a3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_a4") == 0) //head_a4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_a4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b1") == 0) //head_b1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b2") == 0) //head_b2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b3") == 0) //head_b3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_b4") == 0) //head_b4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_b4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c1") == 0) //head_c1.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c1_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c2") == 0) //head_c2.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c2_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else if (Q_stricmp(g_char_skin_head->string, "head_c3") == 0) //head_c3.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c3_sith", g_char_skin_torso->string, g_char_skin_legs->string); } else (Q_stricmp(g_char_skin_head->string, "head_c4") == 0) //head_c4.skin { Com_sprintf(skinName, sizeof(skinName), "models/players/%s/|%s|%s|%s", g_char_model->string, "head_c4_sith", g_char_skin_torso->string, g_char_skin_legs->string); } } Need to do checks to see what head skin we are currently using in order to change to the correct one. This should cover all base heads, but can always add support for more. Looks like you have a much better handle on this. Nice one mate! Tempust85 likes this
Tempust85 Posted November 27, 2016 Posted November 27, 2016 @@redsaurus would you kindly add the code to your next JK Enhanced update? Smoo and Darth Sion like this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now