Windforge

Windforge

データを表示:
Saving and Loading Custom Ships
Hey guys, I noticed that the custom ship screenshot discussion was hands down the most popular thread in the steam forums. There were so many creative & thoughtfully crafted ship designs that I found myself wishing I could take a few for a spin around the planet. Alas, there was currently no way to share them so i resolved to find a way. After a bit of code crawling and several dead ends I was surprised to discover that there is actually a remarkably simple way to save and load ships as .lua text docs.

It makes it possible to share ships with freinds, tryout the unused/test ships located in the Big.FILE, spawn EnemyShips, take ships with you into new games, and create ships with crews (with a few alterations to the .lua file of your ship).

I present to you..

Saving and Loading Custom Ships

Before these will work you must

  • activate DevMode
  • rebind the screenshot key to something other than f12 (steam->settings->in-game)
  • IMPORTANT: Either alter the file path in the code or create the directory Objects/Airships/UserShips in the Data folder.
  • Paste one of the following into ConsoleCommands.lua (located in the /Data folder. If there isnt one you must create it. .lua files can be edited and created with notepad)

Saving
- Pressing f12 will save the ship you are currently captaining to file (Default is Data/Objects/AirShips/UserShips) Wherever you save to you you must make sure the directory exists or you will get an error message. A new file will be generated for each ship so you can save multiple ships on one load.

require "Utils" local saveBasePath = "../Data/Objects/Airships/UserShips/ShipSave_" local savePath = saveBasePath .. os.time() .. ".lua" SaveShipToLua(savePath) ShowInformationText("Ship saved to: "..savePath, 6.0)

Loading
- Pressing f12 will load a ship at the coordinates of your cursor (Default path is Data/Objects/AirShips/UserShips/MyShip.lua) Ships can then be piloted and registered like any other. You can also load multiples of a ship. Just dont load them over other ships or terrain or the physics get unhappy.

LoadShipFromLua("../Data/Objects/Airships/UserShips/MyShip.lua", "", true)



Ive only tested it locally so let me know if theres problems or more info/uses/limitations that i need to include. Have fun and if you found this useful send me a ship. :-)
~Vitic (aka Stickboybob)
最近の変更はStickboybobが行いました; 2015年6月26日 10時18分
< >
1-9 / 9 のコメントを表示
Cool, ship sharing sounds like a great idea. One thing to be careful about when loading ships is to make sure they aren't going to load on top of things. (like islands or other ships)

This causes the physics system to slow down quite a bit, and you may have to restart the game in some cases.
raz334 2016年3月13日 22時33分 
So do we have a place to share saved ships somewhere, google has nothing...
we dont yet, though i think we should
This didn't work for me but I think I've done something wrong. When I go to save my ship it saves empty space, even when I'm piloting the ship i want to save.

Also, you say that we should only copy and paste one of the codes, if that is so, then how do we save AND load ships without having to edit the code mid-game
@JakeR1299, Look at how Old the comments where, development for this game is basically dead. as is its fan base... :(
I was hoping that someone on this discussion would know, because you all seem to be very happy about the mod.
i never did find a way to save and load ships without editing code mid game. i just minimized and changed the doc. its certainly something i'll look into though.
Shade 2017年7月22日 14時43分 
So where was ever a resolution? This sounds awesome.
< >
1-9 / 9 のコメントを表示
ページ毎: 1530 50