Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Puppet mod

Page: 1 of 1
 Darth Weasel
04-10-2010, 9:35 PM
#1
I'm working on making a puppet mod for TSL, and currently I'm working on making the script that assigns it to a party member. Unfortuantly whenever I try to assign it to a party member, the script wont compile. Here's the script.

void ST_GivePuppet(NPC_KREIA, PUP_OTHER1, "st_puppet1") {
string sTag = "";
switch (nNPC) {
case NPC_ATTON: sTag = "atton"; break;
case NPC_BAO_DUR: sTag = "baodur"; break;
case NPC_CANDEROUS: sTag = "mand"; break;
case NPC_G0T0: sTag = "g0t0"; break;
case NPC_HANDMAIDEN: sTag = "handmaiden"; break;
case NPC_HK_47: sTag = "hk47"; break;
case NPC_KREIA: sTag = "kreia"; break;
case NPC_MIRA: sTag = "mira"; break;
case NPC_T3_M4: sTag = "t3m4"; break;
case NPC_VISAS: sTag = "visasmarr"; break;
case NPC_HANHARR: sTag = "hanharr"; break;
case NPC_DISCIPLE: sTag = "disciple"; break;
}

object oOwner = GetObjectByTag(sTag);
if (GetIsObjectValid(oOwner) && IsObjectPartyMember(oOwner)) {
location lLoc = Location(GetPosition(oOwner) + AngleToVector(GetFacing(oOwner)) * 2.0, GetFacing(oOwner)-180.0);

AddAvailablePUPByTemplate(nPUP, sTemplate);
AssignPUP(nPUP, nNPC);
object oPUP = SpawnAvailablePUP(nPUP, lLoc);
AddPartyPuppet(nPUP, oPUP);

SetNPCAIStyle(oPUP, NPC_AISTYLE_PARTY_SUPPORT);
}
}

Does anyone know whats wrong with it?:confused:
 newbiemodder
04-11-2010, 8:09 AM
#2
Did you follow stoffe's tutorial on puppets?

http://www.lucasforums.com/showthread.php?t=151438&highlight=puppets)
 Darth Weasel
04-12-2010, 6:05 PM
#3
Uh yeah I did. In fact this is one of the scripts from that turtorial. Unfortuantly when I tried to compile it... nothing.
 newbiemodder
04-12-2010, 6:46 PM
#4
The reason I asked was first off..the script you're showing is missing the the last few lines of stoffe's script...starting with the 'void main()' and the givepuppet function.. Second..did you take note of stoffe's note regarding the need to include the four .nss script files that need to be saved where your nwnnsscomp.exe compiler is i.e. Kotor Tool...assuming that is what you're using.
 Darth Weasel
04-12-2010, 7:01 PM
#5
Thats kind of strange, especially since I copied and pasted the script on, and yes I did extract the four .nss scripts.
 Darth Weasel
04-14-2010, 6:48 PM
#6
Alright I tried what you said and I still got an error message. It said something about a bunch of the functions (Like switch for example) were invalid. Can anyone explain why this might be, maybe send me a script to assign this to Kreia? (Or if possible the main PC. That's who the puppet was intended for but due to certain limitations I've encountered I haven't been able to set a puppet to the PC.)
 newbiemodder
04-14-2010, 11:19 PM
#7
You cannot link a puppet to the PC only to party members.
 Darth Weasel
04-15-2010, 7:46 PM
#8
Yeah that's what I thought, but I was hoping that there may be a way around that without breaking the law. Maybe some intense scripting or something like that as I'm not really sure of scriptings limitations.
 Hope Estheim
04-15-2010, 7:55 PM
#9
You can make an NPC follow the PC and function like a puppet though...
 Darth Weasel
04-15-2010, 8:30 PM
#10
You can make an NPC follow the PC and function like a puppet though...

What exactly do you mean like that? Like the Call of Aid mod where the NPC doesn't count as a puppet but still follows the main PC?
 Hope Estheim
04-15-2010, 8:32 PM
#11
Yes... that is exactly what I mean... and you can set it's field to Friendly_1 and it'll attack with your party members :)
 Darth Weasel
04-15-2010, 8:56 PM
#12
not a bad idea... I'll try it out.
 Hope Estheim
04-15-2010, 10:22 PM
#13
Haha... good luck Darth. (: (lmfao I can't resist)

May the Tools serve you well.
 Darth Weasel
04-19-2010, 8:08 PM
#14
Alright. I'm pleasantly suprised to say that this mod could very well be finished soon. There are only a few problems with scripting (as that is not my strong suit) but they are slowly being resolved.
 Darth Weasel
08-19-2010, 2:37 AM
#15
Alright I know I said that this mod would be released soon but somethings came up. If it wouldn't be too much of a bother could someone send me a script to assign a puppet character to T3-M4? I'll make the neccesary changes to the script to make it work with the puppets template. After that this mod will be for the most part done...
Page: 1 of 1