Author Topic: Editing Loot Lists?  (Read 617 times)

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« on: July 02, 2012, 11:22:25 pm »


               Hey again. I have no clue if this is solvable but I rather like the default loot generation scripts and I think that they're fairly well balanced - the only problem is, they sometimes spawn FR-specific items, like books. Is there a way to edit the list of items that these scripts refer to? They're not actually contained within the scripts themselves.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Editing Loot Lists?
« Reply #1 on: July 03, 2012, 12:24:59 am »


               You can always modify the item. Find out the item resref, extract it from NWN datas, modify it the way you like and put into: module (by putting it into modules/temp0 and saving module), override, or any hak on server side.
               
               

               
            

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« Reply #2 on: July 03, 2012, 12:45:32 am »


               I suppose that would work, but that would mean working out the resref of every last object in every treasure list, and I'm sure there must be a workaround. 90% of the stuff works fine - gems, arrows, gold, etcetera - it's just stuff like books that's throwing off the immersion.
               
               

               
            

Legacy_Birdman076

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +0/-0
Editing Loot Lists?
« Reply #3 on: July 03, 2012, 01:11:12 am »


               http://nwvault.ign.c...bs.Detail&id=96

May want to take a look at that entry on the vault, it replaces all the bioware books with blanks or you can fill them with your own info
               
               

               


                     Modifié par Birdman076, 03 juillet 2012 - 12:11 .
                     
                  


            

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« Reply #4 on: July 03, 2012, 01:24:37 am »


               

Birdman076 wrote...

http://nwvault.ign.c...bs.Detail&id=96

May want to take a look at that entry on the vault, it replaces all the bioware books with blanks or you can fill them with your own info

Books are kind of a commodity in my world, which is a semi-realistic medieval one full of starving, illiterate peasants. Is there a way to remove them from the lists, along with certain pieces of equipment?
               
               

               
            

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« Reply #5 on: July 04, 2012, 04:26:12 pm »


               Just to clarify, what I want to edit is the contents of TREASURE_TYPE_LOW, TREASURE_TYPE_MEDIUM and so on - I just don't know how to edit those lists.
               
               

               
            

Legacy_ShadowM

  • Hero Member
  • *****
  • Posts: 1373
  • Karma: +0/-0
Editing Loot Lists?
« Reply #6 on: July 04, 2012, 04:40:50 pm »


               nw_o2_coninclude that should be a good place to start.
               
               

               
            

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« Reply #7 on: July 04, 2012, 04:45:11 pm »


               

ShadowM wrote...

nw_o2_coninclude that should be a good place to start.

I think I can kind of see what needs doing. Aren't modules set up to use the SoU system by default, though? There's that x0_i0_treasure library attached to the scripts, and I really don't know how to work with this system.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Editing Loot Lists?
« Reply #8 on: July 04, 2012, 05:53:18 pm »


               

Mr. Versipellis wrote...

ShadowM wrote...

nw_o2_coninclude that should be a good place to start.

I think I can kind of see what needs doing. Aren't modules set up to use the SoU system by default, though? There's that x0_i0_treasure library attached to the scripts, and I really don't know how to work with this system.



If you follow the functions that are being used to create the items.   You will find that all of the books are being created by one function   in  nw_o2_coninclude, That  ShadowM pointed you to.   The function is:  


 void CreateBook(object oTarget)
    {
        int nBook1 = Random(31) + 1;
        string sRes = "NW_IT_BOOK01";
        if (nBook1 < 10)
        {
            sRes = "NW_IT_BOOK00" + IntToString(nBook1);
        }
        else
        {
            sRes = "NW_IT_BOOK0" + IntToString(nBook1);
        }
        //dbSpeak("Create book");
        dbCreateItemOnObject(sRes, oTarget);
    }

EDIT:  If you want a list of the books with there ResRef's, You can find them in the Lexicon 
 Home > Resources > Items > Book
               
               

               


                     Modifié par Lightfoot8, 04 juillet 2012 - 05:11 .
                     
                  


            

Legacy_Mr. Versipellis

  • Full Member
  • ***
  • Posts: 236
  • Karma: +0/-0
Editing Loot Lists?
« Reply #9 on: July 05, 2012, 08:39:25 pm »


               

Lightfoot8 wrote...

Mr. Versipellis wrote...

ShadowM wrote...

nw_o2_coninclude that should be a good place to start.

I think I can kind of see what needs doing. Aren't modules set up to use the SoU system by default, though? There's that x0_i0_treasure library attached to the scripts, and I really don't know how to work with this system.



If you follow the functions that are being used to create the items.   You will find that all of the books are being created by one function   in  nw_o2_coninclude, That  ShadowM pointed you to.   The function is:  


 void CreateBook(object oTarget)
    {
        int nBook1 = Random(31) + 1;
        string sRes = "NW_IT_BOOK01";
        if (nBook1 < 10)
        {
            sRes = "NW_IT_BOOK00" + IntToString(nBook1);
        }
        else
        {
            sRes = "NW_IT_BOOK0" + IntToString(nBook1);
        }
        //dbSpeak("Create book");
        dbCreateItemOnObject(sRes, oTarget);
    }

EDIT:  If you want a list of the books with there ResRef's, You can find them in the Lexicon 
 Home > Resources > Items > Book

Ah, thanks, that works pretty well. I think I might just make a new module base container, though.