[MOD] Lightsaber mod - The Claymore Update!

will you be fixing this? cause having to dig for the crystal is better… and i hope its harder to mine… pls fix this… pls… im begging you… do i need to drag my a** on the stairs?

Just to double check: are you starting a new game with this version of the mod? Changes to mods need a new savegame to work, unfortunately.
Also, make sure you’ve deleted the crystal version before replacing it with the non-crystal version.

If you go into “sabers/recipes/lightsaber_COLOR_recipe.json”
You can change the required ingots:

"ingredients": [

{
     "uri" : "stonehearth:refined:silver_ingot",
     "count" : 1
  }

],

This should work, hopefully!

lol… I’ll see if I have time, but I’m very busy lately :frowning:

1 Like

ok… but how do i open the .json file?

found it… had to open with notepad ^^

1 Like

i can wait… ill just visit everyday ^^

1 Like

another question… how do i add another ingredient? do i just copy and rewrite the {
“uri” : “stonehearth:refined:steel_ingot”,
“count” : 1
}
and change the steel to bronze or gold… cause i want to add gold to the mix…

1 Like

Yes, separated with a comma:

"ingredients": [

    {
     "uri" : "stonehearth:refined:gold_ingot",
     "count" : 1
    },
    {
     "uri" : "stonehearth:refined:silver_ingot",
     "count" : 1
    }

],

Have a look at how to use .json files, there’s some good links on Discourse.
Also, copy+paste your .json data into www.jsonlint.com to make sure it’s formatted correctly

1 Like

hello friend… i think i found out why the blacksmith ignores the freaking crystal… here’s the situation i had last night…

i made a new game, and purposely settle on the mountains for easy access of ores and crystals… and upon digging on the mountain i randomly found 2 crystal ores, and i notice that theres a crystal vein on the highest part of the mountain, so i made a ladder going to the crystal vein and started mining the crystal vein… and when i had a blacksmith i tried to make a crystal prism(4 crytsl ores needed ^^) and wow!! she did it, i saw that her task was collecting ingredients, and then i scroll down to see how my farm was going, after some time i saw my blacksmith going up the ladder again and collecting the crystal ore at the crystal vein and NOT at the closest mine(which had a crystal ore, 3 to be exact) then some of my workers put the crystal ore harvested on the closest mine(without the crystal vein) at the storage lot… and then i had a theory, after my blacksmith made the crystal prism, i ordered another 1 to be made and again my blacksmith went on the ladder and took the crystal ore found at the crystal vein ignoring the crystal ores that i had on the closest mine which is stored at the storage lot, and then after collected the 1st crystal ore i purposely erased the ladder so she would take the nearst ores, and then BOOOOM she ignores it and did another job… she ignores the crystal prism order that she had started after removing the ladder leading to the crystal vein…

now here’s my theory the blacksmith doesn’t recognize any crystal ores that arent harvested in a crystal vein… if a crystal ore is found randomly in a dig site the blacksmith thinks of it as a different ore not a crystal ore… did u get it or not ^^… you can recreate this if u want

1 Like

Thanks for the bug report! I probably would’ve never figured it out

I’ll double check that randomly dropped crystal is the same as vein crystal and update within the next few days (not today though because I’m going to a bachelor party :wink: )

EDIT: After 2 mins, I think I figured out where the problem is:

in ‘/sabers/mixins/mine_loot.json’

{
"crystal_ore" : {
  "num_rolls" : 1,
  "items" : [
     { "uri" : "", "weight" : 100 },
     { "uri" : "sabers:resources:crystal_ore", "weight" : 20 }
  ]
},
"rock" : {

  "items" : [

     {"uri" : "file(/entities/resources/crystal/raw_crystal/raw_crystal.json)", "weight" : 0.025 },
  ]
}
}

This file specifies what drops when different world blocks are mined. The top bit determines what crystal vein blocks will drop (what you said works well), while the bottom determines what normal rock drops (what you said is not recognized by the blacksmith)

I think if you replace:

{"uri" : "file(/entities/resources/crystal/raw_crystal/raw_crystal.json)", "weight" : 0.025 },

with

{"uri" : "sabers:resources:crystal_ore", "weight" : 0.025 },

it’d work as intended…

Feel free to try it out. I’ll try it out sometime and update the mod if it fixes!

EDIT 2: It doesn’t seem like this should make any difference, but I’m assuming it will because it’s the only obvious issue related to what you discovered. Aside from sloppiness, I might also play around with custom tags to make crystal easier to use in other mods.

Could there be any reason why not using an alias makes items ‘invisible’ to crafters?

1 Like

I haven’t found the exact place in the code that describes how a crafter picks which item to grab for his crafting, but based on the evidence I think there is a case to be made.

If you check the URI of a crystal ore that has been spawned from a random drop rather than from a vein, you will see that it has the URI you designated in the mining_loot file, which is a URL type, not an alias type. I suspect the crafter is looking for something with a URI that exactly matches what you have defined in your recipe. Since the URL type is not exactly the same as the alias type, it is going to ignore it.

2 Likes

I guess tags would be preferable to uri’s when dealing with recipe ingredients

Good to know about this issue for future mods!

@nimrod_adenir, if you try my suggestion out, can you let me know if it fixes the issue? Just ot be sure

ill try… but this doesnt work on alpha 11 anymore… evertime i make a new game and put the flag, my people is like buried on the ground with their head only showing… wierd -_- but ill try… ^^

1 Like

and btw alpha 11 is an update of bugs… like everywhere i get errors… i cant even make a custom building without errors, but if i do make it happen my workers just stop midway… amp ahaha

1 Like

Apparently this was caused by an incompatible mod, check which ones do you have installed, just in case.

Well, it’s an unstable alpha, what else were you expecting? :wink:
Every time that new functionality comes in, new bugs do too, it’s unavoidable :confused:

1 Like

i had this mod activated when that bug happened with the mechanical and cook… but it tried removing the 2 and leaving only the cook mod and it works… ill try the mechanical sometimes together with the cook mod

well my bad… so the mechanical doesnt work on A11, the one where u can make machines to build and stuffs… the lightsaber mod though works on 1st try… but i havent tried playing, just tried if my workers will be only head again… anyways ill try the new config on the mod if it works. thanks

every tiem i tried saving the new codes… it says pls check if this file is open in another program…

Try closing the file, opening it again and changing again the code then save it.

I’ve had that error happen recenly, but I didn’t spot any other of my open programs that could be using it.

The mod that glitched the hearthlings when placing the banner was the mechanical mod, if I remember well.

i did a diff method… copied the contents of the orig. then pasted it in a new file using notepad++ then named it mine_loot.json then just move and replace the older one ^^… ill try it now if the mod still works

1 Like

hey, look what i got… ^^

and the crystal ores is not even mined at any crystal vein just randomly appeared… nc work friend

2 Likes