[MOD 0.13] Challenge - defy other Factorio players

Topics and discussion about specific mods
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

[MOD 0.13] Challenge - defy other Factorio players

Post by binbinhfr »

Infos
  • Type: Mod
  • Name: Challenge
  • Description: Define a challenge on a chosen map and try to complete it as fast as you can, or in a limited time. Publish it on the factorio forum (section Maps and Scenarios) to challenge other players, and see if someone can beat your personal record... ;)
  • Example: try an example here with the Cold Metal challenge or the Mino Mania challenge.
  • Tested-With-Factorio-Version: 0.13.0
  • Locale: english, french
  • Multiplayer compatible: tested on a headless server.
  • Tags: Challenge, solo player competition, race
  • License: You are free to use and distribute this mod and also to modify it for personal use, but not to release a modified version without permission (unless visibly not maintained anymore).
  • Portal download : https://mods.factorio.com/mods/binbinhfr/Challenge
screen03.jpg
screen03.jpg (73.23 KiB) Viewed 10972 times
INTRODUCTION
DESCRIPTION
IMAGES
TIPS
TODO
KNOWN ISSUES
EXAMPLE
TRANSLATIONS
Download
For Factorio 0.13.X :
Please now use the portal for downloads (see link above or use ingame mod install/update), as I won't update both downloads links here anymore.
Last edited by binbinhfr on Fri Aug 05, 2016 5:31 pm, edited 37 times in total.
My mods on the Factorio Mod Portal :geek:
StarFox31
Inserter
Inserter
Posts: 28
Joined: Wed Apr 20, 2016 11:02 am
Contact:

Re: [MOD 0.12.x] Challenge - challenge other Factorio players

Post by StarFox31 »

This is a cool idea. I will have to test it out once I finish my current game.
Image
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.12.x] Challenge - defy other Factorio players

Post by binbinhfr »

Thanks. If you want to try an already defined challenge, I already uploaded 2 challenge examples in "Map and sceanrio" section of the forum. Have fun. ;)
My mods on the Factorio Mod Portal :geek:
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.12.X] Challenge - defy other Factorio players

Post by binbinhfr »

working on update to 0.13 , should be ok wednesday evening.
My mods on the Factorio Mod Portal :geek:
imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by imajor »

This is an absolutely great idea. I really hope to see people posting their results!
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by binbinhfr »

alas, there were not many returns, even if quite a lot of people seems to have download it and use it. I guess people play with it alone, in a blitz style... ;)
My mods on the Factorio Mod Portal :geek:
mbattjes@gmail.com
Inserter
Inserter
Posts: 34
Joined: Sat Jan 31, 2015 3:36 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by mbattjes@gmail.com »

When clicking the furnace or electric pole in the Edit menu, i get this error which throws me out of the game: Error while running the event handler: Challenge/control.lua:1247: Gui element with name chlg_flow_sel_200 already present in the parent element.
Happens on both 13.0 and 13.1

I'm a total noob when it comes to Factorio modding, so forgive my lack of knowledge, but i found that selector.entities in line 1242 was linking to game.item_prototypes in line 1245

(similarly selector.units is linking to game.entity_prototypes but i think that is correct)

So i changed game.item_prototypes to game.entity_prototypes.
Now i get an error related to entry.place_result in that same block of code. So i removed that part :geek:

Finally the game shows me a more usable error: Error while running the event handler: __Challenge__/control.lua:1249: Unknown style chlg_icon_curved-rail
I don't think curved rail can be crafted anymore so that might be the issue
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by binbinhfr »

Finally the game shows me a more usable error: Error while running the event handler: __Challenge__/control.lua:1249: Unknown style chlg_icon_curved-rail
Hi, thx for your report.
You shouldn't change the control.lua the way you did, it will not help you : this part is just as it should be, the problem comes from something else :-)
But reading this previous line, it seems strange that you have this error about curved-rail that does not exist anymore (I confirm), and which should appera at all... so I wonder if you are trying to load one of the old challenge examples that i posted ? Because they do not work anymore with the 0.13.x changes... Are you also sure that you downloaded the very last 1.0.4 mod version ? And more than that, are you sure not to use a 0.12.x factorio version ??? because these curved rails... My mod should not speak about them at all !!! because they are loaded at the beginning, when factorio is launched, and my mod is scanning factorio data. (or do you have another old mod that contain these rails ?)

Anyway if you create a new map and define your own challenge, it should work (it works when I tested it a few days ago...). But I wil test it again with 0.13.1 tonight.

If your problem persists, try without any other mod than Challenge.
And if still problematic, please send me the map you are trying to load.
I cannot go further without your map... (unless your map was a new empty one...)

As a first try, to avoid the initial error, before I came back home, you can try to change in line 1245, the code this way, moving the % test block inside the next block (do it from my original control.lua 1.0.4):

Code: Select all

			for name, entry in pairs(game.item_prototypes) do
				entry = entry.place_result
				if entry then
				    if i % selector_icons_per_line == 0 then
					   gui3 = gui2.add({type = "flow", name = "chlg_flow_sel_" .. i, direction = "horizontal", style = "chlg_flow_style"})
				    end
					gui3.add({type = "button", name = "chlg_but_enti_" .. name, style = "chlg_icon_" .. name})		
					i = i + 1
				end
			end
My mods on the Factorio Mod Portal :geek:
mbattjes@gmail.com
Inserter
Inserter
Posts: 34
Joined: Sat Jan 31, 2015 3:36 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by mbattjes@gmail.com »

Thanks for the reply. I was using 13.1 on a new map. I checked some mods and it seems that Bob's mods is causing this error. I checked them all and it seems Bob's Power is the culprit. I have no idea why. It's a small mod, maybe someone with more knowledge than me can figure it out?
mbattjes@gmail.com
Inserter
Inserter
Posts: 34
Joined: Sat Jan 31, 2015 3:36 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by mbattjes@gmail.com »

binbinhfr wrote:

As a first try, to avoid the initial error, before I came back home, you can try to change in line 1245, the code this way, moving the % test block inside the next block (do it from my original control.lua 1.0.4):

Code: Select all

			for name, entry in pairs(game.item_prototypes) do
				entry = entry.place_result
				if entry then
				    if i % selector_icons_per_line == 0 then
					   gui3 = gui2.add({type = "flow", name = "chlg_flow_sel_" .. i, direction = "horizontal", style = "chlg_flow_style"})
				    end
					gui3.add({type = "button", name = "chlg_but_enti_" .. name, style = "chlg_icon_" .. name})		
					i = i + 1
				end
			end
Your suggestion to change the code works! I get no error now and i can open all of the edit menu's. I don't know if this fixes the conflict with Bob's Power but at least it doesnt crash anymore
Last edited by mbattjes@gmail.com on Thu Jun 30, 2016 1:33 pm, edited 1 time in total.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13.X] Challenge - defy other Factorio players

Post by binbinhfr »

mbattjes@gmail.com wrote:Thanks for the reply. I was using 13.1 on a new map. I checked some mods and it seems that Bob's mods is causing this error. I checked them all and it seems Bob's Power is the culprit. I have no idea why. It's a small mod, maybe someone with more knowledge can figure it out?

EDIT: Your suggestion to change the code works! I get no error now and i can open all of the edit menu's
OK, nice to see we solve this one (even if this crash in my mod must come from a problem in 0.13 data, I will check that) .I'll try to verify bob's power.

Anyway, in the next days, I will have to test and possibly redo the 2 challenge maps I already posted.
If you have a map with a new challenge, don't hesitate to post it with your result :-)
My mods on the Factorio Mod Portal :geek:
great_goddess_moka
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 07, 2016 9:54 pm
Contact:

Re: [MOD 0.13] Challenge - defy other Factorio players

Post by great_goddess_moka »

i cant seem to figure out how to open the challenge menu, i am trying to make a supply like challenge, the portal mod loader isn't working for me so i just downloaded the mod and put the zip file into the game just like i do with my other mods, could someone please help me?
great_goddess_moka
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 07, 2016 9:54 pm
Contact:

Re: [MOD 0.13] Challenge - defy other Factorio players

Post by great_goddess_moka »

okay scratch what i said before, but i sadly cant add more then one objective of the same kind and i cant even really add very many different items in the same objective, when i click a item or icon it freezes and it selects it but i cant add it, plus the fact that i cant even start the challenge at all, i really want to use this mod but i cant use it in its current state, oh and a idea you should add a search bar or a scroll able box as when i open the collect objective i have a few mods that add a lot of items but i cant get them as they are off screen
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] Challenge - defy other Factorio players

Post by binbinhfr »

> but i sadly cant add more then one objective of the same kind

I just tested it on 0.14.19, and I can add any objectives, of the same kind or not.
Press the EDIT button
Then press the ADD button and select an objective type, and change the item and number.
Do this any time you want (press ADD again)

> plus the fact that i cant even start the challenge at all,

when you want to start it, just press EDIT again to exit edit mode, and then press START.

Then close the Challenge window (press CLOSE or the main icon) and play...
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Mods”