Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crafting with board or log
Author Message
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #1
Crafting with board or log
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. ????
09-04-2019 09:07 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: Crafting with board or log
This is hardcoded, there's no way to change these "links" using scripts
https://github.com/Sphereserver/Source/b....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
09-05-2019 10:27 AM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #3
RE: Crafting with board or log
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
(This post was last modified: 09-07-2019 10:01 AM by Jhobean.)
09-07-2019 10:01 AM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #4
RE: Crafting with board or log
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.
09-07-2019 11:55 AM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #5
RE: Crafting with board or log
LINE 4880, There is a way to add a verification? If it's for crafting I_board, dont return 1(Don't use board)
09-17-2019 12:04 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #6
RE: Crafting with board or log
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
(This post was last modified: 09-17-2019 07:19 AM by Coruja.)
09-17-2019 07:15 AM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #7
RE: Crafting with board or log
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.
09-17-2019 09:42 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #8
RE: Crafting with board or log
Try pickup the board instead log to check if it works
09-17-2019 12:39 PM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #9
RE: Crafting with board or log
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.
09-17-2019 09:19 PM
Find all posts by this user Like Post Quote this message in a reply
Jhobean
Journeyman
*

Posts: 98
Likes Given: 11
Likes Received: 8 in 3 posts
Joined: Jun 2019
Reputation: 2



Post: #10
RE: Crafting with board or log
Any update? would you like an issue on github for following this "problem"

Thx again for your help.

https://www.uocryptonite.com/
09-24-2019 08:28 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)