This commit is contained in:
Leshyi committed 2026-11-03 13:45:36 +03:00
1 parent 9682ed0987
commit eade0cd2ae
10 files changed
+1531693 -166311

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
{
"mcpServers": {
"Roblox_Studio": {
"type": "stdio",
"command": "cmd.exe",
"args": ["/c", "cd /d %LOCALAPPDATA%\\Roblox && .\\mcp.bat"]
}
}
}
+1531210 -166293
View File
File diff suppressed because it is too large. Load diff
+25
View File
@@ -0,0 +1,25 @@
# Low-poly landscape — 2026-11-03
The baked scene uses flat, matte MaterialVariants for Snow (olive grass), Salt
(ochre paths), and Slate/Rock (cool gray stone). Color and roughness use the
opaque white Roblox built-in `rbxasset://textures/SelfView/whiteRect.png` map;
normal and metalness maps are empty. Geometry supplies the facets.
## Toolbox credits
- **FracturedSkies** — [Low Poly Rock Pack FREE](https://create.roblox.com/store/asset/2128776869), used for shoreline boulders and cliff foot rocks. Credit is also stored on `World1Map.LowPolyRockwork`.
- **DaveCam456** — [Low-Poly Rocky Cliff](https://create.roblox.com/store/asset/11751641277), used for cliff faces.
- **DaveCam456** — [Low-Poly Rocky Mountain Border](https://create.roblox.com/store/asset/11751636142), used for perimeter ridges.
Imported templates are in `ServerStorage.LandscapeAssetLibrary`; only anchored
geometry is copied into the landscape. No imported scripts are used.
## Reapply
`install/LOW_POLY_LANDSCAPE.lua` applies materials and places rock meshes onto an
existing baked World1Map. It requires the above templates in the asset library.
The source palette and the live FishConfig/FishingClient were updated together
so entering World1 does not restore the old grass colors.
Studio changes must be saved with the place. The filesystem build does not
automatically serialize the edited Terrain or imported meshes from Studio.
+61
View File
@@ -0,0 +1,61 @@
-- Apply after REBUILD_LANDSCAPE.lua in Studio Edit mode.
local V,CF=Vector3.new,CFrame.new
local map=workspace.World1Map
local folder=map.LandscapeDetails
local cabin=map.BigCabin;cabin:ScaleTo(1.65)
local c,s=cabin:GetBoundingBox()
cabin:PivotTo(cabin:GetPivot()+V(-80-c.X,10-(c.Y-s.Y/2),1450-c.Z))
local old=folder:FindFirstChild('CabinRamp');if old then old:Destroy() end
local ramp=Instance.new('Model');ramp.Name='CabinRamp';ramp.Parent=folder
local function part(name,size,cf,color,mat,parent)
local p=Instance.new('Part');p.Name=name;p.Anchored=true;p.Size=size;p.CFrame=cf;p.Color=color;p.Material=mat or Enum.Material.Wood;p.TopSurface=Enum.SurfaceType.Smooth;p.BottomSurface=Enum.SurfaceType.Smooth;p.Parent=parent or ramp;return p
end
local function beam(a,b,w,color,parent)
return part('Rail',V(w,w,(a-b).Magnitude),CFrame.lookAt((a+b)/2,b),color,Enum.Material.Wood,parent)
end
local wood=Color3.fromRGB(137,89,48)
local a,b=V(-68.1,12.15,1457.1),V(-68.1,4.3,1479)
local cf=CFrame.lookAt((a+b)/2,b)
part('WalkableRamp',V(6.5,0.55,(b-a).Magnitude+0.5),cf,wood,Enum.Material.WoodPlanks)
for j=0,16 do
local p=a:Lerp(b,j/16)
local strip=part('CrossPlank',V(6.55,0.12,0.10),CF(p+V(0,0.33,0))*cf.Rotation,Color3.fromRGB(103,65,37))
strip.CanCollide=false
end
for _,side in {-1,1} do
local prev
for j=0,4 do
local p=a:Lerp(b,j/4)+V(side*3,0,0)
part('RampPost',V(0.45,3.5,0.45),CF(p+V(0,1.5,0)),wood)
if prev then beam(prev+V(0,2.9,0),p+V(0,2.9,0),0.32,wood) end
prev=p
end
end
-- Warm lamps at the cabin and along the uphill trail.
for _,p in {V(-65,12,1457),V(-88,7,1530),V(-104,20,1464),V(-93,37,1415),V(-46,60,1385)} do
part('LanternPost',V(0.6,6,0.6),CF(p+V(0,3,0)),wood,nil,folder)
local lamp=part('AmberLantern',V(1.1,1.6,1.1),CF(p+V(0,6,0)),Color3.fromRGB(255,199,99),Enum.Material.Neon,folder)
part('LanternCap',V(1.5,0.3,1.5),CF(p+V(0,6.95,0)),Color3.fromRGB(64,57,41),Enum.Material.Metal,folder)
local light=Instance.new('PointLight');light.Color=lamp.Color;light.Brightness=1.3;light.Range=13;light.Parent=lamp
end
-- Broaden the cascade while retaining its original animation and particles.
local sheet=map.Waterfall:GetChildren()[1]
if not sheet:GetAttribute('LandscapeWidened') then
sheet.Size=V(19,sheet.Size.Y,sheet.Size.Z)
for _,a in sheet:GetChildren() do if a:IsA('Attachment') then a.Position=V(a.Position.X*1.9,a.Position.Y,a.Position.Z) end end
sheet:SetAttribute('LandscapeWidened',true)
end
-- The small waterside cabin sits on the opposite shore, below the lookout.
local small=map.SmallCabin;local sc,ss=small:GetBoundingBox()
small:PivotTo(small:GetPivot()+V(-10-sc.X,5.05-(sc.Y-ss.Y/2),1424-sc.Z))
local bridge=map.Bridge
local low=math.huge
for _,p in bridge:GetDescendants() do
if p:IsA('BasePart') and math.abs(p.Size.Y-0.5)<0.01 then low=math.min(low,p.Position.Y+0.25) end
end
if low<math.huge then bridge:PivotTo(bridge:GetPivot()+V(0,39.1-low,0)) end
local generated=workspace:FindFirstChild('HouseWithRamp')
if generated then generated.Parent=game.ServerStorage end
workspace.CurrentCamera.CFrame=CFrame.lookAt(V(22,14,1570),V(-22,25,1443))
return {rampSlopeDegrees=math.deg(math.atan((a.Y-b.Y)/(a.Z-b.Z)))*-1}
+107
View File
@@ -0,0 +1,107 @@
-- Apply to the baked World1Map in Edit mode.
-- Toolbox assets: DaveCam456 / 11751641277; FracturedSkies / 2128776869.
local V,CF=Vector3.new,CFrame.new
local terrain=workspace.Terrain
local map=workspace.World1Map
local lib=game.ServerStorage.LandscapeAssetLibrary
local ms=game:GetService('MaterialService')
for x=-288,287,48 do
terrain:ReplaceMaterial(Region3.new(V(x,-24,1212),V(x+48,160,1788)):ExpandToGrid(4),4,Enum.Material.Rock,Enum.Material.Slate)
task.wait()
end
local colors={Snow=Color3.fromRGB(127,163,63),Salt=Color3.fromRGB(191,155,105),Rock=Color3.fromRGB(132,139,155),Slate=Color3.fromRGB(132,139,155)}
for name,color in colors do
local material=Enum.Material[name]
local variant=ms:FindFirstChild('LowPolyFlat'..name) or Instance.new('MaterialVariant')
variant.Name='LowPolyFlat'..name;variant.BaseMaterial=material
variant.ColorMap='rbxasset://textures/SelfView/whiteRect.png'
variant.RoughnessMap='rbxasset://textures/SelfView/whiteRect.png'
variant.NormalMap='';variant.MetalnessMap='';variant.StudsPerTile=32;variant.Parent=ms
ms:SetBaseMaterialOverride(material,variant.Name);terrain:SetMaterialColor(material,color)
end
local old=map:FindFirstChild('LowPolyRockwork');if old then old:Destroy() end
local folder=Instance.new('Folder');folder.Name='LowPolyRockwork';folder.Parent=map
folder:SetAttribute('CliffCreator','DaveCam456')
folder:SetAttribute('CliffAssetId','11751641277')
folder:SetAttribute('RockCreator','FracturedSkies')
folder:SetAttribute('RockAssetId','2128776869')
local cliff=lib.LowPolyRockyCliff:FindFirstChildWhichIsA('MeshPart',true)
local mountain=lib.MountainBorder:FindFirstChildWhichIsA('MeshPart',true)
local stones={}
for _,p in lib.LowPolyRockPack:GetDescendants() do if p:IsA('MeshPart') then table.insert(stones,p) end end
table.sort(stones,function(a,b) return a.Name<b.Name end)
local rng=Random.new(320)
local function place(source,name,pos,size,angle,color)
local p=source:Clone()
for _,v in p:GetDescendants() do if v:IsA('LuaSourceContainer') or v:IsA('SurfaceAppearance') or v:IsA('Decal') or v:IsA('Texture') then v:Destroy() end end
p.Name=name;p.Anchored=true;p.TextureID='';p.Material=Enum.Material.SmoothPlastic;p.MaterialVariant='';p.Reflectance=0
p.Size=size;p.CFrame=CF(pos)*CFrame.Angles(0,angle or 0,0)
p.Color=color or Color3.fromRGB(130+rng:NextInteger(-7,7),135+rng:NextInteger(-5,5),149+rng:NextInteger(-5,5))
p.Parent=folder;return p
end
-- Broad vertical facets under the grassy lookout and beside the waterfall.
local columns={
{-75,18,1415,23,38,24},{-58,21,1417,26,44,25},{-38,22,1415,25,46,23},{-19,18,1408,24,38,23},
{5,13,1410,22,28,24},
{25,16,1427,23,36,27},{12,13,1423,22,29,26},
{68,17,1425,25,39,29},{85,15,1420,25,34,30},{98,10,1410,24,25,27},
}
for i,p in columns do
place(cliff,'CliffFace_'..i,V(p[1],p[2],p[3]+(i<=5 and 9 or 0)),V(p[4]*(i<=5 and 1.2 or 1),p[5],p[6]*(i<=5 and 1.15 or 1)),i*0.71)
end
-- Large irregular rock silhouettes replace the fine-grained mountain surface.
for i=0,23 do
local a=i*math.pi*2/24
local r=239+17*math.sin(i*2.17)
local radius=66+23*math.sin(i*3.1)^2
local ht=76+43*math.sin(i*1.87)^2
local pos=V(math.cos(a)*r,ht*0.43,1500+math.sin(a)*r)
local mass=place(mountain,'MountainMass_'..i,V(pos.X-math.cos(a)*19,ht*0.51-4,pos.Z-math.sin(a)*19),V(radius*1.95,ht*1.344,radius*2.295),0,Color3.fromRGB(125+i%3*4,136+i%3*3,147+i%3*4))
mass.CFrame=CFrame.lookAt(mass.Position,mass.Position+V(math.cos(a),0,math.sin(a)))
task.wait()
end
local feet={{-64,12,1426,25,30,22},{-44,15,1428,29,35,24},{-25,10,1424,20,24,19},{27,12,1433,24,29,27},{70,15,1430,29,35,30},{92,9,1421,28,25,27}}
for i,a in feet do
place(stones[i],'CliffFootBoulder',V(a[1],a[2],a[3]),V(a[4],a[5],a[6]),i*0.6,Color3.fromRGB(128+i%3*3,132+i%3*3,146+i%3*3))
end
local rp=RaycastParams.new();rp.FilterType=Enum.RaycastFilterType.Include;rp.FilterDescendantsInstances={terrain};rp.IgnoreWater=true
local lakes=require(game.ReplicatedStorage.FishConfig).Worlds[1].lakes
local function gap(x,z)
local g=math.huge
for _,l in lakes do g=math.min(g,math.sqrt((x-l[1])^2+(z-1500-l[2])^2)-l[3]) end
return g
end
-- Discrete clusters, with the dock, ramp, and trail kept open.
for i=1,120 do
local x,z=rng:NextNumber(-112,116),rng:NextNumber(1408,1557)
local g=gap(x,z)
local clear=not (math.abs(x)<27 and z>1530) and not (x< -58 and x> -95 and z>1430 and z<1494) and not (x> -24 and x<8 and z<1440)
if g>-1 and g<7 and clear then
local hit=workspace:Raycast(V(x,180,z),V(0,-230,0),rp)
if hit then
local s=rng:NextNumber(3,7)
place(stones[i%#stones+1],'ShoreBoulder',hit.Position+V(0,s*0.18,0),V(s,s*0.8,s*0.9),rng:NextNumber(0,6.28))
end
end
end
-- Put trees on the new rock surfaces instead of leaving them inside the mountains.
local rockRay=RaycastParams.new();rockRay.FilterType=Enum.RaycastFilterType.Include;rockRay.FilterDescendantsInstances={folder,terrain};rockRay.IgnoreWater=true
local moved=0
for _,tree in map.LandscapeDetails:GetChildren() do
if tree:IsA('Model') and tree.Name=='Pine' then
local c,s=tree:GetBoundingBox()
local base=c.Y-s.Y/2
local hit=workspace:Raycast(V(c.X,220,c.Z),V(0,-260,0),rockRay)
if hit and math.abs(hit.Position.Y-base)>0.5 then tree:PivotTo(tree:GetPivot()+V(0,hit.Position.Y-base-0.3,0));moved+=1 end
end
end
for _,n in {'AssetPreview','MountainPreview'} do local preview=workspace:FindFirstChild(n);if preview then preview:Destroy() end end
map:SetAttribute('LandscapeStyle','LowPolyMatte')
local small=map.SmallCabin
local sc,ss=small:GetBoundingBox()
local shore=workspace:Raycast(V(-8,180,1438),V(0,-220,0),rp)
local sy=math.max(3.5,shore and shore.Position.Y or 3.5)
small:PivotTo(small:GetPivot()+V(-8-sc.X,sy-(sc.Y-ss.Y/2),1438-sc.Z))
return {rocks=#folder:GetChildren(),treesGrounded=moved}
+170
View File
@@ -0,0 +1,170 @@
-- Run in Studio Edit mode. Rebuilds only World1 landscape; keep a scene backup first.
local V, CF = Vector3.new, CFrame.new
local terrain, map = workspace.Terrain, workspace.World1Map
local W = V(0,0,1500)
local lakes = require(game.ReplicatedStorage.FishConfig).Worlds[1].lakes
local path = {{-24,62,4},{-64,52,5},{-87,32,7},{-100,4,10},{-106,-27,17},{-103,-57,27},{-91,-83,37},{-66,-92,46},{-39,-105,54},{-46,-123,60}}
local function gap(x,z)
local g=1e5
for _,l in lakes do g=math.min(g,math.sqrt((x-l[1])^2+(z-l[2])^2)-l[3]) end
return g
end
local function pathInfo(x,z)
local best,h=1e5,4
for i=2,#path do
local a,b=path[i-1],path[i]; local dx,dz=b[1]-a[1],b[2]-a[2]
local t=math.clamp(((x-a[1])*dx+(z-a[2])*dz)/(dx*dx+dz*dz),0,1)
local d=math.sqrt((x-a[1]-dx*t)^2+(z-a[2]-dz*t)^2)
if d<best then best,h=d,a[3]+(b[3]-a[3])*t end
end
return best,h
end
local peaks={}
for i=0,23 do
local a=i*math.pi*2/24
local r=239+17*math.sin(i*2.17)
table.insert(peaks,{math.cos(a)*r,math.sin(a)*r,66+23*math.sin(i*3.1)^2,76+43*math.sin(i*1.87)^2})
end
local function height(x,z)
local g=gap(x,z)
if g<0 then return -10+math.clamp((g+10)/10,0,1)*8 end
local y=4+math.noise(x/48,z/48)*2
for _,p in peaks do
local d=math.sqrt((x-p[1])^2+(z-p[2])^2)/p[3]
y=math.max(y,4+p[4]*math.max(0,1-d)^0.85)
end
local d=math.sqrt(((x+46)/70)^2+((z+123)/64)^2)
y=math.max(y,4+56*math.max(0,1-d^2)^0.7)
-- Broad, grassy summit with a firm level base for the lookout.
if ((x+46)/15)^2+((z+123)/14)^2<1 then y=60 end
-- River escarpment behind the waterfall, with a steep lake-facing wall.
local cliff=math.clamp((x-17)/15,0,1)*math.clamp((112-x)/22,0,1)*math.clamp((-z-68)/12,0,1)*math.clamp((z+172)/28,0,1)
y=math.max(y,4+32*cliff)
local pd,ph=pathInfo(x,z)
local mix=1-math.clamp((pd-4)/9,0,1)
y=y*(1-mix)+ph*mix
-- Level building terrace on the left bank.
local cd=math.sqrt(((x+80)/22)^2+((z+50)/19)^2)
if cd<1.5 then local b=math.clamp((1.5-cd)/0.5,0,1); y=y*(1-b)+10*b end
-- Preserve the low, usable shoreline.
y=4+(y-4)*math.clamp(g/11,0,1)
return y
end
terrain:SetMaterialColor(Enum.Material.Snow,Color3.fromRGB(122,182,74))
terrain:SetMaterialColor(Enum.Material.Salt,Color3.fromRGB(190,153,102))
terrain:SetMaterialColor(Enum.Material.Rock,Color3.fromRGB(111,124,137))
terrain:SetMaterialColor(Enum.Material.Sand,Color3.fromRGB(205,190,140))
terrain.WaterColor=Color3.fromRGB(38,158,157)
terrain.WaterTransparency=0.5
terrain.WaterWaveSize=0.12
terrain.WaterWaveSpeed=8
-- 48-stud chunks keep every WriteVoxels small and allow Studio to repaint.
for x0=-288,287,48 do
for z0=-288,287,48 do
local region=Region3.new(W+V(x0,-24,z0),W+V(x0+48,160,z0+48)):ExpandToGrid(4)
local mats,occ=terrain:ReadVoxels(region,4)
for ix=1,12 do for iz=1,12 do
local x,z=x0+(ix-0.5)*4,z0+(iz-0.5)*4
local h,g=height(x,z)-2,gap(x,z)
local pd=pathInfo(x,z)
local slope=math.max(math.abs(height(x+2,z)-height(x-2,z)),math.abs(height(x,z+2)-height(x,z-2)))/4
for iy=1,46 do
local bottom=-24+(iy-1)*4
local o=math.clamp((h-bottom)/4,0,1)
local m=Enum.Material.Air
if o>0 then
m=Enum.Material.Rock
if bottom>h-7 then
m=(slope>1.05 and h>14) and Enum.Material.Rock or Enum.Material.Snow
if pd<4.5 and g>2 then m=Enum.Material.Salt end
if g<3 then m=Enum.Material.Sand end
end
elseif g<0 and bottom<0 then m=Enum.Material.Water; o=1 end
mats[ix][iy][iz],occ[ix][iy][iz]=m,o
end
end end
terrain:WriteVoxels(region,4,mats,occ)
task.wait()
end
end
local old=map:FindFirstChild('LandscapeDetails'); if old then old:Destroy() end
local details=Instance.new('Folder');details.Name='LandscapeDetails';details.Parent=map
local rng=Random.new(103)
local function part(name,size,cf,color,material,parent)
local p=Instance.new('Part'); p.Name=name;p.Size=size;p.CFrame=cf;p.Color=color;p.Material=material or Enum.Material.SmoothPlastic;p.Anchored=true;p.TopSurface=Enum.SurfaceType.Smooth;p.BottomSurface=Enum.SurfaceType.Smooth;p.Parent=parent or details;return p
end
local wood=Color3.fromRGB(125,78,43)
local function beam(a,b,width,color,parent)
return part('Rail',V(width,width,(b-a).Magnitude),CFrame.lookAt((a+b)/2,b),color or wood,Enum.Material.Wood,parent)
end
-- Move existing assets, keeping game markers and identifiers intact.
local tower=map.Watchtower
local tc,ts=tower:GetBoundingBox()
tower:PivotTo(tower:GetPivot()+V(-46-tc.X,60-(tc.Y-ts.Y/2),1377-tc.Z))
local cabin=map.BigCabin
local bc,bs=cabin:GetBoundingBox()
cabin:PivotTo(cabin:GetPivot()+V(-89-bc.X,8-(bc.Y-bs.Y/2),1512-bc.Z))
local small=map.SmallCabin;local sc,sz=small:GetBoundingBox()
small:PivotTo(small:GetPivot()+V(-24-sc.X,5-(sc.Y-sz.Y/2),1416-sc.Z))
-- An upper river runs beneath the existing bridge to the waterfall lip.
terrain:FillBlock(CF(46,34,1394),V(12,4,54),Enum.Material.Water)
terrain:FillBlock(CF(46,40,1394),V(12,8,54),Enum.Material.Air)
-- Cliff buttresses flank the falling water and support both bridge ends.
for _,b in {{27,17,1422,20,34,24},{68,17,1423,23,34,27}} do
terrain:FillBlock(CF(b[1],b[2],b[3]),V(b[4],b[5],b[6]),Enum.Material.Rock)
terrain:FillBlock(CF(b[1],35,b[3]-5),V(b[4],4,b[6]-10),Enum.Material.Snow)
end
-- Trail fencing follows the graded path, leaving the entrance open.
for i=3,#path do
local a,b=path[i-1],path[i]
local av,bv=V(a[1],a[3],a[2]),V(b[1],b[3],b[2])
local dir=V(b[1]-a[1],0,b[2]-a[2]).Unit;local side=V(-dir.Z,0,dir.X)*6
local steps=math.ceil((bv-av).Magnitude/9)
for _,sign in {-1,1} do
local prev
for j=0,steps do
local p=W+av:Lerp(bv,j/steps)+side*sign
part('TrailPost',V(0.65,3.7,0.65),CF(p+V(0,1.6,0)),wood,Enum.Material.Wood)
if prev then beam(prev+V(0,2.7,0),p+V(0,2.7,0),0.4);beam(prev+V(0,1.3,0),p+V(0,1.3,0),0.3) end
prev=p
end
end
end
-- Restore the established low-poly evergreen style from World1Builder.
local crownRotation=CFrame.Angles(math.rad(-35.264),0,0)*CFrame.Angles(0,0,math.rad(45))
local count=0
for i=1,520 do
local x,z=rng:NextNumber(-235,235),rng:NextNumber(-235,235)
local g=gap(x,z);local pd=pathInfo(x,z);local h=height(x,z)
local blocked=(x>-38 and x<38 and z>42 and z<100) or (math.abs(x+80)<29 and math.abs(z+50)<26) or (math.abs(x+24)<16 and math.abs(z+84)<15) or (math.abs(x+46)<20 and math.abs(z+123)<18) or (x>12 and x<86 and z< -65 and z> -152)
if g>10 and pd>12 and not blocked and h<100 then
local tree=Instance.new('Model');tree.Name='Pine'
local ht=rng:NextNumber(17,32);local p=W+V(x,h-0.5,z)
part('Trunk',V(ht*0.065,ht*0.55,ht*0.065),CF(p+V(0,ht*0.25,0)),Color3.fromRGB(91,65,39),Enum.Material.Wood,tree)
for tier=0,3 do
local s=ht*(0.43-tier*0.075)
local leaf=part('Needles',V(s,s,s),CF(p+V(0,ht*(0.3+tier*0.18),0))*CFrame.Angles(0,i*1.73,0)*crownRotation,Color3.fromRGB(43+tier*11,91+tier*12,51+tier*3),nil,tree)
leaf.CanCollide=false
end
tree.Parent=details;count+=1
end
if i%40==0 then task.wait() end
end
-- Shore rocks and low shrubs frame the lake without hiding the main landmarks.
for i=1,250 do
local x,z=rng:NextNumber(-125,125),rng:NextNumber(-145,90)
local g=gap(x,z);local pd=pathInfo(x,z)
if g>2 and g<13 and pd>9 and not (math.abs(x)<25 and z>35) and not (x>20 and x<78 and z< -60) then
local h=height(x,z);local s=rng:NextNumber(2,6)
local p=part('ShoreRock',V(s,s*0.65,s*0.8),CF(W+V(x,h,z))*CFrame.Angles(0.2,i,0.3),Color3.fromRGB(115,125,132))
if i%2==0 then
for j=1,3 do local q=part('Shrub',V(2.8,2.8,2.8),CF(W+V(x+j*1.1,h+1,z-2)),Color3.fromRGB(91+j*12,138+j*8,51));q.Shape=Enum.PartType.Ball;q.CanCollide=false end
end
end
end
local lighting=game:GetService('Lighting');lighting.ClockTime=15.2;lighting.Brightness=2.5;lighting.Ambient=Color3.fromRGB(125,137,145);lighting.OutdoorAmbient=Color3.fromRGB(145,152,139)
workspace.CurrentCamera.CFrame=CFrame.lookAt(V(8,17,1575),V(-10,25,1435))
map:SetAttribute('LandscapeRevision','ReferenceLandscape_v1')
return {trees=count,details=#details:GetDescendants(),pathPoints=#path}
+37
View File
@@ -0,0 +1,37 @@
-- Requires the generated SpruceTree template, retained in ServerStorage after use.
local source=workspace:FindFirstChild('SpruceTree') or game.ServerStorage:FindFirstChild('SpruceTree')
assert(source,'Generate or restore SpruceTree first')
local template=Instance.new('Model');template.Name='SpruceTemplate'
for _,p in source:GetDescendants() do
if p:IsA('BasePart') then
local q=p:Clone();q.Anchored=true
if q.Name:find('Foliage') then q.CanCollide=false;q.Material=Enum.Material.SmoothPlastic;q.UsePartColor=true end
q.Parent=template
end
end
local templateBounds=template:GetBoundingBox()
template.WorldPivot=CFrame.new(templateBounds.Position)
local rng=Random.new(58)
local folder=workspace.World1Map.LandscapeDetails
local n=0
for _,tree in folder:GetChildren() do
if tree.Name=='Pine' and tree:IsA('Model') then
local trunk=tree:FindFirstChild('Trunk')
if trunk then
local base=trunk.Position-Vector3.new(0,trunk.Size.Y/2,0)
local copy=template:Clone();copy.Name='Pine';copy:ScaleTo(rng:NextNumber(0.75,1.25))
local cf,size=copy:GetBoundingBox()
copy:PivotTo(CFrame.new(base+Vector3.new(0,size.Y/2,0))*CFrame.Angles(0,rng:NextNumber(0,6.28),0))
local c,s=copy:GetBoundingBox();copy:PivotTo(copy:GetPivot()+Vector3.new(base.X-c.X,base.Y-(c.Y-s.Y/2),base.Z-c.Z))
local shade=rng:NextNumber(-0.03,0.04)
for _,p in copy:GetChildren() do
if p.Name:find('Foliage') then local k=tonumber(p.Name:match('%d+')) or 1;p.Color=Color3.fromRGB(50+k*5,95+k*7,44+k*4):Lerp(Color3.fromRGB(120,145,60),math.max(0,shade*7)) end
end
copy.Parent=folder;tree:Destroy();n+=1
if n%25==0 then task.wait() end
end
end
end
template:Destroy();source.Parent=game.ServerStorage
return {replaced=n}
+25 -5
View File
@@ -12,14 +12,34 @@ Config.Worlds = {
id = "World1", name = "Тихое озеро", icon = "🌊", level = 1, mult = 1, id = "World1", name = "Тихое озеро", icon = "🌊", level = 1, mult = 1,
center = Vector3.new(0, 0, 1500), color = Color3.fromRGB(60, 200, 255), center = Vector3.new(0, 0, 1500), color = Color3.fromRGB(60, 200, 255),
desc = "Спокойное лесное озеро. Отличное место, чтобы начать.", desc = "Спокойное лесное озеро. Отличное место, чтобы начать.",
clock = 16.4, water = Color3.fromRGB(38, 172, 166), clock = 16.2,
waterY = 0, waterY = 0,
lakes = { { 0, -15, 62 }, { -42, 8, 34 }, { 44, 2, 36 }, { 0, 22, 30 }, { 48, -50, 22 } }, -- { x, z, радиус } от центра lakes = { { 0, -15, 62 }, { -42, 8, 34 }, { 44, 2, 36 }, { 0, 22, 30 }, { 48, -50, 22 } }, -- { x, z, радиус } от центра
-- внешний вид только этого мира (применяет клиент при входе, при выходе возвращает как было) -- внешний вид только этого мира (применяет клиент при входе, при выходе возвращает как было)
waterTransparency = 0.6, waveSize = 0.12, tint = Color3.fromRGB(255, 240, 222), tint = Color3.fromRGB(255, 247, 236),
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
look = {
lighting = {
Brightness = 2.6, ExposureCompensation = -0.15,
Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
ColorShift_Top = Color3.fromRGB(255, 232, 196),
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8,
},
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
atmosphere = {
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15,
Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
},
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 },
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 },
sunRays = { Intensity = 0.06, Spread = 0.6 },
-- лёгкое размытие дальнего плана
dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
},
-- земля мира залита материалом Snow (ровный, без травинок), дорожки — Salt; здесь они перекрашиваются -- земля мира залита материалом Snow (ровный, без травинок), дорожки — Salt; здесь они перекрашиваются
terrainColors = { terrainColors = {
Snow = Color3.fromRGB(122, 182, 74), Salt = Color3.fromRGB(176, 136, 90), Snow = Color3.fromRGB(127, 163, 63), Salt = Color3.fromRGB(191, 155, 105),
Rock = Color3.fromRGB(132, 139, 155), Slate = Color3.fromRGB(132, 139, 155),
Mud = Color3.fromRGB(78, 110, 92), Sand = Color3.fromRGB(205, 190, 140), Mud = Color3.fromRGB(78, 110, 92), Sand = Color3.fromRGB(205, 190, 140),
}, },
}, },
@@ -27,7 +47,7 @@ Config.Worlds = {
id = "World2", name = "Тропический остров", icon = "🏝", level = 8, mult = 4, id = "World2", name = "Тропический остров", icon = "🏝", level = 8, mult = 4,
center = Vector3.new(1500, 0, 0), color = Color3.fromRGB(255, 190, 70), center = Vector3.new(1500, 0, 0), color = Color3.fromRGB(255, 190, 70),
desc = "Бирюзовое море, пальмы и яркая рифовая рыба.", desc = "Бирюзовое море, пальмы и яркая рифовая рыба.",
clock = 13, water = Color3.fromRGB(35, 175, 185), clock = 13,
waterY = 0, waterY = 0,
sea = 119, -- всё дальше этого радиуса от центра — море sea = 119, -- всё дальше этого радиуса от центра — море
}, },
@@ -35,7 +55,7 @@ Config.Worlds = {
id = "World3", name = "Ледяной фьорд", icon = "❄", level = 18, mult = 12, id = "World3", name = "Ледяной фьорд", icon = "❄", level = 18, mult = 12,
center = Vector3.new(-1500, 0, 0), color = Color3.fromRGB(150, 220, 255), center = Vector3.new(-1500, 0, 0), color = Color3.fromRGB(150, 220, 255),
desc = "Рыбалка в лунках среди льдов и северного сияния.", desc = "Рыбалка в лунках среди льдов и северного сияния.",
clock = 18.3, water = Color3.fromRGB(25, 70, 100), clock = 18.3,
waterY = 1, waterY = 1,
lakes = { { 0, 0, 70 }, { -55, 30, 45 }, { 55, -25, 50 }, { 5, -70, 40 } }, -- подо льдом lakes = { { 0, 0, 70 }, { -55, 30, 45 }, { 55, -25, 50 }, { 5, -70, 40 } }, -- подо льдом
holes = { holes = {
@@ -40,14 +40,9 @@ ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06,
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 }) ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 })
---------------------------------------------------------------- вода ---------------------------------------------------------------- вода
-- цвет, прозрачность и волны воды не задаются скриптом: берутся из свойств Terrain в плейсе
local terrain = Workspace.Terrain local terrain = Workspace.Terrain
-- низкое отражение, иначе вода «засвечивается» небом и выглядит белой
terrain.WaterColor = Color3.fromRGB(10, 55, 70)
terrain.WaterTransparency = 0.15
terrain.WaterReflectance = 0.08
terrain.WaterWaveSize = 0.3
terrain.WaterWaveSpeed = 12
---------------------------------------------------------------- МИР 1: «Тихое озеро» ---------------------------------------------------------------- МИР 1: «Тихое озеро»
-- Уровень собирает модуль World1Builder: один раз в Studio (тогда он лежит в Workspace.World1Map -- Уровень собирает модуль World1Builder: один раз в Studio (тогда он лежит в Workspace.World1Map
@@ -1536,18 +1536,58 @@ local snow = new("ParticleEmitter", {
}) })
local lastWorldId = "none" local lastWorldId = "none"
local terrain = workspace.Terrain local terrain = workspace.Terrain
local defaultWater = Color3.fromRGB(10, 55, 70)
-- то, что мир может поменять под себя (вода, оттенок, цвета травы и песка); остальные миры — как в MapBuilder -- то, что мир может поменять под себя (оттенок, цвета травы и песка); вода не трогается — она из свойств Terrain
local DEFAULT_LOOK = { waterTransparency = 0.15, waveSize = 0.3, tint = Color3.new(1, 1, 1) } local DEFAULT_LOOK = { tint = Color3.new(1, 1, 1) }
local defaultTerrainColors = nil local defaultTerrainColors = nil
-- world.look: свет и эффекты мира; при выходе свойства возвращаются к тем, что были до первого входа
local lookTargets = {
lighting = function() return Lighting end,
atmosphere = function() return Lighting:FindFirstChildOfClass("Atmosphere") end,
color = function() return Lighting:FindFirstChildOfClass("ColorCorrectionEffect") end,
bloom = function() return Lighting:FindFirstChildOfClass("BloomEffect") end,
sunRays = function() return Lighting:FindFirstChildOfClass("SunRaysEffect") end,
dof = function()
return Lighting:FindFirstChildOfClass("DepthOfFieldEffect")
or new("DepthOfFieldEffect", { Enabled = false, Parent = Lighting })
end,
}
local lookDefaults = {}
local function applyLook(world)
-- исходные значения запоминаем до первой правки; эффект мог ещё не прийти с сервера, тогда в следующий раз
for _, w in ipairs(Config.Worlds) do
for section, props in pairs(w.look or {}) do
local obj = lookTargets[section] and lookTargets[section]()
if obj then
lookDefaults[section] = lookDefaults[section] or {}
for prop in pairs(props) do
if lookDefaults[section][prop] == nil then
lookDefaults[section][prop] = obj[prop]
end
end
end
end
end
local look = (world and world.look) or {}
for section, defaults in pairs(lookDefaults) do
local obj = lookTargets[section]()
if obj then
local goal = {}
for prop, def in pairs(defaults) do
local v = look[section] and look[section][prop]
if v == nil then v = def end
if typeof(v) == "boolean" then obj[prop] = v else goal[prop] = v end
end
TweenService:Create(obj, TweenInfo.new(2), goal):Play()
end
end
end
local function applyAmbience(world) local function applyAmbience(world)
local clock = (world and world.clock) or 14.5 local clock = (world and world.clock) or 14.5
TweenService:Create(Lighting, TweenInfo.new(2), { ClockTime = clock }):Play() TweenService:Create(Lighting, TweenInfo.new(2), { ClockTime = clock }):Play()
terrain.WaterColor = (world and world.water) or defaultWater
terrain.WaterTransparency = (world and world.waterTransparency) or DEFAULT_LOOK.waterTransparency
terrain.WaterWaveSize = (world and world.waveSize) or DEFAULT_LOOK.waveSize
local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect") local cc = Lighting:FindFirstChildOfClass("ColorCorrectionEffect")
if cc then if cc then
TweenService:Create(cc, TweenInfo.new(2), { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }):Play() TweenService:Create(cc, TweenInfo.new(2), { TintColor = (world and world.tint) or DEFAULT_LOOK.tint }):Play()
@@ -1555,7 +1595,7 @@ local function applyAmbience(world)
-- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе -- цвета материалов террейна общие для всей карты, поэтому меняем их только у себя и возвращаем при выходе
if not defaultTerrainColors then if not defaultTerrainColors then
defaultTerrainColors = {} defaultTerrainColors = {}
for _, name in ipairs({ "Snow", "Salt", "Mud", "Sand" }) do for _, name in ipairs({ "Snow", "Salt", "Mud", "Sand", "Rock", "Slate" }) do
defaultTerrainColors[name] = terrain:GetMaterialColor(Enum.Material[name]) defaultTerrainColors[name] = terrain:GetMaterialColor(Enum.Material[name])
end end
end end
@@ -1571,6 +1611,7 @@ local function applyAmbience(world)
Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232), Color = frost and Color3.fromRGB(170, 200, 235) or Color3.fromRGB(200, 215, 232),
}):Play() }):Play()
end end
applyLook(world)
snow.Rate = (world and world.id == "World3") and 140 or 0 snow.Rate = (world and world.id == "World3") and 140 or 0
end end