Author Topic: reputation of faction increase/decrease based on chosen conversation  (Read 564 times)

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #15 on: April 07, 2015, 07:25:57 pm »


               


Excellent then, once the variable is set, you can use the script on any door leading to your area(s), and if you need to alter the difficulty check, simply update that variable and all the doors with adjust accordingly.


 


 


Kato




hmmm think I put the variable wrong somehow or it just does not recognize it.....since I gained the required "reputation" as said by the variable but it does not work....


 


given it could be that I made an entirely wrong connection though......


Here is what I put the variable onto: 


 


Alarnian int 10 (as is the tag/name of the faction it is supposed to check)


0door int 10 (as is.....well somewhere I saw in the script)


 


so not sure what I did wrong since it is the first time I used variables like this :S


               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #16 on: April 07, 2015, 07:34:01 pm »


               

Okay, in the area properties window, advanced tab, variables. In the "Name" textbox, write "req_reputation", without the quotes, then in the type textbox, make sure the type is int, and in the value textbox, put the check value you need(0-100), and there you go. If you need to perform several different faction reputation checks, however, the code will need to be adapted, as I thought you were only checking against guards.


 


EDIT: Make sure you click on "Add" after the variable is set, it will then be displayed in the upper list.


 


 


Kato 



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #17 on: April 07, 2015, 07:38:00 pm »


               

no not only against guards BUT was planning on having each area required a certain minimum rep level in order for things to unlock so it works great! \\thanks again and sorry for all the hassle XD



               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #18 on: April 07, 2015, 07:52:20 pm »


               

No problem, I'm glad I could help(if I did).


 


 


Kato



               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #19 on: April 11, 2015, 01:24:21 pm »


               

okay I am not sure what I did wrong here or maybe I have to change something?


 


In any case this is my current issue:


 


The text that should explain to the player what his/her reputation is with the "Dock" Faction and how much reputation the player would need to get through the transition remains the same -1 and ammount needed is 0.


 


now I tried fiddling with it a little buuuut it has not changed, I tried changing the use of variables, no matter nothing seems to work


 


 


so if anyone knows how I can fix it?


 


so It is this section of the script: 


 


if(GetIsDM(oPC) || nRep >= nCheck) ExecuteScript("nw_g0_transition", oDoor);


else
{
string sWarning = "<cþ >I'm not allowed to enter, my reputation with guards is only "+
IntToString(nRep)+" when it should be at least "+IntToString(nCheck)+".</c>"; // red colored warning message example
FloatingTextStringOnCreature(sWarning, oPC);
}
}


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #20 on: April 17, 2015, 05:15:28 pm »


               

okay here I have another problem with this script.....and hopefully you are not tired of my rain of questions yet....


 


I figured out how to fix my previous issue but this is the next one:


 


On the ontransition event on the door I have put the tag of the character which it should check, so like this: 


 


void main()
{
object oPC = GetClickingObject();
object oDoor = OBJECT_SELF;
object oFactionMember = GetObjectByTag("docks"); // members of faction DOCKS will recieve this tag.
int nRep = GetFactionAverageReputation(oFactionMember, oPC);
int nCheck = GetLocalInt(GetArea(GetTransitionTarget(oDoor)), "req_reputation"); // variable set on area, holding the check value

if(GetIsDM(oPC) || nRep >= nCheck) ExecuteScript("nw_g0_transition", oDoor);
else
{
string sWarning = "<cþ >I'm not allowed to enter, my reputation with guards is only "+
IntToString(nRep)+" when it should be at least "+IntToString(nCheck)+".</c>"; // red colored warning message example
FloatingTextStringOnCreature(sWarning, oPC);
}
}

 



 


So here is the issue the: 


 


Using the tag on the door makes the rep count on the pc -1 for that faction and it won't go any higher, also it does not seem to recognise the rep count on the door either.


 


So here is the script I use to raise the rep based on quest ending in convo.


 



#include "nw_i0_plotwizard"


void main()

{

    object oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "VillainHead");

    DestroyObject(oItemToTake);

    GiveGoldToCreature(GetPCSpeaker(), 150);

    PWSetMinLocalIntPartyPCSpeaker("p000state_Daisy", 3);

    PWSetMinLocalIntPartyPCSpeaker("p000state", 3);

    PWGiveExperienceParty(GetPCSpeaker(), 250);

    {

   object oPC = GetPCSpeaker();

   object oFacMember = GetObjectByTag("Daisy"); // OBJECT_SELF is better if they're the same

   int PCCurrFac = GetFactionAverageReputation(oFacMember, oPC);

 

   AdjustReputation(oPC, oFacMember, 10);

   SendMessageToPC(oPC, "Your reputation has raised by 10 points with Dockside");

   SendMessageToPC(oPC, "Your current reputation with Citizens is " + IntToString(PCCurrFac) + ".");

}

 

object oPC = GetPCSpeaker();

 

object oTarget;

oTarget = GetObjectByTag("Door_quest_1");

 

AssignCommand(oTarget, ActionCloseDoor(oTarget));

 

SetLocked(oTarget, TRUE);

 

}

 

 



 

 

well if anyone can help me figure this out? thanks in advance '<img'> 


               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
reputation of faction increase/decrease based on chosen conversation
« Reply #21 on: May 16, 2015, 04:01:24 pm »


               Okay got most things to work but here is my next issue with this and I hope someone can help me with this.


I want to try and tie the rep to a group of npc's who give quests (which gives a different faction standing per area)


But the problem I am having is that it is not stacking with each completed quest. I am not able to get the rep up to 200.


so if anyone can help i would really appreciate it.