New Content - Implemented Avatar of Jarlsberg (Items have their own thread)

kingslime80

New member
Jarlsberg Food not recognized by the Item Manager

Apparently the Item Manager refuses to show the new Jarlsberg food and booze and it must still be eaten manually. It's not horrible, but it's very annoying not to be able to calculate/queue up your "meals".

up to date as of r11900
 
Last edited:

Winterbay

Active member
That would be because no spaded values for the food is available and so they are not in the database yet. A more interesting feature request would be to hide everything that isn't Jarlsberg food seeing as he's such a whiner in regards to what food he eats...
 

roippi

Developer
I'm super tempted to mark this rejected as you seem intent on cramming as much terrible language as possible into your post. Lack of supporting new content is not "refusing" to do anything. And god help me with the "annoying" thing.

Instead I'll just merge this into the very obviously still open thread on Jarlsberg where lost has already explained how he is working on implementing the crafting but it is complicated.
 

lostcalpolydude

Developer
Staff member
I'm not really sure how to proceed with this refactoring, so I'm posting what I've done here for now (zipped since the patch was too large to attach otherwise). If anyone wants to look at it, it starts with changing KoLConstants to use three enums instead of a single bitmask. From there, lots of things were changed in ConcoctionDatabase to work with those. After that was done, everything else was changed in a way that was meant to be equivalent.

To even get mafia running, I had to comment out the check for duplicate recipes in ConcoctionDatabase, since everything was being flagged as a duplicate and no concoctions were added. It doesn't recognize when you can't make something due to a lack of skills, but a lack of ingredients or an inability to use a crafting method is recognized.
 

Attachments

  • craftingRefactoring.zip
    23.5 KB · Views: 22

mstieler

Member
Could we possibly get a little "Jiggle:Effect" when equipping Jarlsberg Chefstaves through Item Manager?

Something like "Jiggle: Prismatic Damage", "Jiggle: Sniff", "Jiggle: Banish", etc. etc.?
 

Darzil

Developer
If anyone happens to be doing Jarlsberg and have access to their consumption logs from session logs, would really appreciate the information here : http://kolspading.com/forums/viewtopic.php?f=2&t=395. Am trying to gather food/booze info so we can get wiki and mafia updated with decent consumption info. Can send me it via pm's here or in game if you don't use kolspading.com.
 

Veracity

Developer
Staff member
I'm not really sure how to proceed with this refactoring, so I'm posting what I've done here for now (zipped since the patch was too large to attach otherwise). If anyone wants to look at it, it starts with changing KoLConstants to use three enums instead of a single bitmask. From there, lots of things were changed in ConcoctionDatabase to work with those. After that was done, everything else was changed in a way that was meant to be equivalent.

To even get mafia running, I had to comment out the check for duplicate recipes in ConcoctionDatabase, since everything was being flagged as a duplicate and no concoctions were added. It doesn't recognize when you can't make something due to a lack of skills, but a lack of ingredients or an inability to use a crafting method is recognized.
You are not sure how to proceed because you couldn't debug the two issues you mentioned? I looked at it and have figured them out, I believe.

- when checking for duplicates, don't compare existing.getMixingMethod() to null. Compare it to CraftingType.NOCREATE
- when reading concoctions, you do this before reading each concoction:

ConcoctionDatabase.mixingMethod = null;
ConcoctionDatabase.requirements.clear();
ConcoctionDatabase.info.clear();

You then create each concoction like this:

Concoction concoction = new Concoction( item, ConcoctionDatabase.mixingMethod, ConcoctionDatabase.requirements, ConcoctionDatabase.info );

You need to do this:

Concoction concoction = new Concoction( item, ConcoctionDatabase.mixingMethod, ConcoctionDatabase.requirements.clone(), ConcoctionDatabase.info.clone() );

in order to make a copy of the EnumSets to store in the Concoction, rather than keeping the ones which you keep clearing.

With those things fixed, it seems to work for me. I checked it in as Revision 11912.

If you want to do the new Jarlsberg concoctions, please proceed. :)
 

lostcalpolydude

Developer
Staff member
I caught the first one, but nothing seemed to work better when I changed it, so I wasn't sure if I was looking at the right thing. I even got sidetracked initializing other things with NOCREATE instead of null.

I initially was using local variables instead of global when making a new Concoction, but then I didn't see a convenient way to update them when parsing the mix value. Maybe there's a better way of doing that, or maybe how I approached it is fine.

Thanks for figuring that out, I think I could have spent several more hours looking at it without even looking at the right section. I even started to figure out how to use the debugging features in NetBeans, but I still wasn't looking in the right place.

Now to add Jarlsberg crafting (should be easy enough), and limit Jarlsberg to eating and drinking his own stuff (haven't started looking at that yet).
 

Theraze

Active member
Most of the consumption would have been easy, except that TPTB like to mess with things. All of Jarlsberg's stuff has its image named jarl_<something>.gif, so that lets you know that it may be a Jarlsberg item. May be, because apparently one of the new Giant Castle drinks (Ye Olde Meade) is named jarl_rum.gif, reusing the adequate rum icon, which eliminates that as a useful check.

Just check if the item to be consumed is between 6176-6236 and call it good? 6238 might be Jarlsberg or it might be dungeon content, but since it's unknown currently, safer to exclude for now. :)
 

slyz

Developer
Now to add Jarlsberg crafting (should be easy enough), and limit Jarlsberg to eating and drinking his own stuff (haven't started looking at that yet).
That's as simple as adding a limit in UseItemRequest and adding a check in ConsumableFilterField.isVisible() in UseItemEnqueuePanel.java (see the code for zombiecore there).
 

Veracity

Developer
Staff member
I even got sidetracked initializing other things with NOCREATE instead of null.
Well, yeah. I didn't even know you could have an enum initialized to null. I know that in this particular place, assuming you'll get NOCREATE works - and maybe initializing to that is the right thing in general - but yeah, it could stand looking at further to make sure the code is as clean as it could be.
 

Erich

Member
Quests -> Lucky Entryway:

Checking prerequisites...
Verifying ingredients for star starfish (1)...
You need 1 more star chart to continue.

even Quests -> Hedge Rotation does that, which makes me wonder why it would check for a starfish after that part was complete. I guess I'm doing the tower by hand this time.
 
Last edited:

lostcalpolydude

Developer
Staff member
The starfish and wand parts of the tower are taken care of in 11916. I need to see the tower to sort out the "familiar" check, I think (it just needs to cleanly stop, like it normally does before the NS fight).
 

Fluxxdog

Active member
Doesn't get saved between daily sessions. Ran in to this after I had finished running for the day:
Code:
> cast conjure fruit

Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> cast conjure fruit

Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> cast conjure fruit

Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> cast conjure fruit

Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> cast conjure fruit

Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> cast conjure fruit

Restoring MP! Currently at 12 of 22 HP, 0 of 71 MP, current meat: 2989 ... Target MP = 10.
Using 1 magical mystery juice...
You gain 16 Mana Points
Finished using 1 magical mystery juice.
Casting Conjure Fruit 1 times...
Conjure Fruit was successfully cast.

> ash $skill[conjure fruit]

Returned: Conjure Fruit
level => -1
traincost => 0
class => none
libram => false
passive => false
buff => false
combat => false
song => false
permable => false
dailylimit => -1
timescast => 6
At the end, no actual MP was burnt and when mafia got a proper look at my MP, it corrected it from 0 to 56. Shouldn't daily limit be set to 1? Or does that not get saved either?
 
Top