Jump to content

Question about "AddItemToLeveledList"


Sepherose

Recommended Posts

Alright, so I have been working on this. And I have hit a spot that could potentially make it useless to a lot of people, and I mean a LOT.

It was suggested that I use the aforementioned script type to add items to their leveled lists but I have a couple of problems/concerns:

1: I am a fail GECK scripter.

2: I have some concerns due to what the GECK wiki states about this command:

 

AddItemToLeveledList adds a form to a Leveled Item list. This should be used in the RARE case where we want to add an item to a Leveled Item list that already exists in the ESM. It's primary use it for modifying lists from the base game in downloadable content. In most cases you should add items to form lists in the editor object windows. This is for those special cases where you want to alter the contents of a list at runtime or want to change it without putting it in your ESP/ESM file. Once altered using this function, it will persist in the save game data.

 

It can not be undone.

Optimally, I would like someone who can script to help me with this. But I would also settle for friendly advice.

Link to comment
Share on other sites

...It was suggested that I use the aforementioned script type to add items to their leveled lists... Optimally, I would like someone who can script to help me with this. But I would also settle for friendly advice.

 

I'm not really that good at scripting, and admittedly I don't know much about the project you're working on, but why are you using a script to add the items to a leveled list in-game instead of adding them to the appropriate lists out-of-game with the GECK, TESsnip, whatever your editor of choice?

Link to comment
Share on other sites

That is what I am CURRENTLY doing lol. It was suggested that I use a script INSTEAD so that it maintains compatibility with other mods.
Link to comment
Share on other sites

You could do it in a simple quest script where the items get added once, then the quest shuts off, like this:

 

 

scn MYLevelListModQuestScript

short iDoOnce

;Script attached to MYLevelListMod Quest - 'Start game enabled' flag set to 'On'

BEGIN GameMode


if (iDoOnce == 0)
 AddItemToLeveledList  LeveledItem1 ObjectToAdd1 iLevel iCount fHealthPercent100
 AddItemToLeveledList  LeveledItem2 ObjectToAdd2 iLevel iCount fHealthPercent100
 
 ... etc
 
 set iDoOnce to 1
 StopQuest MYLevelListMod
endif

END


Link to comment
Share on other sites

The template rickerhk just posted would be the simplest way to do it.

 

One thing worth mentioning - you can tell this to the guy in your file comment thread - if you make a merged patch that would also take care of any problems caused by other mods with overlapping lists. That's essentially the whole point of making merged patches. Of course, doing the list additions via script takes that burden off the user which is nice. If more mods did it this way there would be some less need for user-made patches.

Link to comment
Share on other sites

That is what I am CURRENTLY doing lol. It was suggested that I use a script INSTEAD so that it maintains compatibility with other mods.

 

You can add items to existing leveled lists in the GECK without having to resort to scripts. There could be some reason that I don't know about for why that wouldn't work for you, but that is how I do it. When you create a merged patch in FO3Edit, one of the things it does is compile all the modified leveled lists, form lists, and such, from all the mods you have active and loaded in FO3Edit, and creates new objects that incorporate all the changes those mods made (to a point.) As far as I'm aware, this is the primary way of getting new items spawning in existing containers, on existing NPCs, and so forth.

 

A warning though: in order for form lists to be compiled correctly, your additions need to go at the bottom of the list. When you drag new objects into a form list in the GECK, it inserts them at the top. I don't think order matters for leveled lists though. Something to keep in mind when you're making repair lists for your project.

Link to comment
Share on other sites

That is what I am CURRENTLY doing lol. It was suggested that I use a script INSTEAD so that it maintains compatibility with other mods.

 

You can add items to existing leveled lists in the GECK without having to resort to scripts. There could be some reason that I don't know about for why that wouldn't work for you, but that is how I do it. When you create a merged patch in FO3Edit, one of the things it does is compile all the modified leveled lists, form lists, and such, from all the mods you have active and loaded in FO3Edit, and creates new objects that incorporate all the changes those mods made (to a point.) As far as I'm aware, this is the primary way of getting new items spawning in existing containers, on existing NPCs, and so forth.

 

A warning though: in order for form lists to be compiled correctly, your additions need to go at the bottom of the list. When you drag new objects into a form list in the GECK, it inserts them at the top. I don't think order matters for leveled lists though. Something to keep in mind when you're making repair lists for your project.

Er, I don't think you understand, I am already altering the leveled lists, and it is working great, what I am worried about is optimizing compatibility, and a script, from what I understand would do this while not requiring the end user to muck about with merged patches.

Link to comment
Share on other sites

rickerhk and Hugepinball have hit the nail on the head. By creating a quest script that runs once and adds your items to the existing leveled lists, you have maximized mod compatibility and minimized possible user errors all in one step. IMHO this IS the way it should be done every time.
Link to comment
Share on other sites

rickerhk and Hugepinball have hit the nail on the head. By creating a quest script that runs once and adds your items to the existing leveled lists, you have maximized mod compatibility and minimized possible user errors all in one step. IMHO this IS the way it should be done every time.

Yeah but I'm no fallout 3 mod vet. XD

HP and I have been talking in PMs anyway, seems like an entire rework of the mod is going to have to be done if the script thing is going to work. I'm thinking I may make some compatibility patches the hard way (manually). It would only be fair to the people DLing this mod....

 

You could do it in a simple quest script where the items get added once, then the quest shuts off, like this:

 

 

scn MYLevelListModQuestScript

short iDoOnce

;Script attached to MYLevelListMod Quest - 'Start game enabled' flag set to 'On'

BEGIN GameMode


if (iDoOnce == 0)
 AddItemToLeveledList  LeveledItem1 ObjectToAdd1 iLevel iCount fHealthPercent100
 AddItemToLeveledList  LeveledItem2 ObjectToAdd2 iLevel iCount fHealthPercent100
 
 ... etc
 
 set iDoOnce to 1
 StopQuest MYLevelListMod
endif

END


 

Thank you :) Although, the above explains (I think) why this may not work.... But I may in fact rework the entire thing and implement this... which means pretty much starting the ESP from scratch, but, all for the better, I believe....

Link to comment
Share on other sites

  • Recently Browsing   0 members

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