bark boat recipe picks ingredients in wrong order

The worst monsters in the Hearthlands warp the fabric of space and time..

bark boat recipe picks ingredients in wrong order

Postby theTrav » Tue Apr 19, 2011 9:59 pm

I think I've worked out what confuses me about this recipe.

say you have the bare minimum requirements in your inventory, regular bark, birch bark, stick and string.

First the recipe tries to pick an "any bark"
Second the recipe tries to pick a "birch bark"

It does its picking based on the order in which things were added to your inventory.

Therefore, if the birchbark went into your inventory after the regular bark, it will be picked by the algorithm as the "any bark" component. When it gets to the "birch bark" component, it can't find a free one, so you get the "not enough ingredients" message.

Solution would be to make sure the specific ingredient is before the broad ingredient in the recipe order. You could still end up using more birch bark than you expected, but it would stop someone with adequate ingredients for a single getting confused and not being able to make a boat without inv juggling
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: bark boat recipe picks ingredients in wrong order

Postby cobaltjones » Tue Apr 19, 2011 10:16 pm

Yes.
User avatar
cobaltjones
 
Posts: 2725
Joined: Tue Dec 07, 2010 1:27 am

Re: bark boat recipe picks ingredients in wrong order

Postby loftar » Tue Apr 19, 2011 10:45 pm

+1
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9056
Joined: Fri Apr 03, 2009 7:05 am

Re: bark boat recipe picks ingredients in wrong order

Postby MagicManICT » Tue Apr 19, 2011 10:47 pm

Don't the rules of programming state:

When selecting items from a list, pick specialized items before general items.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: bark boat recipe picks ingredients in wrong order

Postby loftar » Tue Apr 19, 2011 10:48 pm

No, because it has no knowledge of which types are more specific.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9056
Joined: Fri Apr 03, 2009 7:05 am

Re: bark boat recipe picks ingredients in wrong order

Postby MagicManICT » Tue Apr 19, 2011 10:51 pm

You're quite right. The programmer, does, though, and thus the rule. (I think I read it in some debugging book somewhere.)
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: bark boat recipe picks ingredients in wrong order

Postby novaalpha » Tue Apr 19, 2011 10:52 pm

There is no such thing as 'programming rules'.
User avatar
novaalpha
 
Posts: 1490
Joined: Sun Dec 26, 2010 11:42 pm
Location: Sparta

Re: bark boat recipe picks ingredients in wrong order

Postby Jackard » Tue Apr 19, 2011 10:55 pm

old viewtopic.php?f=4&t=18514

that wasnt the first thread either
User avatar
Jackard
 
Posts: 8849
Joined: Sun Jul 12, 2009 6:07 am
Location: fucking curios how do they work


Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 0 guests