Adding New Weapons and making the Available

Just downloaded Vega Strike and need help? Have a question but don't know where to start? Ask here.
Post Reply
PaulB
Merchant
Merchant
Posts: 41
Joined: Mon Oct 07, 2013 8:19 am

Adding New Weapons and making the Available

Post by PaulB »

Can someone explain the meaning of the following entries and fields in Planets, Bases, etc.?

{upgrades/Reactors/Medium;1;.1;6;3}
{upgrades/Weapons/Mounted_Guns_Medium;1;.1;6;5}

What do the 4 numbers mean/represent?

I know the entries determine what is available for purchase at the Ship Upgrades - but what exactly do the numbers mean?

And could someone also explain a little about ship_upgrades.py ?
I've made some mods in Vegastrike.
I added the Galaxy (from PGG) to Vegastrike and Tachyon Cannon, Plasma Gun, and Proton Torpedo to units.csv, master_parts_list.csv, and weapon_list.xml but when I go to buy weapons the tachyon and plasma (even if they show up) are grayed out so not available and I don't know why.
If I click on them the descriptions are NOT what the description says in master_parts_list.csv but something to the effect of what a shield or engine enhancement would show.

To make new weapons available what has to be done beside creating units.csv, master_parts_list.csv, and weapon_list.xml entries ?
Paul
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Adding New Weapons and making the Available

Post by klauss »

Without mention of which column, it's just guessing. But guessing it's Imports:

{<category>;<price>;<price std dev>;<quantity>;<quantity std dev>}
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
PaulB
Merchant
Merchant
Posts: 41
Joined: Mon Oct 07, 2013 8:19 am

Re: Adding New Weapons and making the Available

Post by PaulB »

klauss wrote:Without mention of which column, it's just guessing. But guessing it's Imports:

{<category>;<price>;<price std dev>;<quantity>;<quantity std dev>}
Could you expound a little on the <quantity std dev> and what it means and an example or two?
I have a vague idea but I'm not clear and google didn't really clarify it enough for me - at least in the context of VS.
Paul
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Adding New Weapons and making the Available

Post by klauss »

It's a statistics thing. Randomization. It basically says how far from the average quantity <quantity> the actual value should vary. So, roughly, a quantity of 5 with std dev 1 would mean 5 plus or minus 1 (actually a bit more but roughly that).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
PaulB
Merchant
Merchant
Posts: 41
Joined: Mon Oct 07, 2013 8:19 am

Re: Adding New Weapons and making the Available

Post by PaulB »

Thanks, I kinda thought maybe that might be it but wasn't sure.
Paul
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Adding New Weapons and making the Available

Post by TBeholder »

base price/quantity - those are average values (multipliers), relative to "base prices" - the ones set in data/parts/trade_goods.csv or trade_equipment.csv (formerly master parts), deviations - how far it may vary.

price = abs ( base_price * (rel_price-price_dev) + price_dev*2* random(0..1) )
Price = ( price + (base_price*aveweight) )/(aveweight+1), where aveweight is confwar "cargo/price_recenter_factor" (default 0)


i.e. without recentering, final price is base price multiplied by (price ±(0..1)*price_dev) - e.g. if price is 2 and price_dev is 0.6, the final value will be somewhere between 1.4x and 2.6x of base price.
With recentering >0, differences from medium values will be reduced (1/3 for price_recenter_factor=2) for everything.
Same deal with quantity, so quantity -1 quantity dev 4 means (-5..+3) - usually none, but sometimes up to 3.

On top of this, confvar cargo/price_quant_adj_power (1), cargo/min_price_quant_adj (1), cargo/max_price_quant_adj (5) can change quantity depending on the price, with default values reserves of goods will be values set for a base x1 at minimum price and x0.2 at maximum price among the prices set for items in this category, not in range of possible values for an item (yup, it's weird and may be a bug).

Source code is here.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Post Reply