JCarter426 Posted January 2, 2012 Share Posted January 2, 2012 Well, the player character, maybe. But that didn't stop me from: (This BBCode requires its accompanying plugin to work properly.) 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). Link to comment Share on other sites More sharing options...
DeathScepter Posted January 2, 2012 Share Posted January 2, 2012 that is nice Link to comment Share on other sites More sharing options...
JCarter426 Posted January 3, 2012 Author Share Posted January 3, 2012 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 (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) I think I've managed to get it working again, minus the random crashing! Link to comment Share on other sites More sharing options...
UltimateHK47 Posted January 3, 2012 Share Posted January 3, 2012 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 (hidden content - requires Javascript to show) Show spoiler (hidden content - requires Javascript to show) I think I've managed to get it working again, minus the random crashing! Lol loads of random bao durs . Nice work there! Link to comment Share on other sites More sharing options...
JCarter426 Posted January 3, 2012 Author Share Posted January 3, 2012 Thanks. Some more silliness: Show spoiler (hidden content - requires Javascript to show) 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. Link to comment Share on other sites More sharing options...
UltimateHK47 Posted January 4, 2012 Share Posted January 4, 2012 Haha! loving this Link to comment Share on other sites More sharing options...
harIII Posted January 4, 2012 Share Posted January 4, 2012 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? Link to comment Share on other sites More sharing options...
JCarter426 Posted January 4, 2012 Author Share Posted January 4, 2012 Nope, still has to be an NPC - believe me, I tried. However, this might interest you: (This BBCode requires its accompanying plugin to work properly.) 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. Link to comment Share on other sites More sharing options...
VarsityPuppet Posted January 23, 2012 Share Posted January 23, 2012 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 Link to comment Share on other sites More sharing options...
JCarter426 Posted January 25, 2012 Author Share Posted January 25, 2012 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. 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. Link to comment Share on other sites More sharing options...
VarsityPuppet Posted January 26, 2012 Share Posted January 26, 2012 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 :/ Link to comment Share on other sites More sharing options...
JCarter426 Posted January 26, 2012 Author Share Posted January 26, 2012 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. Link to comment Share on other sites More sharing options...
VarsityPuppet Posted January 26, 2012 Share Posted January 26, 2012 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. Link to comment Share on other sites More sharing options...
Hassat Hunter Posted November 28, 2013 Share Posted November 28, 2013 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 :/ Link to comment Share on other sites More sharing options...
Hassat Hunter Posted November 28, 2013 Share Posted November 28, 2013 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 Link to comment Share on other sites More sharing options...
Fair Strides 2 Posted November 29, 2013 Share Posted November 29, 2013 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... Link to comment Share on other sites More sharing options...
JCarter426 Posted November 29, 2013 Author Share Posted November 29, 2013 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. Link to comment Share on other sites More sharing options...
Hassat Hunter Posted November 29, 2013 Share Posted November 29, 2013 @ 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 :/ Link to comment Share on other sites More sharing options...
JCarter426 Posted November 29, 2013 Author Share Posted November 29, 2013 Ah, good to hear it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.