SRL Archive - MSI Suggestions

Cooking.simba


Gu3st...

2010-09-10 08:42:51

http://villavu.com/repositories/msi/Skills/Cooking.simba

TO-DO-list:
- MSI_MainLoop; is still not yet compatible with skills that withdraw items from the bank… I'll have to take a deeper look at the problem.
- MSI_CookFood; isn't yet complete either, but it's really close! All that's needed is to select 'Cook-All' option

Coh3n

2010-09-10 15:17:02

We should start with a working cooker that cooks anything that can be fished using our fisher, then expand from there.

E: Should also be called MSI_CookFullInv because we're cooking the full inventory, not cooking until the inventory is full (it will already be full), and MSI_CookGear may not be needed. I know for fishing it looks for the fishing gear on the main screen and IIRC cooking isn't quite the same.

Good start though, I like how you're planning it first. :)

Gu3st...

2010-09-11 17:12:55

Each time a new fish is added to the fisher, it will automatically be added to the cooker wouldn't it? With FISH_RAW and so on, I mean :p

MSI_CookFullInv it is, then.

Ah, then we'll screw MSI_CookGer.. I though it was for inventory

Coh3n

2010-09-11 17:15:34

From: Zyt3x
Each time a new fish is added to the fisher, it will automatically be added to the cooker wouldn't it? With FISH_RAW and so on, I mean :p

MSI_CookFullInv it is, then.

Ah, then we'll screw MSI_CookGer.. I though it was for inventory

Not quite automatic, there would have to be a few changes, but the item records would work for both, yes.

Gu3st...

2010-09-11 17:39:09

From: Coh3n
Not quite automatic, there would have to be a few changes, but the item records would work for both, yes.
That's what I meant :p

Sir R. M8gic1an

2010-09-12 10:09:43

You might want to keep in the back of your mind that some of the future foods might include several ingredients ;)

~RM

Gu3st...

2010-09-12 14:28:13

From: Sir R. Magician
You might want to keep in the back of your mind that some of the future foods might include several ingredients ;)

~RM
I already have :p

marpis

2010-09-12 16:08:28

Idea for making baking easy:


type
TFood = record
Ingredients: TIntegerArray;
XPGain, ResultItem: Integer;

And when combining ingredients, just click the items in order Ingredients[0], Ingredients[1], Ingredients[2]…

:)

Coh3n

2010-09-12 17:04:23

From: marpis
Idea for making baking easy:


type
TFood = record
Ingredients: TIntegerArray;
XPGain, ResultItem: Integer;

And when combining ingredients, just click the items in order Ingredients[0], Ingredients[1], Ingredients[2]…

:)

I like that. I think we should really take advantage of types when we start new skills. Something we haven't really been doing so far.

Gu3st...

2010-09-12 17:27:09

Yeah, that's what I have been thinking..
I have made 3 cookers (not working ones.. Only finished planning and creating an efficient system on two of them <_<)

This is the system I used on the most recent one:
type TObj = record
Name, UpText : String;
DTM : Integer;
end;
TRecipie = record
Name : String;
MemberOnly : Boolean;
Level, IngredientCount, Place : Integer;
// Place: 0 = Range/Fire. 1 = Gnome. 2 = Brewing.
Ingredients, UseWith : array of TObj;
end;
TCookingBook = array of array of TRecipie;
{ Fishes, Meats, Breads, Pies, Cakes, Stews, Pizzas, Drinks, Potatoes, Miscs}

So I am basing the recipies on that, but with MSI it will be easier because all that's needed is a TIntegerArray instead of (in this example) TObj.

Coh3n

2010-09-12 17:43:08

I'm not sure where you're going with those types, but I'm sure you've planned it out. Keep it up. :)

Gu3st...

2010-11-06 18:01:42

Alright, Just wanted to make sure that I have not forgotten about this skill. But I have paused working on it until obstacle handling is working, because all cooking ranges have a door or a gate that you have to pass in order to get access to it, making the skill kinda useless unless you manually open the door/gate each and every 5 minutes or so.

TomTuff

2010-11-06 18:04:25

From: Zyt3x
Alright, Just wanted to make sure that I have not forgotten about this skill. But I have paused working on it until obstacle handling is working, because all cooking ranges have a door or a gate that you have to pass in order to get access to it, making the skill kinda useless unless you manually open the door/gate each and every 5 minutes or so.


not the al-kharid range, which would probably be the most used anyways

Gu3st...

2010-11-06 18:17:13

Hey..! You're correct! I though that curtain was close-able…
I guess not! :)

I'll start on this again tomorrow then :)

TomTuff

2010-11-06 18:54:55

From: Zyt3x
Hey..! You're correct! I though that curtain was close-able…
I guess not! :)

I'll start on this again tomorrow then :)


PM Me/post here if you want help with anything, I'll check back

Gu3st...

2010-12-12 18:04:24

Updated first post :)

NCDS

2010-12-12 19:10:02

From: Zyt3x

The only thing holding this skill back right now is MSI_MainLoop; in MainLoop.simba, as it (right now) is made for gathering scripts that deposit items into the bank, and not scripts that might require items to be taken out of the bank.


I would say to make an array for scripts that require withrawing items from the bank, and in the mainloop just do something like:

if InIntarray(CurrentScript, ScriptsThatWithdraw) then
WithdrawStuff
else
DepositStuff;
Just what popped into my head quick.

Gu3st...

2010-12-12 19:26:30

I was thinking about rewriting the mainloop in such a way we didn't have to do stuff like this for other skills too

NCDS

2010-12-12 19:35:04

From: Zyt3x
I was thinking about rewriting the mainloop in such a way we didn't have to do stuff like this for other skills too


What other option is there besides Withdrawing, Depositing, or Power Skilling that would need to be handled?

I generally think it's best to avoid rewriting code that works.

Coh3n

2010-12-12 23:51:18

Add an attribute to the TScript record (Withdraw: Boolean;).

AtBank:
if (not MSI_BankMaterials) then // Bank the materials
begin
if (MSI_TimedOut) then
Break;

MSI_UnsetPlayer('Failed to bank materials', False);
Break;
end;

// If the script required some withdrawing after depositing
if (MSI_Players[CurrentPlayer].Scripts[CurrentScript].Withdraw) then
if (not MSI_WithdrawMaterials) then
begin
end;

Gu3st...

2010-12-13 13:03:07

From: NCDS
What other option is there besides Withdrawing, Depositing, or Power Skilling that would need to be handled?

I generally think it's best to avoid rewriting code that works.
Yeah.. When I was lying in bed trying to sleep yesterday, I though about the problem and came to the same conclusion as you, there is no other option :redface:

A Withdraw boolean would suffice, I'd believe :)

Coh3n

2010-12-13 20:28:34

From: Zyt3x
Yeah.. When I was lying in bed trying to sleep yesterday, I though about the problem and came to the same conclusion as you, there is no other option :redface:

A Withdraw boolean would suffice, I'd believe :)

No no no, I like what you did with the pointer. :) I didn't think of that before.

Gu3st...

2010-12-14 07:18:10

From: Coh3n
No no no, I like what you did with the pointer. :) I didn't think of that before.
If you say so… :p :)

I won't be working on this in the weekdays. I have too much homework and assignments to finish.

Coh3n

2010-12-14 16:11:50

From: Zyt3x
If you say so… :p :)

I won't be working on this in the weekdays. I have too much homework and assignments to finish.

No big deal, this is a busy time of year. ;)