Couple questions.

1. I would like to put some solar panels in my outfitters. I am making them quite ineffective though. So I would like to give the player the ability to plate them with a special coating to double their effectiveness. I however am not sure how to make it so that you can only buy one coating per solar panel?

2. What if I want to give the option to buy two different types of coating but only allow one coating per panel, is that the same as with one or something new?

3. And about bits, I am working off of Absolute Minimum are any bits already used, I'm not quite sure how to check for them?

This post has been edited by Sp3cies : 26 March 2008 - 06:34 AM

For the first and second parts, you could use multiple outfits. The original panel could set a contribute bit, and the upgrades would have a require bit that matches, so that you can only buy the upgrades if you have one of the original panels. Then, have the new outfit remove one of the original panels on purchase, so if you have 4 of the original panels, buying an upgrade would leave you with 3 original and 1 upgraded, etc.

At least, I think this would work, it all depends on whether or not the remove outfit on purchase works instantly or not and whether or not that's abusable by the player.

Edit: As to Absolute Minimum, I don't know off-hand whether or not it uses any bits at the start (I'd lean towards no). The simple way to check would be to open up all of the files of your plug and go through each resource individually and see if any of them are using up bits.

This post has been edited by GutlessWonder : 26 March 2008 - 07:54 AM

@gutlesswonder, on Mar 26 2008, 11:52 PM, said in Couple questions.:

The original panel could set a contribute bit, and the upgrades would have a require bit that matches, so that you can only buy the upgrades if you have one of the original panels.

Or you could use the Oxxx operator in the Availability field of the upgraded solar panel. 🙂

@sp3cies, on Mar 26 2008, 04:27 AM, said in Couple questions.:

1. I would like to put some solar panels in my outfitters. I am making them quite ineffective though. So I would like to give the player the ability to plate them with a special coating to double their effectiveness. I however am not sure how to make it so that you can only buy one coating per solar panel?

2. What if I want to give the option to buy two different types of coating but only allow one coating per panel, is that the same as with one or something new?

@gutlesswonder, on Mar 26 2008, 05:52 AM, said in Couple questions.:

For the first and second parts, you could use multiple outfits. The original panel could set a contribute bit, and the upgrades would have a require bit that matches, so that you can only buy the upgrades if you have one of the original panels. Then, have the new outfit remove one of the original panels on purchase, so if you have 4 of the original panels, buying an upgrade would leave you with 3 original and 1 upgraded, etc.

At least, I think this would work, it all depends on whether or not the remove outfit on purchase works instantly or not and whether or not that's abusable by the player.

I do believe Terek uses this for PlugPack. Perhaps, if you have the time, you should take a look at the resources 'Tektaara Repairing System', 'Repairing System Upgrade', and 'Upgraded Repairing System'.

If you want two coatings on sale in the outfitters, do what GutlessWonder says. It should leave you with one upgraded panel, regardless of what coating you purchase.

I've tried both suggested ways, however if I do it via bits then you need to buy one solar panel then one injection then one solar panel then another injection etc. This seems tedious to me if there is no other way then fine but yeh I would prefer an alternative.
Also using the Oxxx works for one but with this I can't limit the layers of coating. If I have the limit of Solar Panels set to 8 then I need to set the limit for the Coating at least that high so I can cover each panel with it. However when Oxxx is set it just means that I can buy my 8 Coatings while only having one Solar Panel and that doesn't make much sense either.

Dxxx in the OnBuy field. Same as GutlessWonder's idea.

Then I end up with 8 Coatings and can still buy another 8 Panels. 😞

@sp3cies, on Mar 26 2008, 06:27 AM, said in Couple questions.:

1. I would like to put some solar panels in my outfitters. I am making them quite ineffective though. So I would like to give the player the ability to plate them with a special coating to double their effectiveness. I however am not sure how to make it so that you can only buy one coating per solar panel?

I'm new to plugin and EV Nova, so please excuse me if I'm wrong, but isn't this what ModMax was designed for? You could probably set the solar panels to have a ModMax for the coatings (which have a normal limit of 1), but I don't know what could keep you from buying the first one without a solar panel.

I don't know the answer to the other questions, though.

Ah. Didn't think of that. This could get tricky.

You're going to need some way of counting how many Solar Panel outfits you've bought.

Here's a thought:

The OnBuy field of the original Solar Panel sets (say) b1.

Then we have a series of cröns that are used to count up in binary style. It's late at night, so I'm possibly not spotting some glaring problem, but I'm sure someone will point it out to me. Maybe there's even a simpler way. Either that, or someone's already thought of this. 😄

1. Activates on b1 & !b2, and has b2 !b1 OnEnd
2. Acivates on b1 & b2 & !b3 and has b3 !b1 !b2 OnEnd
3. Activates on b1 & b2 & b3 & !b4 and has b4 !b1 !b2 !b3 OnEnd
4. Activates on b1 & b2 & b3 & b4 & !b5 and has b5 !b1 !b2 !b3 !b4 OnEnd

Then your original Solar Panel outfit has !b5 in its Availability field. The procedure for upgrading to the advanced panel is the same as described in GutlessWonder's post above. The trick here is that the procedure only works if the player can only buy the normal Solar Panels one at a time.

So, to explain what I mean, when you buy your first panel, crön 1 activates, setting your counter to 0001. When you buy the second, crön 2 activates, since the least significant bit is set, which sets the second bit and clears the first, setting your counter to 0010. When you buy your third, crön 1 activates again, since the first bit is clear, but since only the second bit is set, none of the other cröns activate - this sets the counter to 0011. When you buy the fourth, crön 3 activates, since the lowest two bits are set. This sets the third bit, making your counter 0100. The fifth, sixth and seventh solar panels repeat the above procedure, setting the counter to 0101, 0110, and 0111 respectively. On the eighth solar panel, crön 4 fires up, setting the most significant bit, and blocking any further purchases of solar panels.

... Does that make any sense, or am I just spouting gibberish? 🙂

The main thing I can't work out is how to restrict the player to only buying one at a time, other than making it outfit limit 1 (which would prevent you from buying any more until you upgrade the one you have).

oütf
128 Solar Panel
129 Blue Coating
130 Yellow Coating

Solar Panel: increases fuel regen by X and has ModMax 129 and 130
Blue Coating: increases fuel regen by Y and has max of 1 and Availability of O128 and OnSell D128
Yellow Coating: increases fuel regen by Z and has max of 1 and Availability of O128 and OnPurchase G129, OnSell D128 D129

OR

oütf
128 Solar Panel
129 Blue Coated Solar Panel
130 Yellow Coated Solar Panel
131 ;token

chär
128 Default Character

Default Character: OnStart G131 G131 G131 G131 (however many you want the max for solar panels to be. You could also do this on a per-ship basis, where each ships has K of oütf 131, where K is the number of Solar Panels it can have. Or, for that matter, they can be granted by an invisible mission. Whatever. The player gets them.)

Solar Panel: increases fuel regen by X and has Availability O131, OnPurchase D131, OnSell G131.
Blue Coated Solar Panel: increases fuel regen by Y and has Availability O128, OnPurchase D128, OnSell G131.
Yellow Coated Solar Panel: increases fuel regen by Z and has Availability O128, OnPurchase D128, OnSell G131.
;token: Nothing, invisible.

This post has been edited by Qaanol : 31 March 2008 - 09:35 AM

Using tokens works, but you'll need to give every ship tokens to make sure that you get them when you get a new ship via buy, capture, or escape. And that makes things more complicated,

Basically, what Qaanol said in the first idea is the way to go.

The difference is that you aren't actually replacing the original panels (so you can't just add coatings and then buy more panels)
So you make the improved recharge rate take that into account.

For different types of coatings, you need to make them upgrades on existing coatings. So, again, you don't replace the coating, but you add on to it.
In Qaanol's example buying the yellow coating actually buys a blue coating as well - same thing, just automatic. If you do it that way, you'll have to explain that in the outfitter, otherwise it will look odd when you try to buy a yellow coating and you get a blue AND yellow coating.

In addition, he's set it up so that the coatings are permanent. Selling a coating sells the whole panel. If you don't want that, get rid of the Dxxx in the OnSell fields.

:wub: :wub:

Note to self, don't attempt to think of a sneaky workaround after midnight. Especially not when Qaanol is in the area.

Edit: Heyyy - I just noticed I'm in Qaanol's sig. 😄

This post has been edited by Belthazar : 01 April 2008 - 06:51 AM

Not sure if anyone is particularly interested but I used Qaanols second method and modified it a little bit. It does end up being little resource heavy but gives exactly the effect I wanted.

So I used these oütf:
135 ;Solar Panel (token)

136 Solar Panel, Availability o135, OnPurchase d135 g137, OnSell d137 g135

137 ;Panel Coating (token)

138 Panel Coating, Availability o137, OnPurchase d136 d137 g139

139 Coated Panel, OnSell g135

Both token have high tech levels.
138 has Remove After Purchased and Cannot Be Sold flag ticked.
139 has a high tech level and the Can Be Sold Anywhere flag ticked.

This way I can have as many different types of coating as I want.

That.... doesn't look right.

o137 looks redundant
o138 and o139 can be combined?

What's wrong with this?

135 ;Token
136 Solar Panel - Available: o135 - OnPurchase: d135 - OnSell: g135
137 Coated Solar Panel - Available: o136 - OnPurchase: d136 - OnSell: g135

The trick here is that you're not actually buying a coated solar panel - you're buying a panel coating for the solar panel you already have, which gives you a coated solar panel. That said, I suppose it's possible to have "Solar Panel Coating" in the field that displays in the Outfitters, while "Coated Solar Panel" appears in the player info.

137 is only redundant if you have one type of Coating, I have gone from only being able to have one or two, to as many as I want with this system.

138 and 139 separated allows me to buy Coatings and once they have been bought I can't sell Coatings anymore but I can sell Coated Panels.