Author Topic: x0_i0_treasure???  (Read 1150 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
x0_i0_treasure???
« on: August 04, 2010, 08:07:01 pm »


               Im going to install Scarfaces xp/gp.

question 1. How do I change the x0_i0_treasure so I get rid of the annoying 1-3 gp in the loot . The changes to 
                     this  script keep going back to normal.

question 2. The monsters/NPC's only pull from default module _LOW treasure container unless I put      a container in tagged  XO_TREASUE_MONSTER ?

Basically where do  I *cuss word of yuor choice here*  put the loot I want monsters to pull from a...change the x0_i0_treasure script ....and get rid of the annoying 1-gp.     '<img'>
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
x0_i0_treasure???
« Reply #1 on: August 04, 2010, 09:37:21 pm »


               

Knight_Shield wrote...

Im going to install Scarfaces xp/gp.

question 1. How do I change the x0_i0_treasure so I get rid of the annoying 1-3 gp in the loot . The changes to 
                     this  script keep going back to normal.



X0_I0_TREASURE Is not a script.  It is an include file.  any changes to an Inclued does not make any changes to your scripts, untill you recompile them.   So for your changes to the include to take effect you would have to find all the scripts that used the  X0_I0_TREASURE Include and recompile them.  This is something that is not always easy to do.  Most Of the oldtimers would suggest that you not make any changes to standard bioware include files.  There are just to many many thing that use them in there original form. 

As far as turning off the loot drops for your monsters.  the best bet is to use the standard system. 

Add this to your on module load: 

SetModuleSwitch( MODULE_SWITCH_NO_RANDOM_MONSTER_LOOT,TRUE);

question 2. The monsters/NPC's only pull from default module _LOW treasure container unless I put      a container in tagged  XO_TREASUE_MONSTER ?

Basically where do  I *cuss word of yuor choice here*  put the loot I want monsters to pull from a...change the x0_i0_treasure script ....and get rid of the annoying 1-gp.     '<img'>


Most People make a area that PC's can not get to and place all of there tresure chests there.  Of course if you turn off the random loot drops. You will have to script in when this tresure is given. Ahh,  To answer the questiom, Place the chest anywhere in the module.   


EDIT:  In order to set the switch above you will need to make sure that your onload script has x2_inc_switches included.
               
               

               


                     Modifié par Lightfoot8, 04 août 2010 - 08:45 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
x0_i0_treasure???
« Reply #2 on: August 04, 2010, 09:55:55 pm »


               hmm...let me ask you this . The monsters and npc's will pull from the module low /medium/ high/ unique ? The way I read the include is that they only pull from the low chest.You have to add the XO_TREASURE_MONSTER for them to pull from .
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
x0_i0_treasure???
« Reply #3 on: August 04, 2010, 10:07:13 pm »


               It seems to me if I could change these numbers I could get loot to drop more and not have that annoying 1-3gp instead of loot .



// * this is the percent chance that no treasure will be spawned by a creature dying

const int BK_CHANCE_OF_N0_MONSTERTREASURE = 80;

// Probability of a single item being generated,

// in percentage

int TREASURE_PROBABILITY_1 = 70;



// Probability of two items being generated,

// in percentage

int TREASURE_PROBABILITY_2 = 20;



// Probability of an item being converted to gold

int TREASURE_GOLD_PROBABILITY = 35;



// Multiplier to use on the value of an item to convert it to gold

float X0_GOLD_MODIFIER = 0.50;

               
               

               
            

Legacy_Melkior_King

  • Full Member
  • ***
  • Posts: 234
  • Karma: +0/-0
x0_i0_treasure???
« Reply #4 on: August 05, 2010, 12:10:30 pm »


               If you change one of the include files, use the Build option in the toolset and select the advanced options to just compile all scripts.  This will recompile all the scripts and incorporate all the changes in the modified include files.



Get into the habit of doing this after making any script changes.
               
               

               
            

Legacy_SuperFly_2000

  • Hero Member
  • *****
  • Posts: 1292
  • Karma: +0/-0
x0_i0_treasure???
« Reply #5 on: August 05, 2010, 01:03:21 pm »


               Good thread you got going here. Lightfoot....I think the system with using the 3-4 containers in the module is usually called the SoU system. The standard system would just be using, well, the standard chests and such.



Well...I think there is way you can edit the master loot drop table somewhere...I'm not sure where though...and then also as you found out...edit some of the include scripts to get what you want.



The SoU system is probably easier and better than the "standard" system though...so don't let my ramblings confuse you...just wanted to point out that it IS possible to use the standard standard system as well...



The thing with the SoU system is that you graphically place the objects in a chest...which kind of feels convenient I have to say.



The specialized scripts that pick specialized onjects wont work though...or will be messed up...if they aren't always (I mean like the scripts that are only supposed to pull armors, weapons, ranged weapons...and so on)
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
x0_i0_treasure???
« Reply #6 on: August 05, 2010, 02:00:35 pm »


               

Melkior_King wrote...

If you change one of the include files, use the Build option in the toolset and select the advanced options to just compile all scripts.  This will recompile all the scripts and incorporate all the changes in the modified include files.

Get into the habit of doing this after making any script changes.

Won't work until you got all scripts that doing treasures re-saved in your module. I don't know which those are.
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
x0_i0_treasure???
« Reply #7 on: August 05, 2010, 03:16:00 pm »


               Ok I copied th x0_i0_treasure file..made my changes and saved a new script called x0_i0_treasure2.

I included this in the nw_c2-default9 in place of the origial x0_i0_treasure. The changes as far as the frequency of drops I adjusted work good.



I still would like someone to clarify if monsters/npc'c pull from all 4 treasure chest (low,medium,high.unique). The way I read the x0_i0_treasure is that they only pull from the (low) and chests,crate,bookshelf,etc pull from the all 4 treasure chests.



Because there is a part in there that says you have to make a chest tagged XO_TREASURE_MONSTER.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
x0_i0_treasure???
« Reply #8 on: August 05, 2010, 08:16:29 pm »


               

ShaDoOoW wrote...

Melkior_King wrote...

If you change one of the include files, use the Build option in the toolset and select the advanced options to just compile all scripts.  This will recompile all the scripts and incorporate all the changes in the modified include files.

Get into the habit of doing this after making any script changes.

Won't work until you got all scripts that doing treasures re-saved in your module. I don't know which those are.


~scratches head~  Ok now I'm confused. I have always used the Build option to recompile all scripts after changing any includes(unless i know exactly which scripts to re-save). I haven't had any problems yet and it seems to work just fine.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
x0_i0_treasure???
« Reply #9 on: August 05, 2010, 08:28:50 pm »


               If you using any custom script "system" it works, however the x0 treasure system is exception because it is used in default scripts. Build module compiles onl scripts in module, and these are not until you open them and re-save - and for that you must know their name.
               
               

               


                     Modifié par ShaDoOoW, 05 août 2010 - 07:29 .
                     
                  


            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
x0_i0_treasure???
« Reply #10 on: August 06, 2010, 04:43:54 pm »


               

Knight_Shield wrote...

Ok I copied th x0_i0_treasure file..made my changes and saved a new script called x0_i0_treasure2.
I included this in the nw_c2-default9 in place of the origial x0_i0_treasure. The changes as far as the frequency of drops I adjusted work good.

I still would like someone to clarify if monsters/npc'c pull from all 4 treasure chest (low,medium,high.unique). The way I read the x0_i0_treasure is that they only pull from the (low) and chests,crate,bookshelf,etc pull from the all 4 treasure chests.

Because there is a part in there that says you have to make a chest tagged XO_TREASURE_MONSTER.


BTW ... I've adapted this system endlessly for my own PW and I love it. I've tweaked it to use the "monster tags" on  containers to create foraging placeables as well. It looks like you've a good start so far. Here's what you need to do next:

1) Make sure your creatures are properly tagged. If you want specific drops for orcs and goblins for instance, then make sure your goblins are tagged "goblin" and orcs tagged "orc". (without the quotes of course)

2) Next create a chest or container (I usually just select the low modulewide ones from the pallette) and set it's tag to match the creature tag you want specific loot for. So if you tagged your goblins as "goblin", then your goblin loot chest needs to be tagged as "XO_TREASURE_MONSTER_goblin" and your orcs would be "XO_TREASURE_MONSTER_orc".

Then just make sure your call to create loot uses the following: CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF);

I'll also suggest you do this in the OnDeath event and not the OnSpawn event like most do. This often helps combat AIs run smoother as there are fewer items in the creature's inventory to check and see if they should be used.

Lastly, if no properly tagged chest exists for a creature, this system automatically defaults to the module wide low loot container to create loot. IE ... if you set up or have a generic low loot bin already, then everything without a specific container will pull from it. So you can create custom creatures constantly and not worry about specific loot everytime. They'll just pull from the module's low loot container by default until you create them their own.

PS ... though I long used Scarfaces XP System myself ... I was running into some oddities where XP was sometimes either too high or too low if someone dropped from a party and then rejoined. "usually due to crashing or relogging to fix a glitch) I've since changed over to Blasco's Fair Kill XP 3 and not only have had no other issues, but it's allowed me even more control over XP awards. Here's a link:
http://nwvault.ign.c....Detail&id=3630

Blasco used the best of a few XP Systems including Scarface's to come up with his. His documentation is pretty good as well.
               
               

               


                     Modifié par kalbaern, 06 août 2010 - 03:53 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
x0_i0_treasure???
« Reply #11 on: August 06, 2010, 05:50:25 pm »


               Thanks kalbaern for clearing this up for me .I like the idea of using the existing chests.'<img'>
               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
x0_i0_treasure???
« Reply #12 on: August 06, 2010, 05:57:24 pm »


               

Knight_Shield wrote...

Thanks kalbaern for clearing this up for me .I like the idea of using the existing chests.'<img'>


Being abit on the darkside ... my module wide loot area looks like a warzone. '<img'>

Since I use the CEP ... I gave most of my loot containers appearances to match at a glance what they contain .. IE .. dead bugbear, orc, ogre and goblin appearances for those chests and bushes, gems, woodpiles for other matched treasures. While abit silly, it helps DMs IG to find the right chest. With this system ... a DM can add or remove items to/from the various containers too.
               
               

               
            

Legacy_Sharona Curves

  • Full Member
  • ***
  • Posts: 115
  • Karma: +0/-0
x0_i0_treasure???
« Reply #13 on: August 08, 2010, 07:33:57 pm »


               

ShaDoOoW wrote...

If you using any custom script "system" it works, however the x0 treasure system is exception because it is used in default scripts. Build module compiles onl scripts in module, and these are not until you open them and re-save - and for that you must know their name.

 
If you are going to modify the X0_i0_Treasure include file, I dare say you are probably going to want to make some changes to all default scripts that utilize this include.  These files are:
 
nw_c2_default9
x0_c2_spwn_cowrd
x0_c2_spwn_cres
x0_c2_spwn_def
x0_c2_spwn_defn
x0_c2_spwn_lhig
x0_c2_spwn_llow
x0_c2_spwn_lmed
x0_c2_spwn_luni
x0_c2_spwn_rang
x0_i0_deckmany
x0_i0_treasure
x0_o2_anyhigh
x0_o2_anylow
x0_o2_anymed
x0_o2_anyuniq
x0_o2_armhigh
x0_o2_armlow
x0_o2_armmed
x0_o2_armuniq
x0_o2_bookhigh
x0_o2_booklow
x0_o2_bookmed
x0_o2_bookuniq
x0_o2_clthhigh
x0_o2_clthlow
x0_o2_clthmed
x0_o2_clthuniq
x0_o2_goldhigh
x0_o2_goldlow
x0_o2_goldmed
x0_o2_mleehigh
x0_o2_mleelow
x0_o2_mleemed
x0_o2_mleeuniq
x0_o2_noamhigh
x0_o2_noamlow
x0_o2_noammed
x0_o2_noamuniq
x0_o2_potnhigh
x0_o2_potnlow
x0_o2_potnmed
x0_o2_potnuniq
x0_o2_ranghigh
x0_o2_ranglow
x0_o2_rangmed
x0_o2_ranguniq
x0_o2_weaphigh
x0_o2_weaplow
x0_o2_weapmed
x0_o2_weapuniq
 

 
To find scripts that utilize an include file you can use Lilac Soul's Biosearcher v2.0 and search for whatever #include "" file you wish to find.  I can highly recommend this immensely useful tool. 
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
x0_i0_treasure???
« Reply #14 on: August 08, 2010, 08:09:42 pm »


               Thats a lot of resources to add to a module when your module may never even use over half od them.



I would have never guessed that it was used in so many places.