2024-02-26 16:33:37 -05:00
|
|
|
create table creature_type
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
creature_type_id int,
|
|
|
|
type_name text not null,
|
|
|
|
primary key (creature_type_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table layout
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
layout_id int,
|
|
|
|
layout_name text not null,
|
|
|
|
primary key (layout_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table moon_tier
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
moon_tier_id int,
|
|
|
|
tier_name text not null,
|
|
|
|
primary key (moon_tier_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table risk_level
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
risk_level_id int,
|
|
|
|
risk_level_name text not null,
|
|
|
|
primary key (risk_level_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table moon
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
moon_id int,
|
2024-02-26 16:33:37 -05:00
|
|
|
moon_name text not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
risk_level_id int not null,
|
2024-02-26 16:33:37 -05:00
|
|
|
cost int not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
default_layout_id int not null,
|
2024-02-26 16:33:37 -05:00
|
|
|
map_size_multiplier real not null,
|
|
|
|
min_scrap int not null,
|
|
|
|
max_scrap int not null,
|
|
|
|
outside_max_power int not null,
|
|
|
|
inside_max_power int not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
moon_tier_id int not null,
|
|
|
|
primary key (moon_id),
|
|
|
|
foreign key (risk_level_id) references risk_level,
|
|
|
|
foreign key (default_layout_id) references layout,
|
|
|
|
foreign key (moon_tier_id) references moon_tier
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table creature
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
creature_id int,
|
2024-02-26 16:33:37 -05:00
|
|
|
creature_name text not null,
|
|
|
|
creature_nickname text,
|
|
|
|
health int,
|
|
|
|
power_level int not null,
|
|
|
|
max_spawn int not null,
|
|
|
|
stunnable int not null,
|
|
|
|
stun_multiplier real,
|
|
|
|
door_open_speed real,
|
|
|
|
hostile int not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
creature_type_id int not null,
|
|
|
|
favorite_moon_id int not null,
|
|
|
|
primary key (creature_id),
|
|
|
|
foreign key (creature_type_id) references creature_type,
|
|
|
|
foreign key (favorite_moon_id) references moon
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table scrap
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
scrap_id int,
|
2024-02-26 16:33:37 -05:00
|
|
|
scrap_name text not null,
|
|
|
|
min_value int not null,
|
|
|
|
max_value int not null,
|
|
|
|
weight int not null,
|
|
|
|
conductive int not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
two_handed int not null,
|
|
|
|
primary key (scrap_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table spawn_chance
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
moon_id int not null,
|
|
|
|
creature_id int not null,
|
|
|
|
spawn_chance real not null,
|
|
|
|
foreign key (moon_id) references moon,
|
|
|
|
foreign key (creature_id) references creature
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table weather
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
weather_id int,
|
2024-02-26 16:33:37 -05:00
|
|
|
weather_name text not null,
|
2024-03-01 14:44:37 -05:00
|
|
|
effect text,
|
|
|
|
primary key (weather_id)
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create table viable_weather
|
|
|
|
(
|
2024-03-01 14:44:37 -05:00
|
|
|
moon_id int not null,
|
|
|
|
weather_id int not null,
|
|
|
|
foreign key (moon_id) references moon,
|
|
|
|
foreign key (weather_id) references weather
|
2024-02-26 16:33:37 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
|