This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Custom Stances  (Read 1489 times)

reidospalas

  • Registred Member
  • Race Changer
  • *****
  • Posts: 32
    • View Profile
Custom Stances
« on: October 03, 2018, 08:50:43 pm »
Hey guys, i'm doin' some own jobs and i didn't know how to solve this issue, i want make some spells requires custom stances spells that i made.
Exemple > Priest Shadowform, to use some custom spells requires player be on shadowform to cast it.
Thats work in same way but using custom Stances, i tried adding new stances on SpellAuraEffects.cpp, then added Shapesshifts masks values for each new Form case, but didn't worked too,


Someone know how to make it possible?

Thats what exactly what i was trying to make
I've trying adding the mask values for it, but it was requering all the stances forms and didn't worked while in new form_stance


[COLOR="silver"]- - - Updated - - -[/COLOR]

If someone know how to make it possible i'll pay for this job

Official post: http://www.ac-web.org/forums/showthread.php?234446-(PAID)-Custom-Stances-requires

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Custom Stances
« Reply #1 on: October 03, 2018, 11:50:31 pm »
note that masks are limited in bit width. the fact you added 0x21 = 33 implies that the mask variable is more than 32 bits. It likely is not. Thus rather than requiring your new bit, it requires crap.

You can try putting your new value somewhere in between. Based on that screenshot, 5 and x17, x18 are unused. If they are, you can reuse those ids.

reidospalas

  • Registred Member
  • Race Changer
  • *****
  • Posts: 32
    • View Profile
Re: Custom Stances
« Reply #2 on: October 04, 2018, 12:23:47 am »
The problem wasn't with masks, but the flags won't work ingame, i tried using my custom one and it just attach all forms like on screenshot

reidospalas

  • Registred Member
  • Race Changer
  • *****
  • Posts: 32
    • View Profile
Re: Custom Stances
« Reply #3 on: October 09, 2018, 08:37:09 pm »
BUMP!!

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: Custom Stances
« Reply #4 on: October 10, 2018, 09:53:21 am »
Did you try what Schlumpf suggested and just use one of the unused shapeshift IDs? I just tried it and it seemed to work fine.

How did you even set the Stances mask for Void missile to such a high value (assuming you did it right)? I tried setting a spell to use a 33rd shapeshift ID, but all the editors/converter I tried refused the value because of the reason Schlumpf mentions.

Are you setting the mask properly? For example, to use the 5th shapeshift ID, you set the Stances mask to:
Code: [Select]
Stances = 1 << (5-1)
Result:
dec 16
hex 0x10
bin 0001 0000 i.e. the 5th bit

Or for multiple forms:
Code: [Select]
Stances = (1<<(5 - 1)) | (1<<(32 - 1))
Result:
dec 2147483664
hex 0x80000010
bin 10000000000000000000000000010000 i.e. the 5th and 32nd bits

Bit calculation: https://www.wolframalpha.com
Dec to hex (for inputting in Spell.dbc): https://www.binaryhexconverter.com/decimal-to-hex-converter
Dec to bin (if you want to verify): https://www.binaryhexconverter.com/decimal-to-binary-converter