Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Save Any Where OXP Version 3.2 [RELEASE]

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

Commander McLane wrote:
Switeck wrote:
There are big trader ships for which it's extremely hard or impossible to dock at the regular main station
I firmly believe that player ships that are too big to dock at (or launch from) a main station do not belong into Oolite.
These big trade ships include Anaconda (which rotates too slow to match the main station's rotation rate) and the Boa 2 (which is so bulky that even the docking computers often bang it up while docking). While it may be (far?) easier for others to dock them than me, I do not believe it's particularly easy with either of those ships.

"Just a small nitpick: it's SHIFT-F, not Ctrl."

Dunno why I typed CTRL+F last time...I guess I hit SHIFT+F out of reflex I do it so much.

"The second triple is in the "pwm" coordinate system"

Dang, makes me wish they had a star-planet coordinate system for the second triple instead. It's so much harder to tell if I'm in the star-planet's spacelane than the p-w one. Barring that, a velocity/vector indicator in the x, y, z coords...because it's only with difficulty that I can move along only 1 axis. This makes it hard for me to go to any arbitrary coordinates -- such as when I'm hunting failed salvage missile driven derelict ships from the dump/logfile. :P
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Switeck wrote:
Commander McLane wrote:
Switeck wrote:
There are big trader ships for which it's extremely hard or impossible to dock at the regular main station
I firmly believe that player ships that are too big to dock at (or launch from) a main station do not belong into Oolite.
These big trade ships include Anaconda (which rotates too slow to match the main station's rotation rate)
My brief flirtation with an Anaconda confirms this...it really can't rotate as fast as a Station.
I firmly believe that manually docking an Anny should be part of the Lave Academy final exams. If you can't dock one you don't get your licence. :twisted:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Cmdr James wrote:
Can I get a look at the log of that crash?
I uploaded the full log here. I can't see anything useful in it. I just noticed it contains a succession of explosions (subentities?)

Code: Select all

18  org.aegidian.oolite           	0x0002ce00 -[Universe newShipWithName:] + 41
19  org.aegidian.oolite           	0x0002c96f -[Universe newShipWithRole:] + 69
20  org.aegidian.oolite           	0x000bfa83 -[ShipEntity becomeExplosion] + 5713
21  org.aegidian.oolite           	0x000c0352 -[ShipEntity becomeExplosion] + 7968
22  org.aegidian.oolite           	0x000e8611 -[StationEntity becomeExplosion] + 290
23  org.aegidian.oolite           	0x000ea475 -[StationEntity takeEnergyDamage:from:becauseOf:] + 632
24  org.aegidian.oolite           	0x00117ab1 RemoveOrExplodeShip + 337
Than the creation of new ships (must be debris of cargo pods), and finally it sets up a ship_script for this debris/cargo and it end with crashing during set-up of this script.

I could not reproduce the crash on my next reload. There I had to break the failed procedure by hand, by selecting "a new game" on the transit station.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Smivs wrote:
My brief flirtation with an Anaconda confirms this...it really can't rotate as fast as a Station.
I firmly believe that manually docking an Anny should be part of the Lave Academy final exams. If you can't dock one you don't get your licence. :twisted:
Just by looking at the stats it should be no problem. The default roll of all stations is 0.4 rotations per second and that of the Anaconda 0.75 That is almost twice as fast. And I can't remember ever having seen an Anaconda with docking problems. :?
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

They seem fine with docking computers, but try as I might, I couldn't get it to rotate as fast as the Station when manually docking. It will dock, but it's a nerve-wracking and noisy (Bang, bang, bang...) affair.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Switeck wrote:
Commander McLane wrote:
Switeck wrote:
There are big trader ships for which it's extremely hard or impossible to dock at the regular main station
I firmly believe that player ships that are too big to dock at (or launch from) a main station do not belong into Oolite.
These big trade ships include Anaconda (which rotates too slow to match the main station's rotation rate) and the Boa 2 (which is so bulky that even the docking computers often bang it up while docking). While it may be (far?) easier for others to dock them than me, I do not believe it's particularly easy with either of those ships.
I have to confess that I never tried an Anaconda (it is not actually very desirable as a player ship). In case of the Boa 2 I think it should be better to dock it vertically instead of horizontally.
Switeck wrote:
This makes it hard for me to go to any arbitrary coordinates -- such as when I'm hunting failed salvage missile driven derelict ships from the dump/logfile. :P
Well, for reaching arbitrary coordinates the best way is to use the debug console. Typing

Code: Select all

player.ship.position = [x, y, z]
will get you anywhere instantly. Note that this only takes "abs" coordinates, which is the major reason that these were included into the SHIFT-F readout (originally it only gave "pwm").

Or if you want to get to the position of a specific ship:

Code: Select all

player.ship.position = system.shipsWithPrimaryRole("role")[0].position
This will take you instantly to the exact position of the closest ship with the given role (of course you have to substitute "role" with the primary role of the ship you want to reach).
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post by mcarans »

Frame wrote:
blasted middle ear infection is to blame..

I had planned to release it just before the summer holidays, however I got sick, and was forced to undergo a rush-cure of penicillin and be spoiled by the wife before leaving for sweden: kopparberg..

Since then, I nearly completed the testing and cosmetic changes and I'm planning a release this evening at between 20:00 - 24:00 GMT+1.

Cheers Frame...
I am sorry to hear of your infection and hope that you are fully recovered now.

Given the discussions on how difficult achieving save anywhere is, I must congratulate you on finding a way to make it work and coding it up. I'm looking forward to trying it out later.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Smivs wrote:
They seem fine with docking computers, but try as I might, I couldn't get it to rotate as fast as the Station when manually docking. It will dock, but it's a nerve-wracking and noisy (Bang, bang, bang...) affair.
Strange, I pulled out an old save file with an Anaconda. With 1.74.2 it still docks as I remember: smoothly. With full turn rate I do turn slightly faster than the station. I find it even easier (but slower) than with the Boa-II I normally fly because I can keep rolling at full speed most of the time of the final docking stage.

And no banging at the docks, but that might be my experience with the Boa-II. Both ships are exactly 60 meters high. The dock is 64 meters high, leaving me 2 meters at either side. I used to bang a lot at the walls in the past with my Boa-II, but lately this becomes the exception.

Maybe you are not flying the original Anaconda? Not all oxps than claim to be replacements of the internal ships are true replacements. e.g. the neolite Anaconda has a double pitch and turn rate of the original. And also a higher maximum speed. It makes it a bit more pleasant to fly for the player, but it ignores the fact that it sometimes is nice to get the feeling of flying a big ship.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

This is strange, isn't it.
My regular ship, a Boa Clipper shares it's hull with the Boa Class Cruiser, and I find that easy to dock, but that bloody Anaconda certainly wasn't.
Maybe it's just me :D
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Nice one, Frame! :)

By the way, even though there might be a problem or two when restoring a save game, it does make the career criminal's life a lot easier! :)

The best thing to do is to keep a couple of backup save games at all times, as insurance against - unlikely, but still possible - problems when loading your last savegame... :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post by mcarans »

Hi Frame,

Just tried Save Anywhere 3.0 at a con store.
Small bug at least on Linux:
Scripts\Frame_save_anywhere.js should be renamed Scripts\frame_save_anywhere.js (lowercase f)
otherwise the script isn't found.

Once I made this change, it worked exactly as you indicated. Great work!

Are you intending to update your wiki page: http://wiki.alioth.net/index.php/Save_Anywhere or do you have some other website?
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

thanks for all your reports/efforts, would you believe it.. I'm sick again..
but once I got the time ill be looking into the seedy bar crash, because a seedy bar should spawn on its own, and therefore not need creation.. (spawning)

and the linux file name issue will be corrected too.(verify did'nt catch this though)

oh yeah, i skipped version 1 and 2, because these effectively only ever existed on my hard-drive..

cheers Frame...
Bounty Scanner
Number 935
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post by mcarans »

I'm very sorry to hear you are unwell again and wish you well for a speedy recovery.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Eric Walch wrote:
Is the version number an error? 0.1 -> 0.2 -> 3.0 or missed I some versions?

I just tested it with a seedy space bar. On reloading the saved game, I entered in a loop of docking and launching. After some time I got an arrival report were I 4 times was fined with 5000 credits for docking without clearance. And than a crash to desktop. :cry:

I think the seedy bars must be added on the banned list because save everywhere is not able to add a correct space bar. The main reason is that JS can only identify a ship by its role and not by its key. And the bars have a primaryRole that does not exist in shipdata.plist. Therefor spawning a ship with the old primaryRole fails and save_anywhere is not prepared for that.

For 1.73 and older it was needed for the market that the primaryRole of the station matched an entry in commodities.plist. And instead of adding 42 different entries in commodities.plist for every of the 42 possible space bars, it was easier to just add one entry and make that all space bars have just that single role after spawning. And there are more reasons for a script to change roles after adding to the system, so I might expect some more stations giving similar problems.
Could you send me the save file in question ?. or tell in what system/galaxy this happened ?..

I think what happend here was that you somehow got landing clearence set to on for all stations.. even custom oxp onces.. is this not one of thargoids oxps doing this.

this is the likely Scenario

1 you reloaded your game, got launched from the main station

2 you dock with the intermediate station, and somehow get launched again either by another OXP or manually, in which case saveAnywhere will forceful re-dock you with the intermediate station, and each time you where fined.. am i right ? because it sounds as if you got fined 4 times after docking at the space bar..

3 finally you docked with the space bar, which should be spawned by the random hits script, rather than being spawned by SaveAnywhere.oxp.. all that should allready have been taken care of at launch from main station... that was one of the main reasons that you had to wait in the intermediate station before being docked to the OXP station where initiated the save game.

as a side note, saveAnywhere does not spawn any of the surroundings when the station already exists meaning that it is being spawned by its own script. This is also true for mainstations.

i.e.. You can have a large battle going on outside the main station, make a save, reload the savegame and be launched out where now, no battle is taking place.

the save anywhere script is big & scary and can be misinterpreted easily, even by its author..

but the basic guideline is.

Anything that is not already spawned will be spawned: IF surroundings was saved in the save file, and the parent station i.e. rockhermit. is succesfully spawned...

the script actually makes 50 attempts at spawning the correct station by matching the AI.plist file to one saved in the save file, before moving the correctly spawned station to position where the game was saved..

Anyway, the landing clearence mess, can be avoided with setting the requiresLandingClearence to false while docking, this will be added with the next version.. I'll try to get it done this evening.. because it should be easy to make..

Cheers Frame...'

Edit Like this

Code: Select all

this.dockplayer = function()
{
	this.stationfortimer.saveAnywhereLandingClearence = this.stationfortimer.requiresDockingClearance
	this.stationfortimer.dockPlayer()
	this.stationfortimer.requiresDockingClearance = this.stationfortimer.saveAnywhereLandingClearence
}
Bounty Scanner
Number 935
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Frame wrote:
I think what happend here was that you somehow got landing clearence set to on for all stations.. even custom oxp onces.. is this not one of thargoids oxps doing this.

....

3 finally you docked with the space bar, which should be spawned by the random hits script, rather than being spawned by SaveAnywhere.oxp.. all that should allready have been taken care of at launch from main station... that was one of the main reasons that you had to wait in the intermediate station before being docked to the OXP station where initiated the save game.
I know that I have set docking clearance as mandatory on my system by installing the special oxp. And it sometimes happens that I forget to ask permission and than I am fined with 5000. But your oxp should overrule that (and you corrected that now). I was just surprised to see 4 messages on one report screen. This somehow means that the docking report was generated and than the ship was already launched before it was displayed.

With the seedy bars: I did not realise that random-hits adds it itself. You are right and I checked:
There is a seedy bar in the system with the same role as you saved in the saved game. But still, I keep getting re-docked at the transition station after launch, not the seedy bar.

One other strange thing: When I launch from a F8 screen, the F8 screen is still present on re-docking. When I launch from a F6 screen I re-dock in the F6 screen, but with no stars on it. Pressing F6 brings the stars back. On docking I should always get the F5 screen, so somehow I think you force a re-dock before oolite has registered the launch completely. It might be worth to try docking at a timer at a very short delay giving oolite time to complete all sequences.

....

When you have time to look at the code, you might look at the new ways of adding ships. With the new methods addShips, your code receives a reference back to the added ships, so you can avoid some of the search to just spawned stations. It also saves the check to see if you found the right station. :wink:
Post Reply