#Wormhole (KSP Launcher & Mod Manager)
1 messages · Page 2 of 1
🙂 🙂 🙂
opacity doenst prevent you from click on them
b.
i want them to be under the tile
you can also do display
i cant rn lol
@keyframes anim_buttons_out {
0% {
display: block;
opacity: 1;
}
99% {
opacity: 0;
}
100% {
display: none;
}
}
where to place buttons
i dont react very well to this code
AHHAHAHAHAH
AHAHAHAHAHAHAHHAHAHHA
HAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHAHAHAHHA
i see what you did there
and it was stupid and youre horrible at jokes and a terrible person and i hate you
jk
ye xd
<><Instance data={info} key={info.name}/>
<button onClick={refreshInstances}>Refresh</button>
</>
like this
wdym refresh
components/Instance.tsx
i dont react
i preact
i dont preact
you... vue?
VITE ISNT A JSX FRAMEWORK
like webpack + webpack dev server
{/* hi mom */}
same as vue i think
i comment when necessary
i dont comment when necassary
well thats bad
eff-fish-int?
yes
what about eff-fish-float? eff-fish-double?
bro wtf is that
tiles?
please explain witch craft
where the edit bar is?
?
routes/Instance.tsx
wdym tiles tho
components/Instance.tsx
if you want a look at one with buttons, check components/Mod.tsx
should make an auto-detect instances button
i mean
no cant vc sorry
u can mute
alr cya
@clever remnant i spent a depressing amount of time adding a search bar
it works pretty well i think
i need to do some research on how to do this correctly
no lag though so thats cool
uh did some other stuff that i forgor about
def pull xd
i go sleep
🙂
@clever remnant
xd what did you do
also ye i need to move search code to rust
i’ll do that today
no like actually what did you do
oh
what is this
are you going ckan gui/cli approach
moving to rust is so hard
case "get_install_dir":
return "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Kerbal Space Program 2";
goddam
nice code
nie
#[tauri::command]
async fn test_distance(a: &str) -> usize {
return levenshtein_distance(a, "hello").await;
}
how do you aviod this
?
u push?
i pushd many things yes
i got no context
ok
did you do anything to the browse.tsx code?
yes
ok fixed
async fn install_mod(mod_id: i32) {
let installer = ModInstaller::new(find_install_dir());
not importing ModINstalelr
into the file
ModInstaller
ok
@clever remnant i ported search to rust
🙂
that was extremely painful
i push
alr
pushed
i mean it was already instant
so idk why i did that
but in the future when there are more mods
lol
so now there is cli correct?
not really
most of its unimplemented
bc im procrastinating on making instances function
important things yes
yessir
cloc says 7666 lines of code + 1332 blank lines + 39 comments
ill shoot you with one
xd
Thank youuu
😄
ye
im trying to figure out how to run mkdir in the installer msi
xd idfk
i got
fren
to make logo
for wormhole
when she finish maybe have good rough draft
@clever remnant what were you thinking for colors for the logo
Idk
Idk
ok...
i already fixed it
...
xd what did you change!!
my solution was perfect
plz dont change it
we tested it a lot with ama yesterday
@clever remnant plz push
i wanna start work on the setup scripts
O ok
I pushed a while ago btw
Also I'm so tired I almost wrote pargin instead of padding/margin lol
fr
im killing myself making a "boot" page
for the status on the stuff
💀
@clever remnant i think i made a mistake
bro
you broke the xss attack code
xdd
no.
i did it in a very specific way
xdd
i keep reading through the code
and i keep finding that you reverted like
all of my yesterday changes
did you just like
not merge???
maybe i just didnt push
idfk
@clever remnant i fixed the merges again
idk why you keep fucking up this stuff
plz just dont change everything again ;-;
Sorry I haven't been responding
Everything compiles except Linux arm64, I'm setting up cross for that but it'll take a bit
Also make sure that dompurify is installed
Otherwise it breaks and doesn't compile
hey @foggy cobalt ya know that page named "SpaceWarp?"
maybe we should remove that, make the instances page the landing page, and add a settings page
sure
also @clever remnant if you could get lazy loading to work for the App.tsx
really need it
it’ll speed up loading by like 10x
also will stop the bundle size error
you dont reset the page number when you switch ksp 1 to ksp 2
i can try
wdym
i fixed
kinda
still kinda broken
if you are on a page larger than 2 in the ksp 1 tab
and switch to ksp 2
ok
it shits itself
alr
i set it to 1 when you switch
lol
but still kinda broken
ok
does this auto update mods?
not yet
o yea @foggy cobalt sorry i havent really been able to do a lot lately - i think most work can be done over the weekend for me, i have school during the week lol
i am working on it rn tho
ok
you can now launch ksp1 with wormhole!
you cant install mods yet, but one step at a time
also mod installation for ksp2 is now fixed - no more random folders; and it's completely automated!
nicee
@clever remnant if you can write in the write function for the config file for the mods
so when you install a ksp2 mod it updates
i dont really understand lol
i just pushed btw
persistent instance data
also multiplatform cache support
#[cfg(target_os = "windows")]
fn get_platform_data_dir() -> String {
return std::env::var("APPDATA").unwrap();
}
#[cfg(target_os = "linux")]
fn get_platform_data_dir() -> String {
return std::env::var("HOME").unwrap() + "/.local/share";
}
#[cfg(target_os = "macos")]
fn get_platform_data_dir() -> String {
return std::env::var("HOME").unwrap() + "/Library/Application Support";
}
pub fn get_data_dir() -> PathBuf {
return PathBuf::from(get_platform_data_dir()).join("Wormhole");
}
?
lol
i legit dont remember lmao
its fine anyway
ill make a patch that removes it
ok pushed
alr
ive pushed more - including installing mods in ksp1!
wwow
i figured out the issue
🧠
you use pnpm not npm
ok
fixed install button
Lol
can't imagine how wrong it can get
I don't think I've had a single issue with CKAN in the years I've been using it exclusively to download and manage mods
and I've had like 15 different modded installs with hundreds of mods
🤷♂️
lol
Keep in mind, there is a reason there is a checkbox for "request addition to CKAN" on spacedock, as mod authors might not want their mod findable by wormhole, I get its slightly odd, but there is history surrounding this
ok, i can look into that
i do see a problem with that tho, there's no info about that in the api response i dont think
i dont see any
it's odd
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ModInfo {
pub name: Option<String>,
pub id: Option<i32>,
pub game: Option<String>,
pub game_id: Option<i32>,
pub short_description: Option<String>,
pub downloads: Option<i32>,
pub followers: Option<i32>,
pub author: Option<String>,
pub default_version_id: Option<i32>,
pub shared_authors: Option<Vec<Value>>,
pub background: Option<String>,
pub bg_offset_y: Option<i32>,
pub license: Option<String>,
pub website: Option<String>,
pub donations: Option<String>,
pub source_code: Option<String>,
pub url: Option<String>,
pub versions: Option<Vec<ModVersion>>,
pub description: Option<String>,
}
^^^ this was made real api responses
yeah but ckan is also completely available so…
doesn’t need to be space dock obv
@foggy cobalt I have been working on instances... It's mostly implemented now (I think).
both
both
lemme try
it hasnt been tested tho 👀
wait did you pshu
ye
o wait
i havent made a way to set the active instance
lmao
also
pub fn validate_instances(instances: Vec<Instance>) -> Vec<Instance> {
let mut final_instances = Vec::new();
for instance in instances {
if instance.install_path.exists() {
let api_dll = match instance.game {
KSPGame::KSP1 => instance
.install_path
.join("KSP_x64_Data/Plugins/x86_64/steam_api64.dll"),
KSPGame::KSP2 => instance
.install_path
.join("KSP2_x64_Data/Plugins/x86_64/steam_api64.dll`"),
};
let size = api_dll.metadata().unwrap().len();
let needed_size = match instance.game {
KSPGame::KSP1 => KSP1_STEAM_API_SIZE,
KSPGame::KSP2 => KSP2_STEAM_API_SIZE,
};
if size == needed_size {
final_instances.push(instance);
}
}
}
return final_instances;
}
lol yes
you should encrypt the KSP1_STEAM_API_SIZE
so people cant change it
nah bro
:D
o
instances should be set by default
bruh nvm
it crashed lol
stack overflow error
ye it bumps versions
in the crates
so i dont have to do it by hand
cuz i do publish the cli and common crates in crates.io sometimes
theres 0.1 and 0.2 rn
but theyre not full releases
i found that on the rust forums so i think yes
can i have some help with this function tho? it seems to be the root cause
pub fn set_default_instances() {
let ksp1_instance_json_path = find_ksp1_install_dir().join("instance.json");
let ksp2_instance_json_path = find_ksp2_install_dir().join("instance.json");
let instances = Instance::load();
if !ksp1_instance_json_path.exists() {
let ksp1_default = instances
.iter()
.find(|i| i.game == KSPGame::KSP1)
.unwrap()
.clone();
let ksp1_default_json = InstanceJson {
id: ksp1_default.id,
};
let ksp1_instance_json = serde_json::to_string(&ksp1_default_json).unwrap();
let mut file = File::create(ksp1_instance_json_path).unwrap();
file.write_all(ksp1_instance_json.as_bytes()).unwrap();
}
if !ksp2_instance_json_path.exists() {
let ksp2_default = instances
.iter()
.find(|i| i.game == KSPGame::KSP2)
.unwrap()
.clone();
let ksp2_default_json = InstanceJson {
id: ksp2_default.id,
};
let ksp2_instance_json = serde_json::to_string(&ksp2_default_json).unwrap();
let mut file = File::create(ksp2_instance_json_path).unwrap();
file.write_all(ksp2_instance_json.as_bytes()).unwrap();
}
}
i have no idea what caused it tho
yea
just checked
xdd
theres no overflow here
I FIGURED IT OUT
WITHOUT LLDB
the Instance::load() call
pub fn load() -> Vec<Self> {
let instances;
let instances_path = get_data_dir().join("instances.json");
if instances_path.exists() {
let mut file = File::open(instances_path).unwrap();
let mut content = String::new();
file.read_to_string(&mut content).unwrap();
instances = serde_json::from_str(&content).unwrap();
} else {
instances = Instance::defaults();
Instance::save_all(&instances);
}
Instance::set_default_instances();
return instances;
}
it calls itself
look at the two things
load: Instance::set_default_instances();
set_default_instances: Instance::load();
it works now
gonna push
okok
i havent added a way to switch yet lol
the only way rn is to launch one
which will then get auto-selected and mods will download to that one after
hm
bug fixed and pushed btw
i think we should switch up the browse menu to be a select thing
instead of download
same as ckan
because to have a full progress bar at the end is best
well
we do have an open grid slot next to the search bar in the browse menu
i can try to rig that up
just fixed that
pushed!
lmfao it just changed 800 lines because crlf -> lf
lol
what file?
what?
for file in bep_in_ex_dir.read_dir().unwrap() {
let file = file.unwrap();
instance_mod.paths.push(
"BepInEx/plugins/".to_string()
+ file.file_name().into_string().unwrap().as_str(),
);
}
lol ok
also are you using the %appdata%
ye
for storing stuff
// common/src/util.rs
#[cfg(target_os = "windows")]
pub fn get_platform_data_dir() -> String {
return std::env::var("APPDATA").unwrap();
}
#[cfg(target_os = "linux")]
pub fn get_platform_data_dir() -> String {
return std::env::var("HOME").unwrap() + "/.local/share";
}
#[cfg(target_os = "macos")]
pub fn get_platform_data_dir() -> String {
return std::env::var("HOME").unwrap() + "/Library/Application Support";
}
pub fn get_data_dir() -> PathBuf {
return PathBuf::from(get_platform_data_dir()).join("Wormhole");
}
ok
theres a bunch of files tho in {wormhole}/instances/{id}/
a lot of code depends on that
so caution
theres like one :D
after you install mods youll see it
very strange
interesting
lemme try again
ok
so
xd
i got a couple errors
first
you cant install more than like 5 mods at a time or it breaks
second
ok
if i try to switch instances at the top dropdown
it crashes
deletes the plugins folder
xdd
:p
its not a bug... its a... feature... yeah
pushed another patch for that
?
and its ignored in the bepinex plugins dir
we are trying to instance mods
not spacewarp
that sounds like breaking changes 100
it is
its not tho
im not tho
that shouldnt happen
xd
i think ill fix that tomr
im kinda burnt out of this for today
ive done a ton of work lol
may I ask why that shouldn't be a thing? it would make sense to be able to install different versions of SpaceWarp
for testing mod compatibility for example
bc it will always fetch the latest release regardless
rn theres no way to change the spacewarp version
^
also that still sounds like breaking changes 100
but
we will have a fun time adding a bunch of compatibility shit
yea lol
@foggy cobalt I think I fixed the bug; I'm also working on the adding instances functions and buttons and modals.
its a little hard beacuse we might have to add the ability to change mods show later
Gn
alr cya
Wait so you are remaking the wheel instead of using the technology we have? Are we like stuck in the middle age? Why make it so complicated…
I hope u have fun with ur hobby as I do not see it being used
Like IE deprecated vs modern browsers
xd what
chill bro
just making something fun
Why make it so complicated...
xdddd
this is nothing compared to ckan
nothing is complicated here
the main point of the project is to make it more effienct. ckan uses 600+mb of ram
ours uses around 120
plus it doesnt look like crap
ckan on mac is very broken, first of all it use cmd line interface, 2nd the search doesn't work (or work in mysterious way)
btw can this thread author or any mod pin the first message since it contains the repo link lol
@clever remnant
The (unofficial) successor to CKAN. Contribute to RedstoneWizard08/Wormhole development by creating an account on GitHub.
Why would such low numbers be ever a problem? Well sure go for optimizing little efficiency. Sorry but the screenshots of the UI I saw didn't look better, nothing comfortable of navigating.
Yea bro I can't pin messages lol
Yea the UI used to look like crap. Hopefully it's better now :p
Also post-1.0 I'm gonna redo the UI with svelte instead of preact, as it's easier to work with.
It'll be a while before then, but after that the UI should look even better.
But as of now, very unbiased source (obviously), but I think the UI is pretty good.
xd you don’t have to use it nobodies forcing you
Btw @foggy cobalt I made a bunch of patches just now on instances
Also can you push the caching code please?
Alr dw
ye
I did
Finally 😄
had like 3 exams xdd
Spring break for me too
yeee
Lol
Ok I'm gonna start the svelte rewrite since it'll improve performance (no virtual dom) and improve dx
@clever remnant can you make a new branch for the svelte rewrite
i have some time rn i can help out
i will yeah
Ok so @foggy cobalt first stuff is pushed to the svelte branch, but it won't compile since it wants the static adapter and won't work with the auto adapter. I'll have to figure out how to fix this (I know I've dealt with this before).
Yea you can prerender dynamic routes. I did it for my personal portfolio (also built with SvelteKit).
NVM this was different. I think I'm just gonna use client side rendering/hydration/routing and a single page app for this.
ok
ok
redstone
you need to remind me every time
that we are using pnpm
not npm
@clever remnant how did we go from 120mb to 330
xdd
xd
im gonna add page caching
i need to finally setup this caching system in the backend
Alr
i saw
doesnt have instancing 
ew
doesnt have ksp1 support

ew
lmfao
very nice ui
jesus its so laggy
to be fair it is still in alpha, and they're in the process of rewriting it
ikik
making it in c# unless they write it in maui it wont be cross platform
and maui is pretty freaking uneffienct
how so? pretty sure c# runs on Mac, Linux and Windows
ooh i see
uh, how functional is Wormhole btw? I've downloaded it, and when I tried to start the install of spacewarp it just closes. Same thing happens when I click browse mods
oh lmao, i see
yeah i can try. what would one use to build it? i'm only familar with building c++ and c#
aight I'll take a look, thanks!
The (unofficial) successor to CKAN. Contribute to RedstoneWizard08/Wormhole development by creating an account on GitHub.
make sure to look at this ^
yep i've already pulled the repo
kk
is there a specific path i should run the build command in?
wait nvm i forgot to install tauri lol
@foggy cobalt
:D
you uh
hm
i forgot what that error was from
dw about it for now
its not in a release stage
:D
aight lol, did the build fail though? I honestly can't tell lmao. But the fact I can't find an exe anywhere tells me it probably failed lol
oh
its a rust command
cargo tauri dev
^
or cargo tauir build
you need to do cargo install tauri-cli
cool!
this error is still present when you do something
i dont remember what
i think its when you switch from browsing ksp1 mods to browsing ksp2 mods
need to fix that
lol same
i have spring break next week so it should be easier for lol
or i mean
tomorrow
Alr
xd
ive mostly shifted my focus onto the spacewarp.org website
ill have some more time in a bit
lol
o yea
@foggy cobalt 1.0 is out!
Can we ping open to test mods for it or does it not count?
hm i just tried it out and the search button for both ksp1 and ksp2 crash wormhole
well nodejs decided to be dumb and kill my lockfile
now to wait 6 hours while wsl does pnpm i and then commit/push
lol
@foggy cobalt 1.0.1 is out
oo