Jump to content

Scripting questions that seem hard to find an answer to.


Recommended Posts

A thought did cross my mind really how to get around this problem as I do use the invisible collision as an activator in my house mod when you portal with my Mark and Recalls. The portal you see is only cosmetic and doesn't work at all, so I put a collision at the same spot and... Well... :wink: That collision is not as fancy as the portals are :tongue:

 

So if you get something else in the Crosshair, it changes right? So then you could try to put that collision in front of the player, not the static version, but the same mesh as an activator, with the name field empty for a frame and it will go so fast, that the player will not notice it. I could give you my script for how to place stuff in front of the player as it uses both cos and sin -> trigonomic calculation.

 

I guess, we can just put the whole bloody box over the player... ;) LET ME OUT OF HERE!!!!!

Edited by Pellape
Link to comment
Share on other sites

Hi all

 

I am very new to modding but generally loving having a go... Think maybe might have even managed to learn something.... SCARY!... but hey,

 

I have two scripts left for a mod that I have been trying to create for a while now that I cannot make work. I have been determined that I would work them out on my own but my head is sore and I cannot make them work.

 

1st is using an activator to send the player to a persistent ref.... why this one refuses to work is beyond me and I have tried multiple scripts to do this and am failing???

 

I am using a copied MS08RowBoat Activator renamed, old script removed, placed in game with a persistent ref and when activated I want the player to be teleported to a MapMarker in an interior cell with another persistent ref... so in reality I am wanting to use the activator as a door.

 

I've tried enabling the activator I've tried, Player.MoveTo's Ive tried reversing it so that MapMarker.PlaceAtMe... I've tried getting the activator to cast a teleport spell that I have created but nothing???

 

Just a thought but so far I've only tried object scripts with Begin OnActivate... is that the issue?

 

The 2nd is an issue with a random number part to a script and I cannot see an easy answer to and am still trying to think of other ways around it.

 

any advice welcomed! I will try them all, even if the first answer works... as I've noted already that Oblivion seems to like having more than one answer... so long as that answer is upside down and back to front... or is that just me?

 

Link to comment
Share on other sites

Hi all,

 

I've sorted yesterdays glitch. with the activator... I'm not 100% on the why's but yesterday I had 3 separate mods... one for the spells and armor and things... one for my inside cell and one for my exterior cell with the theory being that if I mucked something up it would be easier to fix...

 

Anyways I tested a thought this morning and went and found a ref code to a npc in game and asked the activator to send me their... it worked perfectly... ??? So why not my ship??? So I got brave and merged my 3 mods into one... asked the activator to send me to my ship and boom it worked!!!? YAY! but why? for now I don't care to much... but if ever any of you get stuck with a similar issue this might be why?

Link to comment
Share on other sites

Mod de-isolation ... basically it boils down to an ESP can't be the master for another ESP in the vanilla Construction Set. When you merge the three mods the assets are no longer separated into three separate ESPs and so de-isolation doesn't come into play.

 

So an option to your merge is to use Wrye Bash to "ESMifiy" your ESP, create your scripts with that ESMified version as a master for your mod with the script, then once all is working you ESPify the one you ESMified and all continues to work.

 

Some caveats concerning this method ...

 

The latest versions of Wrye Bash have removed the ability to ESMify/ESPify ... the last version of WB that I know still has it is version 305. The other thing is more something you always need to keep in mind about your ESP that is using your other now re-ESPified ESP as a master ... you will always need to re-ESMify the master any time you want to edit that ESP that has the script or else you will lose the "connection" (or at least you could, depending on the changes you're now making).

 

The other option, that doesn't involve using depreciated versions of WB is to use Construction Set Extender, which allows the use of ESPs as masters without any fancy stand on one foot, spin around three times and shout "Please" to the four cardinal points shenanigans.

 

CSE will take some setting up though ... Pekka will be your guy for advice there as in keeping with my dinosaur ways I stand on one foot and ... well you get the picture.

Link to comment
Share on other sites

I do have 4 mark and recall spells provided in my current project, with 36 spots to mark all together but it is always fun to make your own, no doubt. So lets see what works and what does not work.

 

I did read the posts in the original Mark and Recall mod. well there are many so I cannot find it right now, but I did look briefly now.

 

The author wrote that some Xmarkers and XHeaderMarkers do disappear and I had some disappearing in Shivering Isle, well that author solved it by making rats to port to, so now when you use my portals, you mark and a rat will appear, move you 10 cm as you do stand on its spot, and then it gets disabled and stay disabled with an AI to stay where it is placed and so far it worked perfect. I would have never solved this myself. :D 36 rats are stored in my dummy cell, well was at least until I released them with the mark spells

 

Your idea with porting to NPC's are brilliant by the way :D

 

Moving with magic is a bit tricky, the way magic and magic scripts works as those scripts have 3 different parts.

  • A start
  • A middle that loops
  • An end

A scripted spell must have at least 1s duration, or it will not work. The middle will loop 5 times at least during that duration or 6 as it seems they are timed to be ran each 0.2s, that should make it 6 times.

 

Adding a save game in a spell is a nice way to make the game crash and if it does not, that save will be useless while porting and I added that option in my mark and recalls as you decide if you wanna save your game automatic as a player, so I summon portals with my spells. Portals, rats and invisible collision meshes as activators, as the portals them self will sometimes allow you to activate them and sometimes not, even if I made them disable and enable so their collisions got updated. I do use the portal resource for this and I also centered the portals now as they where not and that disturbed me for sure. I have not released the centered portals yet though...

 

I hope this no sense will sum up what or how to do and not to do when it comes to your portals and spells?? :wink:

 

By the way, my portals gets activated in the end of the spell, so it takes a second before they shows up. 2 portals takes 2 seconds as they are extremely complex as they are Bethesdas original portals that contains a lot of textures that are remade by that author of that portal resource. So the most safe way to port with a spell, is to port in the end, in the: Begin ScriptEffectFinish section if you will port direct with the spell that is.

 

Activating a portal, makes clean nice saves with con_save, the OBSE command if the player turned that option on that is.

Edited by Pellape
Link to comment
Share on other sites

Yes, the key problem here I think was that the target locations/markers were in one plugin while the scripts porting to them were in another. You cannot use EditorIDs from one plugin inside another, unless they are parents/masters of it. Every plugin will know all Vanilla game IDs (from Oblivion.esm) as all are by design parented to it (unless created differently) but none other.

 

Though I'm really getting massively confused lately with so many people reporting their mods didn't work, because they were using obviously erroneous syntax in their scripts, but their compilers never threw an error on saving them. How can that be? My CS would've complained multiple times in succession, had I tried to type an (unknown) EditorID into one of my scripts that's not from inside the same plugin. Why doesn't it for so many people lately? What weird versions of the CS did they get a hold of I wonder?

 

No idea what you could be meaning with this part though:

 

 

The 2nd is an issue with a random number part to a script and I cannot see an easy answer to and am still trying to think of other ways around it. any advice welcomed!

Could you perhaps elaborate some?

Link to comment
Share on other sites

But I did succeed in adding portals in the house added by MOO when I used the XheadingMarkers... It was Shivering Isle that caused my problems. I even used the old markers in Avalon and other odd places added by mods, all worked - Not Shivering Isles and I did get ported to odd locations instead as my Xmarkers got moved to Tamriel, at coordinates I guess they where added at inside SI.

 

Cool idea by the way, add a portal that will take the player to random coordinates... :wink: If you are unlucky you end up in Skyrim or Las Vegas

Edited by Pellape
Link to comment
Share on other sites

  • Recently Browsing   0 members

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