lfnetwork.com mark read register faq members calendar

Thread: Theoretical Scripting Question (Puppets)
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-24-2013, 08:57 PM   #1
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
Theoretical Scripting Question (Puppets)

For the last few years now I've been under the influence that only party members are permitted to have puppets. Can anyone actually provide me with a little insight as to why that is? I'm just wonder if there is a weird and kinky way of getting around it because I've managed to be able to do some bizarre things by editing the nwscript file. What is actually preventing the pc from having a puppet?
harIII is offline   you may: quote & reply,
Old 07-24-2013, 09:07 PM   #2
VarsityPuppet
Master of Puppets
 
VarsityPuppet's Avatar
 
Join Date: May 2009
Location: MN
Posts: 1,252
Current Game: Chrono Trigger
Contest winner - Modding Forum Veteran Veteran Modder Helpful! 
I'm not positive, but I believe it is the simple fact that your party members are the puppets... basically.

VarsityPuppet is offline   you may: quote & reply,
Old 07-24-2013, 10:41 PM   #3
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 221
Current Game: Warframe, SC Blacklist, KOTOR1
I believe I heard that oldflash did this in his/her Final Touch mod, and from what I've looked at (though there are a lot of files to look through, and I'm not sure what all is going on with these scripts for sure), it seems that it spawns via an armband that runs this script:
Code:
// pc_remote.nss

void main() 
{
	object oPC = GetFirstPC();
	vector vPos = GetPosition(oPC);
	float fPCFace = GetFacing(oPC);
	location lLoc = Location(vPos + AngleToVector(fPCFace) * 1.5f, fPCFace);
	object oCurHide = GetItemInSlot( INVENTORY_SLOT_CARMOUR, oPC );
	if ( !GetIsObjectValid( oCurHide ) && !GetIsObjectValid(GetObjectByTag("pc_remote"))) {
		object oRemote = CreateObject(OBJECT_TYPE_CREATURE, "pc_remote", lLoc);
		SetNPCAIStyle(oRemote, 13);
		object oNewHide = CreateItemOnObject( "p_rem_chk", oPC, 1, TRUE );
		DelayCommand(0.1,ActionEquipItem( oNewHide, INVENTORY_SLOT_CARMOUR ));}
	else { if (GetIsObjectValid(GetObjectByTag("pc_remote"))) {
			DestroyObject(GetObjectByTag("pc_remote"), 0.0, TRUE); 
				if ( GetIsObjectValid( GetObjectByTag("p_rem_chk"))) {
				DelayCommand( 0.01, ActionUnequipItem( oCurHide ) );
				SetItemStackSize(GetObjectByTag("p_rem_chk"), 1);
				DelayCommand( 0.15, DestroyObject( GetObjectByTag("p_rem_chk"), 0.0f, FALSE, 0.0f, TRUE));} } }
}
And this is the heartbeat script used for "pc_remote.utc" (though that may not be the only one you'd want to look at):
Code:
// pc_remote.nss

void main() 
{
	object oPC = GetFirstPC();
	vector vPos = GetPosition(oPC);
	float fPCFace = GetFacing(oPC);
	location lLoc = Location(vPos + AngleToVector(fPCFace) * 1.5f, fPCFace);
	object oCurHide = GetItemInSlot( INVENTORY_SLOT_CARMOUR, oPC );
	if ( !GetIsObjectValid( oCurHide ) && !GetIsObjectValid(GetObjectByTag("pc_remote"))) {
		object oRemote = CreateObject(OBJECT_TYPE_CREATURE, "pc_remote", lLoc);
		SetNPCAIStyle(oRemote, 13);
		object oNewHide = CreateItemOnObject( "p_rem_chk", oPC, 1, TRUE );
		DelayCommand(0.1,ActionEquipItem( oNewHide, INVENTORY_SLOT_CARMOUR ));}
	else { if (GetIsObjectValid(GetObjectByTag("pc_remote"))) {
			DestroyObject(GetObjectByTag("pc_remote"), 0.0, TRUE); 
				if ( GetIsObjectValid( GetObjectByTag("p_rem_chk"))) {
				DelayCommand( 0.01, ActionUnequipItem( oCurHide ) );
				SetItemStackSize(GetObjectByTag("p_rem_chk"), 1);
				DelayCommand( 0.15, DestroyObject( GetObjectByTag("p_rem_chk"), 0.0f, FALSE, 0.0f, TRUE));} } }
}


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,
Old 07-24-2013, 11:03 PM   #4
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 544
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by harIII View Post
I'm just wonder if there is a weird and kinky way of getting around it because I've managed to be able to do some bizarre things by editing the nwscript file.
Like what, might I ask?


All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.4 is LIVE!!! Check it out here.

Check out WalkSwitch, the Walkmesh-changing tool!
Fair Strides 2 is offline   you may: quote & reply,
Old 07-24-2013, 11:05 PM   #5
supreme kotor
Junior Member
 
supreme kotor's Avatar
 
Join Date: Mar 2013
Location: I'm lost.
Posts: 326
Current Game: Modding.. Wait is that a game?
Yes it is true old flash made a "puppet" for the PC but it was really just an ally set to follow you around that you also had to spawn in each new module. From the experimenting I've done it appears the the PC can't have a puppet simply because there is no spot for the PC on the puppet table which is hard coded.

While they're is workarounds to this it would require duplicating everysingle module as you would have to put a follower into the onenter script. Sorry to be the one to kill this.

-Supreme Kotor


Current WIP: Learning to mod Kotor
supreme kotor is offline   you may: quote & reply,
Old 07-24-2013, 11:18 PM   #6
Canderis
Mercenary
 
Canderis's Avatar
 
Join Date: Jun 2008
Location: Unknown
Posts: 2,504
Current Game: Skyrim
Veteran Modder Helpful! 
Quote:
Originally Posted by supreme kotor View Post

While they're is workarounds to this it would require duplicating everysingle module as you would have to put a follower into the onenter script. Sorry to be the one to kill this.
Right there works. And, HarIII, you are making a total conversion so it wouldn't be too out of the question to do that.




Canderis is offline   you may: quote & reply,
Old 07-25-2013, 12:06 AM   #7
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
My guess is it's the NPC integer. The player's is -1, while the party members' are 0 through 11. If the AssignPUP function was not set up to accept -1, then you wouldn't be able to give the PC a puppet. And I'd say not allowing for negative numbers is pretty much the default attitude. I doubt it was anything more than simple oversight.


JCarter426 is offline   you may: quote & reply,
Old 07-25-2013, 08:42 AM   #8
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
Well the reason I ask this is because I want to make a pet for the player. I'm debating having an option where it will be a companion you can have in your party or a puppet that follows you or someone else. I just wanted to see what exactly we know about this puppet system issue with the pc before I made any decisions.
harIII is offline   you may: quote & reply,
Old 07-30-2013, 12:50 AM   #9
Malxados
Rookie
 
Malxados's Avatar
 
Join Date: Feb 2009
Location: Mandalore
Posts: 221
Current Game: Warframe, SC Blacklist, KOTOR1
Quote:
Originally Posted by JCarter426 View Post
My guess is it's the NPC integer. The player's is -1, while the party members' are 0 through 11. If the AssignPUP function was not set up to accept -1, then you wouldn't be able to give the PC a puppet. And I'd say not allowing for negative numbers is pretty much the default attitude. I doubt it was anything more than simple oversight.
Looks like that might not be the only reason:


Quote:
Originally Posted by stoffe View Post
If you make a party member with a puppet the main character the puppet will disappear while they are. Maybe one of the reasons you're never offered the choice of making Bao-Dur the leader of the Dxun away team in TSL.


"But God demonstrates His own love toward us, in that while we were still sinners, Christ died for us." (Romans 5:8, NKJV)
"For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." (Romans 6:23, NKJV)

Ask me about my sig!

Bao-Dur: I'll take the one who was stupid enough to threaten us instead of shoot us when he had the chance.

k_inc_force bothers me.
Malxados is offline   you may: quote & reply,
Old 07-30-2013, 09:03 AM   #10
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
It only gets unassigned. You just have to assign it again and it's fine.


JCarter426 is offline   you may: quote & reply,
Old 09-01-2013, 04:40 PM   #11
oldflash
Veteran
 
oldflash's Avatar
 
Join Date: Aug 2004
Posts: 904
Current Game: SWtOR
Forum Veteran Veteran Modder Helpful! 
I didn't assign the puppet to PC. The drone is running a script in heartbeat and test the presence of an item in hidden slot, presence of pc and presence of drone (as should not be more than one drone in map).
object oCurHide = GetItemInSlot( INVENTORY_SLOT_CARMOUR, oPC );
Code:
if ( !GetIsObjectValid( oCurHide ) && !GetIsObjectValid(GetObjectByTag("pc_remote")))
As for the armband, it only test if the hidden item is equipped or not and change the state.


"If you must sleep on the same bed, at least try to dream different dreams".
oldflash is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Theoretical Scripting Question (Puppets)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:03 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.