Hey guys, I’m developing my own side mod for vs, should be a lot of fun if i can get this part nailed down and I’ll release it for the world to enjoy once its done. I’m trying to find the best way to save a ship, temporarily, and paste it as a ship in a new dimension. Any pointers would be extremely helpful and i can explain more if needed. Thank you guys.
there is a way to teleport a ship from one dimension to another in the API, which handles most of the copying for you
but if you want more of a long-term “storage” of the ship, for pasting later, then you could use either VLib or Valkyrien Ship Schematics (embedded in VMod) libararies for storing ships as custom “schematics”
Ive been diving into vlib and its probably the way I’ll go. Its just a tad confusing to use but ill get it eventually. Wish the docs were a lil clearer. Thanks for mentioning the tp method in the api, ill look for it. I was just seeing if there had been a vs2 way of saving/retrieving ships or if vlib is really the best way.
Hey just seeing this now, feel free to ping me with questions! (I’m the vlib dev)
I’m having trouble finding the tp method in the api, is the api VSGameUtils.kt? sorry i feel really dumb asking that. also if there is abetter spot in the discord for this discussion just lemme know, i may not have that channel unlocked.
in absence of proper documentation, this discord is the best resource for this stuff
Starlance has a lot of boiler plate around the teleport function, mainly for teleporting entities along with the ship, but the basic api usage is here:
thank you so much for pointing out that example, that will surely come in handy. Could you tell me what it means for a ship to be static or not? I see that term around a lot when it comes to teleporting. I would assume i would not want the ship static, I want it driveable after tp.
static ships don’t have any physics applied to them, they’re frozen in place until no longer static
do ships send out a onDestroyed event or anything similiar? i need to know if a specific ship disassembles.
if i save a ship to structure, then save another ship to the same filepath, will it overwrite the old ship? please say yes, that would be nice for my mod.
It will overwrite the file, it’s still possible to have multiple in memory with the same name though
^ Only worry about this if it’s something you want to happen, it won’t happen by accident
This conversation is on Discord · Reply there