6 posts / 0 new
Last post
movomo
movomo's picture
Offline
Last seen: 5 months 1 week ago
Joined: 02/24/2019 - 01:34
Karma: 3
Morrowind-Oblivion world transition by 'external' mod?

Hi there!

I'm hoping this to fit the forum category because I have a technical question regarding Morroblivion's internal working mechanic.

I have not played Morroblivion much (it was distant past), and currently not even have it installed. But recently I made a general (dependency-free, other than OBSE) Mark / Recall / Intervention mod and going through debugging before release. Now, I do know that Morroblivion have those three spells and players have been happy about it, although I don't have the slightest idea on how they work, so replacing them is not my intention.

However, my users are supposed to be able to mark any arbitrary location and can recall whenever and to wherever they had marked. And potentially can also configure their Intervention spells (which they can freely define in arbitrary worldspace) to cross the world 'borders', for example it can transport them from Bravil to Passwall through the Strange Door, if configured so.

So bottom line is, similarly to what SI door does when passing through it, I suspect that Morroblivion would require certain work to be done as well before transporting the pc properly. I want to make my mod at least not do some serious damage.

How is that done? Can it be done? Is there any easy way, like merely setting a quest stage / checking and setting some variables / calling a function? Should it be handled differently when transporting from SI than from Cyrodiil?

ponyrider0
ponyrider0's picture
Member
Offline
Last seen: 2 months 4 weeks ago
Joined: 07/22/2016 - 05:01
Karma: 922
Welcome, movomo!  From what I

Welcome, movomo! 

From what I remember, Morroblivion's Mark/Recall/Intervention spells are all implemented by very simple scripts that use "Player.MoveTo <reference>" to teleport the player around the game world (https://cs.elderscrolls.com/index.php?title=MoveTo).  Since the scripts use a <reference> instead of a coordinate, there is no need to manually switch between worldpsaces with any other command.

All spells/scripts check to make sure that the Player is in the Morroblivion worldspace before working.  If you are in Cyrodiil, then Divine Intervention takes you to the nearest city with a chapel.  Otherwise, the spells will only work if you are in the Morroblivion worldspace.  The Mark/Recall spells/scripts use a very simple variation of the "Marker Rat" method that's found here: https://cs.elderscrolls.com/index.php?title=Teleport_Recall.

So, theoretically, there should not be much worry for incompatibilities with other mods that do similar things.  You can always post a link to your mod here and hopefully someone in the Morroblivion community can test it out for you.

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 7 hours 36 min ago
Joined: 12/15/2011 - 05:50
Karma: 1904
Assuming I understood your

Assuming I understood your question correctly, there's a global variable in Morrowind_ob.esm called PlayerInMorrowind. It is set to 1 when in Morrowind and to 0 when not.

Existing mods that allow travel between Morrowind and Cyrodiil worldspaces and also Morroblivion's teleport spells keep track of this variable and set it as necessary. If you use other means to travel, this variable may become incorrect, leading mainly to problems with dialogue. There are safeguard scripts in Morroblivion to automatically fix this problem, but you have to be in outside world for them to work.

movomo
movomo's picture
Offline
Last seen: 5 months 1 week ago
Joined: 02/24/2019 - 01:34
Karma: 3
Well! Thank you both!

Well! Thank you both!

I suppose I was trying to be descriptive too much that I made the question less clear, but this 'PlayerInMorrowind' kind is exactly what I wanted. And very simple. I was expecting a wall of scripts like enabling/disabling jail markers and such things.

I guess I have no other way than to check that global variable. Checking the source mod of a cell/worldspace form (Morrowind_ob.esm) will not work if the location was added by another Morroblivion-specific mod.

My understanding is that there is a mod that lets you travel between Cyrodiil and Morrowind by walking. Is PlayerInMorrowind still reliable even if the player chooses to walk into Morrowind? Maybe the safeguard script will sort it out after a few seconds?

I'm concerned about this because my mod has to store this information for each location, permanently until unmarked. So.. if PlayerInMorrowind was 0 by any chance at the time of marking, recalling to there will reset it to 0 every time, and the player will be forced to use the console, if the auto-corrector doesn't work in Morrowind.

*edit* This should do. The code tag in this site is extremely difficult to use. It's very picky. Only one liners seem to actually work. And I'm constantly asked to pass the captcha over and over.

; world_type is teleporting desinations type, 2=Morroblivion
; 2: Morroblivion check.
if (IsModLoaded "Morrowind_ob.esm")
    ; Global variable PlayerInMorrowind
    RunScriptLine "set mriMain.EvalVar to PlayerInMorrowind"
    if world_type == 2 && mriMain.EvalVar == 0
        RunScriptLine "set PlayerInMorrowind to 1"
    elseif world_type != 2 && mriMain.EvalVar
        RunScriptLine "set PlayerInMorrowind to 0"
    endif
endif

qwertyasdfgh
qwertyasdfgh's picture
Moderator
Offline
Last seen: 7 hours 36 min ago
Joined: 12/15/2011 - 05:50
Karma: 1904
My understanding is that

My understanding is that there is a mod that lets you travel between Cyrodiil and Morrowind by walking. Is PlayerInMorrowind still reliable even if the player chooses to walk into Morrowind?

Yes, because this existing mod simply puts a lot of teleport activators at world's borders. Everything else still works the same.

movomo
movomo's picture
Offline
Last seen: 5 months 1 week ago
Joined: 02/24/2019 - 01:34
Karma: 3
That's very nice. Thank you

That's very nice. Thank you for the clarification, sir.