[MOD 0.11.22] Galactic Trade Mod

Topics and discussion about specific mods
diddlydum2
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Jun 07, 2015 5:05 pm
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.

fuyuyuki
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue Jun 02, 2015 4:07 am
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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?
Creator of the Galactic Trade mod

fuyuyuki
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue Jun 02, 2015 4:07 am
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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

diddlydum2
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Jun 07, 2015 5:05 pm
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

diddlydum2
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Jun 07, 2015 5:05 pm
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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?

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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 :D

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Creator of the Galactic Trade mod

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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.
Waste of bytes : P

aureon
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat May 24, 2014 4:44 pm
Contact:

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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 : )

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

Re: [MOD 0.11.22] Galactic Trade Mod [WIP]

Post 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
Image
Check Out Factorio Mod Madness 2.0 Here : http://bit.ly/1afTDl0
Mod Madness ModPack

Post Reply

Return to “Mods”