Aller au contenu

Photo

Editing Loot Lists?


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages
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.

#2
Shadooow

Shadooow
  • Members
  • 4 470 messages
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.

#3
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages
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.

#4
Birdman076

Birdman076
  • Members
  • 186 messages
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 .


#5
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages

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?

#6
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages
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.

#7
ShadowM

ShadowM
  • Members
  • 768 messages
nw_o2_coninclude that should be a good place to start.

#8
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages

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.

#9
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

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 .


#10
Mr. Versipellis

Mr. Versipellis
  • Members
  • 206 messages

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.