Trees

General discussion about the game. Pull up a stool and tell us your tale!
Post Reply
User avatar
Warrior
Evil Iggy
Posts: 667
Joined: Sat 26.10.2002, 15:00
Location: Norway
Contact:

Trees

Post by Warrior » Wed 22.08.2007, 05:27

I'd check the source but I don't really have time and afraid I'll forget about it later:

Every once in a while (maybe once a week or two week) I get a tree directly outside of my door, between my door and another tree. I find this a little fascinating because thats the only place near my house that a tree will ever appear.

I assume (or remember?) that trees have nuts and that they'll occasionally grow to be trees, in a space next to an existing tree, but it seems strange that the new tree will always appear in the same spot, not in any of the other eight ones. (well three of them are too close to the road for that, but still five spaces left).

Will trees remember or somehow prefer spaces where there's been trees before?
-- Mangband Project Team Member

Fink
Ancient MultiHued Dragon
Posts: 614
Joined: Tue 20.01.2004, 13:55

Re: Trees

Post by Fink » Wed 22.08.2007, 09:30

I am pretty sure trees are part of the seed for a town, and will grow back on the same (grey, i think) spot. We see this more often on the main server, because it resets every day (which seems to remove some of the just-grown-back trees). Its kooky, on my ironman server, to see it after a week or two with no reset: I have to go in and hack out some of the trees so you can get to the stairs. And they seem to all grow back in the same spot.

User avatar
Warrior
Evil Iggy
Posts: 667
Joined: Sat 26.10.2002, 15:00
Location: Norway
Contact:

Re: Trees

Post by Warrior » Wed 22.08.2007, 12:53

Yep, seems daily server reset gives us the "default" forest, but then, as times goes by, new trees will appear in fixed locations but at random times apparently...

All part of their evil master plan(failure of daily reset script and...)


************************************************************************
************************************************************************
************************************************************************ ************************************************************************
*****************TOWN*******DOMINATION*******FOREVER!******************
************************************************************************ ************************************************************************
************************************************************************
************************************************************************
************************************************************************
-- Mangband Project Team Member

Fink
Ancient MultiHued Dragon
Posts: 614
Joined: Tue 20.01.2004, 13:55

Re: Trees

Post by Fink » Wed 22.08.2007, 21:07

Yeah good point: fixed locations, random choice of which one to grow next.

Time to show them who's boss with an axe ...

Berendol
Evil Iggy
Posts: 868
Joined: Mon 11.11.2002, 19:13
Location: Loot Pile
Contact:

Re: Trees

Post by Berendol » Thu 23.08.2007, 00:23

The random number seed for the town is saved in the server savefile so the buildings are always the same. Unfortunately, this means that the trees are always in the same place. The town is generated exactly the same in every way, every time the town must be generated. The trigger is usually restarting the server, whether it be from automatic restarts or crashes.

Solution from a coder's perspective? Don't use the stored RNG initial seed when spawning the trees. Shouldn't be too much of a hassle to fix.

It occurs to me how perfectly the terminology (seeding) works in terms of the trees we're discussing.
By appreciation, we make excellence in others our own property. (Voltaire)

Post Reply