Page 3 of 4
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Tue Jun 09, 2015 3:04 pm
by diddlydum2
fuyuyuki wrote:diddlydum2 wrote:fuyuyuki wrote:geting the following issue event handler:_ _ GalacticTrade_ _/ control.lua:372: unknown style wooden-chest-medium_gt_button_style
Have you read the "adding support for mods" section in the first post? I had the same problem. Make sure you add the 'require("styles")' at the end of the data.lua file, not the start. By the looks of things, it's the dytech machine module you've missed.
could i get a copy of your config.lua mine after doing that keeps telling me that there is an incorrect symbol
Here is a link to my config.lua in the galactic trade mod folder, and my data.lua in the DyTech-Machine_1.0.3 mod folder.
Dropbox:
https://www.dropbox.com/sh/l2pf39d0o0wu ... DIg9a?dl=0
So, whichever mod you are adding support to, you add 'require("styles")' at the end of the data.lua, without single quotes. You then need to copy the styles.lua from galactic trade into the folder of the mod you're adding support to. In the galactic trade config.lua, you add the mod's items, or take out the [[-- --]] from around the items if coop has added them already. Make sure you add the styles to all the mods you want items from, e.g. not just the core module from dytech, all the modules.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Tue Jun 09, 2015 3:12 pm
by fuyuyuki
diddlydum2 wrote:fuyuyuki wrote:diddlydum2 wrote:fuyuyuki wrote:geting the following issue event handler:_ _ GalacticTrade_ _/ control.lua:372: unknown style wooden-chest-medium_gt_button_style
Have you read the "adding support for mods" section in the first post? I had the same problem. Make sure you add the 'require("styles")' at the end of the data.lua file, not the start. By the looks of things, it's the dytech machine module you've missed.
could i get a copy of your config.lua mine after doing that keeps telling me that there is an incorrect symbol
Here is a link to my config.lua in the galactic trade mod folder, and my data.lua in the DyTech-Machine_1.0.3 mod folder.
Dropbox:
https://www.dropbox.com/sh/l2pf39d0o0wu ... DIg9a?dl=0
So, whichever mod you are adding support to, you add 'require("styles")' at the end of the data.lua, without single quotes. You then need to copy the styles.lua from galactic trade into the folder of the mod you're adding support to. In the galactic trade config.lua, you add the mod's items, or take out the [[-- --]] from around the items if coop has added them already. Make sure you add the styles to all the mods you want items from, e.g. not just the core module from dytech, all the modules.
ty was just being a moron so use to mc where uncommenting = removeing the -- but leaving the [[]] all good now
alltho i indeed see your next page issue when i first made one it worked but once i went forward afew pages closed the chest then tried it again stuck on page 1
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Tue Jun 09, 2015 11:38 pm
by coopmaster
ty was just being a moron so use to mc where uncommenting = removeing the -- but leaving the [[]] all good now
alltho i indeed see your next page issue when i first made one it worked but once i went forward afew pages closed the chest then tried it again stuck on page 1
So is the problem that you can't get to the second page? Is the first page full of items, or is the first page missing items also? Do you have any other mods installed? and is it a new save or an old one?
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Wed Jun 10, 2015 3:56 am
by fuyuyuki
ok so page is indeed full i can change the gui to be massive in the configs and still not fill it out because dytech and such however the forward button just does nothing it clicks and everything just wont go forward and it was a new save
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Wed Jun 10, 2015 7:20 am
by diddlydum2
I also had the problem. When the world is first loaded with galactic trade, it appears to work fine the first time you open the buy chest, with page buttons working correctly. However, after I saved and quit, then returned, I could not get past the first page. This happened on newly generated worlds and an old 100h+ dytech save.
Edit: After testing the printing the "glob.gt_total_items" variable in the "gt_page_right_button" event handler, it shows as zero. That's almost certainly the problem, but I can't find where you define those variables :/ Btw, if you would rather I didn't look through your code, just say. I'm only trying to help
Edit 2: Found it, it seems like the glob.gt_total_items doesn't get transferred between saves. When I created a new world, it told me 504 items, which was fine, and the buying chest switched pages correctly. However, after quitting and reloading, the value had dropped to zero. I found the definition it control.lua, and you set it to zero every time the world loads, but only the first time you add 1 each time you add the items, because on subsequent saves, the items already have value.
Perhaps something like this in control.lua from line 234:
Code: Select all
game.onevent(defines.events.ontick, function(event)
if first_tick then
first_tick = false
items_without_cost = {}
for c, item in pairs(game.itemprototypes) do
if glob.gt_values[item.name] == nil then
value = get_item_value(item.name, 1)
if value ~= 0 then
glob.gt_values[item.name] = value
else
if game.player.force.recipes[item.name]==nil and glob.gt_blacklist[item.name]==nil then
in_list = false
for a, b in pairs(items_without_cost) do
if b == item.name then
in_list = true
end
end
if not(in_list) then
table.insert(items_without_cost,item.name)
end
glob.gt_blacklist[item.name] = true
game.player.print(item.name)
end
end
end
end
if #items_without_cost ~= 0 then
for a, b in pairs(items_without_cost) do
game.player.print(b)
end
game.player.print("There are "..#items_without_cost.." base resoureces (items without recipies) without cost (listed above)")
game.player.print("look on the mod page for instructions to add their values to the galactic trade mod (to be bought and sold)")
end
game.player.print(glob.gt_total_items)
glob.gt_total_items = 0
for a, value in pairs(glob.gt_values) do
if value ~= 0 then
glob.gt_total_items = glob.gt_total_items + 1
end
end
end
-- rest of code--
This seems to fix the bug for me.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Wed Jun 10, 2015 11:23 pm
by coopmaster
Ok I think I know what the problem is, I will try to get a new version out later today that will fix it.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Thu Jun 11, 2015 6:56 am
by diddlydum2
Thanks for that! Btw, while I was looking for the problem, it seemed like items get a fixed amount of value per recipe (2 by default) instead of the value being dependent on the time taken for crafting. Is this intended? If not, it doesn't seem like the values of energy_required are exposed by default (when I try to access them, it tells me error - no such key). Have you figured out a different way of accessing it, or asked the devs to expose this information?
Edit: Nvm I found this
here
I would still be interested to know if you are planning to add this feature when it's available.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Thu Jun 11, 2015 10:08 pm
by coopmaster
diddlydum2 wrote:Thanks for that! Btw, while I was looking for the problem, it seemed like items get a fixed amount of value per recipe (2 by default) instead of the value being dependent on the time taken for crafting. Is this intended? If not, it doesn't seem like the values of energy_required are exposed by default (when I try to access them, it tells me error - no such key). Have you figured out a different way of accessing it, or asked the devs to expose this information?
Edit: Nvm I found this
here
I would still be interested to know if you are planning to add this feature when it's available.
yes, I only did this because I didn't find a way to do it after looking around on the wiki, if they add it to where I can get the energy required or the time required I will definitely make it that way.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Thu Jun 11, 2015 11:30 pm
by Airat9000
coopmaster wrote:diddlydum2 wrote:Thanks for that! Btw, while I was looking for the problem, it seemed like items get a fixed amount of value per recipe (2 by default) instead of the value being dependent on the time taken for crafting. Is this intended? If not, it doesn't seem like the values of energy_required are exposed by default (when I try to access them, it tells me error - no such key). Have you figured out a different way of accessing it, or asked the devs to expose this information?
Edit: Nvm I found this
here
I would still be interested to know if you are planning to add this feature when it's available.
yes, I only did this because I didn't find a way to do it after looking around on the wiki, if they add it to where I can get the energy required or the time required I will definitely make it that way.
when you can use a mod?
and can be started in the game to use? simply setting
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Fri Jun 12, 2015 1:24 am
by coopmaster
Airat9000 wrote:
when you can use a mod?
and can be started in the game to use? simply setting
Yes, you should be able to start out with the mod in an existing save game.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Fri Jun 12, 2015 1:31 am
by Airat9000
coopmaster wrote:Airat9000 wrote:
when you can use a mod?
and can be started in the game to use? simply setting
Yes, you should be able to start out with the mod in an existing save game.
still does not start the game with the mods that I took off earlier in the file .. your mod is still not set?
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Sat Jun 13, 2015 10:05 pm
by coopmaster
Airat9000 wrote:coopmaster wrote:Airat9000 wrote:
when you can use a mod?
and can be started in the game to use? simply setting
Yes, you should be able to start out with the mod in an existing save game.
still does not start the game with the mods that I took off earlier in the file .. your mod is still not set?
Sorry its taken me a while to write back, but are you sure that the mods are enabled? If not, some more details would be helpful.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Sun Jun 14, 2015 12:21 pm
by Airat9000
coopmaster wrote:Airat9000 wrote:coopmaster wrote:Airat9000 wrote:
when you can use a mod?
and can be started in the game to use? simply setting
Yes, you should be able to start out with the mod in an existing save game.
still does not start the game with the mods that I took off earlier in the file .. your mod is still not set?
Sorry its taken me a while to write back, but are you sure that the mods are enabled? If not, some more details would be helpful.
all the fashion that I threw operate without your fashion and put it .. do not plow forward correction. I want to also understand what bug
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Mon Jun 15, 2015 12:00 am
by coopmaster
Airat9000 wrote:all the fashion that I threw operate without your fashion and put it .. do not plow forward correction. I want to also understand what bug
I'm sorry but I don't think I understand what you said. I can tell you probably don't natively speak english but if there is any way you can word this better that would be helpful.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Mon Jun 15, 2015 12:45 am
by Airat9000
coopmaster wrote:Airat9000 wrote:all the fashion that I threw operate without your fashion and put it .. do not plow forward correction. I want to also understand what bug
I'm sorry but I don't think I understand what you said. I can tell you probably don't natively speak english but if there is any way you can word this better that would be helpful.
to my link in files mods not work in black screen in game. please fix in, and corret work
thanks

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Mon Jun 15, 2015 11:51 am
by Airat9000
coopmaster wrote:Airat9000 wrote:all the fashion that I threw operate without your fashion and put it .. do not plow forward correction. I want to also understand what bug
I'm sorry but I don't think I understand what you said. I can tell you probably don't natively speak english but if there is any way you can word this better that would be helpful.
new archive
https://www.dropbox.com/s/xv03y614qc5ptl6/mods.rar?dl=0
palese help and instuctions to that I did by setting these modes
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Mon Jun 22, 2015 8:51 am
by coopmaster
So I've been out of town for the week and haven't been able to do anything with the mod, starting tomorrow I'm going to start working on this again. I have an opportunity for an internship coming up so I don't know how time consuming that will be, but I will try to keep updating the mod until I feel it's done.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Thu Jun 25, 2015 11:46 pm
by keyboardhack
Error:
Code: Select all
Error while running the event handler: __GalacticTrade__/control.lua:376: Unknown style long-handed-burner-inserter_gt_button_style
Error Cause:
Items from other mods are added after GalacticTrade styles are created thus not creating a style for them so when GalacticTrade tries to make a button for the item it can't find the style and instead throws an error.
To fix it:
Rename data.lua to data-final-fixes.lua
Why it works:
GalacticTrade now makes its styles after all items have been added to the game thus preventing any mod from creating items after the styles has been created.
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Fri Jun 26, 2015 12:19 pm
by aureon
Have you thought of, rather than enabling the player to build universal chests, spawning 'outposts' with chests far away from base, with said chests being limited to certain items?
I guess it's a modmod idea, and i may just make it after 0.12 hits if you allow me to use your code : )
Re: [MOD 0.11.22] Galactic Trade Mod [WIP]
Posted: Sun Jun 28, 2015 6:57 am
by Devildog
Latest And older versions cause game to Black Screen on new game / Loading a game.
*EDIT : Only Got Versions 1.0 , 1.1 , 1.2 Work on Factorio Version V0.11.22