hyperradio

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

Moderators: winston, another_commander

User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: hyperradio

Post by Tricky » Sun Jan 20, 2013 7:00 pm

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.

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2365
Joined: Sat Oct 20, 2007 2:52 pm

Re: hyperradio

Post by Svengali » Mon Jan 21, 2013 10:47 am

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.

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2365
Joined: Sat Oct 20, 2007 2:52 pm

Re: hyperradio

Post by Svengali » Tue Jan 22, 2013 12:41 am

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.

User avatar
Captain Patrick
Competent
Competent
Posts: 42
Joined: Tue Jun 22, 2010 6:14 am

Re: hyperradio

Post by Captain Patrick » Tue Nov 12, 2013 5:49 am

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.

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: hyperradio

Post by Diziet Sma » Tue Nov 12, 2013 7:57 am

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.
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
Captain Patrick
Competent
Competent
Posts: 42
Joined: Tue Jun 22, 2010 6:14 am

Re: hyperradio

Post by Captain Patrick » Tue Nov 12, 2013 9:17 am

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.

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: hyperradio

Post by Diziet Sma » Tue Nov 12, 2013 2:47 pm

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.
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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: hyperradio

Post by cim » Tue Nov 12, 2013 5:42 pm

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.

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: hyperradio

Post by Diziet Sma » Tue Nov 12, 2013 11:31 pm

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!
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
Ranthe
---- E L I T E ----
---- E L I T E ----
Posts: 330
Joined: Sat Oct 13, 2012 7:35 pm
Location: Paraparaumu, New Zealand (TL 8, Rich Agricultural, Multi-Government)

Re: hyperradio

Post by Ranthe » Sat Feb 01, 2014 8:48 pm

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.";
Commander Ranthe: Flying the Anaconda-class transport Atomic Annie through Galaxy 2.
Combat Ranking: Dangerous
"Big ships take more booty on your interstellar flights..."

Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 596
Joined: Sun Jul 21, 2013 12:26 pm

Re: hyperradio

Post by Astrobe » Mon Feb 10, 2014 6:27 pm

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.

User avatar
CaptSolo
---- E L I T E ----
---- E L I T E ----
Posts: 891
Joined: Wed Feb 23, 2011 10:08 pm
Location: Hermit's Pipe
Contact:

Re: hyperradio

Post by CaptSolo » Thu Jun 26, 2014 2:52 am

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?

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: hyperradio

Post by Diziet Sma » Thu Jun 26, 2014 2:53 am

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..
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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: hyperradio

Post by cim » Thu Jun 26, 2014 4:51 pm

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.

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: hyperradio

Post by Diziet Sma » Thu Jun 26, 2014 11:00 pm

At a wild guess, would this also be why the hyperradio music often stops when making a witchjump?
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