Aller au contenu

Photo

Cohorts and Companions Tutorial/Reference?


  • Veuillez vous connecter pour répondre
37 réponses à ce sujet

#1
Happycrow

Happycrow
  • Members
  • 612 messages
Hey folks.

I *can't* be the first person to ask this, but is there a pre-existing set of tutorials to handle things like where a cohort or companion spawns (or how to distinguish one from the other!), how they join your party, how you set up your roster if you're leaving a "headquarters area" like the tavern in the OC, that sort of thing?  My search-fu is seriously failing, and outside of dlg-embedded stuff, I'm a VERY weak noob scripter.

I'm decent enough at some things having built for PW-land, and I can write dialogue, build, make CC, etc, but I'm pulling a real blank here, and it's the last "here be dragons" I need to figure out before I can really get to work.

Thanks in advance.

#2
andysks

andysks
  • Members
  • 1 645 messages
As a matter of fact, I wrote a guide to it yesterday. It is actually information provided by ColorsFade regarding the scripts, but I happened to have the time to document it, while my memory of the system is still fresh. He will be reviewing it these days, or when he actually finds time and publish it.

#3
Happycrow

Happycrow
  • Members
  • 612 messages
WOW. Talk about timing. Thanks, man. If you need an, err... "grammar review," let me know. I'm pretty sure I can stare at Uninvited Guests until I'm blue in the face to figure out how to do basic quest scripting, but this part's totally opaque to me. :)

#4
andysks

andysks
  • Members
  • 1 645 messages
:). It might not cover everything you need, but the hangout spots and proper spawning and initialization of companions yes.

#5
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I've looked at it and done some editing :)

Andy should have it. Feel free to pass it around. I have a difficult time uploading to Nexus.

#6
Happycrow

Happycrow
  • Members
  • 612 messages
Thanks, gents, can't wait.

#7
andysks

andysks
  • Members
  • 1 645 messages
http://www.nexusmods...ter2/mods/858/?

Here it is, I hope it works since the nexus got me a bit confused :D.
If it does, enjoy :).

#8
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
As Andy pointed out to me yesterday, I forgot to write the conclusion to the doc (I put the header in there, but no content). I was going to make it brief and basically just say:

When you're working with the ginc_companion library and using it to manage your companions, the important thing to remember is that there should be one and only one method for adding companions, spawning companions, and removing companions from your group. If you find yourself using multiple functions to do stuff, you're probably headed down the wrong path.

When I first started working with this companion system I was using calls from several different libraries and I didn't even realize it. There's a lot of legacy code left in the NWN2 script files and a lot of it is junk. Stick with the calls from ginc_companion and you;ll be golden.

#9
Happycrow

Happycrow
  • Members
  • 612 messages
Great, thanks. Looking forward to reading this over tonight. Cohorts will be a big deal in the idea I'm playing with, as will "hangout-management."

#10
MERP UK

MERP UK
  • Members
  • 25 messages
This was a fantastic read. My companion system in The Indanthrine Prince was basic, at best. I'll be using some of these tips to tidy it up in the final release and run the system properly in my next module. A must have reference, endorsed! Thanks for putting it together.

#11
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
Glad you like it!

I already need to update it. There's a couple misspellings, and there's a function I want to add.

Using ga_rm_go_to_hangout requires a couple other ga_ scripts to be called if you want the companion to be available in the Roster GUI. I wrote a script this morning that wraps up all three ga_ scripts into one script to make it easier to use when building conversations.

I'll try and update the doc this weekend and get it to Andy to publish.

#12
Happycrow

Happycrow
  • Members
  • 612 messages
I feel like a butt asking this now rather than tonight when I've had a chance to sit down and read it, but in case you're on an earlier timezone while you're responding , did you cover or address cohorts in party, and what limits there might be there? Ultimately, who's alive and who's dead among cohorts is going to be a big deal in what I'm doing, as well as having companions/cohorts spawning in *different* hangouts but not all of them (if possible).

Much obliged in advance, and I'll keep other stupid questions until I've *actually read.* :)

#13
andysks

andysks
  • Members
  • 1 645 messages
Happycrow, I didn't play SoZ, but from what I read and understand cohorts are actually companions... aren't they?

#14
Tchos

Tchos
  • Members
  • 5 042 messages
As far as I can tell, cohorts are functionally identical to the OC's companions, and they were called cohorts in SoZ to differentiate them from the player-created party members.

#15
Happycrow

Happycrow
  • Members
  • 612 messages
The nwn2wiki says that cohorts don't level up with you, whereas companions do. But I might just be missing something in the toolset.

#16
andysks

andysks
  • Members
  • 1 645 messages
I cannot find something relevant in their includes, but the script set of the Cohorts are exactly the same as the companions.

Posted Image

I am sure there is some modification in there, on the module load, or ka:cohort:join scripts that causes the non level up. I didn't search extensively, but will do at some point.

#17
Tchos

Tchos
  • Members
  • 5 042 messages
That would be dependent on whatever choices the designers made for the individual campaigns, not the nature of the companions themselves. It's a design choice whether companions always have the same amount of XP as the main PC or if they only accumulate XP while they're in the party and not when they're in the camp/hangouts/etc., or whether they gain individual amounts of XP for individual actions (like a rogue getting extra XP for disarming a trap, and not sharing it with the other party members). It's not an inherent property of the companions/cohorts.

#18
Tchos

Tchos
  • Members
  • 5 042 messages
For clarification, my module's companions use the SoZ system for their basis, and they gain XP and level up (class-unrestricted) just like anyone else. I haven't read this tutorial, though, so my approach may differ from what it says.

#19
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Happycrow wrote...

I feel like a butt asking this now rather than tonight when I've had a chance to sit down and read it, but in case you're on an earlier timezone while you're responding , did you cover or address cohorts in party, and what limits there might be there? Ultimately, who's alive and who's dead among cohorts is going to be a big deal in what I'm doing, as well as having companions/cohorts spawning in *different* hangouts but not all of them (if possible).

Much obliged in advance, and I'll keep other stupid questions until I've *actually read.* :)


I'd say, read the doc, and if you have questions, feel free to ask me or PM me directly. I'm more than happy to guide you on any of this. It can seem overwhelming at first. I believe the doc will answer many of your questions. 

For example: multiple hangouts are covered in the doc. If you want some companions/cohorts to NOT show up at certain hangouts, that is easy to control through the OnClientEnter script of the area. And I can give you details on what would need to change from the documentation so that you could achieve your goals. 

#20
andysks

andysks
  • Members
  • 1 645 messages

ColorsFade wrote...

I'd say, read the doc, and if you have questions, feel free to ask me or PM me directly.


That. I also altered mine a bit, I don't use the GUI at all at this point... maybe later. But the document will cover most of the things, and for further questions ColorsFade is always helpful :).

#21
Happycrow

Happycrow
  • Members
  • 612 messages
Wow.
Okay, I understand most of what I'm reading, I think. Now I just need to find the tutorial on how to set up a module. :)

#22
kamal_

kamal_
  • Members
  • 5 240 messages
Definitely learning things reading that.

#23
ColorsFade

ColorsFade
  • Members
  • 1 267 messages
I've sent an updated guide to Andy that will hopefully go up sometime in the next day or two. I address a few issues and provide an additional script for readers to make use of. I spend a little time talking about restricting companions to certain hangouts, since that was brought up in this thread and makes sense as an option folks would want.

As always, ping me if you have a question. Happy to answer.

#24
andysks

andysks
  • Members
  • 1 645 messages
I'm so confused, cannot seem to find how to update something on the nexus. I'm sure someone knows :), so help please.

#25
Happycrow

Happycrow
  • Members
  • 612 messages
I absolutely will, CF, and thanks for the help.

Andysks, I did it for the javelin pack I uploaded there, but can't remember how I did it -- I'm at work now but will try to remember and help you out.