Aller au contenu

Photo

Being Forgetful Part 2- Working on Tailor Models


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Wall3T

Wall3T
  • Members
  • 461 messages

Ok so im going to get straight to the point. Im testing out a cep 2.4 starter module Body tailor model using my own custom heads, & body hacks using the btlr_inc

 

two things i cant figure out that i'd like to get help with:

 

1.The head hackpack (which i customized myself) the number goes up to 199 for elf heads but they don't appear on the body tailor NPC*

 

2.i cant figure out how to add more body parts than the allotted 0,1,2 body parts

 

This is the script (unedited from cep 2.4 starter module) below

 

*the heads that "skip" or arent even in the models list when i use the body tailors dialogue. the only way to retrieve these heads is by telling (The PC/Player) the npc Model which number you want (EX: elf heads go from 1-123 then skip to 178 so why does it do that?)

 

//::///////////////////////////////////////////////
//:: BODY TAILOR: include file
//:: btlr_* scripts
//:://////////////////////////////////////////////
/*
   allows restrictions for wings/tails.
   sets MAX for wings, tails, heads.
   and misc switches for control.

*/
//:://////////////////////////////////////////////
//:: Created By: bloodsong
//:: based on the mil tailor by Jake E. Fitch (Milambus Mandragon)
//:: Edited by 420 for CEP where indicated
//:: Edited by Estelindis for KotOR Heads where indicated
//:://////////////////////////////////////////////

//-- CONSTANTS for the soft MAX of each type;
//-- the wing/tail 2das can't go above 256 anyway.
//-- change these to reflect the max number of whatever
//-- that you have in your module.
//-- ie: you may not have 200 female human heads, though it is possible.
int WINGMAX     =   680; //CEP 2.2 Wing Max
int TAILMAX     =   2796; //CEP 2.2 Tail Max

//CEP 2.1 Heads Max
// Modified for KotOR Heads
int HFHEADMAX   =   199;    //-- human female
int HMHEADMAX   =   199;    //-- human male
int AFHEADMAX   =   72;    //-- halfling female
int AMHEADMAX   =   72;     //-- halfling male
int EFHEADMAX   =   199;    //-- elf female
int EMHEADMAX   =   199;     //-- elf male
int GFHEADMAX   =   36;     //-- gnome female
int GMHEADMAX   =   36;     //-- gnome male
int DFHEADMAX   =   50;    //-- dwarf female
int DMHEADMAX   =   40;     //-- dwarf male
int OFHEADMAX   =   39;     //-- halforc female
int OMHEADMAX   =   36;     //-- halforc male
int BFHEADMAX   =   36;     //-- brownie female
int BMHEADMAX   =   32;     //-- brownie male
int WFHEADMAX   =   2;     //-- wemic female
int WMHEADMAX   =   4;     //-- wemic male

int CUSTOMPARTS =    255;     //-- set this to how many pc parts you have
                            //-- before it should switch up to part 255. default is 0, 1, 2.

//--CONSTANTS for switches;  set to 0 to turn off
int SKIP2DALINES    =   1;  //--my wings/tails skip 2da lines, so finding a blank
                //--is not an end-of-file indication. use 1 if your 2das skip,
                //--and then use the restrictions list and MAX constants
                //--to define the wing/tail limits.

int ALLOWBONEARM    =   1;  //-- anybody can get a palemaster arm
int ALLOWBONEREMOVAL=   1;  //-- palemasters can remove bone arms
int ALLOWRDDWING    =   1;  //-- anybody can get red dragon wings
int ALLOWRDDREMOVAL =   1;  //-- red dragon disciples can remove wings
int ALLOWEYES       =   1;  //-- let anybody get glowing eyes
//--REMOVED //-- allow monks to remove glowing eyes -- THEY CANT anyway.

//--notes on EYE numbers; i dont know what the real numbers are,
//-- so i set these as tracking numbers.
//-- 0=none, 1=red, 2=green, 3=yellow

//--RESTRICTION LISTS: WINGS/TAILS
/* instructions:
   you can set individual wings/tails or ranges of them
   to be un-selectable in the body shop tailor.
   for example, if you dont want people to have angel or demon wings,
   set a case # for those, like this:
   case CREATURE_WING_TYPE_ANGEL:
   case CREATURE_WING_TYPE_DEMON:
     return TRUE;

   you can also use straight numbers, which match the 2da line numbers.
   ie: demon = 1 and angel = 2. custom wings will use plain numbers.
   the scripts should skip blank 2da lines, but to make this process
   run more smoothly, you should indicate any large gaps in your 2da files,
   using the invalid range sets, thus:
     if(n >= 43 && n <= 93)  return TRUE;

   this will skip lines 43-93.

   if you touch nothing, there won't be any restrictions.
   you can still use the soft max constants to tell the scripts
   when to loop back to the beginning.

*/


//checks if n is a valid number; TRUE is INvalid, FALSE is valid
int WingIsInvalid(int n)
{
    //-- restriction list switch
    switch(n)
    {
      //case #:
      //  return TRUE;
    }

    // if(n >= [low#] && n<= [high#])  return TRUE;

    return FALSE;
}


//checks if n is a valid number; TRUE is INvalid, FALSE is valid
int TailIsInvalid(int n)
{
    //-- restriction list switch
    switch(n)
    {
      //case #:
      //  return TRUE;
    }

    // if(n >= [low#] && n<= [high#])  return TRUE;

    return FALSE;
}



//--OUTSIDE FUNCTIONS-----------------------------------------------
//-- do not modify stuff below

// Remove an effect of the given type
void RemoveEffectOfType(object oTarget, int nEffectType)
{
    effect eEff = GetFirstEffect(oTarget);
    while (GetIsEffectValid(eEff)) {
        if ( GetEffectType(eEff) == nEffectType) {
            RemoveEffect(oTarget, eEff);
        }
        eEff = GetNextEffect(oTarget);
    }
}



//--sticks nFX eyes on oCreature
//--with routine by the guy who figured out how to figure out eye numbers,
//-- but didnt put his/her name on the scripts
void ApplyEyes(int nFX, object oCreature)
{
  int nGender = GetGender(oCreature);
  int nRace = GetAppearanceType(oCreature);
  //--FX EYE # LIST: 0=none, 1=red, 2=green, 3=yellow.  there.

  switch(nRace)
  {//-- this will make the races translate to proper advances on the fx constants.  trust me.
    case 0: nRace = 2; break;
    case 1: nRace = 4; break;
    case 2: nRace = 6; break;
    case 3: nRace = 8; break;
    case 4: nRace = 0; break;
    case 5: nRace = 10; break;
    default: nRace = 0; break;
  }

  switch (nFX)
  {
  case 1:
    {
    RemoveEffectOfType(oCreature, EFFECT_TYPE_VISUALEFFECT);
    effect eEyes = SupernaturalEffect(EffectVisualEffect( VFX_EYES_RED_FLAME_HUMAN_MALE+nGender+nRace));
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEyes, oCreature);
    break;
    }
  case 2:
    {
    RemoveEffectOfType(oCreature, EFFECT_TYPE_VISUALEFFECT);
    effect eEyes = SupernaturalEffect(EffectVisualEffect( VFX_EYES_GREEN_HUMAN_MALE+nGender+nRace));
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEyes, oCreature);
    break;
    }
  case 3:
    {
    RemoveEffectOfType(oCreature, EFFECT_TYPE_VISUALEFFECT);

    effect eEyes1 = SupernaturalEffect(EffectVisualEffect( VFX_EYES_GREEN_HUMAN_MALE+nGender+nRace));
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEyes1, oCreature);

    effect eEyes2 = SupernaturalEffect(EffectVisualEffect( VFX_EYES_RED_FLAME_HUMAN_MALE+nGender+nRace));
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEyes2, oCreature);
    break;
    }
  case 0:
    {
    RemoveEffectOfType(oCreature, EFFECT_TYPE_VISUALEFFECT);
    break;
    }
  }
}




string Get2DACheck(string sFile, int iRow)
{
   //-- this reads a string from the module...!?
    string sACBonus = GetLocalString(GetModule(), sFile + IntToString(iRow));
    //-- if the module string is blank...
    if (sACBonus == "")
    {  //--read the 2da of the file, for the MODEL column, on our current row.
        sACBonus = Get2DAString(sFile, "MODEL", iRow);

    if (sACBonus == "" && iRow != 0)//-- dont skip blank row 0, none
        {//-- if that is blank, we SKIP that line.
            sACBonus = "SKIP";
           //-- unless the LABEL row is also blank...
            string sCost = Get2DAString(sFile, "LABEL", iRow);
            if (sCost == "" && !SKIP2DALINES) sACBonus = "FAIL";
            //--AND we are not skipping blank 2da lines.
            //-- in which case its a FAIL.
        }
       //--store the 2da row/column value on the module.
        SetLocalString(GetModule(), sFile + IntToString(iRow), sACBonus);
    }
   //--this returns a number-string, or SKIP or FAIL.
    return sACBonus;
}



int GetCachedLimit(string sFile)
{
    if(!SKIP2DALINES)
    {//-- we're not skipping blank lines
    //Fixed the sFile string for CEP
      if(sFile == "wingmodel")
      {  return WINGMAX;  }
      else //--its tails
      {  return TAILMAX;  }
    }
    //-- if we're not skipping blank lines, we can find the max
    //-- line number of the 2da using this

    int iLimit = GetLocalInt(GetModule(), sFile + "Limit");

    if (iLimit == 0)
    {
        int iCount = 0;

        while (Get2DAString(sFile, "MODEL", iCount + 1) != "")
        {
            iCount++;
        }

        SetLocalInt(GetModule(), sFile + "Limit", iCount);
        iLimit = iCount;
    }

    return iLimit;
}



// void main(){}



#2
Wall3T

Wall3T
  • Members
  • 461 messages

So im still trying to work on the script with no luck.

 

Would anyone know if if its possible tweek or modify this script?

 

And would anyone be aware of of other body tailors that they'd recommend? <===as a heads up it would have to be something I can get my hands on. IE if its not on the vault , nexus, on someones drive or elsewhere then I obviously cannot use it



#3
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

well, There is nothing that you have given us that needs to be modified.   The script given is only an include.   You will need to find the script that is attached to the conversation that is effecting the head/body selection for us to see what is going on.   



#4
Wall3T

Wall3T
  • Members
  • 461 messages

ah ok see i didnt know that, no one was explaining. well ....when i try to locate the scripts inside the npc dialogue, they show up in grey as <custom91154> and the script isnt displayed. where should i go to locate these scripts?

 

to be specific i am modding all this from the cep 2.4 starter module



#5
Wall3T

Wall3T
  • Members
  • 461 messages

okay so what im looking to do is this

 

id like to see if its possible to add additional body parts to a body tailor model. Wether that be a non-cep body model or a cep body model like so:

 

part110.jpg

 

Is this even possible? if so would anyone like to help me with this?

 

When i try to locate the exact scripts that change the body parts I only get this:

 

I recieve a <CUSTOM91154< Modifications line, no scripts listed

 

part210.jpg

 

Im not really sure where to start locating these exact files i need to modify or add more parts to????

 

this here is a list of all the files being used

 

part310.jpg

 

the entire list goes in in order of btlr_

 

inc,

applycolor,

 

applyeyes,

 

applypart,

 

applypheno,

 

bodytailor,

 

copymetome,

 

copytomodel,

 

deccolor,

 

decrease,

 

eyes0,

 

eyes1,

 

eyes2,

 

eyes3,

 

inccolor

 

increase,

 

miltailor,

 

modeyes,

 

modhair,

 

modhead,

 

modbicep,

 

modfoot,

 

modforearm,

 

modhand,

 

modshin,

 

modthigh,

 

modneck,

 

modparts,

 

modpelvis,

 

modbiceps,

 

modfoot,

 

modrforearm,

 

modhand,

 

modshin,

 

modrthigh,

 

modskin,

 

modtail,

 

modtat1,

 

modtat2,

 

modtorso,

 

modwing,

 

pheno0,

 

pheno1,

 

remove,

 

reset,

 

setcolorcolor

 

setitem

 

Which one of these would i use to modify body parts with?

 

In addition, is it even possible to modify a CEP body tailor? or would it be far easier to use another model? because though i am using CEP Haks i am also using (as shown above) additonal haks as well

 

Any help is much appreciated!



#6
Wall3T

Wall3T
  • Members
  • 461 messages

ok so ill start with this. i have a custom hak that adds additional body parts to the cep starter module im testing with. what id like to do is see if anyone would know if its even possible to add those body parts appear on a NPC Body Tailor

 

In this case we'll start with Torso's

 

this here is the add body parts script

 

//:://////////////////////////////////////////////
//::  BODY TAILOR:  modify ...
//::                            onconv bodytailor
//:://////////////////////////////////////////////
/*
   sets the system to know what part to change
*/
//:://////////////////////////////////////////////
//:: Created By: bloodsong
//:: based on the Mil_Tailor by Milambus Mandragon
//:://////////////////////////////////////////////


void main()
{
    SetLocalString(OBJECT_SELF, "ToModify", "PARTS");
    SetLocalString(OBJECT_SELF, "2DAFile", "");
    SetCustomToken(91154, "Body Parts");

}

 

This here is the Torso script

 

//:://////////////////////////////////////////////
//::  BODY TAILOR:  modify ...
//::                            onconv bodytailor
//:://////////////////////////////////////////////
/*
   sets the system to know what part to change
*/
//:://////////////////////////////////////////////
//:: Created By: bloodsong
//:: based on the Mil_Tailor by Milambus Mandragon
//:://////////////////////////////////////////////


void main()
{
    SetLocalInt(OBJECT_SELF, "ToModify", CREATURE_PART_TORSO);

}

 

Ive no idea where to start lol :lol:

 

These were the only scripts I could find, and the thing is im pretty sure these are not what id need to add the custom parts to the NPC Model. Would anyone have a good idea where these might be at?



#7
The Mad Poet

The Mad Poet
  • Members
  • 425 messages

Tailoring models are strange at times. The scripts are solid, but it sometimes feels like you have to edit the strangest things. When I redid mine for Q it was a two-week process for two hours a day. Luckily I think the CEP version is pretty well documented. Though it can still get hairy sometimes for novice scripters like us.

 

The script you probably want to look at is 'btlr_increase', and 'btlr_decrease'. Like the clothing tailor the body tailor uses the same script to increase the body part for EVERY single part type. Wings, heads, etc etc.... The only major difference is that wings, tails, and CEP heads use 2da files so the script will actually skip them. If you've added a bunch of heads to CEP you need to open the CEPHEADS.2da (I think that's the name, I don't work with CEP much) file and edit it to include your own heads so that the body tailor won't skip them. That's why you were able to only get them by asking for an exact number.

 

As for the other body parts the script actually tries to go up as far as it can based on the number you put in the CUSTOMPARTS int on line 43 in the btlr_inc script. I don't know what you've set yours to but it *should* work by putting it to 254. That would just stop the increase at 254 to go to 255. Now if I remember right the only valid 'Body' parts are part numbers between 200-254. So setting a body part to 188, as an example, won't work. It won't let you set that as a body part. You need to make sure those are 200+. If you set the 2da right though you can turn the 200+ lines of your 2da so that they are both body parts AND clothing.


  • Wall3T aime ceci

#8
Wall3T

Wall3T
  • Members
  • 461 messages

ok....

 

this is why i enjoy this community so much! ^ ^ ^

 

this is sooo useful! :lol: ok so based on my own findings i sorta figured it wouldnt be easy, I think from what I was able to do, i did ok. I had an inkling of understanding that the body tailors ran off the 2da lines, which for me is kinda handy! so thank you!

 

im more accustomed to working with 2da lines than I am with scripts, so this will make it go MUCH faster (I hope  :wacko: )

 

This is the direction I needed to go, so i should be back soon with an update on the progress.



#9
Wall3T

Wall3T
  • Members
  • 461 messages

Just to follow up this worked and i was able to get the parts i needed in. thank you for the help! :)