World of Banished

MODS Garage => Mod Talk => Topic started by: embx61 on September 03, 2015, 09:43:52 AM

Title: Farmstand
Post by: embx61 on September 03, 2015, 09:43:52 AM
Farmstand

http://worldofbanished.com/index.php?action=downloads;sa=view;down=80 (http://worldofbanished.com/index.php?action=downloads;sa=view;down=80)
Title: Re: Farmstand
Post by: Fellow Villager on September 03, 2015, 12:23:11 PM
really cool
Title: Re: Farmstand
Post by: RedKetchup on September 03, 2015, 07:06:07 PM
thanks you alot for your contribution :)
Title: Re: Farmstand
Post by: irrelevant on September 03, 2015, 07:19:25 PM
It's a beautiful model. I could wish the colorful basketfuls of products weren't in the shadows and were highlighted instead, but that would be picky  ;)
Title: Re: Farmstand
Post by: assobanana76 on September 04, 2015, 12:47:10 AM
for who knows me and knows how much I love markets and decorations today is Christmas !!
as in the past I have amazed by those of Black Liquid with their market and the individual stalls, as in the past I was amazed by Red with its shops ..
Today you make me a gift so amazing !!
I was just planning a new hyper-market and had the right to occupy a corner yet !!
really thanks for this mod !!

P.S. saved game compatible, I guess ..

(http://images.akamai.steamusercontent.com/ugc/443955009657149105/3D1FF658EE4BF86998E3CEEA48CE48B485955879/)

(http://images.akamai.steamusercontent.com/ugc/429320796492086762/2729930DC99B66B6A708DBD54C8A207C5D4C95F6/)
Title: Re: Farmstand
Post by: embx61 on September 04, 2015, 07:48:56 AM
Quote from: irrelevant on September 03, 2015, 07:19:25 PM
It's a beautiful model. I could wish the colorful basketfuls of products weren't in the shadows and were highlighted instead, but that would be picky  ;)

If you look at the pictures assobanana76 posted in this thread you see the same shadow issues on some market stalls in those pictures.
I loaded a game and turned the stand 90 degrees so the front faced the in game light source and the baskets with stuff looked much lighter that way.

@assobanana76
I loaded the farmstand in several games and had no issues so it should be save compatible.

Thanks for the nice comments  :)


 
Title: Re: Farmstand
Post by: Gatherer on September 04, 2015, 12:01:55 PM
Very nice mod. I especially appreciate that it is save compatible. Thanks

How much store unit capacity does it have?
Title: Re: Farmstand
Post by: embx61 on September 04, 2015, 02:17:23 PM
Storage unit capacity is set at 4000.

Thanks  :)
Title: Re: Farmstand
Post by: Gordon Dry on September 09, 2015, 01:44:44 PM
Could you upgrade your mod that it only stores edible food but not the non-edible food?
Because this issue: http://colonialcharter.com/index.php/forum/tavern/1695-non-edible-items-filling-up-markets#16817 (http://colonialcharter.com/index.php/forum/tavern/1695-non-edible-items-filling-up-markets#16817)
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 03:51:52 PM
So you want only the flag Edible? So not add the grain, Veggies, protein, and fruit flags?

[EDIT] Just looked in the template file I basicely copied from the market file and the flags set are
StorageDescription storage
{
RawMaterialFlags _storageFlags = Edible | Fuel | Tool | Health | Clothing | Textile;
bool _areaBasedLimit = false;
bool _available = false;
int _volumeLimit = 4000;
}


I see however the next code some further below

MarketDescription market
{
float _fillLimit = 0.99;

FillType _fillType
[
{
RawMaterialFlags _flags = Fruit;
float _ratio = 0.168;
}
{
RawMaterialFlags _flags = Vegetable;
float _ratio = 0.168;
}
{
RawMaterialFlags _flags = Protein;
float _ratio = 0.168;
}
{
RawMaterialFlags _flags = Grain;
float _ratio = 0.168;
}
{
RawMaterialFlags _flags = Fuel;
float _ratio = 0.168;
}
{
RawMaterialFlags _flags = Tool;
float _ratio = 0.05;
}
{
RawMaterialFlags _flags = Health;
float _ratio = 0.04;
}
{
RawMaterialFlags _flags = Clothing;
float _ratio = 0.04;
}
{
RawMaterialFlags _flags = Textile;
float _ratio = 0.03;
}

]
}


So I guess I have to change it there and make the four food flags 1 Edible flag with a 4 x 0.168 ratio?
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 04:29:26 PM
I am confused.

If I read the thread at the CC forum RedKetchup says that his market not pickup edibles but only Veggies, Grain, protein and fruit.

But you want only Edibles stored? Maybe redKetchup can contact me what to do because it is confusing.

Those flags are confusing as hell because CC uses Textile and Coal flag for other stuff too I believe.
I not play with CC (Don't get me wrong as it is an awesome mod and Black Liquid are for sure talented devs, but it just too big for my taste)

Time for Luke to get of his behind and dig a couple of days in the code to make the flags and limits dynamic.
Sure it is some work but as a hobby programmer myself it is not something what will take him ages to do.

What it takes is to show again some interest in his creation and throw us modders a well deserved bone.
So many headaches can be avoided if Luke make the flags and limits dynamic. Hell, I will even pay for the update if he make it happen.
Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 04:46:11 PM
Quote from: embx61 on September 09, 2015, 04:29:26 PM
I am confused.

dont worry , i am too ^^

from one side i am asked to take out edibles.... and in same time i am asked to put only edible... lol
all this is confusing ^^

all that come from : food processing, trying to elaborate reality in matter of 'can a citizen should eat this or that', lack and absence of material flag creation, specific storage in different building and their purpose.
i blame the developper and us (for trying to deal and resolve conflicts)
Title: Re: Farmstand
Post by: kralyerg on September 09, 2015, 05:12:42 PM
I think you're right, embx61.

In order to only store edible food, the market section has to only have Edible flag.  And then put the ratio at about .672  (.168 x 4)

Then it won't try and bring in the non-edibles. 

The non-edible foods (like wheat) have a food flag (grain) but not edible flag, so the vendor see that your market is asking for grain flags, and then tries to bring it, but then sees in your storage flags that it only allows edible, so he takes it back to storage, but then tries to bring it back because he sees your market wants grain.

So there's 2 options.

1) Make it only stored Edibles as above by changing the market section to only have the Edible flag with .672 ratio.

2) Make it store non-Edibles by adding the Fruit | Vegetable | Grain | Protein flags to the storage.

Gordon would prefer option 1.

But if you only use the edible flag (option 1) you might fill up with 100% fruits.

As I was writing this, I realized I don't actually know what would happen if you tried to make it so your market section did a thing like this:

{
RawMaterialFlags _flags = Edible | Fruit;
float _ratio = 0.168;

}


I don't know if the game will say "Fill this with things that are both Fruit and Edible" or if it will say "Fill this with things that are Fruit and fill this with things that are Edible."
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 05:13:57 PM
I hear you Red,

Well, at least a fellow Modder is as confused as I am. LOL

I tried in a game some time back to take the edible part out of the flour because I did not like it that the bannies took the precious flour I rather see in the bakery, home to eat, so it only was flagged as grain and guess what? It was not picked up from the mill.
When I added edible back in it was picked up.
If I changed edible in Textile it was picked up. Wonder what is up with that!

Are fruit, grain, veggies, and protein sub flags or something what need a flag as edible or textile too to get picked up or did I miss something here?
Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 05:20:25 PM
yeah about markets, as @kralyerg  says : there are 2 thing.

1. what is allowed to be stored in:
StorageDescription storage
{
   RawMaterialFlags _storageFlags = Fruit | Vegetable | Grain | Protein;


and 2. what it asked the vendor to go pickup:
MarketDescription market
{
   float _fillLimit = 0.99;

   FillType _fillType
   [
      {
         RawMaterialFlags _flags = Fruit;
         float _ratio = 0.25;


so he can gets conflicts.
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 05:21:29 PM
Thanks Kralyerg, I will go for option 1 as I think it will be the best option out of the two.

Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 05:22:18 PM
thats a good question Kral :)

what if .... if we ask to fill :
MarketDescription market
{
   float _fillLimit = 0.99;

   FillType _fillType
   [
      {
         RawMaterialFlags _flags = Edible | Fruit;
         float _ratio = 0.25;


??
Title: Re: Farmstand
Post by: kralyerg on September 09, 2015, 05:23:49 PM
In order to pickup non-edible foods, you need to edit the Template/Citizens.rsc file.

The citizens have their own storage, just like buildings.

StorageDescription storage
{
RawMaterialFlags _storageFlags = Edible | Fuel | Tool | Wood | Stone | Iron | Health | Clothing | Textile | Alcohol;
bool _areaBasedLimit = false;
bool _available = true;
int _volumeLimit = 100;
}


You need to add the Fruit | Vegetable | Grain | Protein to it, and while you're at it, it wouldn't hurt to add CoalFuel to it too.  It would make CC compatibility a lot easier.
Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 05:28:00 PM
oh !!!!!
really ?

i never did that.
and i never noticed any trouble with my citizen picking up 'flour as 'grain only w/o edible' on the ground' and go put in the barn
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 05:31:16 PM
Thanks again Kralyerg and RedKetchup.

Things get a lot clearer now.

Never thought about changing the citizen file  :-[

Go make the changes and upload a new version of the farm stand soon.

Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 05:39:53 PM
Quote from: RedKetchup on September 09, 2015, 05:28:00 PM
oh !!!!!
really ?

i never did that.
and i never noticed any trouble with my citizen picking up 'flour as 'grain only w/o edible' on the ground' and go put in the barn

yup they do  /shrug
it stays on the ground


NOBODY told that !!
Title: Re: Farmstand
Post by: kralyerg on September 09, 2015, 05:43:32 PM
Well, when did you change it to not-edible?  I thought it was after 1.1b, so maybe people didn't notice because they don't have that version?
Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 05:48:03 PM
oh ! you probably right ! only for 2.0 :)
ouf
Title: Re: Farmstand
Post by: embx61 on September 09, 2015, 05:56:56 PM
I wonder sometimes how Kralyerg figures all that stuff out. Trial and error or a secret pact with Luke?  ;D ;D ;D
Anyway, well done and it surely saves us some headaches!

I have some programming knowledge but lots of stuff in the mod files are truly adacadabra for me.

What for example is that bool _areaBasedLimit and
   bool _available do in the storage section? Both are set to false as they are in the vanilla market.
Title: Re: Farmstand
Post by: kralyerg on September 09, 2015, 06:07:20 PM
If I had a secret pact with Luke, modding would be much different. :)

I don't actually know what those two lines do.  They're false for Market, false for Storage Barn, but true for Stockpiles. 

For the _areaBasedLimit, it would lead me to believe it has something to do with the amount of storage space being related to the size.  Bigger stockpile = bigger storage.  But you don't want that in a building, so it's false.

But that's just a guess.  And that doesn't really explain the _available one.
Title: Re: Farmstand
Post by: RedKetchup on September 09, 2015, 06:10:33 PM
Quote from: kralyerg on September 09, 2015, 06:07:20 PM
If I had a secret pact with Luke, modding would be much different. :)

I don't actually know what those two lines do.  They're false for Market, false for Storage Barn, but true for Stockpiles. 

For the _areaBasedLimit, it would lead me to believe it has something to do with the amount of storage space being related to the size.  Bigger stockpile = bigger storage.  But you don't want that in a building, so it's false.

But that's just a guess.  And that doesn't really explain the _available one.

i would ask Luke but...
my 2-3 last email has been ignored.

i guess maybe i had a quota of 'questions' and has been expired ^^