Search found 14 matches

by Devcod
Fri Nov 21, 2014 9:13 am
Forum: Maps and Scenarios
Topic: How to make a working market?
Replies: 2
Views: 10946

Re: How to make a working market?

https://forums.factorio.com/wiki/index.php?title=Lua/Market https://forums.factorio.com/wiki/index.php?title=Lua/Game#getentitybytag How to use it: control.lua: require "defines" game.oninit(function() local market = game.getentitybytag("market") market.addmarketitem{price={{&quo...
by Devcod
Thu Nov 13, 2014 10:21 am
Forum: Multiplayer / Dedicated Server
Topic: Factorio Multiplayer Server List
Replies: 17
Views: 28137

Re: Factorio Multiplayer Server Finder Program

I would suggest to fix your C# Application first :) 'I bet there is a better solution to this ...but well! Yes, there is. For example: to check if string is correct IP Address you can use IPAddress.TryParse . For port number you can use regular expressions. In PHP, as I can't test any C# right now, ...
by Devcod
Tue Nov 04, 2014 8:25 am
Forum: Ideas and Requests For Mods
Topic: Skill mod
Replies: 4
Views: 3417

Re: Skill mod

It is possible to create mod like that, but not necessarily with all things you wrote about. For sure you can modify health (not sure about max health; I think I saw "game.player.character.maxhealth" somewhere), health regeneration (not directly; you can make player lose health if you want...
by Devcod
Fri Oct 24, 2014 12:51 pm
Forum: Gameplay Help
Topic: [Solved]Map editor - Research
Replies: 5
Views: 16597

Re: Map editor - Research

You can not do it in map editor (or i don't know how :) ). Yes, you can do it via script/mod Here you have working (probably) script/mod: require "defines" local techs = { "laser", "steel-processing" } for tech in techs do game.player.force.technologies[tech].researched...
by Devcod
Fri Oct 24, 2014 11:44 am
Forum: Ideas and Requests For Mods
Topic: Underground wires
Replies: 13
Views: 7698

Re: Underground wires

You can create "power pole" that will deliver power in 1x1 radius but it will block ability to build on that tile - there will be no point in it. Power pole prototype can not be non-blocking = it will always block buildings on tile it does exist, so it kills any reasonable way of creating ...
by Devcod
Fri Oct 24, 2014 7:18 am
Forum: Modding help
Topic: GUI Buttons
Replies: 5
Views: 3335

Re: GUI Buttons

You can add this little code to your if elseif statement in onguiclick event, before end: else game.player.print(event.element.name or "Element missing name!") It should print you a name of gui element clicked or "Element name missing!" in case it doesn't exists (== nil). It shou...
by Devcod
Wed Oct 22, 2014 8:54 pm
Forum: Modding help
Topic: GUI Buttons
Replies: 5
Views: 3335

Re: GUI Buttons

game.onevent(defines.events.onguiclick, function(event) if event.element.name == "your-button-name" then -- example: heal player game.player.character.health = 100 -- example: add 10 iron plate game.player.insert({name="iron-plate", count="10"}) end end) Not tested, bu...
by Devcod
Wed Sep 17, 2014 9:44 am
Forum: Ideas and Requests For Mods
Topic: MultiPlayer.......[Request]
Replies: 4
Views: 4672

Re: MultiPlayer.......[Request]

Next version (0.11) that is planned for October will have multiplayer according to roadmap.
These is no point in creating mod for it now.
by Devcod
Tue Sep 16, 2014 1:38 pm
Forum: Mods
Topic: [0.11.x] Factorio Maps
Replies: 80
Views: 77581

Re: [0.10.x] Factorio Maps

using (just a test) game.onload(function() game.daytime = 0 game.takescreenshot{} end) works like I expect, taking a screenshot in broad daylight. When I change it to game.onload(function() game.daytime = 0 game.takescreenshot{} game.daytime = .5 end) It takes a screenshot in the dark. I've seen th...
by Devcod
Tue Sep 16, 2014 10:55 am
Forum: Mods
Topic: [0.11.x] Factorio Maps
Replies: 80
Views: 77581

Re: [0.10.x] Factorio Maps

Phillip_Lynx wrote:Maybe centered on Player position at start??
Setting it to 0,0 will give more consistency in case of map update (player position may change, 0,0 should always be in same place).
by Devcod
Tue Sep 16, 2014 10:13 am
Forum: Mods
Topic: [0.11.x] Factorio Maps
Replies: 80
Views: 77581

Re: [0.10.x] Factorio Maps

I don't think you do only the max zoom level in png, and the rest in jpg, because you have to specify the format in the index.html You can use if statement in JavaScript part of index.html to load files based on zoom level. This should theoretically work, but I can't test it right now: CustomMapTyp...
by Devcod
Thu Aug 21, 2014 6:52 am
Forum: Modding help
Topic: ned help with making mod
Replies: 6
Views: 2548

Re: ned help with making mod

You are right Turtle, there is no need to use a mod, unless if he want it for every game / future mod techs, then mod would be ok. Speedy45, if you want to have all technologies researched every time with modification turned on, you should do it like this: require "defines" game.oninit(fun...
by Devcod
Wed Aug 20, 2014 8:47 pm
Forum: Modding help
Topic: ned help with making mod
Replies: 6
Views: 2548

Re: ned help with making mod

If you would share code that you are using, then someone could help you. Right now we don't know anything.
by Devcod
Tue Aug 19, 2014 11:06 am
Forum: Modding help
Topic: technology effects
Replies: 6
Views: 2905

Re: technology effects

Actually you can do regeneration bonuses with some hacking around. You can check if technology is researched, you can run function every tick, you can have some global variables. So what is a problem? Of course you don't have real values for regeneration (how much per how many ticks) but you can gue...

Go to advanced search