Are the leveled lists buggedbroken?

Post » Thu Jan 03, 2013 6:54 am

So, I made an xEdit script to automatically generate leveled lists so that every item is no leveled anymore, but the more valuable items are rare and the less valuable are more common. Basically it works this way:

Vanilla List
Spoiler

lvl 1 item - available at lvl 1
lvl 10 item - available at lvl 10
lvl 25 item - available at lvl 25
lvl 30 item - available at lvl 30
lvl 50 item - available at lvl 50

Custom list

Spoiler

lvl 1 item - available at lvl 1
lvl 1 item - available at lvl 1
lvl 1 item - available at lvl 1
lvl 1 item - available at lvl 1
lvl 1 item - available at lvl 1
lvl 10 item - available at lvl 1
lvl 10 item - available at lvl 1
lvl 10 item - available at lvl 1
lvl 10 item - available at lvl 1
lvl 25 item - available at lvl 1
lvl 25 item - available at lvl 1
lvl 25 item - available at lvl 1
lvl 30 item - available at lvl 1
lvl 30 item - available at lvl 1
lvl 50 item - available at lvl 1

What I'm doing is multyplying the less valuable items, then I set each item level to 1. The above is just to give a rough idea, in truth some lists have now more than 100 entries. The preview count in the CK gives the correct results but the game has them all wrong, I tested the above with merchants and loot and I often find valuable items regardless of what the CK is saying. I am perhaps pushing the system to its limits? It is my understanding that there's a hard limit of 255 entries but the above doesn't seem to work with much less entries anyway. Thoughts?
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Wed Jan 02, 2013 7:12 pm

Container references can persist in save games.........I have to ask.
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Thu Jan 03, 2013 2:29 am

This is not the case, I always test them in new games.
User avatar
Camden Unglesbee
 
Posts: 3467
Joined: Wed Aug 15, 2007 8:30 am

Post » Wed Jan 02, 2013 10:51 pm

I think we may need more information.
How exactly is this script operating? Is anything generated at runtime?

Another thought is that your merged lists are being populated with objects from each levelled list, thus you are seeing a range of loot.......????
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Thu Jan 03, 2013 5:46 am

It ain't Papyrus, it's a Delphi xEdit script. I am not generating the lists on the fly in the game, I have just automated a manual task.

Spoiler

{  MultiplyLLEntriesByListContent.pas      Scans through all entries of all Leveled Lists and adds N copies of user-selected entries to the current List   You have also the option to automatically multiply the items by a rate based on the items quantity  [10 items in the list = the first item will be multiplied by 9, the second by 8 etc.]}unit userscript;function Initialize: integer;begin  Result := 0;end;var  i, j, y, LastEntryIndex, saferate: integer;  AutoMultiply: boolean;  SelectedEntryReference, SelectedEntryLevel, SelectedEntryCount, SelectedEntryIndex, SelectedEntryMultiplier: string;  Entries, Entry, NewEntry: IInterface;      SelectedEntryReferenceArray, SelectedEntryLevelArray, SelectedEntryCountArray, SelectedEntryMultRateArray: array[0..199] of string; function Process(e: IInterface): integer;begin  Result := 0;   if (Signature(e) <> 'LVLN') and (Signature(e) <> 'LVLI') then // apply to both NPC and items  Exit;   if not ElementExists(e, 'LLCT') then // skip empty lists  Exit;   AddMessage(#13#10 + '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');  AddMessage('Processing list ' + FullPath(e) + #13#10);   Entries := ElementByName(e, 'Leveled List Entries');  LastEntryIndex := ElementCount(Entries) - 1;  // fill the arrays with the List entries  for i := 0 to LastEntryIndex do begin    Entry := ElementByIndex(Entries, i);    SelectedEntryReferenceArray[i] := GetElementEditValues (entry, 'LVLO\Reference');    SelectedEntryLevelArray[i] := GetElementEditValues (entry, 'LVLO\Level');    SelectedEntryCountArray[i] := GetElementEditValues (entry, 'LVLO\Count');    AddMessage('Reading entry ' + IntToStr(i) + ': Reference ' + SelectedEntryReferenceArray[i] + ', Level ' + SelectedEntryLevelArray[i] + ', Count ' + SelectedEntryCountArray[i]);  end;  AddMessage(#13#10);   // ask for automatic or manual mode  j := MessageDlg('Processing list:' + #13#10 + #13#10 + FullPath(e) + #13#10 + #13#10 + 'Attempt to automatically multiply the items in the list [YES] or insert multiply rates manually [NO]?' + #13#10 + #13#10 + ' [Cancel = skip to the next list or stop the script if it has been applied to a single list]', mtConfirmation, [mbYes, mbNo, mbCancel], 0);  if j = mrYes then AutoMultiply := true else    if j = mrNo then AutoMultiply := false else begin	  //Result := 1;  // uncomment this to stop the script by pressing Cancel	  Exit;    end;      if AutoMultiply then begin  // Auto mode? Then fill the rate array        if LastEntryIndex > 20 then begin          saferate := 1;      end      else begin          saferate := 0;      end;    for i := 0 to LastEntryIndex do begin	   SelectedEntryMultRateArray[i] := LastEntryIndex - i - saferate;    end;  end  else begin    for i := 0 to LastEntryIndex do begin  // Manual mode? Then ask for multipliers	  SelectedEntryIndex := IntToStr(i);	  SelectedEntryMultiplier := InputBox('Enter', 'Current Reference [index ' + SelectedEntryIndex + ']:' + #13#10 + #13#10 + SelectedEntryReferenceArray[i] + #13#10 + #13#10 + 'Level: ' + SelectedEntryLevelArray[i]  + #13#10 + 'Count: ' + SelectedEntryCountArray[i] + #13#10 + #13#10 + 'How many copies of this entry do you want to create? [just press OK for no copy or type STOP to terminate the script]', '0');	  	  // empty multiplier - set to 0	  if SelectedEntryMultiplier = '' then SelectedEntryMultRateArray[i] := 0 else SelectedEntryMultRateArray[i] := SelectedEntryMultiplier;    	  if SelectedEntryMultRateArray[i] = 'STOP' then begin  // not an elegant way to stop the script, I know	    Result := 1;	    Exit;	  end	  else begin	    AddMessage('Entry ' + IntToStr(i) + ' queued for ' + SelectedEntryMultRateArray[i] + ' copies');	  end;        end;  end;    // multiply the entries  for i := 0 to LastEntryIndex do begin    for y := 1 to StrToInt(SelectedEntryMultRateArray[i]) do begin	  Entry := ElementAssign(Entries, HighInteger, nil, False); // create a new empty entry	  if not Assigned(Entry) then begin	    AddMessage('Can''t create a new entry');	    Exit;	  end;	  SetElementEditValues(Entry, 'LVLO\Reference', SelectedEntryReferenceArray[i]); // fill the new entry with the array data	  SetElementEditValues(Entry, 'LVLO\Level', SelectedEntryLevelArray[i]);	  SetElementEditValues(Entry, 'LVLO\Count', SelectedEntryCountArray[i]);    end;    AddMessage('Entry ' + IntToStr(i) + ' copied ' + SelectedEntryMultRateArray[i] + ' times');  end;   SetElementEditValues(e, 'LLCT', ElementCount(Entries)); // updates the entries quantity  // display the updated list  LastEntryIndex := ElementCount(Entries) - 1;  AddMessage(#13#10 + 'Updated list:' + #13#10);  for i := 0 to LastEntryIndex do begin    Entry := ElementByIndex(Entries, i);    AddMessage('Entry ' + IntToStr(i) + ': Reference ' + GetElementEditValues(Entry, 'LVLO\Reference') + ', Level ' + GetElementEditValues(Entry, 'LVLO\Level') + ', Count ' + GetElementEditValues(Entry, 'LVLO\Count'));  end;   AddMessage(#13#10 + 'Finished processing list ' + FullPath(e));  AddMessage('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<' + #13#10);end;function Finalize: integer;begin  Result := 0;end;end.

Once the above is done, I'm setting every item lvl to 1 using this:

Spoiler

{  SetItemsAndNPCLevelto1.pas      Does what its name says. This script is meant to be used on the entire ESP.}unit userscript;function Initialize: integer;begin  Result := 0;end;var  i: integer;  ent, entries: IInterface;function Process(e: IInterface): integer;begin  Result := 0;   if (Signature(e) <> 'LVLN') and (Signature(e) <> 'LVLI') then // apply to both NPC and items  Exit;  AddMessage('Processing: ' + FullPath(e));if not ElementExists(e, 'LLCT') then  // skip empty lists	    Exit;  entries := ElementByName(e, 'Leveled List Entries');   for i := 0 to ElementCount(entries) - 1 do begin    ent := ElementByIndex(entries, i);    SetElementEditValues(ent, 'LVLO\Level', 1); // set every NPC and item level to 1  end;  SetElementEditValues(e, 'LLCT', ElementCount(entries)); // update list sizeend;function Finalize: integer;begin  Result := 0;end;end.			   

And yes, I'm seeing a range of loot but each sublist is also populated with the same method. Hence, in the above example if "lvl 50 item - available at lvl 1" is a leveled list it means it's filled with the same method as well.

edit: stupid BB code messing the scripts up
User avatar
Valerie Marie
 
Posts: 3451
Joined: Wed Aug 15, 2007 10:29 am

Post » Wed Jan 02, 2013 10:56 pm

Yes, but it wants a result from each component list?
User avatar
Ronald
 
Posts: 3319
Joined: Sun Aug 05, 2007 12:16 am


Return to V - Skyrim