Create Items And Add Them As Loot - SWG-Source/swg-main GitHub Wiki

Create items and add them to loot Last edited by swgnoobs a year ago

Creating a new Item begins in this file: datatables/item/master_item/master_item.tab This File has the following format and possible variables: name template_name type unique required_level required_skill creation_objvars charges tier value scripts version can_reverse_engineer string_name string_detail comments We start with a simple example, this will add a belt, using a template of a generic one. item_belt_special_01 object/tangible/wearables/belt/belt_faux_mabari_generic.iff 2 200 "item.buff_worn_item" 1 Belt of the Junior Painter As you see we add the script item.buff_worn_item to it, this will give us the possibility to add stats to our item. We will now add stats to our new made belt. Open the file datatables/item/item_stats.tab and add: item_belt_special_01 "constitution_modified=500,agility_modified=500,strength_modified=500,staminamodified=500,precision_modified=500" appearance/pt_heal.prt These are the basic step to create a new Item. Adding an Item with a Proc Adding an Item with a Buff Adding Items to Loot Tables Heroic Loot Tables Now we may want to add our item to something to actually loot it! As our loot item is pretty special we wanna add it to something special! Lets say IG88? Just because we can beat him in two minutes ;) For this we need to find out which Loot-Table our target NPC is using, we need to find our NPC is in the ``` datatables/mob/creatures.tab File and look which loottable is used in the loottable row. heroic_ig88_ig88_rocket is the actual IG88 NPC, which uses the heroic/heroic:ig88 Loot Table. This Loot Table can be found in datatables/loot/loot_types/heroic/heroic.tab The format is abit weird to understand on the first look, import the tab File into Excel to have a really different view on it, the tabs have to be exact later, so make sure to use a proper editor with tabs and linebreaks shown. We will find that IG88 links to a specific other table called: dungeon/heroic_drops:ig88 This one can be found in datatables/loot/loot_items/dungeon/heroic_drops.tab Again this file format maybe a bit confusing as it has rows for all heroic instances, but if you import them into excel you should get your head around it. We will see the following items for IG88: item_heroic_ig_88_head_01_01 item_heroic_ig_88_head_01_01 item_heroic_schematic_saber_03_01 item_heroic_schematic_saber_03_01 item_heroic_random_ring_01_01 item_heroic_random_ring_01_01 item_heroic_random_ring_01_02 item_heroic_random_ring_01_02 item_heroic_random_ring_01_03 We have to add our new created belt now to this, as we want to increase the chances abit, we add it abit more often: item_heroic_ig_88_head_01_01 item_heroic_ig_88_head_01_01 item_heroic_schematic_saber_03_01 item_heroic_schematic_saber_03_01 item_heroic_random_ring_01_01 item_heroic_random_ring_01_01 item_heroic_random_ring_01_02 item_heroic_random_ring_01_02 item_heroic_random_ring_01_03 item_belt_special_01 item_belt_special_01 item_belt_special_01 item_belt_special_01 Krayt Dragon Loot Tables Lets say we wanna add our belt to the Krayt Dragons because pearls get boring over time. The actual Items for these are stored again in loot_types and loot_items files. The actualy loot_items File for Krayt Dragons is datatables/loot/loot_items/cash_loot/creature_cash_krayt.tab This File is alot easier to understand then the Heroic Loot Tables we looked at first, here we can just add our belt at the bottom of the File and are done with it. strItemType s item_junk_imitation_pearl_01_01 item_junk_imitation_pearl_01_01 item_junk_imitation_pearl_01_01 item_junk_imitation_pearl_01_01 item_junk_imitation_pearl_01_02 item_junk_imitation_pearl_01_02 item_belt_special_01 item_belt_special_01 item_belt_special_01 item_belt_special_01 Creating new NPCs Attaching Conversation Scripts to NPCs Creating Custom Events (like Ewok Loveday, Lifeday and so on)