Natural Diversity
#91


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/5518-necora/&do=hovercard" data-mentionid="5518" href="<___base_url___>/index.php?/profile/5518-necora/">@Necora</a> I don't completely understand what you mean, but perhaps that's because I didn't explain my plan clearly enough. What I meant is to have a new building (Thatcher's Hut) and associated profession (Thatcher). The thatcher then harvests the naturally growing grasses, and reseeds them. So it functions similarly to the Forester's Lodge/Forester, but it's a separate chain altogether.




I have tested this with a placeholder mesh for the building just to see if it was possible, and it works perfectly.


  Reply
#92


the forester plant/ seed technic works perfectly with everything but they wont harvest anything if ... if in the flag of the item to harvest it is mentionned "health" or "edible" 




out of that they will plant harvest what ever you want. only 1 item harvested can be specified.


  Reply
#93

is there a way to set the berry bushes and other gathering items to appear more outside forests or is this hardcoded into the games.like bartender is talking,he could make a grass or thatch field and we can still have berry bushes etc mixed thru it? that would be rally good to see all his plants in a nice meadow or shrub field even.i do hope he has more plans for the thatch than just construction materials.

  Reply
#94


Thanks for clarifying <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a>! While it's a shame that we can't have edibles and herbs be grown by a forester type of building, it makes sense concidering the fact that we have gatherers and herbalists for those.




<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/8298-stiles/&do=hovercard" data-mentionid="8298" href="<___base_url___>/index.php?/profile/8298-stiles/">@stiles</a> Basically, the 'gathering items' normally get spawned by the trees. This is why they only grow in forests, they simply don't spawn in places where there are no trees. A big downside of this is indeed that they are barely visible, which is one of the main reasons why I wanted more open fields. What I did is to have the grasses spread through the map similarly to the trees, creating patches of forest and patches of grasses. Then I set the herbs, roots, and onions and the like to be spawned by the grass instead of by the forest (the forest still spawns mushrooms, herbs and blueberries, otherwise the forests would be empty). You can see this in the screenshot below: all the flowering plants you see have been naturally spawned by the grass.




<a class="ipsAttachLink ipsAttachLink_image" href="<fileStore.core_Attachment>/monthly_2017_04/Grasslands2.png.32201e8de7e187735557fc2ee1ad59a8.png" data-fileid="1936">[img]<fileStore.core_Attachment>/monthly_2017_04/Grasslands2.thumb.png.68563b558368cf8e3e1755d3545ecd7a.png[/img]</a>




You raise a good point that having the thatch only as a construction material is a bit meager. I am thinking about other ways to use it, for example as food for animals, or perhaps to make paper. Any suggestions are welcome!


  Reply
#95

Quote:
5 hours ago, Bartender said:




Thanks for clarifying <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a>! While it's a shame that we can't have edibles and herbs be grown by a forester type of building, it makes sense concidering the fact that we have gatherers and herbalists for those.




oh they can be planted and grow by foresters but you wont get any harvest from them. you would let it go 10 years long and results of 10 years production : 0 and they will just go full idle till 1 spot has been cleared out for a planting.




 




and it is not really good to have because you still can take the remove tool and tag them. in case of herbs, if you already have an herbalist somewhere on the map and has harvested at least 1 herb somewhere, you would tag all the herbs for destroy and get a +2000 herbs in barn instantly.




about food.... food can always be good but you can specify only 1 food as product. you wouls get a 6000-9000 food in an instant but would be all the same food like 10k blueberry if you specified that one even if they removed a patch of grass.


  Reply
#96


can i throw a curveball at ya's on this? i have wondered but not checked an idea.  you say berries etc spawn in forests.what does the game consider a "forest"?? we have the resource mod that plants and harvests stone in a circle similar to a forester. does the game know the difference or will it spawn gatherer items among the rocks and iron??? same thing with RED's fodder. if the game considers the grass to be trees then it should spawn other roots and ginger through his fields. if the game  bases this spawn on "trees" then what about an invisible tree that looks like grass instead?




  now in your sceenshot,what building or who  collects those berries and other items? am i reading correctly that you are designing this not as a forester but to spawn on maps by itself? so when we start a game the map will have forests and open meadows thoughout the entire map? are those herbs and berries collectable? if so that is very interesting. a big change to the game. go teach NECORA to do that to his maple and apples and pines too even.


  Reply
#97


I'm going to try to answer your questions!




Firstly yes, the game does know the difference between each of the resources. It basically has a separate file for 'tree', 'rock', 'ore', etc. The file for 'tree' has a piece of code in it that tells it to spawn berries and such close to the tree. The files for 'rock' and 'ore' don't have this part, so they don't spawn anything.




My 'grass' resource also has such a file, which has the same piece of code as the 'tree' file does, to tell it to spawn things. In that sense the game indeed treats the grass in a similar way as it treats the trees. (as a side-note, I have tried adding this piece of code to the 'rock' and 'ore' files, but for those it didn't work for some reason).




The grasses indeed spawn throughout the map by themselves, so they are there at the start of the game. The herbs and such that they spawn are collectable. the herbalist can gather the herbs, and the gatherer can gather the food resources.




If anyone wishes I can explain how exactly I got this to work, though I'm not sure if it's really something special. From what I can see <abbr title="Colonial Charter">CC</abbr> also seems to spawn new resources in this way, though perhaps not in such large quantities.


  Reply
#98


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/11115-bartender/&do=hovercard" data-mentionid="11115" href="<___base_url___>/index.php?/profile/11115-bartender/">@Bartender</a> are your grasses in the same file as the trees? Or do you have two naturalresourcex. files loading when the game starts?




 


  Reply
#99


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/5518-necora/&do=hovercard" data-mentionid="5518" href="<___base_url___>/index.php?/profile/5518-necora/">@Necora</a> I have them in a separate file, which is identical in structure to the tree file.




The first thing is that I added the grasses template to the WeakComponentDescription part of StartCondition.rsc:



Code:
    WeakComponentDescription _naturalResources
    [
        "Template/NaturalResourceGrass.rsc",
        "Template/NaturalResourceRock.rsc",
        "Template/NaturalResourceOre.rsc",
        "Template/NaturalResourceTree.rsc",
    ]



Now this by itself gives an error if you try to load it. By pure accident, I had done something else simultaneously that somehow mitigates this error. It is weird though, and I don't want to know how broken the game code is for this to work. I had added a 'spawn' description to the rock template:



Code:
// layout of the entity
ComponentDescription resource
{
    // how often to update
    UpdatePriority _updatePriority = None;
    
    // declare types that will be used
    Description _descriptions
    [
        "map",
        "model",
        "naturalresource",
        "spawn",
    ]
}

SpawnDescription spawn
{
    Spawn _spawn
    [
        {
            ComponentDescription _naturalResource = "Template\NaturalResourceGrass.rsc";
            float _minSpawnAge = 1.1;
            float _maxSpawnAge = 100.0;
        }
    ]
}



Now as I mentioned above, this doesn't do anything by itself (so without the change in the StartCondition.rsc). It doesn't give an error, but it doesn't spawn anything either. For some reason though, the combination of the two does result in the new resource getting spawned naturally in the world.




One thing I have noticed though is that adjusting the spawning behaviour is a very tricky thing! After a lot of testing I have a rough idea of what each variable does, but they are all interdependent so understanding the fine details of their workings is very difficult. Another thing that makes it even more complicated is that changing the spawn behaviour of one resource, also influences the behaviour of the others. With some settings for the grass template I noticed an increase in rocks and ores for example.




EDIT: I had forgotten to mention that you also need to make sure that your mod loads new versions of the easy, medium and hard.rsc. You don't need to change anything in them except for an extra line somewhere to force the game to use the ones in the mod. These load the StartConditions.rsc, and if you don't do this they will still load the old one.


  Reply

You added a spawn to the natural resource rock to make the grass work? That is... odd.

  Reply