Jump to content


question re: Refinements-style polymorphs


  • Please log in to reply
14 replies to this topic

#1 -silas-

-silas-
  • Guest

Posted 01 August 2005 - 04:01 PM

Okay, I'm looking to expand my druid polymorphs a bit, and I figure I should follow the example of the Refinements system rather than the Bio system. I'm just having a bit of trouble following along with what you guys did.

As an example: let's say I want to allow a druid to polymorph into a lion. Mimicking the Refinements werewolf polymorph, I'd create the attacking item and also create another item, modeled on LI#WERE.itm, in the armor slot. LI#WERE.itm seems to be doing all the work of making the PC look and act like a werewolf; easy enough to adapt it to make the PC look and act like a lion instead. Only thing I don't follow is the 'cast spell on condition' global effect in LI#WERE.itm. In NI this effect shows this near the top:

Unknown:........... 00 00 00 00 h
Unknown:........... 09 00 00 00 h

... and this near the middle:

Unknown:........... 4c 49 23 57 45 52 45 00 h

What condition does the effect refer to? and what spell gets cast? Are they determined by these two variables? Does the spell/condition deal specifically with a werewolf trait, or could I leave it alone and drop them wholesale into a 'polymorph lion' item?

I'm also a bit curious as to why you guys used two different systems, one for vanilla/avengers and one for shapeshifters. (At least, looking in NI, it seems like there are two systems...) But that's an ancillary question...

#2 T.G.Maestro

T.G.Maestro

    Eclipse

  • Member
  • 4415 posts

Posted 01 August 2005 - 11:52 PM

Lets just wait for Littiz, he'll be the one with the right answers this time. ^_^
Posted Image

Refinements v2 has been released!
Go and visit the website or the forum for more info!

Member of The Silver Star team.

#3 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 02 August 2005 - 05:58 AM

Sorry, I'm seriously out of time lately, ATM I can't check everything and explain in depth.
If you can wait a few days...
Anyway, the different methods are due to the fact that Shapeshifters cannot wear anything in the armor slot (not even if they dual), so the solution can be tailored that way for them. The solution for the rest of the druids was born as an extension of the idea :)

Ever forward, my darling wind...


#4 -silas-

-silas-
  • Guest

Posted 02 August 2005 - 01:38 PM

No problem, don't put your self out on my account. I'm currently pondering my options... I started to follow the non-shapeshifter example, having the innate ability polymorph the user into a lion and equipping a claw that constantly recreates itself every few seconds. (I am assuming that the global effect that constantly recreates the attack claws with a 2-second delay is to overcome the possibility of them being dispelled?)

Then again I am toying with disallowing druids to equip helmets, and then have everyone get invisible shapechange items in the helmet slot, like you do in the shapeshifter's armor slot. Not a huge sacrifice, and then I don't have to worry about .cre files, I can just fudge them with item effects instead.

Eh, I think either would work fine, it will just take some time in NI.

#5 Caedwyr

Caedwyr

    Wraith Editor

  • Member
  • 962 posts

Posted 02 August 2005 - 04:03 PM

I think there has also been some promised collaboration at some future point in time between Camdawg and Littiz to hammer out a definative shapeshifter fix tweak, as I believe there are still some things that can be improved regarding the mechanics.
"Knowledge is Power. Power Corrupts. Study Hard. Be Evil." - Ferret

PnP Celestials
Geomantic Sorcerer Kit

#6 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 02 August 2005 - 10:47 PM

Eh, I think either would work fine, it will just take some time in NI.

The hardest part was to handle interactions between the possible forms. If you want to do things right, you'll have to go through some headaches ;)
More to come, I'm still in hurry ;)


I think there has also been some promised collaboration at some future point in time between Camdawg and Littiz to hammer out a definative shapeshifter fix tweak, as I believe there are still some things that can be improved regarding the mechanics.

Yes, there was this idea, but I got no reply to my last PMs as I think Cam has been too busy with other projects recently.
There's a base plan for a new common structure of the fix based on the existing Refinements' structure + some smart ideas/improvements from Cam.
I tried to imagine all of the possible problems beforehand (after the first experience...) and alas I did find a couple of weak points. If we solve those though, we might produce quite an impressive fix...

Edited by Littiz, 02 August 2005 - 11:20 PM.

Ever forward, my darling wind...


#7 -silas-

-silas-
  • Guest

Posted 03 August 2005 - 10:08 PM

The hardest part was to handle interactions between the possible forms. If you want to do things right, you'll have to go through some headaches wink.gif


Yes, when I tried to add in a couple of druid tweaks on top of Refinements, I got some abilities that worked (yours) and some that didn't quite (mine). Stuff like polymorph to wolf, then immediately polymorph to bear... then I'd see two abilities to return to human form. Hit one and the other would still be there, and I could polymporph from human form to human form! It's quite confusing when you go looking through NI -- there are at least five 'return to human form' abilities in the unmodded game, the use of which is split between eight druid polyporphs, two druid HLAs, two mage spells with multiple forms each, and at least two magic items. It's not very clear what works how.

Your system seems to work great in its implementation, but doesn't change the substance of druid polymorphs, and I want to change that pretty radically. Now that I've worked out in my head what I'd like to see for each kit, I'm trying to put together a bunch of druid polymorph abilities, and have all of them use the same basic system.

#8 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 09 August 2005 - 11:03 PM

still taking my time to answer, hadn't even time to re-open the files, sorry.

Ever forward, my darling wind...


#9 Jinnai

Jinnai

    Bye Sanzo! You'll play with me again next time?

  • Member
  • 377 posts

Posted 11 August 2005 - 06:55 AM

Better not take to long or you'll start sounding as bad as me.
Posted ImagePosted Image

#10 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 11 August 2005 - 11:36 PM

Well, to face an average technical issue I need:
-A bit of free time
-The willingness to spend it digging again into the trickyness of the files.
Last two times this combo verified I had to use it to solve a bug.
I can't offer more than this kind of availability.

Anyway, trying to answer recollecting memories and without files at hand.
As I explained already, the two systems are because of items usability issues.
With shapeshifters we can abuse of that free slot (armor), and so I came up with the idea of an invisible armor doing all the job.
I can't check the unknowns you refer to right now, but chances are that they are uninfluent. Most of the in-game files are created by using existing files as templates, and various "garbage" fields carry over from one to another, even if they have no meaning in the various new applications. This applies even to modding, alas, even though I (we) try to procede as cleanly as possible when it costs a reasonable amount of time.
Of course sometimes "unknown values" are there for a reason, and it's just NI that hasn't been developed long enough to give them the right name at the right moment.
I think this isn't the case anyway.

For a generic fix you'll need to follow the second kind of mechanism, since you do not have that free item slot.
Hence, you can follow my impostation.
The re-cast effects are placed upon the paw itself. Now, since this is worse than the armor trick, I tried to move away as many effects as possible: so, in this case, I mixed the mechanism with the original shapeshifting effect - which is bugged, but still partially works: physical stats and something else (like resistances IRRC) do carry over upon shapechanging, so I used the original effect to apply these values (you'll need to create your own CRE file for this).
Other effects, like enchantments placed on the CRE, or upon items carried by the CRE, do *NOT* carry over.
So, you'll need to place them on the paw.
Here we have a big difference with the first system: you *can't* use a "While Equipped" time setting, since the paw themselves can be dispelled, and you'd lose continuity of the enchantments until the paw is reapplied (using the armor slot with Shapeshifters avoided this problem).
In this case, I use a precise amount of time, trusting the fact that the paw is reapplied at a given delay, indeed. The time setting for the enchantments is a tick longer than the re-casting delay, creating a bit of overlapping that ensures an even better continuity. Of course you'll have to avoid this little overlapping for effects that work incrementally, but most of the times you can freely apply it.

Another difficulty is with the interactions between the forms.
See, again, with the armor trick I could simply remove the armor and the whole mechanism stopped.
Having everything moved to the paws, I had to come up with something else.
This was a big problem until I remember about the Protection from Spell effect.
By using a properly placed protection from spell effect I could stop the chain of castings any time, so I just imagined to place it in the natural form spell.
This wasn't enough of course, and things became very tricky to do without doing mistakes, since you have to prevent conflicts between the forms: when you change from a form to another (which I wanted to allow without forcing to pass through the human form) applying the new paw isn't enough, since you must stop the previous chain of spells, first.
So, this is where all of those interwoven protections from spell effects are born...
:wacko:

Hell, hope it helps. I think you can figure out a bit better how the thing works by studying the files now.
I'm sure there were additional tricky issues, but I can't recollect them all right now, not without the files (and a problem) at hand :)

Edited by Littiz, 11 August 2005 - 11:44 PM.

Ever forward, my darling wind...


#11 -silas-

-silas-
  • Guest

Posted 14 August 2005 - 09:42 PM

Ah, so that's what those 'protection from spell' effects are.

Well, the non-shapeshifter technique seems extremely complex, I think mimicking it would be too much for my abilities. So I imposed an item restriction on all druid kits (helmets, not too big a deal for druids imho) and added a set of new shapeshifter-style polymorphs to all kits. (Vanilla druids now have expanded shapeshifting into 'natural' forms, with Shambling Mound as an HLA; avengers shapeshift into extra-planar forms, with the elemental transformation HLA; and shapshifters follow your model.)

Thanks for the info, it's a good insight into just what goes into a mod like this.

#12 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 15 August 2005 - 11:05 PM

You're welcome :)

Ever forward, my darling wind...


#13 -silas-

-silas-
  • Guest

Posted 23 August 2005 - 10:39 PM

Okay, further questions:

I can't replicate your shapechanges because I can't put into effect the constantly reappearing claws (because I can't use the 'protection from spell' effect on a spell of my own making (because I'm on a Mac and can only use NI for this stuff)). So I have ended up with a system that instead apes Bioware's shapechanges, i.e. a 'polymorph' effect into a creature I modified, and a 'create item' effect for claws to attack with.

But as I was implementing this, I came upon an idea to remedy the possibility of claws being dispelled: instead of a simple 'create item' effect to create the claws, I will use a 'cast spell' effect to cast a separate spell, which in turn will create the claws. The benefit being that the 'cast spell' effect asks what level the spell should be cast at. So if it casts at 10 levels higher than the highest NPC dispeller (say, at level 50), there should only ever be a 1% chance of the claws being dispelled.

Right? Am I missing something, or will that actually work? And, now I'm thinking I can lump all the effects (animation change, modified STR DEX & CON, immunities, regeneration, etc) into the claws themselves... so even if they are dispelled, the whole shebang will be dispelled. Thus the awkward situation of being in the shape of a bear but wielding a quarterstaff would not happen - it would be an all-or-nothing deal.

#14 Littiz

Littiz
  • Modder
  • 1078 posts

Posted 24 August 2005 - 06:29 AM

I can't replicate your shapechanges because I can't put into effect the constantly reappearing claws (because I can't use the 'protection from spell' effect on a spell of my own making (because I'm on a Mac and can only use NI for this stuff)).

Uh?
I did the whole shapeshifting fix with NI...

But as I was implementing this, I came upon an idea to remedy the possibility of claws being dispelled: instead of a simple 'create item' effect to create the claws, I will use a 'cast spell' effect to cast a separate spell, which in turn will create the claws. The benefit being that the 'cast spell' effect asks what level the spell should be cast at. So if it casts at 10 levels higher than the highest NPC dispeller (say, at level 50), there should only ever be a 1% chance of the claws being dispelled.

Actually, this is what I did already in the generic (non-shapeshifter) version of the fix (though I don't recall ATM the exact value I used as level). I didn't actually try a true statistical analysis, but the paws keep getting dispelled quite often, to my memory (I think the hard-coded bug is messing things up).
Anyway, I think the minimum might be 5% in this case, plus, the random engine in BG2 doesn't appear perfectly well done... all in all, I don't think we could trust "low" chances. Plus, there are mods and modders, and spells with high level settings...

Right? Am I missing something, or will that actually work? And, now I'm thinking I can lump all the effects (animation change, modified STR DEX & CON, immunities, regeneration, etc) into the claws themselves... so even if they are dispelled, the whole shebang will be dispelled. Thus the awkward situation of being in the shape of a bear but wielding a quarterstaff would not happen - it would be an all-or-nothing deal.

Maybe not a big deal, but this would leave a bit of chaos with the natural form innates and such, anyway. This is one of the theorical problems I identified with the possible common shapeshifting fix Camdawg and I might realize (for that case I'd have a solution, but not as clean as I'd want it).
Anyway, such issues may not be of interest to you, if you're after a personal version of the fix ;)

Ever forward, my darling wind...


#15 -Guest-

-Guest-
  • Guest

Posted 24 August 2005 - 11:42 AM

Uh?
I did the whole shapeshifting fix with NI...


Actually, I just ran into the same problem again, in a different context. I was looking at the Song & Silence Sharpshooter kit, and their "poison weapon" effect. It has a "melee hit effect" effect and a "ranged hit effect" effect, but the reference for both in NI is "UNKNOWN 00 00 00 00 00 00 00 00."

Similarly, the "protection from spell" effect is an unknown with eight double zeros. I don't know how to deal with those double zeros.

But, I just made some progress: knowing this was originally coded on Windows, I figure those eight valuse could represent the eight letters of a filename. The sharpshooter "melee hit effect" reference is

73 70 43 6c 34 32 32 00

Through a process that in its wildest dreams couldn't really be called induction, I figured out that that probably refers to SPCL422, which is indeed a poison effect.

But while I can work backwards from a known value, I can't yet figure out how to arrive at a value. I

...

ACK! Right-click, choose "edit as string." Just discovered this feature. I guess I did a lot of mental gymnastics for nothing. Still I'm kinda proud of how far I got with the limited info available...

thx for all the info, I'm off to the races.