Author Topic: Trees, Wood, and Global Settings  (Read 891 times)

0 Members and 1 Guest are viewing this topic.

Offline Zefire

  • May 2020
  • 4 Posts
  • Reputation Power: 1
  • Zefire has no influence.
Trees, Wood, and Global Settings
« on: May 24, 2020, 03:55 am »
Don't know if anyone needs this, but I thought I'd just post what I learned.

In the various Land scripts, SET_GLOBAL_LAND_BALANCE(5, 2.000000) controls how much wood you get from each tree.  5 is the setting for Trees-Wood and 2.000000 means each tree will produce 2x the wood. 

SET_GLOBAL_LAND_BALANCE(VALUE, MULTIPLIER)

So here is how CREATE_NEW_TREE then works.

CREATE_NEW_TREE(Forest#, "X-Cord,Y-Cord",TreeType, ?, Rotation, TreeSizeStart, TreeSizeMax)

Forest#, Not sure why the game assigns a tree to a "forest" but it does.  Think it has something to do with Villagers and chopping them down.  Villagers can't chop down a tree that isn't in a "Forest"

TreeType
Value   BaseWood   Desc
0      700      Maple
1      500      Eucalyptus
2      700      Bonsai
3      350      Pine, Green
4      350      Pine,Yellow
5      800      Oak, Yellow
6      800      Oak Green
7      500      Birch
8      300      Palm, Straight
9      300      Palm, Crooked
10      300      Palm, Leafy
11      300      Palm, Woody
12      350      Pine, Dark Green
13      15      Bush, Yellow
14      15      Bush, Dark Green
15      15      Bush, Green
16      400      Evergreen, Dense
17      400      Evergreen, Sparse
18      700      Evergreen, Dense
19      700      Evergreen, Sparse
20      100      Fence Bush, Dark Green
21      100      Fence Bush, Light Green
22      0      Dead Tree

?, No idea what this does, but it's always 1.  No noticeable effect with any other value.
Rotation, Self explanatory, Value of 0 will align it with X axis.  Value of 1 Looks like it adds 30 degrees of angle but that's just a guess.
TreeSizeStart, is the what the tree starts at when the match starts
TreeSizeMax, is how big the tree will grow to.  Any values over 1.0 will cause it to exceed the base wood values and size.


Another random fact.  Those "Ancient Forest" contain a base of 15,000 wood, or 43 Green Pines trees if picked by hand.  Villager foresters will also return the same amount to the village store.  Also when those forest reduce in size, they will drop 1 Dark Green Pine sapling which can grow and spread.  That being said, I usually replant "Ancient Forest" forest at the start of every game.  It can produce quite a bit more wood then 15,000 if replanted and left to grow over time.


Anyone know what the other "SET_GLOBAL_LAND_BALANCE" does?  Seems to be 0-6.  4 is villager speed.  6 is on each of the Skirmish maps but I can't tell what it does.  Haven't tested 0-3 yet.

Offline Zefire

  • May 2020
  • 4 Posts
  • Reputation Power: 1
  • Zefire has no influence.
Re: Trees, Wood, and Global Settings
« Reply #1 on: May 24, 2020, 04:01 am »
Here's a visual of the trees and their base wood values.

https://drive.google.com/file/d/1dE5wdfB2YLCOGeMQRt-8i3jlCmbZ7KrA
« Last Edit: May 24, 2020, 04:08 am by Zefire »

Offline Neen

  • October 2020
  • 2 Posts
  • Reputation Power: 1
  • Neen has no influence.
Re: Trees, Wood, and Global Settings
« Reply #2 on: Oct 18, 2020, 05:08 pm »
Hi

I recently began to play with these files, and your post has been great help to me so thank you :)

Here are my guesses about animal flocks :

Quote
CREATE_FLOCK(4, "2858.50,3403.88", "2858.50,3403.88", 27, 14, 12)
CREATE_NEW_ANIMAL("2864.74,3529.45", 10, 4, 12, 22)
CREATE_NEW_ANIMAL("2862.39,3517.45", 10, 4, 12, 16)
...

CREATE_FLOCK( flockID,  "x,y" , "x,y" , p1 , p2 , townID)
  • Flock ID : self explained
  • "x,y" :  location, often it's the same thing written twice
  • p1 : no idea what this refers to. Tried to do some tests but could not see a change. In standard files it's a number between 5 and 150
  • p1 : no idea what this refers to. Tried to do some tests but could not see a change. In standard files it's a number with some that come very often : 14, 11, 30 ...
  • Town ID: Just a guess, but I dont know if it changes anything when a village claims a flock. Sometimes it's -1 so I guess it means no village claims the flock.


CREATE_NEW_ANIMAL("x,y", SpeciesID, FlockID, TownID, Size)
  • "x,y" : location of the animal
  • Species ID : a number from 0 to 15 (see down this list)
  • Flock ID : seems like an animal is always linked to a flock. Don't know what it changes, except maybe they tend to pack together
  • TownID : Same as the flock the animal belongs to
  • Size : A number from 1 to 50.  Until 8 it looks like a baby animal, then it's bigger

Animal IDs
  • 0 - Lion
  • 1 - Tigre
  • 2 - Wolf
  • 3 - Leopard
  • 4 - Sheep
  • 5 - Void - Crashes the game if you try it
  • 6 - Turtle
  • 7 - Void - Crashes the game if you try it
  • 8 - Cow
  • 9 - Horse
  • 10 - Pig
  • 11 - Crow
  • 12 - Colomb (not sure about english names of these birds)
  • 13 - Swallow
  • 14 - Pidgin
  • 15 - Seagul, albatros or something alike

Now I can see a strange behavior with flocks created manually... the animals will always go in line and follow the first one :
https://drive.google.com/file/d/1zIK_bJpRdi9XUKHlWQwbnLpK9L-w1H75/view?usp=sharing
Trying to relate it to the unknown parameters but no luck for now
Let me know if you know more about these :)

Besides I did some powershell scripts to generate forests, line of trees (cool to create symetrical stuff around a storage pit) , flocks, villagers... let me know if you're interested in it.
https://drive.google.com/file/d/1zkks0N6sCVON7V3FKPRHxjcZU_U2qho3/view?usp=sharing