About: Random Treasure   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

This random treasure script works rather similarly to the Shadows of Undrentide (SoU) treasure system (see the script x0_i0_treasure). The basic idea is that the builder places treasure in player-inaccessible source chests, and the player-accessible chests randomly select items from the inaccessible ones. Specifically, one or two items will be selected from a generic chest that serves the entire module, and another item likely (2/3 of the time) will be selected from an area-specific chest.

AttributesValues
rdfs:label
  • Random Treasure
  • Random treasure
rdfs:comment
  • This random treasure script works rather similarly to the Shadows of Undrentide (SoU) treasure system (see the script x0_i0_treasure). The basic idea is that the builder places treasure in player-inaccessible source chests, and the player-accessible chests randomly select items from the inaccessible ones. Specifically, one or two items will be selected from a generic chest that serves the entire module, and another item likely (2/3 of the time) will be selected from an area-specific chest.
  • Items from RNDTRE01 may randomly grant one of the following: Items from RNDTRE02 may randomly grant one of the following: Items from RNDTRE03 may randomly grant one of the following: Items from RNDTRE04 may randomly grant one of the following: Items from RNDTRE05 may randomly grant one of the following: Items from RNDTRE06 may randomly grant one of the following:
  • put this script on On Open and OnDestroyed. //sChest = string SourceChest tag //oChest = Object Destination Chest // grab random object from source Chest // and create a copy of it in Destination chest // the source chests are in the Dungeon Master's Palace // and have unique names void MakeTreasure(string sChest,object oChest){ int nCountItems; int nRandomItem; object oSource; object oItem; string sResRefItem; oSource = GetObjectByTag(sChest); if(!GetIsObjectValid(oSource))return; //count item logic oItem=GetFirstItemInInventory(oSource); nCountItems = 0; while(GetIsObjectValid(oItem)){ nCountItems++; oItem=GetNextItemInInventory(oSource); } //now get random item nRandomItem=Random(nCountItems)+1; oItem=GetFirstItemInInventory(oSource); while(nRandomItem>1){ nRandomItem--; oItem=GetNex
dcterms:subject
dbkwik:baldursgate...iPageUsesTemplate
abstract
  • This random treasure script works rather similarly to the Shadows of Undrentide (SoU) treasure system (see the script x0_i0_treasure). The basic idea is that the builder places treasure in player-inaccessible source chests, and the player-accessible chests randomly select items from the inaccessible ones. Specifically, one or two items will be selected from a generic chest that serves the entire module, and another item likely (2/3 of the time) will be selected from an area-specific chest.
  • Items from RNDTRE01 may randomly grant one of the following: Items from RNDTRE02 may randomly grant one of the following: Items from RNDTRE03 may randomly grant one of the following: Items from RNDTRE04 may randomly grant one of the following: Items from RNDTRE05 may randomly grant one of the following: Items from RNDTRE06 may randomly grant one of the following:
  • put this script on On Open and OnDestroyed. //sChest = string SourceChest tag //oChest = Object Destination Chest // grab random object from source Chest // and create a copy of it in Destination chest // the source chests are in the Dungeon Master's Palace // and have unique names void MakeTreasure(string sChest,object oChest){ int nCountItems; int nRandomItem; object oSource; object oItem; string sResRefItem; oSource = GetObjectByTag(sChest); if(!GetIsObjectValid(oSource))return; //count item logic oItem=GetFirstItemInInventory(oSource); nCountItems = 0; while(GetIsObjectValid(oItem)){ nCountItems++; oItem=GetNextItemInInventory(oSource); } //now get random item nRandomItem=Random(nCountItems)+1; oItem=GetFirstItemInInventory(oSource); while(nRandomItem>1){ nRandomItem--; oItem=GetNextItemInInventory(oSource); } sResRefItem = GetResRef(oItem); CreateItemOnObject(sResRefItem,oChest); } void main() { object oThisChest = OBJECT_SELF; location lThisChest = GetLocation(oThisChest); float fDelay = 10.0; // delay in seconds int nFlag= 0; string sSourceChest; // Source of Treasure nFlag = GetLocalInt(oThisChest, "Used"); sSourceChest = GetLocalString(GetArea(oThisChest),"SourceChest"); if(nFlag > 0) return; // timer in progress //2 pieces of junk, 1 good item //obviously chests with these tags apear in the //Dungeon Masters Palace and have the appropriate //items in them MakeTreasure("cgchestjunk",oThisChest); if(d2() > 1 ) MakeTreasure("cgchestjunk",oThisChest); if(d3() > 1 ) MakeTreasure(sSourceChest,oThisChest); //MakeTreasure("cgchest3",oThisChest); SetLocalInt(oThisChest,"Used",1); // this chest has been // used already, don't do it again }
is Items of
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software