starlit  Diff

Differences From Artifact [642ae8f101]:

To Artifact [b30e9eb59a]:


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
...
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
184
185
186
187
188
189
190


191
192
193
194
195
196
197

					return {lining, plate, skin, skin, eye, hair}
				end;
				stats = {
					psiRegen = 1.3;
					psiPower = 1.2;
					psi = 1.2;
					hunger = .8; -- women have smaller stomachs
					thirst = .8;
					staminaRegen = 1.0;
					morale = 0.8; -- you are not She-Bear Grylls
				};
				traits = {
					health = 400;
					lungCapacity = .6;
					irradiation = 0.8; -- you are smaller, so it takes less rads to kill ya
					sturdiness = 0; -- women are more fragile and thus susceptible to blunt force trauma
					metabolism = 1800e3 / 24 / 60 / 60; --kCal/s
					painTolerance = 0.4;
					dehydration = 3; -- mL/s
				};
			};
			male = {
				name = 'Human Male';
				eyeHeight = 1.6;
				stats = {
					psiRegen = 1.0;
					psiPower = 1.0;
					psi = 1.0;
					hunger = 1.0;
					thirst = 1.0;
					staminaRegen = .7; -- men are strong but have inferior endurance
				};
				traits = {
					health = 500;
					painTolerance = 1.0;
					lungCapacity = 1.0;
					sturdiness = 0.3;
					metabolism = 2200e3 / 24 / 60 / 60; --Cal/s
					dehydration = 5; -- mL/s
				};
			};
		};
		traits = {};
	};
}

................................................................................
		if base == true then
			base = max
		elseif base == false then
			base = min
		end

	end
	return min, max, base
end

-- set the necessary properties and create a persona for a newspawned entity
function starlit.world.species.birth(pSpecies, pVariant, entity, circumstances)
	circumstances = circumstances or {}
	local sp,var = spLookup(pSpecies, pVariant)

................................................................................
	end
	local ps = starlit.world.species.mkPersonaFor(pSpecies,pVariant)
	local startingHP = pct('health', 1.0)
	if circumstances.injured    then startingHP = pct('health', circumstances.injured) end
	if circumstances.psiCharged then ps.statDeltas.psi = pct('psi', circumstances.psiCharged) end
	for k,v in pairs(starlit.world.stats) do ps.statDeltas[k] = 0 end
	ps.statDeltas.warmth = 20 -- don't instantly start dying of frostbite



	entity:set_properties{hp_max = var.traits.health or sp.traits.health}
	entity:set_hp(startingHP, 'initial hp')
	return ps
end

function starlit.world.species.paramsFromTable(pSpecies, tbl)







|
|








|

|









|
|







|
|







 







|







 







>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
...
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

					return {lining, plate, skin, skin, eye, hair}
				end;
				stats = {
					psiRegen = 1.3;
					psiPower = 1.2;
					psi = 1.2;
					nutrition = .8; -- women have smaller stomachs
					hydration = .8;
					staminaRegen = 1.0;
					morale = 0.8; -- you are not She-Bear Grylls
				};
				traits = {
					health = 400;
					lungCapacity = .6;
					irradiation = 0.8; -- you are smaller, so it takes less rads to kill ya
					sturdiness = 0; -- women are more fragile and thus susceptible to blunt force trauma
					metabolism = .150; -- kCal/s
					painTolerance = 0.4;
					dehydration = 10e-4; -- L/s
				};
			};
			male = {
				name = 'Human Male';
				eyeHeight = 1.6;
				stats = {
					psiRegen = 1.0;
					psiPower = 1.0;
					psi = 1.0;
					nutrition = 1.0;
					hydration = 1.0;
					staminaRegen = .7; -- men are strong but have inferior endurance
				};
				traits = {
					health = 500;
					painTolerance = 1.0;
					lungCapacity = 1.0;
					sturdiness = 0.3;
					metabolism = .150; -- kCal/s
					dehydration = 15e-4; -- L/s
				};
			};
		};
		traits = {};
	};
}

................................................................................
		if base == true then
			base = max
		elseif base == false then
			base = min
		end

	end
	return min, max, base or 0
end

-- set the necessary properties and create a persona for a newspawned entity
function starlit.world.species.birth(pSpecies, pVariant, entity, circumstances)
	circumstances = circumstances or {}
	local sp,var = spLookup(pSpecies, pVariant)

................................................................................
	end
	local ps = starlit.world.species.mkPersonaFor(pSpecies,pVariant)
	local startingHP = pct('health', 1.0)
	if circumstances.injured    then startingHP = pct('health', circumstances.injured) end
	if circumstances.psiCharged then ps.statDeltas.psi = pct('psi', circumstances.psiCharged) end
	for k,v in pairs(starlit.world.stats) do ps.statDeltas[k] = 0 end
	ps.statDeltas.warmth = 20 -- don't instantly start dying of frostbite
	ps.statDeltas.nutrition = 2000 -- shoulda packed more MRE :c
	ps.statDeltas.hydration = 3 -- stay hydrated uwu

	entity:set_properties{hp_max = var.traits.health or sp.traits.health}
	entity:set_hp(startingHP, 'initial hp')
	return ps
end

function starlit.world.species.paramsFromTable(pSpecies, tbl)