Page 10 of 11

Re: hyperradio

Posted: Sun Jan 20, 2013 7:00 pm
by Tricky
Diziet Sma wrote:
Oops.. :oops: my bad.. Since Snoopers does the reporting, I thought that's where it was located. Sorry.
S'ok, no biggie.

My initial thought was Snoopers, since it is a Galactic News channel that is used as the backdrop. A simple case-insensitive grep on Svengali's OXP's, using hypperadio as the search term, narrowed it down for me.

--
Just noticed the output again. In equipment.plist, it has this HyperRadio™. <--- Trademark symbol.

Re: hyperradio

Posted: Mon Jan 21, 2013 10:47 am
by Svengali
Tricky wrote:
What's with the weird characters after HyperRadio? It is in all of the missiontext entries.
I wanted to know if the old way of displaying special chars is still working. Seems I forgot to set it back... :mrgreen:

Thanks, Tricky.

Re: hyperradio

Posted: Tue Jan 22, 2013 12:41 am
by Svengali
v1.26.1 is online.

Changes:
- Fix Trademark symbol.

Special thanks to Cmd.Cheyd, Tricky and Diziet Sma.-)
Cmd.Cheyd has offered webspace and the Hyperradio and 3 musicpacks (AFC01 +HH01 +JFRG01) have moved.
Tricky has also mirrored ST01 + ST02 and Dizzy is hosting TN01 + PSY01.

Re: hyperradio

Posted: Tue Nov 12, 2013 5:49 am
by Captain Patrick
I like this concept, but can't get around the idea of paying the equivalent of thousands of tons of food for what's really just a portable media player with a few dozen titles. And more than a ton of computers, or 3 kg of gold, for a 20-day satellite radio license. Just doesn't seem a viable business model.

This is only ambience after all, with no effect on game play or balance.

Seems to me ships could pick up broadcasts from a system's space station with very modest equipment, that's already being used for other purposes (to communicate market prices, bounties, etc; also a plausible reason that Hyperradio doesn't work in interstellar space); content would be relayed in bursts to other nearby stations through the wormholes of departing ships.

I suggest 1 credit for the receiver/descrambler/player, and 0.1 credits for a license & code good for 20 days. Both to be available at all tech levels.

Re: hyperradio

Posted: Tue Nov 12, 2013 7:57 am
by Diziet Sma
So far as I can recall, the cost, and operational cost, was partly intended as a means for Commanders to burn off some of the excess credits that tend to accumulate after a while. Also, I think the idea was to be more like a cable-tv subscription than free-to-air.. without advertising, in other words.. (at least, once upon a time, cable was like that.. :x )

It's easy enough to change, if you like.. I reduced the subscription price considerably in my own copy and made it a 90 day subscription, rather than 20.

Re: hyperradio

Posted: Tue Nov 12, 2013 9:17 am
by Captain Patrick
Indeed, those skilled at programming can always tweak any OXP to their taste.

My comments apply to this one as it's currently available to everyone else. It doesn't make sense that only the super-rich could afford to listen to music (and even they would find cheaper ways - an iPod, maybe, or a live band in the hold). I think elite players can find other ways of burning excess credits - buy more Galactic Navy bonds, maybe. Or shares in one of the Corporate worlds, or a title in a Feudal one.

Re: hyperradio

Posted: Tue Nov 12, 2013 2:47 pm
by Diziet Sma
Captain Patrick wrote:
It doesn't make sense that only the super-rich could afford to listen to music
Actually, the OXP does provide a way to obtain a "pirate" version of the hyperradio.. but you may need to think about where and how you'd find it.. :wink:
Captain Patrick wrote:
Indeed, those skilled at programming can always tweak any OXP to their taste.

My comments apply to this one as it's currently available to everyone else.
Here you go then.. for all the "everyone else's" out there:

Open the Hyperradio OXP, go into the 'Scripts' folder and open hyperradio.js in your favourite text-editor (DON'T use Notepad though if you're a Windows user, go with Wordpad, or, better yet, Notepad++). Scroll down to the function this.playerBoughtEquipment = function(equipmentKey) which is on line 137.

Code: Select all

this.playerBoughtEquipment = function(equipmentKey)
{
	switch(equipmentKey){
		case 'EQ_HYPER_RADIO':
			this.hyperRadio = true;
			this.hyperradioDuration = Math.floor(20+clock.days);
			EquipmentInfo.infoForKey('EQ_HYPER_RADIO_ADD').effectiveTechLevel = 7;
			break;
		case 'EQ_HYPER_RADIO_ADD':
			this.hyperRadio = true;
			this.hyperradioDuration += 20;
			player.ship.removeEquipment('EQ_HYPER_RADIO_ADD');
			missionVariables.TL_FOR_EQ_HYPER_RADIO_ADD = null;
			break;
		case 'EQ_HYPER_RADIO_PIRATE':
			player.ship.removeEquipment('EQ_HYPER_RADIO_PIRATE');
			this.hyperRadio = true;
			player.ship.awardEquipment('EQ_HYPER_RADIO');
			missionVariables.TL_FOR_EQ_HYPER_RADIO_PIRATE = null;
			this.hyperradioDuration += Math.ceil(20/Math.log(system.government+2.1));
			this.news = 0;
			break;
	}
};
In the above, you will see three instances of the number '20'. This is the number of days the subscription is active for. Change all three to '60' or '90' or whatever is your preferred value. Note also the part that reads effectiveTechLevel = 7. If you change the '7' to '0', the hyperradio will be available at all tech levels.

To change the price of the hyperradio and subscriptions, look in the Config folder of the OXP and open equipment.plist for editing.

Code: Select all

(
	(7,12000,"HyperRadio™","EQ_HYPER_RADIO","This device connects your ship-systems to the HyperRadio™ stations. By sending it's ID your ship receives a coded hyperwave that is stored into the integrated memory. You are licensed to use this device for a period of 20 days.",
		{available_to_all = true; portable_between_ships = true; incompatible_with_equipment = "EQ_HYPER_RADIO_PIRATE";
		script = "hyperradio_eq.js"; script_info = {thargoidRepairBotChance = "0.7";};}
	),
	(99,8000,"HyperRadio™","EQ_HYPER_RADIO_ADD","Additional 20 days more for your HyperRadio™-License with a big and fat discount for our customers. Only available for a short period of time.",
		{available_to_all = true; requires_equipment = "EQ_HYPER_RADIO"; incompatible_with_equipment = "EQ_HYPER_RADIO_PIRATE"; conditions = ("systemGovernment_number greaterthan 4");}
	),
	(99,1000,"HyperRadio™ Social","EQ_HYPER_RADIO_PIRATE","Inofficial HyperRadio™ license. This device connects your ship-systems to the HyperRadio™ stations. Use on you own risk.",
		{available_to_all = true; portable_between_ships = true; incompatible_with_equipment = "EQ_HYPER_RADIO_PIRATE";}
	)
)
In this instance, the prices are the '12000', '8000' and '1000' values, to 1/10 of a credit.. hence, they mean 1200, 800 and 100 credits respectively. You can change these to whatever price you like.. (e.g. - if you change it to '100', the price will be 10 credits)

Note also the '7' in front of the '12000'. This means it will only be available at TL8 and up. Change this to '0' to make it available at all tech levels. What the '99' in front of the other two prices means, I'm not quite sure, but I'd assume it equates to a zero as well. For completeness, you can edit the descriptions so that they reflect the number of days you've picked as well, rather than leaving them at '20'.

Save your changes, and be sure, when you next start Oolite, to hold down the Shift key until you see the spinning Cobra MkIII. (this forces Oolite to rebuild its' cache)

Note that if/when a new version of Hyperradio is released, after you update it, you will need to re-apply the above changes. I keep a folder which contains copies of all changes I've made to OXPs (along with notes on things like line numbers) so that I can easily re-apply my customisations when necessary.

Re: hyperradio

Posted: Tue Nov 12, 2013 5:42 pm
by cim
Diziet Sma wrote:
What the '99' in front of the other two prices means, I'm not quite sure, but I'd assume it equates to a zero as well.
99 means "only available at TL:100 and up", but unlike other such values, 99 is a special value which OXPs can change using scripting to make the item available. In Oolite 1.77 and later, condition scripts provide a less arbitrary way to make items available conditionally.

Re: hyperradio

Posted: Tue Nov 12, 2013 11:31 pm
by Diziet Sma
cim wrote:
unlike other such values, 99 is a special value which OXPs can change using scripting to make the item available.
Ahh.. hence the use of effectiveTechLevel in hyperradio.js. Now it all makes sense.. thanks!

Re: hyperradio

Posted: Sat Feb 01, 2014 8:48 pm
by Ranthe
I found that in "missiontext.plist" for Hyperradio1.26 (and 1.26.1) that the following Snooper message puts square-brackets around the system where the solar activity occurred:

Code: Select all

HYPERRADIO_NEWSD = "GNN: 'Solar activity disrupts Hyperwave transmissions':\n\nA intensive solar eruption in the [%I] system has damaged the radio transmitter station. Most parts of the station were destroyed by this immense powerful flare and we can only hope that other stations in orbit around this wonderful world won't be affected. The HyperRadio™ Inc. has already initiated a repair team in cooperation with the Galactic Repair Service. Estimated time for repairs is according to C.E.O. Carneg Rhambass (HyperRadio™ Inc.) within the next two days.";
I believe from looking at other similar code in Snoopers that this should read:

Code: Select all

HYPERRADIO_NEWSD = "GNN: 'Solar activity disrupts Hyperwave transmissions':\n\nA intensive solar eruption in the %I system has damaged the radio transmitter station. Most parts of the station were destroyed by this immense powerful flare and we can only hope that other stations in orbit around this wonderful world won't be affected. The HyperRadio™ Inc. has already initiated a repair team in cooperation with the Galactic Repair Service. Estimated time for repairs is according to C.E.O. Carneg Rhambass (HyperRadio™ Inc.) within the next two days.";

Re: hyperradio

Posted: Mon Feb 10, 2014 6:27 pm
by Astrobe
A more generic way to make an equipment or a ship cheaper is to add some credits to your account. Just go to your save file, find the "credits" key, and add the desired number of credits to the number below it. Note that this number is ten times your in-game credits (123456 will become 12345.6Cr).

Yes, you can cheat on a lot of things by fiddling with this file (and the game will write something in its logfile about how bad your parents are), but that's your game after all.

Re: hyperradio

Posted: Thu Jun 26, 2014 2:52 am
by CaptSolo
Just installed version 1.26.1 via the in-game manager for Oolite 1.80 hoping to eliminate a minor annoyance, but it did not. When I pause the game, whatever music was playing stops after a few seconds. This never occurred with Oolite 1.77. Anyone else have this problem?

Re: hyperradio

Posted: Thu Jun 26, 2014 2:53 am
by Diziet Sma
CaptSolo wrote:
Just installed version 1.26.1 via the in-game manager for Oolite 1.80 hoping to eliminate a minor annoyance, but it did not. When I pause the game, whatever music was playing stops after a few seconds. This never occurred with Oolite 1.77. Anyone else have this problem?
Yes.. happened to me this morning.

And since I'm (apparently) now the guy who has to fix it, I'm hoping cim can explain to me what's changed to cause this..

Re: hyperradio

Posted: Thu Jun 26, 2014 4:51 pm
by cim
CaptSolo wrote:
When I pause the game, whatever music was playing stops after a few seconds.
Fixed in commit 8d7536b for tonight's build. Thanks for the report.
Diziet Sma wrote:
what's changed to cause this..
It's not very interesting. Essentially, in 1.77 (at least on Windows and Linux) there was a distinction between "sounds" (which were loaded fully into a buffer) and "music" (which was streamed off disk) - and the music streaming took place in the SDL library. In 1.79/80 OpenAL doesn't make that distinction: it'll buffer or stream the sound depending on the file size, but the streaming off disk (and perhaps out of an OXZ) takes place within Oolite's code. So, the game didn't previously need to update the sound objects while the game was paused (because new sounds weren't expected in that situation), but now it does because the existing objects need to have the stream buffers regularly refilled.

Re: hyperradio

Posted: Thu Jun 26, 2014 11:00 pm
by Diziet Sma
At a wild guess, would this also be why the hyperradio music often stops when making a witchjump?