Jump to content

[LE] Having issue with adding a quest item to the player


JustChill

Recommended Posts

This engine really starts to get on my nervs. -.-

 

Especially as it refuses to work in the same way as it previously did.

 

 

As posted here, I had issues with Draugrs in coffins not properly reaction even if everything worked fine previously.

 

Therefore I restarted from scratch and enhanced the german Nexus version of said mod, as the Steam version is currently as broken as mine as the developer used my files to update the german version too. :(

 

 

 

It turned out that the Nexus version had plenty of differences (some good ones too) and introduced new bugs which I've fixed now.

 

There is just one thing left to do and exactly that one starts to bug me the most.

I previously added a unique Misc Item that was a quest object.

I had to do this by using an actual quest and Quest Aliases as Bugthesda thought it would be a good idea to add quest items in that way instead of using a simple flag on an item form or a simple Papyrus function. :down:

The thing should work like this:

 

The player picks up a unique sword, but instead of having the sword available he will get a Misc Item of the sword as he is only allowed to use the sword upon a specific point (and afterwards by free will).

This is the very, very exact same script I used for the older version where the MasterAmbushScript got somewhat broken within the ESP.

 

Scriptname NQTommy_GothSwordScript extends ObjectReference  

Event OnActivate(ObjectReference akActionRef)
    if akActionRef == Game.GetPlayer()
        if NQTommy.GetStage() < 260
            NQTommy.SetStage(260)
        endif
    endif
EndEvent

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
  if akNewContainer && !akOldContainer
    if akNewContainer == Game.GetPlayer()
        if NQTommy.GetStage() < 270
            NQTommyAddSwordMisc.Start()
            Game.GetPlayer().RemoveItem(Self, 1, True)
        endif
    endif
  endIf
endEvent

Quest Property NQTommy Auto
Quest Property NQTommyAddSwordMisc  Auto

 

And there it worked

.

 

 

But now the Papyrus Log throws this garbage at me:

 

 

[02/09/2020 - 12:18:57PM] Error: Cannot call start() on a None object, aborting function call
stack:
[item 3 in container (00000014)].NQTommy_GothSwordScript.OnContainerChanged() - "NQTommy_GothSwordScript.psc" Line 15
[02/09/2020 - 12:18:57PM] warning: Assigning None to a non-object variable named "::temp12"
stack:
[item 3 in container (00000014)].NQTommy_GothSwordScript.OnContainerChanged() - "NQTommy_GothSwordScript.psc" Line 15

So I only get the weapon removed, but no new misc item is added to the player's inventory.

 

The Quest Property "NQTommyAddSwordMisc" is linked to this quest, which is either set up in the same way as in the older version where it worked:

Quest Data

 

Quest Alias 1

 

Quest Alias 2

 

 

It previously took me 1 whole day to figure out how to create a quest item in the player's inventory.

 

And as I am not willing to figure out why the very exact same way of adding a quest item doesn't work anymore, I had to come back here crying for help.

 

 

 

I mean seriously, this utterly garbage engine is trolling me now!

 

In Gamebryo you were at least able to tell what's wrong but that issue doesn't make any sense at all. :huh:

Link to comment
Share on other sites

Hey, thank you for your response, but that's exactly the issue.

Everything seems to be set up properly.

 

I even deleted the whole quest, made a new one, reassigned the property to the new quest, but it still tells that this Property is NONE. Which is absolutely impossible.

 

 

 

 

Addition:

UGH... I was able to fix it without knowing what caused the issue again -.-

Even though I ensured that all properties were set, I finally resigned and threw ALL assets out of the mod, added them again by hand and now it works.

 

I definitely will step back from taking over mods written by someone else.

 

People should take care about their mods themselves and ensure that they are not issued.

This feels like wiping someone elses ass, while I am already bothered enough with my own s#*&#33;. XD

Link to comment
Share on other sites

Still thanks for your response.

I guess you had some advide for me too. ^^

 

 

 

I got pretty emotional over this one, as the SureAI developer Hoxyd manages the german version of this mod on Steam and was happy to update it by receiving an enhanced german version from me on my Dropbox account.

Yet, I don't like to hand out or upload bugged stuff, so doing all over again was just the best way to ensure everything works fine this time.

 

And I finally was able to reach that goal. :smile:

 

At least the english version is now updated to work properly. Hoxyd might update the german version as soon as he finds the time for. The Dropbox file I linked him is updated with the german version too. :smile:

 

 

FINALLY, I can get back to the my own stuff now. :D

Link to comment
Share on other sites

I guess you had some advide for me too. ^^

 

Not really an advice, but a wild guess... My modding level does not let me give you advices... I'm mostly expirienced in languages, where declaring variables after using it won't work, so I thought: what if moving properties declarations to the beginning of the script will do the trick? Low probability is more than zero probability. First I checked CK docs, the properties are declared always in the beginning there [1], and then posted that... ^^

 

[1] - https://www.creationkit.com/index.php?title=Variables_and_Properties

Edited by shumkar
Link to comment
Share on other sites

 

I guess you had some advide for me too. ^^

 

Not really an advice, but a wild guess... My modding level does not let me give you advices... I'm mostly expirienced in languages, where declaring variables after using it won't work, so I thought: what if moving properties declarations to the beginning of the script will do the trick? Low probability is more than less probability. First I checked CK docs, the properties are declared always in the beginning there [1], and then posted that... ^^

 

https://www.creationkit.com/index.php?title=Variables_and_Properties

 

@shumkar

FYI - Papyrus is a little more flexible than other languages. Properties can be declared above, below or in between functions and events so long as they are within the empty state and not within any function or event. Even functions need not be declared before the events that call them.

Link to comment
Share on other sites

 

 

I guess you had some advide for me too. ^^

 

Not really an advice, but a wild guess... My modding level does not let me give you advices... I'm mostly expirienced in languages, where declaring variables after using it won't work, so I thought: what if moving properties declarations to the beginning of the script will do the trick? Low probability is more than less probability. First I checked CK docs, the properties are declared always in the beginning there [1], and then posted that... ^^

 

https://www.creationkit.com/index.php?title=Variables_and_Properties

 

@shumkar

FYI - Papyrus is a little more flexible than other languages. Properties can be declared above, below or in between functions and events so long as they are within the empty state and not within any function or event. Even functions need not be declared before the events that call them.

 

 

People who declare properties between event or function declarations are monsters.

Link to comment
Share on other sites

FYI - Papyrus is a little more flexible than other languages. Properties can be declared above, below or in between functions and events so long as they are within the empty state and not within any function or event. Even functions need not be declared before the events that call them.

 

Thank you for the explanation!

 

People who declare properties between event or function declarations are monsters.

 

Noone has invented something like "use strict" for Papyrus, so far?

Edited by shumkar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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