[MOD 0.12.20] GalacticTrade
Posted: Sat Feb 06, 2016 5:01 pm
by Ninjadude501
NOTE: I am currently just really not interested in continuing to update this branch of the mod. Anyone that wishes to take this and continue updating it in my place is more than welcome to do so (under the terms of the license, of course) -Ninjadude501
Type: Mod
Name: Galactic Trade
Description: Adds the ability to buy and sell items. Did a few fixes to update to 0.12.20 -Ninjadude501
License: MIT
Version: 0.6.6
Release: 2015-07-17
Tested-With-Factorio-Version: 0.12.20
Category: Gameplay Enhancement
Tags: Trading, Market
Download-Url: Bottom of the post I guess?
Website: archive of older versions (because I don't have a website yet)
Type: Mod
Name: Galactic Trade
Description: Adds the ability to buy and sell items. Did a few fixes to update to 0.12.20 -Ninjadude501
License: MIT
Version: 0.6.6
Release: 2015-07-17
Tested-With-Factorio-Version: 0.12.20
Category: Gameplay Enhancement
Tags: Trading, Market
Download-Url: Bottom of the post I guess?
Website: archive of older versions (because I don't have a website yet)
Important
This is just a quick fix of a few game-breaking bugs that I found to update it to work with 0.12.20. While I am not going to test it with any more recent experimental versions (0.12.22), I do not mind if someone takes this version and updates it so it works with 0.12.22. Or, if it just works with 0.12.22, feel free to reply to this and tell me so I can update the tested version.
Please note that it may be possible not all features are completely working. Please report these as you can encounter them so I can either be awesome and fix them, or lazy and just note that they don't work.
One more thing before you move on. Almost ALL of the following spoilers are just directly copied from coopmaster's post, which can be found in the obsolete mods section. However, any bits in bold are my own.
Please note that it may be possible not all features are completely working. Please report these as you can encounter them so I can either be awesome and fix them, or lazy and just note that they don't work.
One more thing before you move on. Almost ALL of the following spoilers are just directly copied from coopmaster's post, which can be found in the obsolete mods section. However, any bits in bold are my own.
License
License
The MIT License (MIT)
Copyright (c) 2015 Cooper Mahring
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------------------------------------------------------------------------------------------------
"This license basically means that you can do whatever you want with the code, just make sure that you give credit to me.
You can use the code in your mod if you want. If you make a modpack with my mod in it, just let me know.
If I ever stop working on the mod, I will most likely edit the post to make sure that it is clear that it isn't being worked on anymore. If that ever does happen without me saying anything, the code can be used by anyone to make a similar mod." -coopmaster
The MIT License (MIT)
Copyright (c) 2015 Cooper Mahring
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------------------------------------------------------------------------------------------------
"This license basically means that you can do whatever you want with the code, just make sure that you give credit to me.
You can use the code in your mod if you want. If you make a modpack with my mod in it, just let me know.
If I ever stop working on the mod, I will most likely edit the post to make sure that it is clear that it isn't being worked on anymore. If that ever does happen without me saying anything, the code can be used by anyone to make a similar mod." -coopmaster
Bugs
If you encounter a bug that gives you a message saying something like "a bug has happened" (I'm tired right now and not remembering stuff), please, take a screenshot and feel free to report it! If you encounter a bug that does not give you an error message (sometimes the prices display glitches, for example), you may still report it, but I probably will be unable to fix it, or just plain not want to.
Here's some information I need if you report a bug, other than the screenshot:
What were you doing/trying to do when the bug occurred?
What version of Factorio are you using?
Are you using any other mods whatsoever?
Here's some information I need if you report a bug, other than the screenshot:
What were you doing/trying to do when the bug occurred?
What version of Factorio are you using?
Are you using any other mods whatsoever?
Long description
Long description
Have you ever forgotten to set a cap on that inserter chest and thought, "oh man now I just wasted a ton of iron and copper for nothing!". No longer! Now you can teleport your unwanted items directly to a merchant once a day to turn it into something useful! You can also make a living off of it! Design your factory around buying and selling items and become RICH! You can buy the rocket defense just from selling circuits, lots and lots of circuits!
This mod adds the ability to buy and sell items in the game at market prices. You unlock the chest by researching market trading which comes after electronics. This mod adds two items (shown below) the buying trading chest (top left), the selling trading chest (top right), the logistics buying trading chest (bottom left), and the logistics selling chest (bottom right).
The selling trading chest adds a gui on the top left of the screen (shown below) which shows you information about the sale of the contents. It also has a checkbox that allows you to disable that chest from selling its contents to the market. Trading efficiency accounts for the cost of the trades, but you can decrease the percentage cost with research.
The logistics selling chest is a chest that is a part of the logistics network that acts like a requester chest, just with the same functionality as a selling trading chest.
The buying trading chest also gives an additional gui that allows the sale of items. It shows the info about the sale and by clicking on any of the buttons with item icons, it switches the sale to that item. The textbox is where you enter the amount you want to have in the box, make sure you press the update button to update the information. Also like the selling trading box, it has a checkbox which allows the ability to disable that chest from buying things off the market. The copy and paste buttons allow you to copy trading chest values over to other trading chests. The current amount text shows how much it would cost to get the currently requested items, so if you already have 50 iron in the chest and request 100, it shows the price for 50 iron. There are multiple pages of items (which the size of a page can be changed in the config), clicking the left or right arrows will take you to different pages. The logistics buying trading chest has the same gui, except it acts like a passive provider chest.
Once a day, at noon (in-game time of day value of 0), everything in the selling trading chest is sold for credits with a 15% cut of the buying price. In the buying trading chest, whatever item is sold is bought at the amount requested. Credits are in the top left of the screen (see below).
If you don't have enough credits to complete the purchase, currently you won't buy anything for that chest's order (each chest has its own order it request). The price of each item is determined by the resources it takes to craft them, any item that can be crafted in the game can be bought. The price is also determined by the crafting time (2 credits for each resource item (recursive)) and if it was smelted (additional 15 credits). Items that have no crafting recipe have a value set manually, so might need balancing. You don't need any research to buy or sell items, you just need the appropriate chests.
Next to the credits is a button that shows info of your current and previous transactions on the market. You can look at all the days where you had a transaction and how much you gained or lost. You can look through your transaction history with the arrow buttons (outer ones being first and last).
Multiplayer
Use 0.6.0 if you find issues with 0.6.5 (tested it but not very much)
There are two modes for multiplayer, shared and non-shared wallets. The non-shared wallet is more for PVP, but is good for those friends you can't trust! Shared wallet is simply that everyone shares the chests and money, if you decide later to change to non-shared then the current resources just go to player 1. Non-shared means that each individual player has a different credit amount and each has their own chests. Those chests aren't protected right now, though, that is a planned feature. This is perfect for PVP since you can't effect anyone else's chests unless you have physical access, but you can see how much they have gained or spent in the transaction history! Give feedback if you encounter any bugs since I'm not easily able to test multiplayer with my bad laptop. Also, let me know if you want more features for multiplayer!
CURRENTLY THIS IS UNTESTED! Running this with multiplayer may break your game! Or it may just work perfectly, I don't know! Use with caution!
Have you ever forgotten to set a cap on that inserter chest and thought, "oh man now I just wasted a ton of iron and copper for nothing!". No longer! Now you can teleport your unwanted items directly to a merchant once a day to turn it into something useful! You can also make a living off of it! Design your factory around buying and selling items and become RICH! You can buy the rocket defense just from selling circuits, lots and lots of circuits!
This mod adds the ability to buy and sell items in the game at market prices. You unlock the chest by researching market trading which comes after electronics. This mod adds two items (shown below) the buying trading chest (top left), the selling trading chest (top right), the logistics buying trading chest (bottom left), and the logistics selling chest (bottom right).
The selling trading chest adds a gui on the top left of the screen (shown below) which shows you information about the sale of the contents. It also has a checkbox that allows you to disable that chest from selling its contents to the market. Trading efficiency accounts for the cost of the trades, but you can decrease the percentage cost with research.
The logistics selling chest is a chest that is a part of the logistics network that acts like a requester chest, just with the same functionality as a selling trading chest.
The buying trading chest also gives an additional gui that allows the sale of items. It shows the info about the sale and by clicking on any of the buttons with item icons, it switches the sale to that item. The textbox is where you enter the amount you want to have in the box, make sure you press the update button to update the information. Also like the selling trading box, it has a checkbox which allows the ability to disable that chest from buying things off the market. The copy and paste buttons allow you to copy trading chest values over to other trading chests. The current amount text shows how much it would cost to get the currently requested items, so if you already have 50 iron in the chest and request 100, it shows the price for 50 iron. There are multiple pages of items (which the size of a page can be changed in the config), clicking the left or right arrows will take you to different pages. The logistics buying trading chest has the same gui, except it acts like a passive provider chest.
Once a day, at noon (in-game time of day value of 0), everything in the selling trading chest is sold for credits with a 15% cut of the buying price. In the buying trading chest, whatever item is sold is bought at the amount requested. Credits are in the top left of the screen (see below).
If you don't have enough credits to complete the purchase, currently you won't buy anything for that chest's order (each chest has its own order it request). The price of each item is determined by the resources it takes to craft them, any item that can be crafted in the game can be bought. The price is also determined by the crafting time (2 credits for each resource item (recursive)) and if it was smelted (additional 15 credits). Items that have no crafting recipe have a value set manually, so might need balancing. You don't need any research to buy or sell items, you just need the appropriate chests.
Next to the credits is a button that shows info of your current and previous transactions on the market. You can look at all the days where you had a transaction and how much you gained or lost. You can look through your transaction history with the arrow buttons (outer ones being first and last).
Multiplayer
Use 0.6.0 if you find issues with 0.6.5 (tested it but not very much)
There are two modes for multiplayer, shared and non-shared wallets. The non-shared wallet is more for PVP, but is good for those friends you can't trust! Shared wallet is simply that everyone shares the chests and money, if you decide later to change to non-shared then the current resources just go to player 1. Non-shared means that each individual player has a different credit amount and each has their own chests. Those chests aren't protected right now, though, that is a planned feature. This is perfect for PVP since you can't effect anyone else's chests unless you have physical access, but you can see how much they have gained or spent in the transaction history! Give feedback if you encounter any bugs since I'm not easily able to test multiplayer with my bad laptop. Also, let me know if you want more features for multiplayer!
CURRENTLY THIS IS UNTESTED! Running this with multiplayer may break your game! Or it may just work perfectly, I don't know! Use with caution!
Pictures
Version history
Version history
Version# (Date): What has changed...
0.1.0 (2015-05-25):
-Initial release
0.1.1 (2015-05-25):
-fixed selling values when selling items
-fixed all buying chest buying amounts set to 0 when another buying chest is destroyed
-added gui for selling chest which shows the value of the items in the chest
0.1.2 (2015-05-25):
-selling trading chest gui now shows value it will sell for on the market with merchant cut
0.2.0 (2015-05-27):
-fixed all buying chest buying amounts set to 0 when another buying chest is destroyed (instead of being mined)
-added checkbox for enabling/disabling the trading for a specific chest
-most items are now available on the market at the price of their recipes resource values
-support for other mods with a little bit of work required on the user's end
0.2.1 (2015-06-02):
-fixed when a trading chest is mined or placed by a robot, it would cause a crash (after trying opening another chest or buying or selling)
-if trading chest has more of an item than what you entered to buy, it now shows 0 instead of a negative number
-update button in buying trading chest now doesn't set the amount to 0 if a valid number isn't entered
-added copy and paste button for buying trading chest
-buying trading chest no longer requests more items than it can accept
-added background for credits amount to make easier to see
0.2.2 (2015-06-07):
-base resources that don't have values now are shown when values are shown
-added values for NEAR mod (uncomment in control.lua) credit to Syriusz
-added config.lua and moved loading values for mods there
-fixed where modded smelted items didn't have extra value added
-added pages for item list and you can now change the size of the item list in the config.lua
-now reloads all values when mod loads (in case you want to change it on a map you already started)
-fixed some mods causing a loop when finding values
-added option in config to reload values on load
-added a way to blacklist modded items in config
0.2.3 (2015-06-10):
-fixed a bug where there wouldn't be more than one page after loading a save with the trading chest
0.3.0 (2015-07-08):
-made trading chest show localised name of items
-added loading bar to loading items
-items without values are now put into a horizontal list that fits the screen if there are too many
-you can now disable alerts for trader in config.lua
-added a button in the top left that tells current and previous transactions
-fixed a bug where new buying trading chests would not always be enabled by default
-made credits easier to read (by adding commas)
-no longer shows alert for trade merchant coming if you don't have any trading chests put down
-expanded both trading chests by 2 stacks
0.4.0 (2015-07-14):
-added logistic trading chests
-fixed a bug where if you started a vanilla game and tried to load galactic trade, it would cause an error
-added first and last buttons for transaction history
0.4.1 (2015-07-17):
-fixed issue where disabling selling trading chest would crash the game
0.5.0 (2015-07-17):
-Updated for 0.12.0 of factorio
-item cost now reflect crafting times (may need balancing)
0.5.1 (2015-07-25)
-made it to where you no longer need to edit other mods to have my mod work with them
0.5.2 (2015-07-28)
-added support for 0.12.1
0.5.3 (2015-08-03)
-transaction log now shows signs for positive and negative for profit and expenses
-buying trading chests will now buy as much as it can if you don't have enough money for the whole transaction
-added a search field in buying trading chests
-current transaction amount for buying trading chests now shows up in text field when opening it
-the mod now makes two potential files, one where all items and values are listed. the other one is items which need to have values manually entered. (in the "script-output" directory)
-added a new line in transaction log to show expected gross (how many credits you will have left afterwards) after the current transaction
0.6.0 (2015-08-08)
-multiplayer support (possibly still buggy)
-while making multiplayer support I changed a few small things
-market values now don't recalculate every time the game is reloaded, there is a button that is temporarly located in the market transaction tab
0.6.1 (2015-09-10)
-config is now cleaner and has different config options for clients and servers (both types are also for single player)
-There is now an option to have every player have their own wallet with each trading chest being owned by the person who placed it.
-coin now is tax exempt (merchant doesn't take any cut from it)
-recalculate market values button now actually works
-changed merchant cut to 10%
-recalculate button actually works now
-tech cost does not affect market values, you can change how much so in the config
-made it to where saves with older versions should work with this one (post if you get an error)
-you can now change the individual prices of items by adding it to the config and reloading the config and recalculating the item values
0.6.2 (2015-09-15)
-tech cost modifier is now 0.5 by default
-fixed crash on buying from chest when you don't have enough money for whole order
-added option for instant buy and instant sell buttons back in config
-buying trading chest now updates cost of trade when typing in amount
0.6.3 (2015-09-19)
-fixed not loading all recipies correctly
-removed need for listing smelted items
-fixed loading items freezing game with some mods
-searching and selecting items now automatically updates info unless specified in config, also removed update buttons
-added research for decreasing (now) trading efficiency
0.6.4 (2015-09-20)
-fixed mod not working due to tech name
0.6.5 (2015-09-22)
-fixed tech costs
-fixed page numbers not updating for buying trading chests
-fixed not reporting items without cost
-added additional values for dytech mod values
-fixed some mods causing the mod to get stuck in an infinite loop when loading values
-fixed skipping the first item for the page
-fixed not messaging all players in multiplayer when trade happens
-fixed selling items not giving correct profit and selling chest not displaying correct projected profit
0.6.5 (something happened and I messed up the date)
-fixed many game-breaking bugs
-was too lazy to update version number, so you have to keep track of that yourself.
0.6.6 (2016-02-27)
-Fixed a minor, yet game-breaking, glitch. If I'm right, most mods should now work fine.
-Stopped being lazy and updated the version number.
Version# (Date): What has changed...
0.1.0 (2015-05-25):
-Initial release
0.1.1 (2015-05-25):
-fixed selling values when selling items
-fixed all buying chest buying amounts set to 0 when another buying chest is destroyed
-added gui for selling chest which shows the value of the items in the chest
0.1.2 (2015-05-25):
-selling trading chest gui now shows value it will sell for on the market with merchant cut
0.2.0 (2015-05-27):
-fixed all buying chest buying amounts set to 0 when another buying chest is destroyed (instead of being mined)
-added checkbox for enabling/disabling the trading for a specific chest
-most items are now available on the market at the price of their recipes resource values
-support for other mods with a little bit of work required on the user's end
0.2.1 (2015-06-02):
-fixed when a trading chest is mined or placed by a robot, it would cause a crash (after trying opening another chest or buying or selling)
-if trading chest has more of an item than what you entered to buy, it now shows 0 instead of a negative number
-update button in buying trading chest now doesn't set the amount to 0 if a valid number isn't entered
-added copy and paste button for buying trading chest
-buying trading chest no longer requests more items than it can accept
-added background for credits amount to make easier to see
0.2.2 (2015-06-07):
-base resources that don't have values now are shown when values are shown
-added values for NEAR mod (uncomment in control.lua) credit to Syriusz
-added config.lua and moved loading values for mods there
-fixed where modded smelted items didn't have extra value added
-added pages for item list and you can now change the size of the item list in the config.lua
-now reloads all values when mod loads (in case you want to change it on a map you already started)
-fixed some mods causing a loop when finding values
-added option in config to reload values on load
-added a way to blacklist modded items in config
0.2.3 (2015-06-10):
-fixed a bug where there wouldn't be more than one page after loading a save with the trading chest
0.3.0 (2015-07-08):
-made trading chest show localised name of items
-added loading bar to loading items
-items without values are now put into a horizontal list that fits the screen if there are too many
-you can now disable alerts for trader in config.lua
-added a button in the top left that tells current and previous transactions
-fixed a bug where new buying trading chests would not always be enabled by default
-made credits easier to read (by adding commas)
-no longer shows alert for trade merchant coming if you don't have any trading chests put down
-expanded both trading chests by 2 stacks
0.4.0 (2015-07-14):
-added logistic trading chests
-fixed a bug where if you started a vanilla game and tried to load galactic trade, it would cause an error
-added first and last buttons for transaction history
0.4.1 (2015-07-17):
-fixed issue where disabling selling trading chest would crash the game
0.5.0 (2015-07-17):
-Updated for 0.12.0 of factorio
-item cost now reflect crafting times (may need balancing)
0.5.1 (2015-07-25)
-made it to where you no longer need to edit other mods to have my mod work with them
0.5.2 (2015-07-28)
-added support for 0.12.1
0.5.3 (2015-08-03)
-transaction log now shows signs for positive and negative for profit and expenses
-buying trading chests will now buy as much as it can if you don't have enough money for the whole transaction
-added a search field in buying trading chests
-current transaction amount for buying trading chests now shows up in text field when opening it
-the mod now makes two potential files, one where all items and values are listed. the other one is items which need to have values manually entered. (in the "script-output" directory)
-added a new line in transaction log to show expected gross (how many credits you will have left afterwards) after the current transaction
0.6.0 (2015-08-08)
-multiplayer support (possibly still buggy)
-while making multiplayer support I changed a few small things
-market values now don't recalculate every time the game is reloaded, there is a button that is temporarly located in the market transaction tab
0.6.1 (2015-09-10)
-config is now cleaner and has different config options for clients and servers (both types are also for single player)
-There is now an option to have every player have their own wallet with each trading chest being owned by the person who placed it.
-coin now is tax exempt (merchant doesn't take any cut from it)
-recalculate market values button now actually works
-changed merchant cut to 10%
-recalculate button actually works now
-tech cost does not affect market values, you can change how much so in the config
-made it to where saves with older versions should work with this one (post if you get an error)
-you can now change the individual prices of items by adding it to the config and reloading the config and recalculating the item values
0.6.2 (2015-09-15)
-tech cost modifier is now 0.5 by default
-fixed crash on buying from chest when you don't have enough money for whole order
-added option for instant buy and instant sell buttons back in config
-buying trading chest now updates cost of trade when typing in amount
0.6.3 (2015-09-19)
-fixed not loading all recipies correctly
-removed need for listing smelted items
-fixed loading items freezing game with some mods
-searching and selecting items now automatically updates info unless specified in config, also removed update buttons
-added research for decreasing (now) trading efficiency
0.6.4 (2015-09-20)
-fixed mod not working due to tech name
0.6.5 (2015-09-22)
-fixed tech costs
-fixed page numbers not updating for buying trading chests
-fixed not reporting items without cost
-added additional values for dytech mod values
-fixed some mods causing the mod to get stuck in an infinite loop when loading values
-fixed skipping the first item for the page
-fixed not messaging all players in multiplayer when trade happens
-fixed selling items not giving correct profit and selling chest not displaying correct projected profit
0.6.5 (something happened and I messed up the date)
-fixed many game-breaking bugs
-was too lazy to update version number, so you have to keep track of that yourself.
0.6.6 (2016-02-27)
-Fixed a minor, yet game-breaking, glitch. If I'm right, most mods should now work fine.
-Stopped being lazy and updated the version number.
media
Video Spotlights
https://youtu.be/TtKj1XPknTc
https://youtu.be/TtKj1XPknTc
Adding Support for Other Mods
Depending on what mods you download, there could be some items that my mod cannot get the values for. In that case, it will tell you after it is done with loading the other items and give some instructions. After following those instructions, if you wan to use the same save, click the "GT" button in the top left and click the "Recalculate Values" button. That will make sure that all values are up to date and will make sure you can buy and sell those items.
*Only for versions before 0.5.1*
If you get stuck with the steps, you can check out my video which shows you how to do it here
1. go to galactic trade mod folder
2. copy styles.lua
3. go to mod you want to add support with (if it has extra items)
4. paste the styles.lua file
5. edit data.lua with a text editor
6. add to the end of the file
7. if it has any raw resources (resources that don't have crafting recipes, but are available) go back to galactic trade mod folder (otherwise you are done!)
8. make sure the mod isn't already supported (look below)
8. edit the config.lua file with a text editor
9. look for the line "--add raw resource values here (items which don't have crafting recipes) with their values, see examples below"
10. look at examples and make sure you know what the item name is inside the mod's files, it would look something like "iron-plate"
(there are also some mods which already have support, all you need to do is remove the --[[ and --]] that surrounds the mod you want support for)
11. put the new line in and if it is smelted then also look slightly lower down (it also has instructions)
12. if you have done all of those steps then the items from the mod should show up in the buying trading chest with the correct credit values
13. if you want to help others not do steps 7-12, post to the forum thread and tell me the mod it was, and the lines you added to the files.
I have no clue if these instructions will work anymore. Also, due to my very limited Lua experience (as in fixing this is my only Lua experience) I'm going to be no help in getting this to work with any other mods.
*Only for versions before 0.5.1*
If you get stuck with the steps, you can check out my video which shows you how to do it here
1. go to galactic trade mod folder
2. copy styles.lua
3. go to mod you want to add support with (if it has extra items)
4. paste the styles.lua file
5. edit data.lua with a text editor
6. add
Code: Select all
require("styles")
7. if it has any raw resources (resources that don't have crafting recipes, but are available) go back to galactic trade mod folder (otherwise you are done!)
8. make sure the mod isn't already supported (look below)
8. edit the config.lua file with a text editor
9. look for the line "--add raw resource values here (items which don't have crafting recipes) with their values, see examples below"
10. look at examples and make sure you know what the item name is inside the mod's files, it would look something like "iron-plate"
(there are also some mods which already have support, all you need to do is remove the --[[ and --]] that surrounds the mod you want support for)
11. put the new line in and if it is smelted then also look slightly lower down (it also has instructions)
12. if you have done all of those steps then the items from the mod should show up in the buying trading chest with the correct credit values
13. if you want to help others not do steps 7-12, post to the forum thread and tell me the mod it was, and the lines you added to the files.
I have no clue if these instructions will work anymore. Also, due to my very limited Lua experience (as in fixing this is my only Lua experience) I'm going to be no help in getting this to work with any other mods.
Planned Features
[done] -GUI for selling chest which will tell the value of items in the chest currently
[not possible]-slider in buying gui instead of textbox (there isn't slider element yet, as far as I know)
[done] -checkbox for buying and selling chest (to enable and disable trading in that chest)
[done] -chest types that hook to logistics network
-shift+right click and shift+left click copy settings (not possible, but have copy and paste buttons for now)
-dynamic economy with simulated factories (WIP)
-better graphics for chests, and increased size
-a thing that gives info on the market
-multiplayer support (needs more testing)
[done]-better mod support for other mods (could possibly get better with better API support of ores)
-find a solution for localization
Leaving this here so people can see it and work on these features if they want to only. I will be working to implement none of these.
[not possible]-slider in buying gui instead of textbox (there isn't slider element yet, as far as I know)
[done] -checkbox for buying and selling chest (to enable and disable trading in that chest)
[done] -chest types that hook to logistics network
-shift+right click and shift+left click copy settings (not possible, but have copy and paste buttons for now)
-dynamic economy with simulated factories (WIP)
-better graphics for chests, and increased size
-a thing that gives info on the market
-multiplayer support (needs more testing)
[done]-better mod support for other mods (could possibly get better with better API support of ores)
-find a solution for localization
Leaving this here so people can see it and work on these features if they want to only. I will be working to implement none of these.
Archive
archive of older versions
versions 0.4.x and before are for factorio version 0.11.22, the thread for 0.11.22 can be found at https://forums.factorio.com/forum/vie ... 14&t=12496
Remember, the 0.6.5 contained in this is not the version I made that works with 0.12.20!
versions 0.4.x and before are for factorio version 0.11.22, the thread for 0.11.22 can be found at https://forums.factorio.com/forum/vie ... 14&t=12496
Remember, the 0.6.5 contained in this is not the version I made that works with 0.12.20!
Source
https://github.com/coopmaster/GalacticTradeMod-Factorio You can contribute if you want, contact me by email at coopmaster24@gmail.com if I don't respond on GitHub.
I don't do anything with Github, so I'm not going to be putting my version onto Github myself. However, anyone that wants to do that for me is welcome, and I don't even really care about credit. -Ninjadude501
I don't do anything with Github, so I'm not going to be putting my version onto Github myself. However, anyone that wants to do that for me is welcome, and I don't even really care about credit. -Ninjadude501