SkyProc

Skyrim Mod:SkyProc/How to List/CreateNew

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Related SkyProc Classes[edit]

  • Mod - An object representing a complete Skyrim mod.

How To[edit]

Create New Records[edit]

To make a brand new major record (not an override or duplicate of an existing record) you must have a mod for it to originate from. In addition, not all major records currently have constructors that allow you to make a new "fresh" record. If a record type you want to use doesn't have a constructor, contact Leviathan1753.

For major records that have constructors to make new records, it looks like this:

TXST aNewTXSTRecord = new TXST(patch, "AUniqueEDID");

After this has run, a new record will be created and added to the patch.

NOTE: It is VERY important that you pass the new record a unique EDID that:

  1. Is unique from all other EDIDs in your patch. If you have a loop that is creating new records, each record has to have a unique EDID, so find a way to ensure each record that gets created has a new EDID. Counters or hashs are good for this.
  2. Is unique from all other EDIDs even from other mods. You can use a prefix unique to your mod to prevent EDID dups in 99.99% of cases.
  3. Is the same each time the patch is run. If your patcher is run on the same setup twice, each record that was created the first time should have the same EDID when created the second time. This is because SkyProc uses EDIDs to give records the same FormIDs they had last time. Thus, if EDIDs aren't the same each run, there's a good chance formids won't be either.. which will most likely result in broken savegames for your users. You can achieve this goal by putting bits of the conditions that created the record inside the EDID itself. For example, if you make a new TXST record for an ARMO + ARMA combination, you can put the ARMO + ARMA's EDID in the new TXST EDID. That way, whenever those two records "come together", they will produce the same EDID.