Jump to content

[LE] Retroactive Necromage- need scripting help!


Recommended Posts

For understanding: The quest (your new created quest that has attached the script "RetroactiveNecromageScript") runs once (maybe twice) at the moment you run a new game or a loaded game.

If you run the quest on new game the player cannot be a vampire.

If you run the quest on a loaded game first time and the player is not a vampire, times later quest is still running and the player transforms to any vampire race there exists no event that will be

triggered to run myF_Test() again.

 

Hopefully I do not have explained to confused.

; -- EVENTs -- 3

EVENT OnInit()
; keep in mind: Do NOT overwhelming this init event with a lot of code !!!
    RegisterForSingleUpdateGameTime(0.0)    ; trigger next event OnUpdateGameTime() as fast as possible
ENDEVENT

EVENT OnUpdateGameTime()
    RegisterForSingleUpdate(1.0)                    ; test first time after 1.0 second
ENDEVENT

EVENT OnUpdate()
    myF_Test()

    IF ( ResetOnce )
    ELSE
          RegisterForSingleUpdate(5.0)            ; trigger event again after 5.0 seconds
    ENDIF
ENDEVENT

Can you remember what I wrote earlier, find out the right event.

You decided to use a "quest script" instead of a "ReferenceAlias script" prefilled with player.

Edited by ReDragon2013
Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

So, what I'm doing is testing using two saves with the prepared character (level 81, purchased perks affected by the Necromage Vampire build).

 

1: Save without Necromage and Vampire, (but with the vampire disease). The purpose of this save is to test if the script will appropriately run in the background during a new or in-process game where the player does not have Necromage or Vampirism, and if saving/loading will be required to force the script to behave appropriately. Your new example code fixes that potential issue, so thanks!

 

2: Save with Necromage and stage 1 Vampirism. The purpose of this save is to test that the script will work with an in-progress game, where a player has both Necromage and Vampirism. It serves as a quick way to determine if the script will properly run, since the save will load with the player already ready for the script to replace perks and spells.

 

All of the testing I have done with this in-progress mod so far has been with the 2nd save, the one with both Necromage and stage 1 Vampirism. In short, the script is consistently failing to recognize the player as a vampire despite the game loading with the player having Stage 1 Vampirism.

Edited by Galcyon
Link to comment
Share on other sites

Ok, just ran another test, and I think I found out what's happening.

 

For some reason, the script isn't registering the player, period. Switched the order of True/false checks, and now it's claiming that the Player doesn't have Necromage.

 

So, the most likely problem is that the script isn't properly referring to the player, instead of us not properly defining vampirism or perks.

 

I can see the definitions of referring to the player here, but the examples that page provides are... kinda poor, since there's two ways to refer to the player, and the examples are doing a poor job doing something as basic as, say, showing how to refer to the player to see if they do or don't have something. Or maybe they do, and I'm just too Papyrus-illiterate to understand without better examples. So how do I refer to the player in the game the script will understand?

Edited by Galcyon
Link to comment
Share on other sites

Are you tracking the player in a Quest Alias? If not, you should be. Then you can add that Reference Alias as a property on your script. Or better yet, simply attach the script to the Quest Alias and use the OnRaceSwitchComplete event handler to detect when the player becomes a vampire.

 

It would be helpful if you could upload your plugin and scripts somewhere so that we can see exactly what you're working with.

Link to comment
Share on other sites

  On 6/21/2019 at 8:54 PM, npdogg said:

It would be helpful if you could upload your plugin and scripts somewhere so that we can see exactly what you're working with.

The entire script is posted at the last post of the prior page, under spoilers. It's functioning as a simple "run in background" script, so I don't think uploading the whole .esp is absolutely necessary; it's literally a "boot up CK, make new quest, shove the script into the new quest" deal.

Edited by Galcyon
Link to comment
Share on other sites

  On 6/21/2019 at 9:41 PM, Galcyon said:

 

The entire script is posted at the last post of the prior page, under spoilers. It's functioning as a simple "run in background" script, so I don't think uploading the whole .esp is absolutely necessary; it's literally a "boot up CK, make new quest, shove the script into the new quest" deal.

 

Did you set the properties on your script? If you just "shove the script into the new quest" (not sure what that is supposed to mean), your check to determine if the player has the necromage perk will fail because the property is empty.

Link to comment
Share on other sites

  On 6/22/2019 at 3:40 AM, npdogg said:

 

  On 6/21/2019 at 9:41 PM, Galcyon said:

 

The entire script is posted at the last post of the prior page, under spoilers. It's functioning as a simple "run in background" script, so I don't think uploading the whole .esp is absolutely necessary; it's literally a "boot up CK, make new quest, shove the script into the new quest" deal.

 

Did you set the properties on your script? If you just "shove the script into the new quest" (not sure what that is supposed to mean), your check to determine if the player has the necromage perk will fail because the property is empty.

 

 

Reproducing the current script (again) under the spoiler:

 

  Reveal hidden contents

 

 

Additionally, when I say "shove the script into the new quest", it's basically shorthand for the guide here. Which, in my experience, literally means "open up the CK, make a new quest, do not touch anything because the default selections will already have it set up to run on game load, and put the script in the last tab where scripts go, making sure you have it selected for extends quest".

Link to comment
Share on other sites

  On 6/22/2019 at 5:12 AM, Galcyon said:

 

Additionally, when I say "shove the script into the new quest", it's basically shorthand for the guide here. Which, in my experience, literally means "open up the CK, make a new quest, do not touch anything because the default selections will already have it set up to run on game load, and put the script in the last tab where scripts go, making sure you have it selected for extends quest".

 

But did you click "Auto-Fill All" in the properties dialog?

Link to comment
Share on other sites

 

  Reveal hidden contents

 

 

This is how I would do it. Quest with Quest Alias filled with Player, and two Form Lists containing the perks and abilities that you want to reset.

Link to comment
Share on other sites

  On 6/22/2019 at 9:29 AM, npdogg said:

This is how I would do it. Quest with Quest Alias filled with Player, and two Form Lists containing the perks and abilities that you want to reset.

Cool, and I think I now see why the prior attempts at pointing to the player failed.

 

And yeah, ReDragon did mention something about Form Lists (actually looks like Arrays now), so that's also something to think about. Right now, I want to make sure the script works before any further tinkering/shrinking gets involved.

 

I'll update this thread, either because I need further help, or because I'm announcing the mod's initial release.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...