Jump to content

My mod breaks a vanilla function and I have no why


KatsAwful

Recommended Posts

I originally posted this in the CS section of the forums but didn't get anywhere that would solve my problem

>I'm working on a mod that involves changing how the player is set to jail, with one possibility being the basic send to jail function. The problem is that my mod somehow breaks the function "GoToJail" and I cannot figure out why. With every possibility I can think of the game will always lock up when "player.gotojail" is called in a dialogue result script. Is there any possible way that this can break?

 

The function `gotojail` only works in a result script yet every time its called properly (in a Goodbye flagged dialogue), the game freezes when it tries to run `gotojail`. The only thing I'm left with is remaking the plugin and I don't want to do that due to the scope of it and me not knowing what caused this

 

If anyone can help I would greatly appreciate it, I have no idea what to do at this point. This mod is dead until it gets fixed

Link to comment
Share on other sites

You need to set up a quest script with a GameMode block that checks for a variable you set in the dialogue. Dialogue result scripts cannot be used to move the player anywhere, whether it be by way of MoveTo or the GoToJail function. The game will either CTD, freeze, or your interface to the world will be inverted permanently when you next leave the game to reload. That last thing being very nasty because it gives no indication of the issue prior to that. You could lose hours and hours worth of play time to it. I had to learn this the hard way when making the Cyrodiil Travel Services mod.

Link to comment
Share on other sites

The problem is that the vanilla usage of getting sent to jail doesn't work at all. The only change I made to the Crime quest was adding my modified topic texts plus flags for the 2 different outcomes I want. I didn't touch anything else. The modified dialog is passed off to a script (ie use a variable) to do the MoveTo I want. I didn't want to modify the vanilla guards too much to keep things as trouble free as possible. GoToJail just doesn't work in its intended function which from my research seems to be that its a dialog result script only. Putting it in a normal script does weird things (but doesn't freeze) and I can't find any script that would be activated when the player completes the "ServeSentence" dialog choice

Link to comment
Share on other sites

  • Recently Browsing   0 members

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