Aller au contenu

Photo

Adding new polymorph type


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

#1
kamal_

kamal_
  • Members
  • 5 250 messages

I want to add some new polymorph creature types, so I can polymorph things into the new creature types, but can't figure out how to do so. I've edited the polymorph.2da and put it in my campaign folder, but the new POLYMORPH_TYPE_ options are not available to my scripts.

 

I know my script works in general (I'm using the code from the base polymorph spell), as I can polymorph to the valid existing polymorph types, such as zombie.



#2
kevL

kevL
  • Members
  • 4 061 messages

more info?

what spell, base spellscript are you using? debug to see that it's firing?
maybe Polymorph.2da doesn't like campaign-folder. suggest get it working in /Override first

I glanced at PolymorphSelf script ( nw_s0_polyself ) and Shapechange ( nw_s0_shapechg ). It looks like they GetSpellId() of children entries of a Master row# in Spells.2da - have those been defined? i guesstimate the effect is then constructed using the corresponding entry in Polymorph.2da



#3
kamal_

kamal_
  • Members
  • 5 250 messages

I am using a lightly modified part 2 or part 3 from http://nwn2.wikia.co...rRespawn_script

 

As you can tell by the scriptassist, there are appearances from nwn1 and nwn2, but when I change the polymorph.2da, the new entries do no show up. I have tried the polymorph.2da in the campaign, module, and in the override folder. Polymorphing to one of the nwn2 creatures in the default list works fine (I can be a zombie or air elemental in the example).

 

poly1.jpg



#4
kevL

kevL
  • Members
  • 4 061 messages

oh. Those don't appear in ScriptAssist until defined in a script or referenced include.

put something like this at the top of your script - before void main()

const int POLYMORPH_TYPE_TEST = 160;

where in Polymorph.2da,
POLYMORPH_TYPE_TEST is the Name and 160 the row #
  • kamal_ aime ceci

#5
kamal_

kamal_
  • Members
  • 5 250 messages

 

oh. Those don't appear in ScriptAssist until defined in a script or referenced include.

put something like this at the top of your script - before void main()
 

const int POLYMORPH_TYPE_TEST = 160;
where in Polymorph.2da,
POLYMORPH_TYPE_TEST is the Name and 160 the row #

 

Winner. That worked.



#6
Dann-J

Dann-J
  • Members
  • 3 161 messages

Indeed, you won't see any new constants in script assist unless you define them somewhere yourself. They're not pulled automatically from a 2DA column - those values are just for visual reference when viewing the 2DA. A lot of constants refer to the line number in a 2DA, so I generally just use the new number directly in a function instead of bothering to define a constant for it. Sometimes I might bother to add a comment to the end of the line reminding me what that number refers to.



#7
kamal_

kamal_
  • Members
  • 5 250 messages

Interestingly, I can't reverse this and return the pc to their normal form. All the debug scripting indicates things were stored correctly (name, initial appearance, etc). Though at this point it's more a script forum than toolset forum thread.



#8
Dann-J

Dann-J
  • Members
  • 3 161 messages

I doubt you can choose to return to human form voluntarily if you set nLocked to 1 in the effect function. If it's locked, then you'll have to wait for the full 999.9 seconds (sixteen minutes forty seconds) until the effect wears off. Unless you strip the effect off via script (or dispel magic).



#9
kamal_

kamal_
  • Members
  • 5 250 messages

I doubt you can choose to return to human form voluntarily if you set nLocked to 1 in the effect function. If it's locked, then you'll have to wait for the full 999.9 seconds (sixteen minutes forty seconds) until the effect wears off. Unless you strip the effect off via script (or dispel magic).

I want to strip it via script and restore the players original form. nLocked was 1 to make sure it couldn't wear off before I scripted the change back.



#10
Shallina

Shallina
  • Members
  • 1 011 messages

Check in BGR campaign, polymorth.2da and the script bgr_polymorth



#11
BartjeD

BartjeD
  • Members
  • 249 messages

I imagine using SetEffectSpellId and then using a function to strip effects with that spellID would work to restore the player to their original form?



#12
Dann-J

Dann-J
  • Members
  • 3 161 messages

I imagine using SetEffectSpellId and then using a function to strip effects with that spellID would work to restore the player to their original form?

 

You have a good imagination!

 

http://forum.bioware.../#entry18406825


  • BartjeD aime ceci