Aller au contenu

Approval on custom companions


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

#1
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
Hello everyone! i hope someone can help me here a little!
I made a new companion, custom, simple. i want to enable his approval and then give him approval after a conversation.
There's any way on doing this? i've searched on wiki but theres only the script of "enablin approval";
wich is this one
void main()
{
object oFollower = getobjectbytag("party_companion");
SetFollowerApprovalEnabled(  object oFollower, int bEnabled);
}

any help will be appreciated, thanks Posted ImagePosted Image

#2
Proleric

Proleric
  • Members
  • 2 346 messages
The OC approval system is explicitly scripted for the official followers. To give just one example, much depends on the function Approval_GetFollowerObject in approval_h, which has a specific line for each follower.

So, as far as I can see, modifying the official system is do-able, but not trivial. You'd need to add your custom follower throughout the approval system scripts, and consider the best strategy for incorporating the header changes.

For Crown of Creation, which is a standalone campaign, we have a working custom version of the approval system which is 2DA-driven, with no follower-specific code. Although it's not released as a formal offering, anyone can download our stuff from Google Code. Sorry that's no help with the OC.

Modifié par Proleric1, 24 mars 2010 - 09:03 .


#3
ladydesire

ladydesire
  • Members
  • 1 928 messages
What I would do (and what I will do for my custom companion) is to create functions that duplicate the official ones and use them instead; this way, the official scripts and headers won't be affected in any way. You also need to create a custom approval plot.

#4
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
Hey! well what i just want to make is a companion to gain approval once you speak with him and when you give some gifts, nothing complicated, no "crisis" state, no "warm" nothing...just that two things...can that be done?

#5
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
okay got that working, if anyone want to know how to enable a companions approval and the give him approval, just send me a pm. The new question is this one:

If i get my companion approval to 50, how i change the (neutral) thing?

it doesn't matter if it is hire from an script or a 2DA, just give me an idea on how to do it.

thanks, regards,

#6
Proleric

Proleric
  • Members
  • 2 346 messages
The functions in approval_h do that. You'll need to make a version that explicitly references your companion throughout, and hook it into plots that mirror the official party plots.

#7
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
alright, i get it...but, how i do that, i mean, i know how to hook my plot with the official plots...but, what about the main script? i mean , how to make the word "neutral" change to "friendly" ?

#8
ladydesire

ladydesire
  • Members
  • 1 928 messages
I'll work on a custom companion approval system that works like the Bioware system tonight; it will be easier to do that than type out what we mean here.

#9
DLAN_Immortality

DLAN_Immortality
  • Members
  • 481 messages
Never EVER edit an oc script. Always make your own, for your won companion, and just include the _h.

#10
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
alright...tell me how that goes ladydesire

yea...i saw the consequences of that, thanks Inmortality :)

#11
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
@LadyDesire did you got something?

@ for the ones who want to enable the script on the follower:



void main()

{

object oFollower = GetObjectByTag("Your Follower Tag goes here");

SetTeamId(oFollower, -1);

SetFollowerApprovalEnabled(oFollower, TRUE);

SetFollowerApprovalDescription(oFollower, 371487);

}

#12
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
hope that helps,let's share our knowledge!!! good luck to everyone who wants to enable the approval.

I dont know how to do that the companions go friendly or somthing, if someone knows, please share =)

#13
Guest_templarioseco_*

Guest_templarioseco_*
  • Guests
im bumping this

still need help

thanks =)

#14
Proleric

Proleric
  • Members
  • 2 346 messages
To recap in slightly different words, you need a custom version of the ChangeApproval function, so that in conversation you can script xxxChangeApproval(oFollower, 100) to make them friendly.

Like ladydesire suggested, your script could include a new header file, using approval_h as a starting point. You might want to call it xxx_approval_h (where xxx is a unique prefix for your module).

Normally, you'd only need to change one or two functions. However, in this case, the functions are so interdependent that it's probably easier to customise them all.

Rename you custom functions. For example, ChangeApproval might become xxxChangeApproval. Remember to change every instance of the function name (Edit > Find takes you to the find-and-replace tool).

Wherever you see an explicit list of followers in the functions, extend it by analogy to include your follower.

Does that help?

#15
alschemid

alschemid
  • Members
  • 475 messages
Sorry to ressurrect this thread but... I wanted to add the romance flags to the OC followers, I already changed the genpt_app_(follower).plt to add the flags, perhaps I should have created new ones with new names?

Now I need to change the Approval_GetFollowerLoveEligFlag, Approval_GetFollowerRomanceFlag and Approval_GetFollowerCutOffFlag to add the followers' name to it... what is the best way to do it? Should I rename the approval.h, rename those 3 functions I need and make the ChangeApproval and all the other functions that use these 3 functions I've renamed?

Or should I rename all the functions of the approval.h? In this case I have to write my own genpt_approval_follower.nss to use the flags I have created?

Thanks!

EDIT: Got it working...so far...:P

Modifié par alschemid, 27 février 2011 - 12:35 .


#16
Obadiah

Obadiah
  • Members
  • 5 718 messages
I wouldn't mind getting some extra information on this.

It looks like not all of the Approval functions are available to recodem, such as AdjustFollowerApproval(). At this point, I just want to get the Approval/Disapproval message to fire (got my own approval tracking). I tried using UI_DisplayApprovalChangeMessage() but that didn't do anything.

#17
Sunjammer

Sunjammer
  • Members
  • 925 messages
You might find the Gifts And Approval step in Idomeneas's Companion Tutorial helpful.

#18
Obadiah

Obadiah
  • Members
  • 5 718 messages
Thanks. Ah, I'd already read that.

Anyway I figured out what the problem was - the functions only work on followers that have joined the party. You can't use them on, say, arbitrary people in the game to track how they feel about the main character (or maybe you can, but just don't get the approval messages).

Modifié par Obadiah, 11 juillet 2011 - 03:41 .