lfnetwork.com mark read register faq members calendar

Thread: Player can't have a puppet? Rubbish!
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 01-02-2012, 02:38 AM   #1
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Player can't have a puppet? Rubbish!

Well, the player character, maybe. But that didn't stop me from:

View page
YouTube Video

I didn't cheat! The remote is a genuine puppet, genuinely attached to my genuine Bao-Dur player. Technically Bao-Dur is still an NPC, so the puppet recognizes him as its owner. I'm still working out all the kinks. Switching characters has a tendency to crash the game, and as always puppets complicate the matter. I've filtered out most of the problems. I think the only one left is that doing anything, and I mean anything, while it's switching characters will cause the game to crash immediately. I'd say it happens around 5% of the time, maybe less. I can usually avoid it if I'm careful. It might just be how I'm firing it, though (through a computer screen).


JCarter426 is offline   you may: quote & reply,
Old 01-02-2012, 11:36 AM   #2
DeathScepter
Rookie
 
Join Date: Aug 2011
Posts: 189
that is nice
DeathScepter is offline   you may: quote & reply,
Old 01-03-2012, 03:06 PM   #3
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Thanks.

I rebuilt most of my code to streamline it and with any luck filter out the bugs. And after some silliness mostly due to typos or me confusing myself:

Show spoiler

Show spoiler

I think I've managed to get it working again, minus the random crashing!


JCarter426 is offline   you may: quote & reply,
Old 01-03-2012, 03:10 PM   #4
UltimateHK47
Forumite
 
UltimateHK47's Avatar
 
Join Date: Nov 2011
Location: In a Galaxy, far far away...
Posts: 500
Current Game: Kotor 1
Post

Quote:
Originally Posted by JCarter426 View Post
Thanks.

I rebuilt most of my code to streamline it and with any luck filter out the bugs. And after some silliness mostly due to typos or me confusing myself:

Show spoiler

Show spoiler

I think I've managed to get it working again, minus the random crashing!
Lol loads of random bao durs . Nice work there!


http://www.lucasforums.com/showthrea...12#post2807812
The Turret Arcade 1.2 ^^


USED TO BE KNOWN AS DARTH JANGO/WEASLEY
UltimateHK47 is offline   you may: quote & reply,
Old 01-03-2012, 06:11 PM   #5
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Thanks. Some more silliness:

Show spoiler

While trying to keep the party members between switches, I didn't properly account for the number of party members - two would get kept while one would be thrown out, turning the whole thing into the most boring game of musical chairs.


JCarter426 is offline   you may: quote & reply,
Old 01-04-2012, 11:57 AM   #6
UltimateHK47
Forumite
 
UltimateHK47's Avatar
 
Join Date: Nov 2011
Location: In a Galaxy, far far away...
Posts: 500
Current Game: Kotor 1
Haha! loving this


http://www.lucasforums.com/showthrea...12#post2807812
The Turret Arcade 1.2 ^^


USED TO BE KNOWN AS DARTH JANGO/WEASLEY
UltimateHK47 is offline   you may: quote & reply,
Old 01-04-2012, 05:24 PM   #7
harIII
Veteran
 
harIII's Avatar
 
Join Date: Feb 2008
Posts: 983
Helpful! 
Out of curiosity have you been able to let the PC have a puppet without altering the PC or does he/she have to be a party member for some reason? If so can you please explain how to do it?
harIII is offline   you may: quote & reply,
Old 01-04-2012, 05:54 PM   #8
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Nope, still has to be an NPC - believe me, I tried. However, this might interest you:

View page
YouTube Video

Player as a party member, yes, that's correct. And only 10 party members? Rubbish! The new player NPC is in Hanharr's slot, and Mira remains unaffected - though the GUI becomes buggy (additionally, the character with the higher NPC ID number is always shown) Using this method, I've managed to get a party with Mira and Hanharr, Handmaiden and Disciple, and the rest - all 12.

So I do believe it would be possible to functionally give the player a puppet, at least temporarily - maybe even permanently with a lot of work.

EDIT: Just a brief update...

Good news: Strangely enough, though, my player NPC can use the party selection screen, while other NPCs cannot. That's a good thing, though. Well, good that the player NPC can still use it, bad that the others can't, but I already knew that. And I did manage to give myself the remote, and it worked perfectly.

Bad news: Entering the Ebon Hawk as anyone other yourself crashes the game (even without the complicated player switching - simply warping there while you're controlling a party member will do it). And I can now confirm a player NPC is no different. I thought it might be because of the party selection oddity, but no such luck. So something would have to be done about that.

And just some musing: When I tried to assign the remote to my PC, it would not follow me around, nor would it automatically spawn I entered a new module. However, when I assigned my player NPC a puppet without the proper heartbeat script required to make it follow me around, it still automatically spawned when I entered a new module. This leads me to believe that the AssignPUP function, which assigns the puppet to the NPC, must not include -1 as a possible puppet owner, thus making it impossible to give a puppet to the PC, whose NPC integer is -1. The party selection screen, on the other hand, must work by object tag or something else that the other NPCs don't have and not the NPC integer, or else my player NPC wouldn't be able to use it. Now, I believe both of these elements are hard coded, but perhaps there is some way around it.



Last edited by JCarter426; 08-21-2012 at 10:45 PM.
JCarter426 is offline   you may: quote & reply,
Old 01-23-2012, 05:58 PM   #9
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! 
Hmm this is some interesting stuff....

Gotta say though I had a feeling about the party members. They each have their own index so you could essentially add everyone to your party, but of course only certain ones would show up in the GUI. Might be some handy stuff to be learned from all this here, but who knows? I wonder if the Party indexes are hardcoded or if... for instance, they're represented in some 2da file? Should the latter be true, we might have an interesting concept at hand here... Imagine spawning additional custom party members via some sort of wristband console. Not as elegant as control panel GUIs, but a novel idea at least I'd say.

I honestly don't see why one couldn't just spawn whatever NPC and have a follow script in its heartbeat slot? The effects are almost the same, although one would have to modify every onEnter and onExit script in every module...

... but there are some fields in the module.ifo for each module that support this capability - and the good news is most are currently empty so, modifying these fields hopefully wouldn't cause too many issues, if they work at all. I've used mod_OnPlrLvlUp before and it actually worked! (though only for the PC).

So if you have time, play with these fields in module.ifo for your choice area

mod_OnClientEntr
mod_OnClientLeave
mod_OnModLoad
mod_OnModStart

If it works, I'd think it'd be a lot cleaner than what you're experimenting with

VarsityPuppet is offline   you may: quote & reply,
Old 01-25-2012, 06:59 PM   #10
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Quote:
I wonder if the Party indexes are hardcoded or if... for instance, they're represented in some 2da file? Should the latter be true, we might have an interesting concept at hand here... Imagine spawning additional custom party members via some sort of wristband console. Not as elegant as control panel GUIs, but a novel idea at least I'd say.
No luck - they're defined in NWScript. Can't add any.
Quote:
I honestly don't see why one couldn't just spawn whatever NPC and have a follow script in its heartbeat slot? The effects are almost the same, although one would have to modify every onEnter and onExit script in every module...
Well, the problem is, you can do a lot more with party members - level them up, change their equipment, and so on. And the only way to save that information is with the party table. It seems to be impossible to move a character to another module by any other means.

So yeah, it could be done, maybe. But there's a lot of messy work involved and it wouldn't be nearly as functional as the real thing.


JCarter426 is offline   you may: quote & reply,
Old 01-25-2012, 07:51 PM   #11
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! 
Aye, this be true. I didn't think of that....

For a generic 'this guy follows this guy' script, it could work, but deleting and respawning doesn't save any character information...

Hmmm... seems like you still have some work ahead of you, JCarter :/

VarsityPuppet is offline   you may: quote & reply,
Old 01-25-2012, 08:10 PM   #12
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
I actually was working on this, and transferring information was precisely the problem. Basically, I wanted to spawn a copy of a party member but be able to give them different dialogue (to go back to the ship, switch weapons, etc) and still follow you. So a new UTC would be necessary, but there's no way to set certain stats with a script. Yes, you can change appearance, give powers and feats, and (in K2 at least) adjust skills and attributes, but you can't change a character's level or class... and even so, writing a script to do all this would be tedious work.


JCarter426 is offline   you may: quote & reply,
Old 01-25-2012, 08:48 PM   #13
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! 
Quote:
Originally Posted by JCarter426 View Post
and even so, writing a script to do all this would be tedious work.
Tedious indeed :/ I can think of many ways to keep track of information within the same module, but once a new one starts.... well... you know the problem.

Unless you want to use globals, but that's a pretty brutish way to add that sort of stuff...

If I think of anything, I'll let you know.

VarsityPuppet is offline   you may: quote & reply,
Old 11-28-2013, 12:20 PM   #14
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 555
Anything on this?

Learned the hard way a puppet on PC doesn't work trying to fix that for Bao as leader on Dxun.
But think I will just take the cheap way out and assign Remote to one of the other 2 team members XD

EDIT: Or it will simply follow no-one, not even other party members... guess time to delve in more how to do this puppet thing :/

Last edited by Hassat Hunter; 11-28-2013 at 12:33 PM.
Hassat Hunter is offline   you may: quote & reply,
Old 11-28-2013, 01:45 PM   #15
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 555
Okay, got it to actually work, pretty much akin to the movie at the top.
Now just to see it wont give issues down the line, like Bao-Dur having 2 remotes

EDIT: Crashes when loading a save, crashes when changing a level. Not a good idea. Works fine adding it to another NPC though, sadly enough, they will stick around with it forever... hmmm...
EDIT2: Figured I could be clever, destroying the NPC, then re-adding them to the roster. Alas, it still re-added remote upon loading a save/adding to party.

I think I will just give up then 0_o

Last edited by Hassat Hunter; 11-28-2013 at 02:55 PM.
Hassat Hunter is offline   you may: quote & reply,
Old 11-28-2013, 09:03 PM   #16
Fair Strides 2
Witty Programmer
 
Fair Strides 2's Avatar
 
Join Date: Jan 2012
Location: Oregon, United States
Posts: 540
Current Game: Master of Orion 2
Helpful! 
Quote:
Originally Posted by Hassat Hunter View Post
Okay, got it to actually work, pretty much akin to the movie at the top.
Now just to see it wont give issues down the line, like Bao-Dur having 2 remotes

EDIT: Crashes when loading a save, crashes when changing a level. Not a good idea. Works fine adding it to another NPC though, sadly enough, they will stick around with it forever... hmmm...
EDIT2: Figured I could be clever, destroying the NPC, then re-adding them to the roster. Alas, it still re-added remote upon loading a save/adding to party.

I think I will just give up then 0_o
Simple, HH. From what it sounds like, you made the Remote spawn and be assigned when it's owner was spawned, in the OnSpawn event right? Then do an if check for a global boolean, and if it's 0, don't assign the puppet. That way, you can set the boolean to 1 at the end of Duxn...


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 11-29-2013, 02:37 AM   #17
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Yeah, it does seem to crash when loading a save. Considering you only need it for two modules, it might be easier to edit the modules' heartbeat scripts to spawn a remote NPC if Bao-Dur is in the module, give it the puppet faction, and give that NPC a different script to make it follow Bao-Dur. Functionally it should be close enough. Only problem is copying the remote's stats, with the restored upgrade scenes considered.


JCarter426 is offline   you may: quote & reply,
Old 11-29-2013, 05:58 AM   #18
Hassat Hunter
Forumite
 
Join Date: Jan 2010
Posts: 555
@ Fair Strides; Then I would need to modify the onenter of every single module. Since once the puppet is asigned, it stays assigned. Forever.

@ JCarter426; I can probably try that... Not quite sure on the how to follow, but I will give it a try.

EDIT: Well, that worked. Fixed in 15m what I couldn't do in 3 hours yesterday. Thanks a lot for the suggestion, which I apparently never could come up with myself :/

Last edited by Hassat Hunter; 11-29-2013 at 06:23 AM.
Hassat Hunter is offline   you may: quote & reply,
Old 11-29-2013, 07:47 AM   #19
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,635
Ah, good to hear it.


JCarter426 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 > Player can't have a puppet? Rubbish!

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 10:08 AM.

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