Jump to content
  • 0
Sign in to follow this  
RoyBatty

Advice on making scripts needed.

Question

After talking with Zilav a bit, I've decided to try and start making some of my own scripts for things I need. As much as pascal/delphi's syntax makes my brain hurt I'm going to give it an honest go anyways as I haven't got much choice.

 

I have this bookmarked but he told me it's out of date https://www.creationkit.com/TES5Edit_Scripting_Functions

 

Is there a newer function reference somewhere?

 

The main thing I want to do is batch change formid's like the built in right click menu functions does, but have it propogate to all of the refs in the plugins which are loaded that have the same id's. That way when I'm merging things I can update ALL the patches or modules at the same time.

 

More than one of us is working on A World of Pain, when we add new things and need to update several patches and merge them too it becomes a giant nightmare to manage. :D

 

A side bonus is that authors wishing to merge their modulars into one plugin and update all the compatibility patches they have could use it too. That would go for people in this project too wanting to merge plugins, I think it would be QUITE useful to have such a script. I just need some help on it as I know it's not going to be easy since I've never made any xEdit script that worked.

 

Thanks for any help on this subject.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

After talking with Zilav a bit, I've decided to try and start making some of my own scripts for things I need. As much as pascal/delphi's syntax makes my brain hurt I'm going to give it an honest go anyways as I haven't got much choice.

The syntax isn't that different from standard languages. Just := assignment operator, "then" clause on if statements, and begin..end instead of curly braces.

 

 

 

I have this bookmarked but he told me it's out of date https://www.creationkit.com/TES5Edit_Scripting_Functions

 

Is there a newer function reference somewhere?

It's not that out of date, it's just missing some of the functions that have been added in 3.0.33, like RemoveFilter(). You can still use it. The only other place you can really get xEdit function references is in xEdit's source code. Registered system functions can be found here. But reading functions from source code can be a bit difficult, especially if you're first starting out. Stick to the CK wiki page for now.

 

 

 

The main thing I want to do is batch change formid's like the built in right click menu functions does, but have it propogate to all of the refs in the plugins which are loaded that have the same id's. That way when I'm merging things I can update ALL the patches or modules at the same time.

Renumbering of FormIDs in Merge Plugins already does propagate to all the refs in the plugins which are loaded. You can see the source code of zilav's renumbering script to get an idea of how this is done. (I put it on pastebin because syntax highlighting is nice, the source from google is here).

 

The way things are done is via the following code:

while ReferencedByCount(m) > 0 do
  CompareExchangeFormID(ReferencedByIndex(m, 0), OldFormID, NewFormID);

This loops through all the references to the record m, and uses CompareExchangeFormID to switch those references from OldFormID to NewFormID. More or less the same code can be found in Merge Plugins.

 

 

 

More than one of us is working on A World of Pain, when we add new things and need to update several patches and merge them too it becomes a giant nightmare to manage. :D

 

A side bonus is that authors wishing to merge their modulars into one plugin and update all the compatibility patches they have could use it too. That would go for people in this project too wanting to merge plugins, I think it would be QUITE useful to have such a script. I just need some help on it as I know it's not going to be easy since I've never made any xEdit script that worked.

 

Thanks for any help on this subject.

If you want you link me to some plugins to test with and I can make certain the current Merge Plugins script (v1.8 was just released yesterday) does what you want. ^_^

 

 

-Mator

Edited by Mator

Share this post


Link to post
Share on other sites
  • 0

Thanks for all your help and advice Mator. I will study the source of the script from zilav and try to get my head around pascal. It seems sort of like the ancient microsoft basic in some regards, but is much more modern in other respects. I always had issues with abstracts and languages that use them, but I can work through it given time.

 

Hopefully you won't mind if I bother a bit here on the forum for help if I need it. I won't learn anything if you to do it for me ;) However I'll see if I can come up with a set of plugins and patches that don't require TOO many other ones, so that can be added to merge plugins script. It might be better if I give you something that is purely related to what I am doing, it will keep the amount of plugins down to just a couple. I can contact you via private message if that's allright with you.

 

I prefer to merge things myself by hand (no offense) as it often leads me to bugs in the plugins and more understanding of the records and data structure.

Share this post


Link to post
Share on other sites
  • 0

Merging by hand was a reasonable thing to do a year, or maybe even 6 months ago.  But given the current state of the Merge Plugins script, I'd say it's no longer the sort of thing any sane individual should do.  I say this because the number of operations that the Merge Plugins script currently handles far exceeds the number of operations a human can perform in a reasonable time span.

Don't believe me?  Try merging a couple fully voiced follower mods by hand.  I promise you that you will not be able to get all their voices working without sinking 6+ hours into it.

When you need help let me know.  But don't ask me for help with anything relating to merging without my script.  That's just absurd.

Share this post


Link to post
Share on other sites
  • 0

Wow did I offend you or something?

 

I am merging things your script couldn't possibly do. Unless of course it has smart heuristics for merging scripts and xEdit gets a script compiler or you make one yourself. Automated scripts don't handle collisions very well either. I just asked for advice on how to make stuff for my own needs, not to have you go all ego butt hurt on me.

 

I've merged very complicated mods like EVE for FO3 and EVE for FNV together flawlessly. That's a lot more difficult than merging two completely unrelated mods together.

 

:P

Edited by RoyBatty

Share this post


Link to post
Share on other sites
  • 0

Ok, you clearly know more about merging plugins than I do.  So why did you need my help exactly?

Share this post


Link to post
Share on other sites
  • 0

I think a script has the potential to flag exceptions that can then be addressed by hand ... to add missing handlers to the script for improving the script ;)

 

I would never do anything by hand unless I would never-ever have to repeat the task and unless it would not require significantly more time than writing up a scripted routine to handle it.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.