Torchmodders

Modding => Modding Questions => Topic started by: Waves_Blade on November 09, 2019, 05:36:07 am


Title: Diablo II Charms possible in Torchlight II?
Post by: Waves_Blade on November 09, 2019, 05:36:07 am
Is it possible in the TL2 Engine to create charm like objects that give buffs for just being in your inventory?

Would make for a crazy mod.
Title: Re: Diablo II Charms possible in Torchlight II?
Post by: Phanjam on November 10, 2019, 05:14:39 am
Hey WaveBlade. The idea floated in the discord about this (a new container of type "body" with its own UI) is theoretically possible, but has never been tried before.
Title: Re: Diablo II Charms possible in Torchlight II?
Post by: Anarch16sync on November 11, 2019, 07:01:45 am
Here is a short checklist/guide of what you would need to do create the charms and the charm inventory:

Fist check this guide to get familiar with the parts of the GUTS window: http://torchmodders.com/wiki/doku.php?id=main_window

Now, this may seems like a lacking explanation, but GUTS as a lot of features and it's not really all that documented, so modding requires a lot of leg work from the user, with trial and error, and checking existing stuff and modify it slowly to understand what does what... So the learning curve is steep. And for the stuff I say next the best you can find would be tangencially related info.

Actual things needed for your mod:
- Create a new unittype, for example, CHARM. For this you need to go to the Unittype Editor in the Data editor menu.
 You can see how the unittype editor works in this video: https://youtu.be/65bQfH8kYHY?t=100 (https://youtu.be/65bQfH8kYHY?t=100) It's about class creation, but there is no specific unittype tutorial written yet. In your case you would want to give your unittype the inheritance of something equippable, like Trinket or Socketable.

- Create a new slot, in the slot editor under inventory, in the same Data editor menu, this should have Equippable checked, and allowed unittype CHARM.
- Create a new container, for example PLAYER_BAG_CHARM, and add your slot to the slot list with the number of slots you want in your bag.
As far as I now there are no written tutorials for this either... but the editors are pretty simple so there is not much room for error.

- Then you need to create a new UI or edit one of the already existing ones. This one is harder and more intimidating since there is a lot of stuff and properties, but once you find what you need to edit is pretty straight foward.
 One way of making this easier is downloading this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=232573509&searchtext=ember+bag unpacking it and just editing the gem bag (in player_inventory.layout or something like that) to use your containers and slots.
Here you can see a screenshot where I marked what you would need to change to your new container for it to work (In my example I selected the weapons & armors inventory slot, in your case you should search for the gem bag inventory)
Spoiler (hover to show)

- Then the las part would be to create the actual items in the unit editor.
Here you can find a basic tutorial for item creation but applied to a weapon: http://torchmodders.com/wiki/doku.php?id=cloning_an_item_editing_its_texture
Title: Re: Diablo II Charms possible in Torchlight II?
Post by: Waves_Blade on November 11, 2019, 09:40:43 am
Edit: NVM, just saw discord.

I didn't particularly intend to get into modding more than this one thing, so its better that someone more experienced handles it rather than me risk goofing it.