Jump to content

Home

NPC,PC help


newszi

Recommended Posts

Hay! I'm makeing a Mod for TSL, and basicly, I'd like to change my character.

I'm gt explain:

So the game starts, then 001ebo fired up. I altered the intro.dlg, so yu can skip the prologue to start to play my mod.

The problem is, that Tema(t3m4) is showing up sa playable at 001ebo, therefore I have to change it back to player char, or whatever.

But how can I do that?

I solved it by half, by overrideing:

a_bet3m4.ncs

with an empty script, so the main character appaers at 001ebo, but that's just not absouletly what I want, because if you choose other way, you should be able to play the game as the original story stands.

Link to comment
Share on other sites

DeNCS not works for me either... I use the

nwnnsscomp103.zip

as some suggested in this forum, and have only the jse6 installed with that jre (jre1.6.0). It loads, but decompile nothing. So if someone can decompile that a_bet3m4.ncs for me that would be a help enought, for now...

Somewhere someone mentioned in this forum, that somewhere there is a decompiled scripts library, but I couldn't find it, I bet if I could find my script there anyway.

Link to comment
Share on other sites

Come to think of it, Can I somehow alter the 001ebo not to load, but to load my first module?

Is that possible to modify the whole character creation screen? In my mod the player shouldn't be a Jedi, but instead a soldier, or scout, or etc. Therefore I should change ist's class by script when my first module is loading. But if I could alter the character creation screen, well it would be a great improvement in user experience, and that's just more "noble". <3

Link to comment
Share on other sites

DeNCS not works for me either... I use the
nwnnsscomp103.zip

as some suggested in this forum, and have only the jse6 installed with that jre (jre1.6.0). It loads, but decompile nothing. So if someone can decompile that a_bet3m4.ncs for me that would be a help enought, for now...

 

nwnnsscomp cannot decompile scripts back into NSS format. It'll only print out the byte code in a somewhat more human-readable way if you use the -d flag.

 

Anyway, here is my version of that script which compiles identical to the original:

// ST: a_bet3m4.nss (001EBO_s.rim)

void Rumble();
void PossessT3M4();
void DisarmNPC(object oTarget, int bDestroy);

void main() {
   if (GetLoadFromSaveGame())
       return;

   if (GetIsPC(GetEnteringObject())) {
       if (!GetLocalBoolean(OBJECT_SELF, 30)) {
           SetLocalBoolean(OBJECT_SELF, 30, TRUE);
           Rumble();
           RevealMap();
       }

       if (GetGlobalNumber("002EBO_Door_Override")) {
           object oDoor = GetObjectByTag("star_dorm");
           AssignCommand(oDoor, ActionOpenDoor(oDoor));
       }

       int nBeenT3 = GetGlobalNumber("001EBO_BEEN_T3_M4");
       if (!nBeenT3) {
           if (GENDER_MALE == GetGender(GetFirstPC()))
               SetGlobalBoolean("000_PLAYER_GENDER", TRUE);

           SetGlobalNumber("001EBO_BEEN_T3_M4", 1);    
           DelayCommand(0.2, PossessT3M4());

           object oExile = GetObjectByTag("MEDBAY_PC");
           if (!GetIsObjectValid(oExile)) {
               object oMarker = GetObjectByTag("InvisibleLocationMarker");
               location lBed = GetLocation(oMarker);

               oExile = CreateObject(OBJECT_TYPE_CREATURE, "c_medbaypc", lBed);
               int nLooks = GetAppearanceType(GetEnteringObject());
               effect eLooks = EffectDisguise(nLooks);

               ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLooks, oExile);
               AssignCommand(oExile, ActionPlayAnimation( ANIMATION_LOOPING_DEAD_PRONE, 1.0, -1.0 ));
           }
       }

       SetGlobalNumber("GBL_MAIN_SITH_LORD", 0);

       if (GetGlobalNumber("001EBO_Movie") == 0) {
           SetGlobalNumber("001EBO_Movie", 1);
           PlayMovie("permov01");
           SetGlobalFadeOut();
           SetFadeUntilScript();

           AssignCommand(GetObjectByTag("Prologue"), ActionStartConversation(OBJECT_SELF, "intro"));   
       }
   }
}

void Rumble() {
   if (GetGlobalNumber("001EBO_Rumble") == 0) {
       DelayCommand(IntToFloat(Random(10) + 10), Rumble());    

       AurPostString("Rumbling", 5, 5, 5.0);       
       PlaySound("MetalStrain");
       ApplyEffectToObject(DURATION_TYPE_TEMPORARY, 
                           EffectVisualEffect(VFX_IMP_SCREEN_SHAKE), 
                           GetFirstPC(),
                           IntToFloat(Random(8) + 1));
   }
}



void PossessT3M4() {
   AddAvailableNPCByTemplate(NPC_T3_M4, "p_t3m4");
   SwitchPlayerCharacter(NPC_T3_M4);
   DisarmNPC(GetObjectByTag("t3m4"), TRUE);
   SetMinOneHP(GetObjectByTag("t3m4"), TRUE);

   AssignCommand(GetObjectByTag("debris"), ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(25), GetObjectByTag("t3m4") )); 
   DisableHealthRegen(TRUE);
   ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELECTRICAL_SPARK), GetObjectByTag("t3m4")); 
}



void DisarmNPC(object oTarget, int bDestroy) {
   object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTWEAPON, oTarget);
   AssignCommand(oTarget, ActionUnequipItem(oWeapon, TRUE));

   if (bDestroy)
       DestroyObject(oWeapon, 0.0, TRUE, 0.0, TRUE);
}

Link to comment
Share on other sites

Hay! I'm makeing a Mod for TSL, and basicly, I'd like to change my character.

I'm gt explain:

So the game starts, then 001ebo fired up. I altered the intro.dlg, so yu can skip the prologue to start to play my mod.

The problem is, that Tema(t3m4) is showing up sa playable at 001ebo, therefore I have to change it back to player char, or whatever.

But how can I do that?

I solved it by half, by overrideing:

a_bet3m4.ncs

with an empty script, so the main character appaers at 001ebo, but that's just not absouletly what I want, because if you choose other way, you should be able to play the game as the original story stands.

 

Perhaps this is why I posted the "Big stupid queston" thread anyways. If you want to to load your mod on game start (after character creation) see this thread.

http://www.lucasforums.com/showthread.php?t=164784

I've figured it out. It's hardcoded in the swkotor2.exe however it can be changed. You can load to whatever map/mod you want at game start.

Link to comment
Share on other sites

Thx, so the character creation screen is not alterable, at ne means...

Also I'm keeping myself of hacking into the exe, so I use my "old" way, by altering the intro.dlg and to skip to my module that way, it works fine reliably after all. Thx for the hints.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...