[MOD 0.12.X] Galactic Trade

Topics and discussion about specific mods
Post Reply
coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

[MOD 0.12.X] Galactic Trade

Post by coopmaster »

Type: Mod
Name: Galactic Trade
Description: Adds the ability to buy and sell items.
License: MIT
Version: 0.6.5
Release: 2015-07-17
Tested-With-Factorio-Version: 0.12.9
Category: Gameplay Enhancement
Tags: Trading, Market
Download-Url: https://forums.factorio.com/forum/dow ... ew&id=6083
Website: archive of older versions (because I don't have a website yet)
Important
License
Long description
Version history
media
Adding Support for Other Mods
Planned Features
Archive
Source
Attachments
GalacticTrade_0.6.5.zip
0.6.5 for factorio 0.12.X
(167.96 KiB) Downloaded 3052 times
GalacticTrade_0.6.4.zip
0.6.4 for factorio 0.12.X
(82.71 KiB) Downloaded 596 times
GalacticTrade_0.6.0.zip
0.6.0 for factorio 0.12.X
(79.35 KiB) Downloaded 1789 times
Last edited by coopmaster on Mon Oct 19, 2015 11:53 pm, edited 38 times in total.
Creator of the Galactic Trade mod

User avatar
Devildog
Fast Inserter
Fast Inserter
Posts: 170
Joined: Tue Aug 19, 2014 8:19 pm
Contact:

Re: [0.12]Galactic Trade

Post by Devildog »

Nice! You got it updated already.
Image
Check Out Factorio Mod Madness 2.0 Here : http://bit.ly/1afTDl0
Mod Madness ModPack

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

Devildog wrote:Nice! You got it updated already.
Yes, most of what they changed with the api was just making functions more readable so it didn't take too long.
Creator of the Galactic Trade mod

Koub
Global Moderator
Global Moderator
Posts: 7203
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: [0.12]Galactic Trade

Post by Koub »

Hi coopmaster, can you please update your first post with the template provided here ?
Koub - Please consider English is not my native language.

Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.12]Galactic Trade

Post by Airat9000 »

coopmaster wrote:
Devildog wrote:Nice! You got it updated already.
Yes, most of what they changed with the api was just making functions more readable so it didn't take too long.
list the mods you mod work?
Image

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

Airat9000 wrote: list the mods you mod work?
Image
Sorry, I don't understand, what are you asking? Can you ask it in your native language, it seems like there is a translation error.
Creator of the Galactic Trade mod

User avatar
StanFear
Fast Inserter
Fast Inserter
Posts: 236
Joined: Sun Dec 15, 2013 2:49 pm
Contact:

Re: [0.12]Galactic Trade

Post by StanFear »

hey,
have you though about using networks to know what to buy ? like - buy as much as there is on red cable

Shanix
Inserter
Inserter
Posts: 21
Joined: Tue May 26, 2015 12:52 am
Contact:

Re: [0.12]Galactic Trade

Post by Shanix »

Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
Creator of the Galactic Trade mod

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

StanFear wrote:hey,
have you though about using networks to know what to buy ? like - buy as much as there is on red cable
I'll look into it, I thought about integrating with networks but I want to some other things first.
Creator of the Galactic Trade mod

Shanix
Inserter
Inserter
Posts: 21
Joined: Tue May 26, 2015 12:52 am
Contact:

Re: [0.12]Galactic Trade

Post by Shanix »

coopmaster wrote:
Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
I checked and gave names to two items, but it didn't fix them. So I removed the mods that had items that I couldn't add to the galactic network, and I still get the error. Guess I'm waiting for the next update.

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

Shanix wrote:
coopmaster wrote:
Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
I checked and gave names to two items, but it didn't fix them. So I removed the mods that had items that I couldn't add to the galactic network, and I still get the error. Guess I'm waiting for the next update.
did you happen to edit the localization files of anything? It shouldn't have any errors like that if it's just my mod and vanilla.
Creator of the Galactic Trade mod

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

coopmaster wrote:
Shanix wrote:
coopmaster wrote:
Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
I checked and gave names to two items, but it didn't fix them. So I removed the mods that had items that I couldn't add to the galactic network, and I still get the error. Guess I'm waiting for the next update.
did you happen to edit the localization files of anything? It shouldn't have any errors like that if it's just my mod and vanilla.
So after some testing I think that the only way these errors can happen is if the code was edited, I suggest doing a fresh install of my mod to make sure everything is correct. The first error is because my mod doesn't have that chest stored (which happens when one is placed), the second one only happens if somehow the item selection frame gets removed before the other (which will be fixed in the next update). Let me know if problems still persist after a fresh install.
Creator of the Galactic Trade mod

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

coopmaster wrote:
coopmaster wrote:
Shanix wrote:
coopmaster wrote:
Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
I checked and gave names to two items, but it didn't fix them. So I removed the mods that had items that I couldn't add to the galactic network, and I still get the error. Guess I'm waiting for the next update.
did you happen to edit the localization files of anything? It shouldn't have any errors like that if it's just my mod and vanilla.
So after some testing I think that the only way these errors can happen is if the code was edited, I suggest doing a fresh install of my mod to make sure everything is correct. The first error is because my mod doesn't have that chest stored (which happens when one is placed), the second one only happens if somehow the item selection frame gets removed before the other (which will be fixed in the next update). Let me know if problems still persist after a fresh install.
Now that I think of it, there is one other way that this error could happen. If the trading chest was placed without my mod detecting it or the chest was moved after being placed without being picked up by mining it. If you tried to place it with a command or have a mod that somehow moves the chest, that might cause this error. Let me know if either of these are the case.
Creator of the Galactic Trade mod

Shanix
Inserter
Inserter
Posts: 21
Joined: Tue May 26, 2015 12:52 am
Contact:

Re: [0.12]Galactic Trade

Post by Shanix »

coopmaster wrote:
coopmaster wrote:
Shanix wrote:
coopmaster wrote:
Shanix wrote:Anyone else having an error when opening the Buy Chest? I get an error that game.get_localised_item_name(gt_glob.buyingtradingchests_itemselected[item_index]) is a nil value when opening, and when closing I get an error saying game.player.gui.left.item_selection.destroy() is a nil value as well. Lines 394 and 529 respectively in control.lua.
Do you have any other mods enabled? it sounds like an item doesn't have the correct localized variable name that is standard. I will try to make it to where it doesn't give an error in the next update.
I checked and gave names to two items, but it didn't fix them. So I removed the mods that had items that I couldn't add to the galactic network, and I still get the error. Guess I'm waiting for the next update.
did you happen to edit the localization files of anything? It shouldn't have any errors like that if it's just my mod and vanilla.
So after some testing I think that the only way these errors can happen is if the code was edited, I suggest doing a fresh install of my mod to make sure everything is correct. The first error is because my mod doesn't have that chest stored (which happens when one is placed), the second one only happens if somehow the item selection frame gets removed before the other (which will be fixed in the next update). Let me know if problems still persist after a fresh install.
Well, I play a medium sized number of mods, so no it's not just your mod and vanilla. I had to edit the localization files for 5dim's Automization and Resource mod's localisations. With a fresh install of Galactic Trade, here's an overview of the errors I get.

I'm almost positive the error is in 5dim's localisations.

EDIT: In Sandbox, the trade ships come...

EDIT 2: Using the buy chest will disable ships and sell chest updating.
coopmaster wrote:Now that I think of it, there is one other way that this error could happen. If the trading chest was placed without my mod detecting it or the chest was moved after being placed without being picked up by mining it. If you tried to place it with a command or have a mod that somehow moves the chest, that might cause this error. Let me know if either of these are the case.
Nope, I didn't even know you could move chests without mining them. I'm not sure if I can tell you if your mod does or doesn't detect the chest when placed, sorry.

coopmaster
Fast Inserter
Fast Inserter
Posts: 109
Joined: Mon May 18, 2015 1:12 am
Contact:

Re: [0.12]Galactic Trade

Post by coopmaster »

So the problem is that you need to follow the steps on the thread about making other mods compatible with my mod,
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")
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.
Creator of the Galactic Trade mod

Shanix
Inserter
Inserter
Posts: 21
Joined: Tue May 26, 2015 12:52 am
Contact:

Re: [0.12]Galactic Trade

Post by Shanix »

Alright, I guess only doing it for some wasn't good enough, I'll try it for all my mods and see what happens.

EDIT: Yep, I'm just dumb and didn't set everything to be compatible. What a twist.

User avatar
darkshadow1809
Filter Inserter
Filter Inserter
Posts: 306
Joined: Thu Jan 15, 2015 10:13 pm
Contact:

Re: [0.12]Galactic Trade

Post by darkshadow1809 »

FreekillX1Alpha wrote:
Found a bug with the Galatic Trade mod, when opening a buying chest i get the error:
Error while running the event handler: __GalacticTrade__/prototypes/scripts/trading-chest.lua:397: Unknown style gas-canister_gt_button_style

The game then crashes to the main menu.

Using mod pack 0-0-1 for 0.12 (single player version).

Factorio Build 103; Windows 64 bit

update: upon further inspection i find that there is another window that opens behind the main window; cannot copy the text so ill try and write it out manually:
Error when running the event handler: __GalacticTrade__/control.lua.394: bad argument #-1 to get_localised_tem_name' string expected, got nil

Update 2: been trying to fix this myself, haven't yet but i have managed to change the error. If you set dytech to enabled in the galactic trade config file, you get the error from my previous update (still in the back ground) and my original error is placed by: Error while running the event handler: __GalacticTrade__/control.lua:529: attempt to index field 'item_selection' (a nil value)
===============================================================================================================================================================

Hi there :) Someone reported this to me when hes using my modpack :) Could you look into it? Thanks!

Now i read in a bit about the mod compatibility fix.. But I don't think thats related to this o.o

If I am stupid and you already fixed it please tell me so xD haha. Sorry I've been crazy busy getting things ready for 0.12

Link to modpack: https://forums.factorio.com/forum/vie ... 60&t=13591 DL for all mods that are in there that may cause an issue with your mod :p Sorry I haven't done the credits section yet since I am still hourly removing/adding mods to make it work together.
ShadowsModpackDevelopment

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.12]Galactic Trade

Post by ssilk »

Moved thread to convenience, I think this is not just a new item. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Shanix
Inserter
Inserter
Posts: 21
Joined: Tue May 26, 2015 12:52 am
Contact:

Re: [0.12]Galactic Trade

Post by Shanix »

darkshadow1809 wrote:Hi there :) Someone reported this to me when hes using my modpack :) Could you look into it? Thanks!

Now i read in a bit about the mod compatibility fix.. But I don't think thats related to this o.o

If I am stupid and you already fixed it please tell me so xD haha. Sorry I've been crazy busy getting things ready for 0.12

Link to modpack: https://forums.factorio.com/forum/vie ... 60&t=13591 DL for all mods that are in there that may cause an issue with your mod :p Sorry I haven't done the credits section yet since I am still hourly removing/adding mods to make it work together.
Oh actually I literally just had this error. You have to enable compatibility for all mods in your modpack, and it will sort of work. I did that and now the only error is every time I load my save, I lose all credits and have to place all of my chests again.

Post Reply

Return to “Mods”