Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
310 lines (307 loc) · 17.3 KB
/
Copy pathindex.html
File metadata and controls
310 lines (307 loc) · 17.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Theory Simulator</title>
<link rel="stylesheet" href="./Styles/fonts/Computer Modern Bright Semibold/cmun-bright-semibold.css" />
<link rel="stylesheet" href="./Styles/fonts/Computer Modern Concrete/Concrete/cmun-concrete.css" />
<link rel="stylesheet" href="./Styles/main.css" />
<link rel="stylesheet" href="./Styles/navbar.css" />
<link rel="stylesheet" href="./Styles/controls.css" />
<link rel="stylesheet" href="./Styles/output.css" />
<link rel="stylesheet" href="./Styles/narrow.css" />
<link rel="stylesheet" href="./Styles/themes.css" />
<script>
// Keep in sync with defaultTheme in src/UI/simState.ts
const defaultTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? "dark" : "light";
const state = JSON.parse(localStorage.getItem("simState") ?? `{}`);
const theme = (state && state.settings && state.settings.theme) ? state.settings.theme : defaultTheme
document.documentElement.setAttribute("theme", theme);
</script>
<script defer type="module" src="./build/bundle.js"></script>
</head>
<body>
<header class="nav">
<h1 class="nav-title">e<sup>x</sup> Theory simulator</h1>
<div class="nav-actions">
<span class="version">v4.0.0 (Alpha)</span>
<button class="settingsButtons changelogBtn">Changelog</button>
<button class="settingsButtons instructionsBtn">Instructions</button>
<label class="theme-picker">
<span>Theme</span>
<select class="themeSelector" aria-label="Theme"></select>
</label>
<button class="settingsBtn" aria-label="Sim settings" title="Sim settings">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
</button>
</div>
</header>
<main class="content-wrapper">
<!-- Keep the two .controls rows in this order: render.ts uses the first one for the theory inputs.
CSS shows the mode row first. -->
<section class="panel">
<div class="controls">
<div>
<label class="description" for="theoryInput">Theory</label>
<select class="theory" id="theoryInput"></select>
</div>
<div>
<label class="description" for="stratInput">Strat</label>
<select class="strat" id="stratInput">
<option value="Best Overall">Best Overall</option>
<option value="Best Active">Best Active</option>
<option value="Best Semi-Idle">Best Semi-Idle</option>
<option value="Best Idle">Best Idle</option>
</select>
</div>
<div>
<label class="description" for="sigmaInput">Sigma</label>
<input type="text" class="sigma" id="sigmaInput" placeholder="<number>" spellcheck="false" />
</div>
<div>
<label class="description" for="rhoInput">Input</label>
<input type="text" class="input" id="rhoInput" placeholder="<rho>[r/t/m]" spellcheck="false" />
</div>
<div class="capWrapper">
<label class="description" for="capInput">Cap</label>
<input type="text" class="cap" id="capInput" placeholder="<rho>[r/t/m]" spellcheck="false" />
</div>
<!-- The selected theory's own inputs (render.ts / theoryInputs.ts) -->
<div class="theoryInputs"></div>
</div>
<div class="controls controls-mode">
<div>
<label class="description" for="modeSelect">Mode</label>
<select class="mode" id="modeSelect"></select>
<button class="testPorted" title="Fills in sigma 500 and 500 for every theory the Rust sim supports, then simulates">Test all supported theories</button>
</div>
<div class="hardCapWrapper" style="display: none">
<label class="description" for="hardCapInput">Hard cap?</label>
<input type="checkbox" class="hardCap" id="hardCapInput" />
</div>
<div class="extraInputs">
<span class="extraInputDescription" id="modeInputsCaption">mode inputs</span>
<div class="simAllInputs">
<button class="saveDist">Save distribution</button>
<label for="semiIdleInput">Semi-Idle</label>
<input type="checkbox" class="semi-idle" id="semiIdleInput" checked="true" />
<button class="getDist">Get distribution</button>
<label for="hardActiveInput">Hard Active</label>
<input type="checkbox" class="hard-active" id="hardActiveInput" />
<button class="loadSave">Load save</button>
<button class="theoryInputsBtn" title="Inputs that only some theories have, such as MF's reset depth">Theory inputs</button>
</div>
<textarea class="simAllInputArea" aria-labelledby="modeInputsCaption" cols="30" spellcheck="false"></textarea>
<textarea class="modeInput" aria-labelledby="modeInputsCaption" cols="30" spellcheck="false"></textarea>
</div>
<div class="timeDiffWrapper" style="display: none">
<input type="text" class="timeDiffInput" />
<input type="text" class="timeDiffInput" />
<input type="text" class="timeDiffInput" />
<table class="timeDiffTable"></table>
</div>
</div>
<div class="panel-footer">
<button class="simulate">Simulate</button>
<button class="clearInput">Clear all inputs</button>
<!-- Progress of the running simulation (main.ts), before the status text so they don't move as it changes -->
<progress class="simProgress" max="1" value="0" aria-label="Simulation progress" hidden></progress>
<span class="simElapsed" aria-label="Time elapsed"></span>
<span class="output"></span>
</div>
</section>
<section class="results">
<div class="results-header">
<h2 class="results-title">Results</h2>
<div class="results-toolbar">
<button class="imageC">Copy Image</button>
<button class="imageD">Download Image</button>
<button class="csvD">Download CSV</button>
<button class="clear">Clear all results</button>
<button class="downloadPubTable" style="display: none">Download Pub Table</button>
</div>
</div>
<p class="results-empty">Run a simulation to see results here.</p>
<div class="table-wrapper">
<table class="simTable">
<thead><tr></tr></thead>
<tbody></tbody>
</table>
</div>
</section>
</main>
<dialog class="settings">
<h1>Sim settings</h1>
<button class="settingsCloseBtn" aria-label="Close">×</button>
<section class="settings-section">
<h2 class="settings-section-title">Simulation</h2>
<div class="sliderContainer">
<label for="dtSlider">dt</label>
<input type="range" class="dt" step="0.1" max="10" min="0" value="8.1943" id="dtSlider" />
<span class="sliderOtp dtOtp">1.5</span>
<label for="ddtSlider">Δdt</label>
<input type="range" class="ddt" step="0.1" max="10" min="0" value="2.71233" id="ddtSlider" />
<span class="sliderOtp ddtOtp">1.0001</span>
<label for="boughtVarsDeltaSlider">Bought vars in recovery</label>
<input type="range" class="boughtVarsDelta" step="1" min="5" max="30" value="5" id="boughtVarsDeltaSlider" />
<span class="sliderOtp boughtVarsDeltaOtp">e5ρ</span>
<button class="resetSettings settingsButtons">Reset</button>
</div>
</section>
<section class="settings-section">
<h2 class="settings-section-title">"All" mode</h2>
<label class="settings-row">
<span>Strats simmed</span>
<select class="simallstrats">
<option value="all">Active and Idle</option>
<option value="active">Active only</option>
<option value="idle">Idle only</option>
</select>
</label>
<label class="settings-row">
<span>Completed CTs</span>
<select class="completedcts">
<option value="in">Alongside other CTs</option>
<option value="end">After other CTs</option>
<option value="no">Don't sim</option>
</select>
</label>
</section>
<section class="settings-section">
<h2 class="settings-section-title">Display</h2>
<!--span>Skip completed CTs in "all" mode: </span> <input type="checkbox" class="skipcompletedcts" /><br /><br /-->
<label class="settings-row"><span>Show a2 and a3 lvl in EFAI strat output</span> <input type="checkbox" class="a23" /></label>
<label class="settings-row"><span>Show unofficial CTs</span> <input type="checkbox" class="unofficials" /></label>
<label class="settings-row"><span>Generate a total purchase list</span> <input type="checkbox" class="total_purchase_list" /></label>
</section>
</dialog>
<dialog class="theoryInputsDialog">
<h1>Theory inputs</h1>
<button class="theoryInputsCloseBtn" aria-label="Close">×</button>
<p class="theoryInputsNote">Used by "All" mode. Hover a name for what the input does.</p>
<div class="theoryInputsDialogContent"></div>
</dialog>
<dialog class="boughtVars">
<button class="boughtVarsCloseBtn" aria-label="Close">×</button>
<div style="overflow: auto; max-height: 60vh; position: relative; padding-right: 1rem">
<table style="margin: 0">
<thead style="position: sticky; top: 0">
<td>Variable</td>
<td>Lvl</td>
<td>Cost</td>
<td>Timestamp</td>
</thead>
<tbody class="boughtVarsOtp">
<tr>
<td>c2</td>
<td>100</td>
<td>1e2000</td>
<td>1d1h1m</td>
</tr>
<tr>
<td>c2</td>
<td>100</td>
<td>1e2000</td>
<td>1d1h1m</td>
</tr>
</tbody>
</table>
</div>
</dialog>
<dialog class="changelog">
<h1>Changelog</h1>
<button class="changelogCloseBtn" aria-label="Close">×</button>
<h2>v4.0.0 (Alpha)</h2>
<ul>
<li><strong>New simulation engine:</strong> simulations now run in Rust, compiled to WebAssembly. Every theory is checked to give exactly the same results as sim 3.0.</li>
<li><strong>All theories:</strong> T1 to T8 and the custom theories run in Rust, with the same results as sim 3.0 and faster (about 1.1–3×, depending on the theory).</li>
<li><strong>New theories:</strong> the unofficial custom theories FS, BD, ILC and NLI from sim 3.0 (shown with "Show unofficial CTs").</li>
<li><strong>Theory inputs:</strong> inputs that only some theories have sit next to the theory's other inputs, and in a "Theory inputs" dialog in All mode. MF's reset depth moved there from the settings, as in sim 3.0, and NLI asks for your lifetime α.</li>
<li><strong>Modes:</strong> All, Single sim, Chain, Steps, Comparison, StepChain, Amount, Time and Pub Table, including the "Best Overall / Active / Semi-Idle / Idle" strategy selection. "Test all supported theories" (All mode) runs every ported theory at e500 with sigma 500.</li>
<li><strong>Progress while simulating:</strong> the status shows which strategy is running (e.g. "MFd2Coast (11/41)" in Comparison and the "Best …" picks), with a progress bar wherever the amount of work is known, and the time elapsed. Results appear in the table as they finish, and stopping a simulation keeps them.</li>
<li><strong>Long runs:</strong> very long Steps or Chain runs no longer get stuck at the end. Variable purchases are loaded when you open them instead of being sent with every result (a Steps run could have millions), and a failed simulation now shows an error instead of running forever.</li>
<li><strong>No more freezing:</strong> simulations run in the background, with progress shown while they run, and the "Stop simulating" button works again. Errors are highlighted.</li>
<li><strong>New look:</strong> redesigned layout, 14 themes (8 new), and the theme picker moved to the header.</li>
<li><strong>Remembers your inputs:</strong> mode, theory, strategy, sigma and inputs are restored when you come back. In All mode, theories whose input didn't change reuse their previous result.</li>
</ul>
</dialog>
<dialog class="instructions">
<h1>Instructions</h1>
<button class="instructionsCloseBtn" aria-label="Close">×</button>
<h2>About the sim:</h2>
<br>
<ul>
<li>
<strong>Mode:</strong> You can select from different modes allowing you to do more varied inputs. Each mode is described below:
<ul>
<li>
<strong>All:</strong> This will give you an input field where you can enter all of the values of your theories. The input order for your values will be : <br>
Sigma T1 T2 ... T7 T8 WSP SL ... BaP.<br>
If you don't want to sim a theory, enter 0. <br /><br />
You also have the option to put an "r" or "m" at the end of each value. "r" means that it is a rho value, and will not be affected by rho/tau conversion. "m" means that the value is the total
multiplier (make sure to have maximum possible levels of r9 bought, because this will affect the result), and it will be automatically converted to rho. By default, all values are expected as tau.
<br />
<br /> Example: 95 230 50m 250 300 300 70m 250 200 7e100r
<br>
</li>
<li>
<strong>Single:</strong> You will sim one publish for a single theory using a single (or let it automatically find the best) strategy.
<br>
</li>
<li>
<strong>Chain:</strong> For Chain Sims, you are required to enter a value for "Cap." This sims every publish until it gets to your desired tau/rho. <br /> Hard Cap?: This button hard caps the
tau/rho to the cap you placed instead of simming the entire publication.
<br>
</li>
<li>
<strong>Step:</strong> A Variant of Chain that will sim in steps of n x tau/rho where n is any number.
<br>
</li>
</ul>
</li>
<li>
<strong>Changelog:</strong> See all the versions, changes, and updates to the sim.
</li>
<li>
<strong>Copy Image: </strong>This button will copy the output of the sim to your Clipboard
</li>
<li>
<strong>Download Image:</strong> This button will download a .png to your device, mobile or pc.
</li>
<li>
<strong>Clear Results: </strong>This will clear your last Sims results.
</li>
<li>
<strong>Simulate:</strong> "Execute order 66" aka, start simulating.
</li>
<li>
Below are explanations for what the different input fields do that are visible if you are not in "All" or "Time diff." mode:
<ul>
<li>
<strong>Theory:</strong> You can select a theory for you to simulate in this dropdown. This will allow you to sim only 1 theory at a time.
</li>
<li>
<strong>Strat:</strong> When simulating 1 sim at a time, you can select a strategy that you would like to use for the sim. This drop-down will have all known strategies that are effective.
</li>
<li>
<strong>Sigma:</strong> Generally, you would want to put your total students in here, but you can put any value in here. This is adaptive for R9, so if you enter students < 65 you
will not have R9, or if you enter 65<sigma<75, you will have 1R9, etc.
</li>
<li>
<strong>Input:</strong> This is where you will enter your theory's rho/tau/multiplier. Accepted inputs are x.xxexxxx, xxxx or the value in log10. You can optionally put an r/t/m after the value,
to indicate whether it's a rho, tau or total multiplier value. Default is rho.
</li>
<li>
<strong>Cap:</strong> This is only used when you use chain or steps mode. This is a value for how far it will simulate. Same formats apply here as for Input.
</li>
</ul>
</li>
</ul>
</dialog>
</body>
</html>