Aller au contenu

Photo

Changing race via script?


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

#1
Grani

Grani
  • Members
  • 558 messages
Say I want to have an NPC of random race, gender and class (no multiclassing, only base classes and only playable races, though) summoned. Any combination of these three is supposed to be possible.

Do I have to make blueprints of all possible combinations for that, or is there a way I could summon this NPC and then change his, for example, race via script, so that I could use fewer blueprints?

I'm afraid I know the answer, but wanted to make sure before making a hundred blueprints. :(

Modifié par Grani, 06 janvier 2014 - 06:26 .


#2
henesua

henesua
  • Members
  • 3 883 messages
with the basic NWN scripting hooks available to you, you can not change race. You would need NWNX for that. One way around this might be to play with polymorphs. I believe the race is changed to the form of the polymorph. Nevertheless I do not recommend this solution.

I have not tried changing class yet, so can not speak authoritatively on that.

If I was attempting to do what you are with Vanilla scripting I'd inventory what I can and can not change via script. Then I would create base blueprints of creatures with the characteristics I can not change.

#3
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
If you don't mind the race selection only being cosmetic, you can just set the NPC's appearance to that of the desired race.

#4
WhiZard

WhiZard
  • Members
  • 1 204 messages
If you are concerned about the character sheet, you can use a subrace to display a racial name in the location the race would normally be displayed. For classes, you can use LevelUpHenchman() (provided the NPC starts at level one) to level up the NPC in any chosen class.

#5
Grani

Grani
  • Members
  • 558 messages
Thanks for suggestions. However, I'd rather have them have all the characteristics of their race (including bonuses for favored enemy feat, if their opponent happens to have it).
I think I'll resort to creating blueprints for all combinations.

#6
DM_Vecna

DM_Vecna
  • Members
  • 280 messages
There are some other threads around here where very intelligent people warn that this can cause unexpected bugs. However I have done this for my player world and though in the early stages, I cannot find any issues.

As suggested above this is done through NWNX_funcs