Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

[MOD][Stations] Not Enough Stock 1.0b


NerArth
 Share

Recommended Posts

Readme:

 

Created by NerArth, based on the mod request of http://www.avorion.net/forum/index.php/topic,4814.0.html and based on the info at http://www.avorion.net/forum/index.php/topic,1560.0.html

 

--Description

 

I created this mod based on a request by the forum user Echo-107. This mod modifies the following two files:

..\data\scripts\lib\shop.lua - where we add a random variation to the amount of any given item being stocked

..\data\scripts\entity\merchants\equipmentdock.lua - where we make the item generator iterations go higher, so that possibly more variety will exist

 

This mod's scope is only to increase quantities of stock, not quality. Below you can see how this was achieved.

 

--Installation and Technical stuff

 

Replace the two lua files mentioned above with the provided files.

 

Alternatively, if you already have modified files from another mod or modpack, this mod changes the following:

 

In the ..\data\scripts\lib\shop.lua file, at the function Shop:add(item_in, amount) we change the original

    item.amount = amount

to

    item.amount = amount * math.random(2,5)

here, we have made it so that the amount of any given stocked item is multiplied by a random value between 2 and 5

 

This is a smaller file, so you shouldn't get lost in it;

In the ..\data\scripts\entity\merchants\equipmentdock.lua file, at the function EquipmentDock.shop:addItems() we change the original

    while counter < 12 do

to

    while counter < 36 do

effectively, this increases the amount of times the an upgrade generation is called; 36 is an arbitrary value of treble the original

 

--Version History

1.0.190214

Made sure the mod was compatible with Avorion v0.20

 

1.0.180509

Created the mod, modifies equipmentdock.lua and shop.lua files.

 


 

Download:

1.0b

 

Known issue: Equipment docks may generate a lot of systems available for purchase with this mod, but the default UI does not provide a way to scroll through the list, so the actual visible stock will be subjected and limited to the higher quality systems only (or until you buy out all the higher quality stock, which is easy enough in creative).

Link to comment
Share on other sites

TEN THOUSAND THANKS to thee Senpai! Much much MUCH appreciated :)

 

No problem, let me know if you have any further feedback down the line; I really want to fix the issue with not being able to see all the items in one page, but still trying to figure out how to add scrolling or pages (pages will probably be easier).

Link to comment
Share on other sites

For all intents and purposes the mod is fully functional. all stocks are up by 10 times allowing access to some serious firepower, at high cost, as in base game but ten times over. makes outfitting ships significantly easier. The fact you cant scroll in the menus is a downer but its still good.

Link to comment
Share on other sites

  • 9 months later...
  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...