Aller au contenu

Photo

Script help (SetAutoLevelUp)


10 réponses à ce sujet

#1
jsd313

jsd313
  • Members
  • 184 messages
I want to make it so my followers will not auto level up. I want to do it manually. What would I have to add here to get this to work. Thanks.


case EVENT_TYPE_PARTYMEMBER_ADDED:
        {
            object oFollower = GetEventObject(ev, 0);
            SetLocalInt(oFollower, CREATURE_REWARD_FLAGS, 0); 
            SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE);
           AddCommand(oFollower, CommandJumpToLocation(GetLocation(GetHero()))); 
             }

Modifié par jsd313, 08 janvier 2010 - 09:35 .


#2
Mengtzu

Mengtzu
  • Members
  • 258 messages
If the CREATURE_REWARD_FLAGS is set to 1 they will not gain XP.



I'm 85% sure that a follower needs to go through the autolevel process at least once to have a working skill tree. I would strongly suggest you construct an ALtable for each follower that matches your needs and then hire them via a script like my hireCustomFollower() from the wiki tutorial.

#3
Mengtzu

Mengtzu
  • Members
  • 258 messages
I should add SetAutoLevelUp(oFollower, nAutolevel) sets the flag on the character sheet, with three values: off, on and locked on.

#4
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
The way to do this is to modify player_core. There's a line in the event handler for EVENT_TYPE_PARTY_MEMBER_HIRED, AL_DoAutoLevelUp(OBJECT_SELF, TRUE);



If you delete this line, I think it should do what you want.



If you don't want to modify the core script, you may be able to intercept that event and not pass it down, but I think you'd have to replicate all the other functionality or your party member would just be level 1, or maybe even 0.

#5
jsd313

jsd313
  • Members
  • 184 messages
I am editing ALfiles and preassigning abilities, easiest way I guess. Thanks guys.

#6
Mengtzu

Mengtzu
  • Members
  • 258 messages

The way to do this is to modify player_core. There's a line in the event handler for EVENT_TYPE_PARTY_MEMBER_HIRED, AL_DoAutoLevelUp(OBJECT_SELF, TRUE);

If you delete this line, I think it should do what you want.


I *think* that if you do that the skill trees will not work.  I say think rather than know because I abandoned my investigation into exactly which line in player_core did the magic when I figured out how to make autolevelling work for me (which I did by making my own version of the code from the player_core event, it turns out to be a big function!).

Modifié par Mengtzu, 09 janvier 2010 - 01:06 .


#7
jsd313

jsd313
  • Members
  • 184 messages
Let me ask this.. If I edit the .xls files to the way I want them, overwriting existing data. Then I keep the .gda in my module/override and package it that way it will not mess with the single player caimpaign right? This is a standalone mod, but I'm new to modding ><

Modifié par jsd313, 09 janvier 2010 - 01:20 .


#8
Mengtzu

Mengtzu
  • Members
  • 258 messages
That should be correct. If you're overriding core ones (like the default Rogue/Wizard/Warrior ones), that will affect the single player campaign, but only if your module is enabled. If you're making your own tables (that is, new name and id), there should be no problems at all.

#9
jsd313

jsd313
  • Members
  • 184 messages
Oh lol, Im using the default player one like Morrigan and Alistair lol. Guess I better make new ones ones I have them tweaked.

#10
jsd313

jsd313
  • Members
  • 184 messages
This is'nt going to work. I have far to many party members to add. I think I may just have to leave it up to people to buy stat/talent/spell books from the merchant to get everything they want :)

#11
jsd313

jsd313
  • Members
  • 184 messages
I added this section to my module script and I no longer need a script on each party members convo. I simply join them from a conversation action GEN_HIRE_FOLLOWER. It doens't open the party picker just joins them to the group and they have to manually be leveled up. I can then use the party picker to swap people in an out. However if I hire everyone and save the game and reload they are gone. But it's always been that way. So I assume I am going to have to keep track of all that by plots? I have been avoiding them for some reason...


case EVENT_TYPE_PARTY_MEMBER_HIRED:
{
int nScaled = GetLocalInt(OBJECT_SELF, FOLLOWER_SCALED);
int nShowPartyPicker = GetEventInteger(ev, 0);
int nMinLevel = GetEventInteger(ev, 1);
int bPreventLevelup = GetEventInteger(ev, 2);
}

Modifié par jsd313, 09 janvier 2010 - 06:27 .