[Release] RandomHits 1.7.1

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

Moderators: another_commander, winston

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.7.1

Post by Eric Walch »

cim wrote:(Mission offer on dock should probably move to an interface screen anyway, of course)
For random Hits, it is just a matter of commenting one line out, to avoid the hit offers on docking. To be more precicely, without the line (around line 170), you only can enter the hitpages through the interface screen.:

Code: Select all

this.showScreen = "firstPage"; // default page (used, unless there were pending messages).
But I noticed that during the "this.startUp" handler, the station is the main station, even when loading a game saved at a seedy bar. This handler should be the place for a script to check were he is at the start in my opinion. At least it was my first choice to check were I started, but it did't work for a saved-bar-game.

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [Release] RandomHits 1.7.1

Post by cim »

Eric Walch wrote:But I noticed that during the "this.startUp" handler, the station is the main station, even when loading a game saved at a seedy bar. This should be the place for a script to check were he is at the start in my opinion.
This is unfortunately unavoidable. You can't move the player to their saved station until it's there. It won't be there until the populator function has run. You have to complete startUp before the populator runs so that worldscripts have somewhere to do necessary initialisation.

There is, however, a new startUpComplete handler which runs after the populator and after the player has been placed in the correct station.

Hmm. It would have been useful if I'd documented that... {goes to fix}

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.7.1

Post by Eric Walch »

cim wrote:There is, however, a new startUpComplete handler which runs after the populator and after the player has been placed in the correct station.
I did check if there were new handlers I could use for this check. :)

And this works. It detects being in the bar correct and adds the interface screen for the hitpages now. But it still doesn't do nothing, so the script probably needs more things to set instead of just calling the ShipDockedWithStation handler to make it work correctly without launching first. So I have some work to do.

@Thargoid: Yes it is big now. Was big already though. I downloaded it from the new http://addons.oolite.org/ pages so no hickups in Oolite itself. But I have a connection of 11 MByte/sec, so 108 MB takes here about 10 seconds downloadtime. :D

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Re: [Release] RandomHits 1.7.1

Post by Thargoid »

Eric Walch wrote:@Thargoid: Yes it is big now. Was big already though. I downloaded it from the new http://addons.oolite.org/ pages so no hickups in Oolite itself. But I have a connection of 11 MByte/sec, so 108 MB takes here about 10 seconds downloadtime. :D
I think it's my machine (which is low spec) rather than the download speed itself. I can manually download the file in about 30-40s (not quite as quick as you ;) ), but if I try to do it in-game then things become non-responsive. But it takes a couple of minutes for the game to start-up (after a trunk build), hence the thought about it being the machine.

As I said I'm just concerned that such delays may put newer players with similar low-spec machines off either the OXZ or the whole game.

User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2555
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.7.1

Post by spara »

Eric Walch wrote:But it still doesn't do nothing, so the script probably needs more things to set instead of just calling the ShipDockedWithStation handler to make it work correctly without launching first. So I have some work to do.
If I'm not totally mistaken, you'll need to set this.random_hits_docked = true after calling this.shipDockedWithStation(). That's how I got it to work. I was not aware of the ShipDockedWithStation handler, so I did it with guiScreenChanged :mrgreen: . Are you doing this change? It's your code after all and you'll be more likely to take better account of things than I.

About the size. Maybe the extension manager could show some warning when the size is over some limit? With 1.79 it's also possible to chop the oxp into core + additional ship sets. That would naturally require some rewriting of the code.

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [Release] RandomHits 1.7.1

Post by cim »

If we find there's consistent problems downloading above particular sizes, it could warn, though it does already give the download size on the install list.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Re: [Release] RandomHits 1.7.1

Post by Thargoid »

spara wrote:About the size. Maybe the extension manager could show some warning when the size is over some limit? With 1.79 it's also possible to chop the oxp into core + additional ship sets. That would naturally require some rewriting of the code.
You can do it without re-writing anything, just packaging things up differently. Just split it into multiple OXZs (say a core one plus one or more shipset ones) and make each OXZ require all of the others. Then once loaded nothing has changed, but you can download them in smaller chunks rather than all at once.

If you really want to be complete, then have both options - a single large OXZ and the smaller chunk group which require all of the others in the group. Just make the large one conflict with each of the group ones, and the group ones individually conflict with the large one. Means more work to maintain, but then people could do it either way as suited them.

User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2555
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.7.1

Post by spara »

Thargoid wrote:You can do it without re-writing anything, just packaging things up differently. Just split it into multiple OXZs (say a core one plus one or more shipset ones) and make each OXZ require all of the others. Then once loaded nothing has changed, but you can download them in smaller chunks rather than all at once.
True. I was thinking something more ambitious. There could be a core package that would function on its own and then you could mix and match ship packages with it. But that's probably pointless as most users will most likely just load 'em all.

Actually splitting the textures into smaller packages and scripts into another package would be a good idea. Then a small update in the script would not require one to download the whole package.

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.7.1

Post by Eric Walch »

spara wrote:If I'm not totally mistaken, you'll need to set this.random_hits_docked = true after calling this.shipDockedWithStation(). That's how I got it to work.
Yep, that should work. I had missed that because it is set in the ship script. I now added:

Code: Select all

this.startUpComplete = function (){
    if (player.ship.docked && player.ship.dockedStation.name === "A Seedy Space Bar"){
        this.shipDockedWithStation();
        this.random_hits_docked = true;
    }
};
And now the leaderboard can be accessed after loading the game without launching first. It is better you upload it as I can't edit the manifest you started.

-------
Off-topic:
I had the AddOns folder in my personal cloud (Synology Nas in my LAN). With the new system I also put the Mannaged_AddOns in the cloud, so every change I make to an oxp in the addOns or the Mannaged_AddOns is synchronised between my 3 macs.
I wonderd if this would work for the managed oxz's, but I see no complains. (Only a message that there is a mismatch between installed and available oxz's)
So every mac uses the same oxp set and the same saved games. :)

User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: [Release] RandomHits 1.7.1

Post by cim »

Thargoid wrote:Just make the large one conflict with each of the group ones, and the group ones individually conflict with the large one.
I would advise in this case just having the group ones conflict with the large one (or the other way round, if you think that's easier to maintain). Otherwise you may end up with a case where the dependency check order is:

"component one"
"monolithic"
"component two"

"component one" rules itself out because it sees "monolithic", and then "monolithic" rules itself out because it sees "component two". "component one" doesn't get re-checked at this point, however, so then "component two" rules itself out because it doesn't have "component one" which it requires.


As far as separating goes ... I wouldn't generally advise it unless:
  • You have a clear separation of functionality between components so you can usefully install only some (e.g. "Povray Planets" or "Your Ad Here!")
  • You want to separate assets and config (e.g. "Griff's Shipset"), because you expect the config to change more frequently than the assets and don't want to force a redownload of the assets every time, or because you want to have multiple configs for the same assets - in that case, the config should depend on the assets, and the assets could add the config(s) to their optional list
Remember that people can still download and install an OXZ file with a web browser and drop it into their AddOns folder and it's still a bit easier - except on a Mac - than using the OXP format. If the OXZ manager has problems with large files, and they aren't fixable, that might be a better workaround. (If you try it, you'll see that the OXZ manager then highlights that OXZ red for "manual install" but still shows you if new versions are available)

Maybe if I get round to adding a bit more dependency helpfulness to the OXZ manager - you install an OXP and if after downloading the dependencies aren't met it offers to go and fetch them right then - it might matter less, but there are tricky things to adding that sort of extra functionality, so not for 1.80.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] RandomHits 1.7.1

Post by Diziet Sma »

I'm wondering how much of this download difficulty is due to the download method Oolite uses, and also perhaps the Wiki software involved.

It's well known that some download methods and protocols are quite aggressive about continuing a download over a flaky connection, whereas others will give up quite easily if a connection is lost/dropped or times out. If the internet connection is poor, or internet conditions unstable, as happens now and then, a large download is much more likely to exhibit such problems.

Ideally, I'd like to see Oolite using FTP for downloads, rather than HTTP. FTP was designed from the ground up with bad connections in mind.
Last edited by Diziet Sma on Tue May 13, 2014 9:22 am, edited 3 times in total.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 1882
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: [Release] RandomHits 1.7.1

Post by maik »

Diziet Sma wrote:I'm wondering how much of this download difficulty is due to the download method Oolite uses, and also perhaps the Wiki software involved.
I was wondering the same regarding the wiki, however Thargoid mentioned
I can manually download the file in about 30-40s (not quite as quick as you ), but if I try to do it in-game then things become non-responsive.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] RandomHits 1.7.1

Post by Diziet Sma »

Which would tend to suggest that it's Oolite that isn't coping well with less-than-ideal conditions.

On the other hand, how well does the Wiki software and server cope with multiple simultaneous large downloads going on? If a number of large downloads are going on at once, as may well happen after a new release of a popular OXZ, are some connections timing out, perhaps, as the server struggles to serve all requests in a timely fashion?

Server load could have dropped considerably in the time between Thargoid trying to download via the OXZ Manager, and downloading via his browser.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 1882
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: [Release] RandomHits 1.7.1

Post by maik »

Diziet Sma wrote: On the other hand, how well does the Wiki software and server cope with multiple simultaneous large downloads going on? If a number of large downloads are going on at once, as may well happen after a new release of a popular OXZ, are some connections timing out, perhaps, as the server struggles to serve all requests in a timely fashion?
Good question. I don't know the server's specs off the top of my head but I recall they were mentioned on the BB after a server switch took place. It wasn't too shabby though. I'd be surprised if it wouldn't be able to answer hundreds of parallel download requests, which seems absurdly high.
Diziet Sma wrote:Server load could have dropped considerably in the time between Thargoid trying to download via the OXZ Manager, and downloading via his browser.
That can be easily tested by repeating it a few times.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] RandomHits 1.7.1

Post by Diziet Sma »

maik wrote:Good question. I don't know the server's specs off the top of my head but I recall they were mentioned on the BB after a server switch took place. It wasn't too shabby though. I'd be surprised if it wouldn't be able to answer hundreds of parallel download requests, which seems absurdly high.
I'm inclined to agree, particularly as it appears to be on a dedicated server, and not shared hosting. It ought to be able to cope with anything (legitimately) thrown at it.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

Post Reply