Custom crafting class


#22

Your roles are messed up. They should be ["guildmaster_job", "crafter"] as Dani suggested, not ["guildmaster", "job crafter"] as you have.


#23

Yea I am fixing that now. When he suggested I use an array set up I mis-typed.


#24

Your workshop URIs in your recipes are wrong. You need to use your mod’s namespace, not stonehearth.


#25

I don’t see where you are looking?


#26

I see it.


#27

All the changes have been made and the error remains. I feel like it is related to when I open the workshop and it says “undefined crafting orders”.


#28

Yes, I’m still looking for it. It’s quite elusive though, so must be something really small, like a typo


#29

Yea. i just have no idea what workshop equivalents is referring to.


#30

Hah!
Found it

Very elusive indeed. Will write up in a sec.

(just checking if my fixes work)


#31

Yep! It works.

Okay, so… your workshop.less file was broken (in the skin folder inside the Guildmaster folder)

Try replacing it entirely with this:

#craftWindow.guildmaster {
   background: url('skin.png');

   .item {
      background-image: url('skin.png');
   }

   #craftButton {
      position: absolute;
      right: 10px;
      top: -50px;
      width: 90px;
      height: 151px;
      #craftButtonImage {
         background: url('hammer.png');
      }
   }

   #orderListContainer {
      table{
         background: #21272c;
      }

      .orderListRow {
         background: #21272c;
      }
   }

   #tabContainer {
      #tabs {
         position: absolute;
         top: 743px;
      }
   }
}

It should work!

As a general tip, however, I do recommend cleaning your mod a bit as well!
I understand that you’re on the process of learning (we all always are, really!) but I’ve learned with Bruno that cleaning up earlier spares you a headache later. I used to put all stuff I would mix into something in a single “mixins” folder, for example - and he made me realize that this makes it uncomfortably difficult to browse around/work with that mod, for example.
So a couple of tips:

  • I’d remove all iconic aliases from the manifest, they’re not really necessary. I use SHED too and you can easily access iconics by going to the iconic tab inside the main entity. Not only they are useless but also they can be spawned (since they’re aliases) and when they are spawned they cause errors for not having the entity forms component. Since they do have catalog tags, they could even show up in shops, for example - causing more errors.

  • You don’t need to alias some things like the .less files (you actually declare it twice :stuck_out_tongue: ) Less files just need the “ui” declaring at the bottom of the manifest, no alias needed! Some things are not necessary (like recipes) but I understand they are useful since you can edit them in SHED. I’d remove them too (personally) but that’s up to you, these ones are harmless.

  • There’s a bunch of assets/things not being used that add a lot of weight to your mod. For example, the UI folder has only unused workshop UI things and inside the jobs folder there’s a lot of things that you don’t use or are from the base game (like the common icons). You can make your entities search for these directly by using addresses like "/stonehearth/jobs/common/images/recipe_unlock_1.png" instead of having to copy them over to your mod. Additionally, there is also a lot of unused things in the Data folder: all the game’s rigs are there for no reason :slight_smile: All in all, all those things add 400+ mbs to your mod :smiley:

  • And finally, I’d fix the aliases of the unused workshops. I know they are unused, but either keep them with fixed aliases or just remove them from the manifest entirely. Leaving them in the manifest but pointing to files that don’t exist will only cause errors by accident if you forget to edit some reference, etc.

That’s all! :slight_smile:
Keeping it tidy and clean helps with performance and makes it more compatible with other mods, so it’s always a good policy :slight_smile:

Good luck and hope to see it soon in the workshop :smiley:


#32

Thank you so much, Dani! I will implement the changes you made and spend quite a while cleaning things up!


#33

If it is ok, when I finish cleaning up I would like to send it to you again to see if I can streamline it any further.
Thanks again!!!


#34

No problem! Always glad to be able to help :merry:


#35

Another quick question…
If I remove the recipe aliases from my manifest, is there an easy way to edit them in SHED?
(Like the way you suggested using the iconic tab of an entity).
Writing the en.json is my worst!


#36

Only if their crafter is a declared job in the manifest. For example, your Guildmaster recipes will always show on shed as sub-items of your Guildmaster job, even if you remove them from the manifest.

Recipes that were added to other professions, however, won’t. Editing things in SHED is really easier, so just remove the Guildmaster recipes (which should make up most of the mod recipes anyway) since they’ll remain in SHED nonetheless and only leave the recipes that belongs to other professions, so it is easy to edit :slight_smile:


#37

Here’s the updated .smod . Still no new models.

weapons_plus.smod (1.1 MB)

But… I don’t need drop box anymore!
Thanks to your suggestion the unzipped mod went from 406 mb to 3.14 mb after cleaning!
Now a few days of design and modelling to fill up the recipes!

On a completely related subject, you know how when you get a buff your stats turn green? Can you do that with the description of an item? (for example Speed +20 in green (Like some other games use .)) To emphasize that it is a “magical” item?

Thank you for all your help today!
-TacocaT


#38

So i have made a couple of weapons and am trying to make some dual wield weapons now. The problem I am having is when I put

"slot": "mainhand",
"slot": "offhand"

They still have a shield also, which is not the effect I was going for.
So I looked at the shield.json and saw it is

"slot": "leftArm"

So I added that into my weapon.json. Now they drop the shield but attach the weapon to the left arm and not the left hand.
My question is how to tell it NOT to pick up a shield but also NOT attach a sword to your left forearm?


#39

Each slot can only have 1 item in it.
When the game is reading your file, it will read only one of the “slot” fields. You can’t have two fields with the same name in a json file because the lua reading it only sees one.


#40

So if I want them to carry 2 daggers I need to make a recipe/entity for dagger.json and dagger_offhand.json (for example, and with all the dependant files) then declare dagger.json “mainhand” and dagger_offhand.json “offhand”?


#41

Yes, this is something we dealed with in ACE by standarizing all offhand items to the offhand slot. We made it in a way that is retro-compatible with shields from other mods, but if you want to make an off-hand weapon that is compatible with SH shield system without having to come up with a lot of new things, make your off-hand weapon “offhand” slot but also add to it the “added equipment” for the offhand placeholder like shields and two handed weapons do, like this:

"stonehearth:equipment_piece": {
         "slot": "offhand",
         "additional_equipment": {
            "stonehearth:armor:offhand_placeholder": true
         }

That way the weapon will be equipped in the offhand and no shield will be able to be equipped with it :slight_smile:
The only issue is that without altering the equipment preferences, footmen will be crazy equipping shields and then offhand weapons back and forth since they’re two different slots.

So you need to add proper support for offhand weapons by making units choose either shields or them - or just use ACE’s support :slight_smile: