Jump to content

A map showing map markers when having it in the inventory


Leonardo

Recommended Posts

Just after I released my Skyrim Map Markers mod I got an idea about a similar map marker mod, but I think this is gonna be tricky perhaps impossible to do.

 

Anyway, this picture from the CK show you what I mean and I wonder if it's possible to create a similar map and each marker on the dragon burial mound map will show a map marker on the game map.

 

Dragon Burial Mound Map   CK

The player always need to have this special map in the inventory in order to show all map markers (only the dragon burial mound) on the game map, otherwise only visited map marker on the game map will be shown on the game map.
 
 
What do you think, is it possible? :)
Link to comment
Share on other sites

You want marker available on the worldmap only available if the player have your map-object in its inventory ? If so, yes, that should be pretty doable. In many ways actually. The only condition is that disabling a MapMarker remove it from the map and prevent its "discovery" by the player, and remove it from the map, I'm pretty sure this is the case.

 

 

Cleanest way I can think of :

 

Add all of your map markers in desired locations, and check the "initially disabled" checkbox in their reference window.

Create a FormList and add all of your MapMarkers in it

Create your map-object (either as Misc or eventually as Book/Note)

Create an ability ("permanent spell") and a small initialisation quest to automatically give it to the player.

Design your ability with a single and simple scripted magic effect, add a condition to it using the GetItemCount condition (checking for your map-object and being >= 1). Don't forget to check the "Hide in UI" checkbox in the magic effect so it doesn't show up in the player's magic effect list (no one want to see this kind of utility effect in their UI).

In this magic effect's script, write something like this :

ScriptName ShowDragonSiteMapMarkerScript Extends ActiveMagicEffect
 
Property Formlist DragonSiteMapMarkers
 
Bool AllowFastTravel = False
 
Event OnEffectStart(Actor akTarget, Actor akCaster)
 
  int i = DragonSiteMapMarkers.GetSize()
  While i >= 0
    i -= 1
    (DragonSiteMapMarkers.GetAt(i) as ObjectReference).Enable()
    (DragonSiteMapMarkers.GetAt(i) as ObjectReference).AddToMap(AllowFastTravel)
  EndWhile
 
EndEvent
 
Event OnEffectFinish(Actor akTarget, Actor akCaster)
  int i = DragonSiteMapMarkers.GetSize()
  While i >= 0
    i -= 1
    (DragonSiteMapMarkers.GetAt(i) as ObjectReference).Disable()
  EndWhile
EndEvent

Bind the script's formlist property to your actual FormList where you added all of your map marker : Job is done.

(Btw, this one doesn't even require SKSE, all of the papyrus functions used are vanilla)

 

You can simply choose if the map markers are just "grey" or if the player can actually fast travel directly to them by modifying the default value of the AllowFastTravel variable in the script. Or even make it a property and let this as a configuration option through an MCM.

 

 

Now get to work and check if yes or no disabling a map marker actually remove it from the map :P (again, 99.9% sure it do).

 

 

Edit : Just re-read your description, look like you actually want to prevent them to be removed if the player actually discovered them. If so, checking PlayerKnows() in the OnEffectFinish event before disabling it "could" do the trick. Not guaranteed though. If not, you'll have to script your map-markers themselves to track those that have been discovered.

Link to comment
Share on other sites

I think the script that Vincent posted does what I wanted to do, but the only problem I have right now is to get the script compiled by Papyrus in the CK.

 

Although, your script is not a bad idea, but I think you misunderstood my idea.

 

I didn't want a spell to show the map markers, instead what I wanted to do is attach a script to the Dragon Burial Mound map that Delphine made based on the Dragonstone the player found in Bleak Falls Barrow in the MQ.

 

Anyway, thanks for the script you provided. :)

Link to comment
Share on other sites

That's just how modding work :P

You need an "entry point" from which you can run your script. Hidden magic effect tied to a conditioned ability are the easiest way. You can compile this other script because you'd need to pool in permanence from papyrus. The example above is a fake spell that automatically cast itself on the player whenever he have at least one item in its inventory ;) (and clean itself when this item is removed).

Link to comment
Share on other sites

Well now you know how much I know about modding, especially neat modding tricks. :P

 

Ah, that's clever and I might want to use that script, because I can't figure it out how to compile the script that Vincent posted on TAL.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...