Jump to content

Creation kit question, scripting, enabling parents... ?


fizzybutt

Recommended Posts

I'm dipping my toes into the harder part of the creation kit scripting and I am Thiisssss close to get what I want it to do. I've got an object, an activator and it's currently hiding and I need it to activate-show up on it's location permenantly, when an event happens in skyrim. I know it can be done because at least two other mods have it. I just don't know how to connect it to the already standing activators or event triggers so they'll show up. I thought it would be a quest script or something but I'm just really not sure.

 

Now, the exact thing I want to do has no tutorials anywhere. So what I did was:

 

  1. placed my activator/object where they're going to be eventually standing,
  2. linked them by the enable parent tab of the xmarkers and those markers are initially disabled.
  3. Tested in the game and indeed they aren't there. So I know that's working.

 

Now I don't know how I need to connect them to the identical objects/ location event.. (I have the feeling is going to be what's needed is a link ref to location event or from... ) But there's no scripting source/tutorial on how to do this specific thing I'm looking for. I'm not sure what to create the linked reference to for each item.

 

I found this snippet of script 

If (questName.GetStageDone (XX))
   ObjectReference.Enable
EndIf

but I don't know how to use it, This particular piece of script wouldn't work anyway because I don't think these particular actually have quest events.. books, doors, teleporting, mannequins, weapon plaques/racks and things like that I can do..

 

This is a little more advanced and requires me to say

help-me-obi-wan.jpg

 

Someone who's good at scripting, please help? 

Link to comment

Thanks for looking into this. 

 

It's the discovery of locations. The trigger events are already there in vanilla skyrim.

 

It'll work like this:

 

Player visits my mod on a completely new character. They haven't visited any of the stones physically standing in the cell yet. They head off to riverwood to get one of the three guardian stones and trigger the discovery. Those three stones will now be available in the worldspace I've created. Then the player finds the lovers stone or the serpent stone, that one is then enabled in my worldspace; and so on and so on...

 

I've already got the stones ready and waiting, disabled by default with x markers enabled as parents (If this isn't right I can easily change it to the correct way, I just thought that was the easiest to do so it doesn't change the power stones themselves). I know I somehow need to link them to the discovery event that triggers, (map location discovery?). I don't want to change the way the stones work, I just want to make it so it's more accessible to the player as a reward for their discovery. And if they've already got them all discovered, they should be there without visiting them again. I don't know if that's possible that might be too many checks or whichever. ...

 

I know what I want it to do but I just don't know how to fit it all together to make it work. 

Link to comment

So if i understood you right, you want to enable something as soon as the map marker is discovered?
if yes, IsMapMarkerVisible should do the trick.

But that triggers as well if the map marker is only visible but not available as fast travel target, so CanFastTravelToMarker has to be used in conjunction or used instead, as some locations can be aquired from books, dialogues and the likes.

Link to comment

Seems like the CanFastTravelToMarker would make the most sense out of those.  How would I and where would I add that? My gut says to add it to the x marker the stones in my mod are attached to, but is that all that goes into the new script or is there something else?

 

 

What it looks like in creation kit: I have them attached to x markers (via enable parent) and that x marker is initially disabled beneath the land so they aren't showing up in the game.

post-433593-0-45066300-1422120035_thumb.png

 

 

How the area looks in the game world, the stones are disabled like I want them to be, waiting for the stones to be discovered in Tamriel

post-433593-0-94647300-1422120043_thumb.png

 

 

 

You will also need something to start the check if the marker is visible, either an Event or have an object check when it is used (portal/door to your world).

 

I thought I might have to do something like this, but... ah hell, I've been googling like crazy for two days. I'm not asking the right questions I think.

 

I've been working through the objectreference script tutorials but I don't understand how to make all that mumbo jumbo fit together to do what I want.  :lol:

Link to comment

My approach would be a quest (not a useable player quest ofc) with conditions.

Check vanilla or mod quests, that trigger stages as soon as you reached a destination on how to do that.

Veladarius Captured Dreams mod may have something like this (can't really remember, sorry). Or SD+ or Defeat (still can't remember, sorry).

Some vanilla quests send you to a specific location as well and trigger new stages that go like "i discovered XYZ and should now ...".

 

Edit: i don't know if CanFastTravelToMarker can be used in conditions or only via script, so you may/will have to experiment.

Link to comment

Would quest stages actually be feasible for just triggering the appearance of identical objects for use though? That seems like overkill but I'm so new to all this I have no idea. I just want them to become visible on discovery of the real stones.

Link to comment

You can add a script to the portal that takes the player to your world space that when activated will check if the stones have been found and enable them in yours.

 

The script would be something like this:

 

Scriptname <name> extends objectreference

 

event onactivate(objectreference <portal>)

  if <stone1>.CanFastTravelToMarker() == true

    <mystone1>.enable()

  endif

  <repeat the above if statement set for each stone>

endevent

 

objectreference property <portal> auto

objectreference property <stone1> auto      ; map markers for stones, need property for each one

objectreference property <mystone1> auto    ; the x marker you linked that stone to, need property for each one

 

 

If the player has to talk to someone or use something else to move them there the if statements can be added to those as well.

Link to comment

Would quest stages actually be feasible for just triggering the appearance of identical objects for use though? That seems like overkill but I'm so new to all this I have no idea. I just want them to become visible on discovery of the real stones.

 

You can use quest stages but since you don't know the order they will be found in it would not be ideal, also you would still need something to trigger the start of the stage.

Link to comment

It's working :3 I actually got it working. CPU had been helping me all day. Patiently I'm sure because of all my stupid questions and unclear wants. But it's now working. 

 

Confirmed it by going to the world space before I had discovered the first three guardian stones (easiest to test since it's right there and there's three), ensuring they weren't there, then running off to discover the guardian stones, went back to the world space and there they are! :3 All day I've been attempting to do this and it's ridiculously simple. It's just object references and enabling them, I just didn't know how to put them together to get the effect I wanted. I guess I was trying to make it more complicated than it was. Now just to do the other 10!  :lol:  :lol:

 

Thanks so much for every ones help and input. I'm so grateful for the invaluable knowledge I'm gaining from everybody.

 

Proof of concept:

 

 

16358374755_4b500daa95_o.png

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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