Welcome to the forum. I think the ffp_terr_detail action is not needed, you can remove it. It probably was from a time when terrain detail textures were not automatically supported and you needed such a function.

It the same with many shaders you find on the Wiki, terrain_multitexture, bumpmapping, waving grass and so on, they are all not needed anymore and are from a time when this was not yet included in Gamestudio.