Blockland Forums > Modification Help
RTB Preferences for maps?
Ephialtes:
That'd be fine. Put it at the bottom of the .mis - a .mis is exactly the same as a .cs file. You'll need to change the code to use $Worlds::SlateOn since you've registered that instead of $Pref::Worlds::SlateOn.
Reactor Worker:
I tried it out, but no preference appears under the in the GUI. Is part of the code incorrect?
--- Code: ---//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
new ScriptObject(MissionInfo) {
saveName = "Worlds";
name = "Worlds";
};
new MissionArea(MissionArea) {
Area = "-360 -648 720 1296";
flightCeilingRange = "20";
locked = "true";
flightCeiling = "300";
};
new Sky(Sky) {
position = "336 136 0";
rotation = "1 0 0 0";
scale = "1 1 1";
materialList = "./astroskies/gal.dml";
cloudHeightPer[0] = "0.349971";
cloudHeightPer[1] = "0.3";
cloudHeightPer[2] = "0.199973";
cloudSpeed1 = "0.0005";
cloudSpeed2 = "0.001";
cloudSpeed3 = "0.0003";
visibleDistance = "600";
fogDistance = "2000";
fogColor = "0.000000 0.000000 0.000000 1.000000";
fogStorm1 = "0";
fogStorm2 = "0";
fogStorm3 = "0";
fogVolume1 = "0 0 0";
fogVolume2 = "0 0 0";
fogVolume3 = "0 0 0";
fogVolumeColor1 = "192.000000 128.000000 128.000000 -222768174765569860000000000000000000000.000000";
fogVolumeColor2 = "128.000000 128.000000 128.000000 0.000000";
fogVolumeColor3 = "128.000000 128.000000 128.000000 -170698929442160050000000000000000000000.000000";
windVelocity = "1 1 0";
windEffectPrecipitation = "1";
SkySolidColor = "0.000000 0.000000 0.100000 1.000000";
useSkyTextures = "1";
renderBottomTexture = "1";
noRenderBans = "1";
locked = "true";
};
new Sun() {
azimuth = "180";
elevation = "90";
color = "1.000000 1.000000 1.000000 1.000000";
ambient = "0.300000 0.250000 0.200000 1.000000";
direction = "0 0 0";
locked = "false";
position = "0 0 120";
scale = "1 1 1";
rotation = "1 0 0 0";
};
new SimGroup(PlayerDropPoints) {
new SpawnSphere() {
position = "0 0 20";
rotation = "0 0 1 130.062";
scale = "0.940827 1.97505 1";
dataBlock = "SpawnSphereMarker";
canSetIFLs = "0";
radius = "50";
sphereWeight = "1";
indoorWeight = "1";
outdoorWeight = "1";
RayHeight = "150";
};
};
new InteriorInstance() {
position = "500 400 0";
rotation = "0 0 1 180";
scale = "1 1 1";
interiorFile = "./Lava.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./Grass.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "500 -400 -50";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./Water.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "350 600 20";
rotation = "0 0 -1 90";
scale = "1 1 1";
interiorFile = "./asteroid.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "391 527 52";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./asteroid2.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "311 522 19";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./asteroid3.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "330 515 30";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./asteroid2.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "331 506 10";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./asteroid2.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "414 630 69";
rotation = "0 0 -1 90";
scale = "1 1 1";
interiorFile = "./asteroid3.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "366 607 77";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./asteroid2.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "-500 -400 0";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./Desert.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "600 -240 65";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./moon.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "-500 400 0";
rotation = "0 0 1 90";
scale = "1 1 1";
interiorFile = "./snow.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "0 130 30";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./buildpad.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "0 -130 30";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./buildpad.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "130 0 30";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./buildpad.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
new InteriorInstance() {
position = "-130 0 30";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "./buildpad.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
};
//--- OBJECT WRITE END ---
if($Pref::Worlds::SlateOn)
{
%interior = new InteriorInstance() {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "~/Map_Slate/slate.dif";
useGLLighting = "0";
showTerrainInside = "0";
};
MissionGroup.add(%interior);
}
RTB_registerPref(
"Slate On?",
"Worlds",
"$Pref::Worlds::SlateOn",
"bool",
"Map_Worlds",
"0",
1,
1, );
--- End code ---
Ephialtes:
Syntax error at the end, you can't have:
--- Code: ---, );
--- End code ---
Reactor Worker:
Thanks! It works now.
A side question; is it possible to include a save with the map?
Ephialtes:
Not really. You can hax it to write a save file into the save folder but that's pretty cheap and it won't go away when they remove the map.