Click Here to view all the amazing entries to Rookie Awards 2024
Diablo 2 Style Item Generator
Share  

Diablo 2 Style Item Generator

Thomas Jensen
by Hrimfisk on 1 Jun 2024 for Rookie Awards 2024

This project was built to be a clone of the Diablo 2 item system and matches about 90% of the design. It uses custom editor windows to allow you to search for, add, and edit items, and allows you to generate any item of any quality with random affixes. Grid-based inventory and equipment are also implemented.

0 58 0
Round of applause for our sponsors

I created a Diablo 2 Style Item Generator as my final project for the GAP 351 Indie Game Programming class at the Academy of Art University, and it won the spring show programming category.

Items are chosen with a weighted random system using (1 / itemLevel) as the weight of the item, so a level 1 item will have a weight of 1, a level 5 item will have a weight of 0.2, and a level 50 item will have a weight of 0.02. This allows better random distribution and increases the rarity of higher level items. The higher the weight, the higher chance of that item being chosen.

Here are some examples of an item that could be generated. To demonstrate item qualities, a Short War Bow was the base item used. The first image shows a normal Short War Bow, followed by a Superior Short War Bow that provides additional damage and attack rating, then a magic Short War Bow that received the Bronze and Craftsmanship affixes, then a rare Short War Bow with 5 affixes, and lastly a unique, the Hellclap Short War Bow that will always have the displayed list of affixes.

Items can also be pieces of a set, providing bonuses when multiple items of that set are equipped. Each set piece provides its own list of bonus affixes, and the item set as whole provides its own list of bonus affixes that are visible on each equipped set piece. The images below show two pieces of the Arctic Gear set. The Arctic Furs armor and Arctic Horn weapon are equipped, and the Arctic Binding belt is in the player's inventory, but the player does not have the Arctic Mitts gloves yet.

Here are some examples of magic items that can be generated. Magic items can have up to two affixes; a prefix, a suffix, or both. The first image shows the Bronze prefix, the second image shows the Craftsmanship suffix, and the last image shows both of those on the same item.

Rare items can have 2-6 affixes, but no more than 3 prefixes or suffixes. Here are some examples of rare items that can be generated.

Here are the custom editor windows I built to be able to easily search for, add, duplicate, and edit items. The first image is the left half of the item editor, the second image is the right half of the item editor, and the last image is the affixes editor.

Unlike item weights and rarities, the weight of the affix package set in the affix editor is used directly by the algorithm, allowing designers to use whole numbers or decimals to easily increase or decrease the rarity of each package.

Here is the video presentation I created for the spring show. It is 6 minutes long, but it covers all the features I created for this project.

This is a high level overview of how the affix algorithm works. It searches the affix database for valid affixes based on the base item type, such as belt, and the item level of that base item. An affix that requires level 50 is not valid for a base item with item level 25, so it will be ignored.

Comments (0)

This project doesn't have any comments yet.