Author Topic: Generating Random Treasure  (Read 1018 times)

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
Generating Random Treasure
« Reply #15 on: July 23, 2011, 07:59:58 am »


               you can also expand ffbj idea. everyt time you kill a monster a "value" is added to the player. (this value represent the loot value of the monster in question). when the player opens a "loot" chest it grabs the variable and generate loot worth that amount. So if the player open chest all the time he get low value stuff such as health potions, while if he can stay away from it he get more expensive stuff.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Generating Random Treasure
« Reply #16 on: July 23, 2011, 02:07:03 pm »


               Cool.  Yes you could have 3 values for the int for instance 5 or less between 5 and 10 and greater than 10 and then execute a different treasure script on the chest for each different value.
Low, medium, high for example.
               
               

               
            

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
Generating Random Treasure
« Reply #17 on: July 23, 2011, 08:22:28 pm »


               nah you make it dynamic and you got a sorted list of loot in price order and you pick one item at random up to the maximum amount. substract the sum and do it again. the higher value the more option is open in the loot list. you can even add a create item on the fly code that adds item properties according to the value. but in that case you will endup with loot similar to titanquest and other hack and slash games,
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
Generating Random Treasure
« Reply #18 on: July 25, 2011, 01:24:13 am »


               How do you have loot on the enemy for the player to get when he kills it?
               
               

               
            

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
Generating Random Treasure
« Reply #19 on: July 25, 2011, 02:33:28 pm »


               put it in the enemies inventory either manually or by script and allow it to be dropable.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
Generating Random Treasure
« Reply #20 on: July 25, 2011, 07:15:23 pm »


               The enemy is creatures randomly generated in an encounter - which script do i use?
               
               

               
            

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
Generating Random Treasure
« Reply #21 on: July 25, 2011, 07:19:15 pm »


               well the enemies in the encounter has blueprints and you can edit those to have treasure, but it wouldn't be random. other then that you either edit the ondeath or onspawn script to generate the treasure, depending on if you want the monster to beable to use the treasure in the fight.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
Generating Random Treasure
« Reply #22 on: July 25, 2011, 07:34:48 pm »


               How do I bring up their blueprints?
I'm looking at the scripts on the encounter screen and I don't see ondeath or onspawn.
Either way would probably work.
               
               

               
            

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
Generating Random Treasure
« Reply #23 on: July 25, 2011, 08:21:17 pm »


               the creatures blueprints is under creature in the palette. it's the same list as you pick from when you make the encounter.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Generating Random Treasure
« Reply #24 on: July 25, 2011, 11:31:29 pm »


               I do a little of both.  The onspawn method I use is to loop through what the npc has, usually I only use this on npc's that have a few items maybe 3 or 4.  All the items are marked undroppable. Then in onspawn I run through those items and give a percent chance maybe 25% that any one item is marked droppable.  So you can get none, or more usually 1 or 2 itmes from an npc.

The ondeath I use give a % chance either the left hand, right hand, or chest slot drops.  The percent chance is varied by the difference in levels between the killer and the killed.  Reducing the chance that higher level players can kill twits, low level creatures, for their loot.  So once you are 10 levels higher than your enemy the drop zippo, for you.  Anyway that's one thing I do.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0
Generating Random Treasure
« Reply #25 on: July 25, 2011, 11:52:44 pm »


               okay i got it to work - thank dude.