![]() |
Crafting with board or log - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Crafting with board or log (/Thread-Crafting-with-board-or-log) |
Crafting with board or log - Jhobean - 09-04-2019 09:07 PM I want to know if there is a way to make the type t_log and t_board the same during carpenter crafting. Fox exemple, if I have 5 log in my inventory and a recipe need 5 board, I want to be able to craft it. I don't know where to look at... Typedef t_log = t_board. ???? RE: Crafting with board or log - Coruja - 09-05-2019 10:27 AM This is hardcoded, there's no way to change these "links" using scripts https://github.com/Sphereserver/Source/blob/ca1fb77a1964ed62eff23e823ca2c19ca3e6000e/src/graysvr/CItem.cpp#L4853 As you can see on the code, board is already considered the same resource as log, but it will compare using item ID (01bd7 = 01bdd) instead item type (t_board = t_log), and also note that board can be used as log but log can't be used as board RE: Crafting with board or log - Jhobean - 09-07-2019 10:01 AM Haaaa. Maybe what you explained is the source of my problem! When I craft a board, it's fine. Use log and board appear. If I craft a second board, it's use my first board for crafting the new one RE: Crafting with board or log - Jhobean - 09-07-2019 11:55 AM There a way to change the "hard code" to use log in priority than using board? Because at this time, I'm not able to craff a stack of board except if each time I remove the new board from my bag. RE: Crafting with board or log - Jhobean - 09-17-2019 12:04 AM LINE 4880, There is a way to add a verification? If it's for crafting I_board, dont return 1(Don't use board) RE: Crafting with board or log - Coruja - 09-17-2019 07:15 AM Sure, that's weird. But this should be a bit tricky to fix The logic is: every item inside containers have an internal number and the code will search for itens inside this container using an loop by order (1, 2, 3, 4, ...). So if the board is number 2 and log is 10, and board can be used as log, the code will return "board" and stop the loop because the desired item was already found So to the fix will be tricky because sphere should find a way to deal with these numbers correctly without cause any performance decrease (eg: heavier loops). Just to test if the fix that I'm planning will work, try craft the first board, then pickup the log and drop it on backpack again. Maybe this will change the item internal order inside the backpack, making the next loop find it first RE: Crafting with board or log - Jhobean - 09-17-2019 09:42 AM I made some test with new server and lastest script pack: Always using the board instead of log. I tried to deplace, drop, retake log. Always the same. Core taking board in priority. RE: Crafting with board or log - Coruja - 09-17-2019 12:39 PM Try pickup the board instead log to check if it works RE: Crafting with board or log - Jhobean - 09-17-2019 09:19 PM Change nothing.. When I have a board in my backback, always use the board for fabrication. Same if I drop the board down and put it back to backpack. RE: Crafting with board or log - Jhobean - 09-24-2019 08:28 AM Any update? would you like an issue on github for following this "problem" Thx again for your help. |