The Problem

I'm now trying to create a function to change the features in the wilderness, as an alternative to doing this through inserting the lines in the actual map itself. However, I'm having trouble changing the actual wf_info index for the squares.

I can change town number, the appearance of the square in the wilderness map, the description of the square in the bottom left of the main window, and even the terrain level I think, but I can't seem to find the right variable to change the actual wf_info index, that controls what type of terrain of which a square consists. I.e. If I start Gondolin as a mountain square, then alter it to a town halfway through the game, I can successfully make the town appear, but it is still filled with mountains, rather than grass and trees as I would like (and as the actual Gondolin wf_info.txt entry dictates).

What I have tried so far:

I'm not sure they all did anything, but none of them threw up lua errors.

[EDIT: upon further experimentation, only the entrance and perhaps town_num ones *do* work. The others simply do nothing...]

[EDIT 2: Actually, the wild_map(y,x).feat one changes the name correctly, but that's all it seems to do. None of the other information about the wild feature changes...]

So, is there something I'm missing?

Thanks, TheFalcon.

[some time later] I really can't see anything that I haven't tried to change the actual terrain. It seems that anything I do only changes part of the wf_info information, rather than switching the entry as a whole. Is there no way to do this? *goes frantically searching CVS*

[later still] I've just had a thought... is all the calculation of terrain *only* done at birth, when the seed for the square is calculated? This would make sense, but is a PITA... since it would mean that I can't change it...

Except that that can't be right, else the current method of inserting the line in the wilderness map wouldn't work...

O_o

So is the only way to change the terrain to change the feature in the wilderness map itself? I don't think I can hack that in lua, can I?

Chatter

Module Developers Discussion/Changing wilderness features in lua (last edited 2005-10-13 13:30:52 by TheFalcon)