forums | blogs | polls | tutorials | downloads | rules | help

Web-based Item Creator

I've been thinking of how to create an interface for items in DS2. Perhaps it would be good for new modders.

I just started and wrote some of the code for how I want to structure it. I will generate fields for the items based on their type with javaScript. I didn't think I'd start it today, but this took me just a few minutes to write. I did it in a rush, so I plan to write more notes. It will also be open source. Reagents are very easy, so I think I will start with them. It will be open source. I may decide to do a java version in the future, because I know how to build the UI for all platforms in that language. I don't know enough about .net for C# to build an interface for all platforms. A console version wouldn't be as cool.

I'm planning to use local storage at first to store user's items they create to reuse later. Eventually, I might use php with a CMS to store it in a database. I also think adding a randomizing feature would be cool, so users could get items with random names and properties.

Not much done yet. Just generates a list of item types. Tested it out so I can create the html form in javaScript based on the type of item selected.

      const itemType = ["Ring", "Sword", "Bow", "Staff"];
      const itemSelect = document.getElementById("itemSelect");

      itemType.forEach(options => {
        const opt = options;
        const el = document.createElement("option");
        el.textContent = opt;
        el.value = opt;

      checkValue = type => {
        if ((itemSelect.value === type)) {
          console.log(`${type} is selected`);
      //event listener
      itemSelect.addEventListener("change", e => {



Perhaps I will start off with unique rings. Reagents have definitions for their properties in logic/world/contentdb/Reagent.gas. I thought they just had enchantment blocks. I'm quite rusty. I would also have to organize them based on types inside of arrays and catalog the various custom effect skrits for different types of items. They can easily be put into an array, but typing out all of the effect skrits will take time. It's best to start off with the most simple item.


Confused at the question mark below, but it doesn't matter. Just have to generate code that works. I can use check boxes to select the type of item the user wants the reagent to be applied to. Got side tracked, but wanted to make note of this. Best to start with unique rings/amulets.

      custom_effect_skrit = world\global\enchantments\weapon_enchant.skrit
                    ?weapon_ffx    = ffx_spell_str_bonus_sword
                    &projectile_ffx  = ffx_spell_str_bonus_arrow;

Ranged only type. Question mark appending it to weapon_enchant.skrit? Seems to make the most sense.
edit: Some kind of directive to tell skrit where to pass the value?
      custom_effect_skrit = world\global\enchantments\weapon_enchant.skrit
                  ?projectile_ffx    = ffx_spell_damage_bonus_arrow;

edit: if it contains the code bellow or code like it, it looks like I'll need to generate a hit_ffx for it.

alteration      = alter_custom_damage_fire; 

Projectile and hit effect

      custom_effect_skrit = world\global\enchantments\weapon_enchant.skrit
                  ?projectile_ffx    = ffx_spell_fire_arrow
                  &hit_ffx        = ffx_spell_fire_sword_hit;

The ring creation tool is the first step. This is incomplete at the time of typing this and missing the enchantment blocks. I plan to add them in soon with a button so the user can add as many as they want. ATM, it's crude.

The UI is godawful, but if you wanted a preview, you can check it out here: