Jump to content

Error with CompanionRadiantQuest for Polymorph spell


DeepBlueFrog

Recommended Posts

I am trying yet again to get a proper polymorph spell in place to turn the player into a full spriggan in SD+.

 

I found this nice tutorial:

 

http://jaredbangerter.hubpages.com/hub/How-to-Create-New-Shape-Shifting-Spells-In-Skyrim

 

However, when I try to use the suggested script for the polymorph, I am getting a rash of errors about compilation of the related CompanionRadiantQuest.psc script.

 

Is that an issue known to anyone?

 

Here are the errors:

c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\CompanionsRadiantQuest.psc(5,24): cannot name a variable or property the same as a known type or script
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\CompanionsRadiantQuest.psc(48,7): MapMarker is not a variable
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\CompanionsRadiantQuest.psc(48,40): cannot call the member function GetReference alone or on a type, must call it on a variable
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\CompanionsRadiantQuest.psc(49,12): cannot call the member function GetReference alone or on a type, must call it on a variable
No output generated for _sdmes_polymorphSpriggan, compilation failed.
Link to comment

You accidently named a function or a script the same as a parameter in this vanilla script.

 

Take this for example:

 

ScriptName ThisWillNotWork
....
this script will cause an error in another script which might look like this:

 

Function ConflictedFunction(ObjectReference ThisWillNotWork)
Link to comment

TDF - The script you attached gave me the same error.

 

Heromaster - It looks like MapMarker in that Companion script is the culprit.

 

I renamed it to MapMarkerRef and my magic effect script compiled.

 

I hope that didn't mess up the property value for that radiant quest now... yay for CK.

 

Thanks for the replies though... at least now I have the illusion of progress :)

Link to comment

Here is the script.

 

 

Scriptname _sdmes_polymorphSpriggan extends activemagiceffect


Faction Property PlayerWerewolfFaction auto

Shout Property MonsterShout auto

Race Property PolymorphRace auto

Spell Property PolymorphSpell auto

Faction Property MonsterFaction auto

Weapon Property MonsterWeapon auto


Event OnEffectStart(Actor Target, Actor Caster)

if (Target.GetActorBase().GetRace() != PolymorphRace)

Target.SetRace(PolymorphRace)

Game.GetPlayer().SetHeadTracking(false)

Game.GetPlayer().UnequipAll()

Game.GetPlayer().AddSpell(SPELLCLEAR1)

Game.GetPlayer().EquipSpell(SPELLCLEAR1, 0)

Game.GetPlayer().AddSpell(SPELLCLEAR2)

Game.GetPlayer().EquipSpell(SPELLCLEAR2, 1)

Game.GetPlayer().AddItem(WEAPONCLEAR1)

Game.GetPlayer().EquipItem(WEAPONCLEAR1, 0)

Game.GetPlayer().AddItem(WEAPONCLEAR2)

Game.GetPlayer().EquipItem(WEAPONCLEAR2, 1)

Game.GetPlayer().EquipSpell(PolymorphSpell, 0)

Game.GetPlayer().AddSpell(PolymorphSpell)

Game.GetPlayer().EquipSpell(PolymorphSpell, 0)

Game.GetPlayer().AddToFaction(MonsterFaction)

Game.GetPlayer().AddItem(MonsterWeapon)

Game.GetPlayer().EquipItem(MonsterWeapon, 1)

Game.GetPlayer().AddItem(MonsterAmmo, 99)

Game.GetPlayer().EquipItem(MonsterAmmo)

Game.GetPlayer().AddItem(MonsterArmor)

Game.GetPlayer().EquipItem(MonsterArmor)

Game.DisablePlayerControls(false, false, false, false, false, true, false)

Game.SetPlayerReportCrime(false)

Game.GetPlayer().SetAttackActorOnSight(true)

Game.GetPlayer().AddToFaction(PlayerWerewolfFaction)

Game.GetPlayer().AddShout(MonsterShout)

Game.GetPlayer().EquipShout(MonsterShout)





endif



EndEvent







Event OnEffectFinish(Actor Target, Actor Caster)

; change back

Game.GetPlayer().RemoveSpell(PolymorphSpell)

Game.GetPlayer().UnEquipSpell(PolymorphSpell, 0)

Game.GetPlayer().RemoveFromFaction(MonsterFaction)

Game.GetPlayer().RemoveItem(MonsterWeapon)

Game.GetPlayer().UnEquipItem(MonsterWeapon, 1)

Game.GetPlayer().RemoveShout(MonsterShout)

Game.GetPlayer().UnEquipShout(MonsterShout)

Game.GetPlayer().RemoveItem(MonsterAmmo, 99)

Game.GetPlayer().UnEquipItem(MonsterAmmo)

Game.GetPlayer().RemoveItem(MonsterArmor)

Game.GetPlayer().UnEquipItem(MonsterArmor)

Game.GetPlayer().AddSpell(SPELLCLEAR1)

Game.GetPlayer().EquipSpell(SPELLCLEAR1, 0)

Game.GetPlayer().AddSpell(SPELLCLEAR2)

Game.GetPlayer().EquipSpell(SPELLCLEAR2, 1)

Game.GetPlayer().AddItem(WEAPONCLEAR1)

Game.GetPlayer().EquipItem(WEAPONCLEAR1, 0)

Game.GetPlayer().AddItem(WEAPONCLEAR2)

Game.GetPlayer().EquipItem(WEAPONCLEAR2, 1)

Game.EnablePlayerControls()

Game.SetPlayerReportCrime(true)

Game.GetPlayer().SetAttackActorOnSight(false)

Game.GetPlayer().RemoveFromFaction(PlayerWerewolfFaction)

Debug.Trace("WEREWOLF: Setting race " + (CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace + " on " + Game.GetPlayer())

Game.GetPlayer().SetRace((CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace)



endEvent







Ammo Property MonsterAmmo Auto







Armor Property MonsterArmor Auto

SPELL Property SPELLCLEAR1 Auto



SPELL Property SPELLCLEAR2 Auto



WEAPON Property WEAPONCLEAR1 Auto



WEAPON Property WEAPONCLEAR2 Auto

Quest Property CompanionsTrackingQuest Auto

 

 

The problem is that I am not using 'MapMarker' anywhere in my script... 

The Quest property of my script triggers a recompilation of the radiant companion script which DOES contain the MapMarker property that is throwing a compilation error.

 

Interestingly, I couldn't find any reference of that script being used in vanilla skyrim so far... maybe I should look into USKP..

Link to comment

Yeah, I just uploaded the Vanilla script... It was a long shot, but it was the best thing I could think of. But yeah, I agree, it seems clear to me that the problem is that MapMarker property (yet I may be totally wrong here again :P ). I wonder what would happen if you simply did what you did before, and got everything to compile, then recompiled the Vanilla script as it was originally (undoing the renaming of the property), or better yet, just backup the originals then replace them again.

Link to comment

I can remove the new compiled version and rely on what's in the BSA files.

 

The vanilla script will not compile as is anymore, for the same error apparently... not sure what is going on here, but then again, this is CK. It doesn't have to make sense.

 

I got the polymorph spell to work.

 

I am troubleshooting an issue with missing attack animations, but that's another issue...

Link to comment

Ok, as far as I've seen your script is okay. It's definitely not this script which is causing the error. But it must be another script in your script folder which is misusing those properties and lead to the vanilla script not compiling anymore.

 

If it would be my guess, there is a script in your folder which is called MapMarker.psc and MapMarker.pex.

 

While I was browsing your script, here are some other suggestions:

 

Replace Game.GetPlayer() with an Actor Property PlayerRef or if you don't want to use another property in your script at least do

Actor Player = Game.GetPlayer()
This around 10,000 times faster than what you are using now.

 

Use the official parameter convention from Beteshda

Event OnEffectStart(Actor Target, Actor Caster)
to
Event OnEffectStart(Actor akTarget, Actor akCaster)
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...