Search found 1266 matches

by FreeER
Sun Feb 01, 2015 8:38 am
Forum: Mods
Topic: [MOD 0.10.x] Time Display - v1.0.0
Replies: 36
Views: 23666

Re: [MOD 0.10.x] Time Display - v1.0.0

Here's my updated version for 11.x MP, note I haven't tested this in MP or with prior saves so... if something happens let me know (with the error message) :) script commands updated to take the nickname (in "quotes") as the last parameter so that settings can be separate for each player. ...
by FreeER
Sun Feb 01, 2015 7:11 am
Forum: Modding help
Topic: Wiki tutorial by FreeER
Replies: 32
Views: 21180

Re: Wiki tutorial by FreeER

This guide is for version 0.10.3, can edit car entity with base-game car :) An updated version of this tutorial would be very much appreciated, then. That, or an explanation of what you mean with this? An updated version is on the way, I just haven't managed to take the time to rework the graphics ...
by FreeER
Sun Feb 01, 2015 5:30 am
Forum: Modding help
Topic: Loaders and custom entity types
Replies: 2
Views: 1280

Re: Loaders and custom entity types

I wonder if there's any way to add your own entity types to the loaders, or somehow override the loaders? Not currently, all entity types are coded in C++. The devs eventually intend to add a custom Lua entity but that probably won't be added until close to the official 1.0 release, so until then w...
by FreeER
Sun Feb 01, 2015 3:57 am
Forum: Mods
Topic: [MOD 0.10.x] Time Display - v1.0.0
Replies: 36
Views: 23666

Re: [MOD 0.10.x] Time Display - v1.0.0

Ack, I don't have a second system to test multiplayer functionality. Can you post the error? Might be able to dig out something that works. well the obvious issue is that game.player can not be used in MP with more than 1 player, you have to use the game.players table (and either a loop or a player...
by FreeER
Sun Feb 01, 2015 1:54 am
Forum: Mods
Topic: [0.11.x] Factorio Maps
Replies: 80
Views: 58097

Re: [0.11.x] Factorio Maps

Frostea wrote:I'm no LUA programmer, but I don't think that is even possible under the current LUA scripting interface for Factorio
Not true async but Lua does have co-routines that can simulate it, as far as I'm aware those would work within Factorio as well.
by FreeER
Sat Jan 31, 2015 4:16 am
Forum: Modding discussion
Topic: Confused about mods.
Replies: 3
Views: 4779

Re: Confused about mods.

*moved to modding discussion since modding help is for help making your own mod, whereas modding discussion is just related to mods in general I reckon that the Dytech and F-Mod are two different things, right? Definitely I remember watching youtube videos that even had an wooden axe, but on the las...
by FreeER
Fri Jan 30, 2015 6:00 am
Forum: Mods
Topic: [MOD 0.11.x] PvP with craftable Biters
Replies: 14
Views: 46647

Re: [MOD 0.11.13] PvP with craftable Biters

To FreeER for making(and remaking many times) the code for putting players on separate teams. :) You know, after seeing this released I decided to see what I could do to make it a bit more useful post 0.12... I haven't been able to actually test this in MP myself but I did test it locally (just me)...
by FreeER
Thu Jan 29, 2015 10:07 pm
Forum: Ideas and Requests For Mods
Topic: Help PVP in need
Replies: 5
Views: 2260

Re: Help PVP in need

all you need for such mod is Close :) There is also, currently, an issue of when players respawn their character is returned with the game.forces.player force, so a little bit of work also needs to be done in onentitydied to detect that and then fix it in ontick (player doesn't have a new character...
by FreeER
Thu Jan 29, 2015 9:11 pm
Forum: Modding help
Topic: Making a Watermill?
Replies: 2
Views: 850

Re: Making a Watermill?

Well the offshore pump is hard coded to only be placeable on a water tile, so unless you want to manually check the tile after it's been built (game.gettile(x, y).name:match("water"), or something similar) you'd need to use that as your entity type, which of course means that you'd have to...
by FreeER
Wed Jan 28, 2015 9:46 pm
Forum: Modding help
Topic: Making trees that heal
Replies: 7
Views: 1721

Re: Making trees that heal

I wonder Hm, I'm honestly not certain since all of my Lua experience has been with Factorio and I've never really worried about optimization much, but my, um, logical hypothesis, is that the for loop would be a bit faster since it removes the need for a method/function call. Of course with that rea...
by FreeER
Wed Jan 28, 2015 6:18 pm
Forum: Modding help
Topic: Creating a Building That Requires No Power?
Replies: 5
Views: 1509

Re: Creating a Building That Requires No Power?

So how would I change the code so that instead of giving energy it inserts 1 supercoal when built? instead of "event.createdentity.energy = 1" you'd use "event.createdentity.insert{name='super-coal', count=1}", if that didn't automatically go into the fuel slot (usually does, bu...
by FreeER
Wed Jan 28, 2015 5:54 am
Forum: Modding help
Topic: Making trees that heal
Replies: 7
Views: 1721

Re: Making trees that heal

Maybe they should implement LuaJIT, so mods won't be that slow. So far it hasn't actually been needed when a modicum of thought is put into the scripts (in this case, trying to loop over every tree in a new world drops UPS to 1/2, vs a very slight optimization with practically no thought put into i...
by FreeER
Wed Jan 28, 2015 2:51 am
Forum: Modding help
Topic: How to add entries to existing prototype?
Replies: 7
Views: 2783

Re: How to add entries to existing prototype?

You use the table.insert function which takes the table to insert into and the table that is to be inserted and you access the prototype using data.raw [wiki] (sounds like you know how but I like to repeat for when people come across this later, like when they use the search feature), with the forma...
by FreeER
Tue Jan 27, 2015 10:17 pm
Forum: Modding help
Topic: Making trees that heal
Replies: 7
Views: 1721

Re: Making trees that heal

call a function which gets a list of all trees in the map There is not, to my knowledge, any provided function that can do that. That is essentially what the onchunkgenerated event function is doing for us, adding trees in new chunks (base trees don't reproduce so no need to recheck them) to our ow...
by FreeER
Mon Jan 26, 2015 8:46 pm
Forum: Modding help
Topic: Can I Avoid Referencing an Animation in an Entity?
Replies: 1
Views: 533

Re: Can I Avoid Referencing an Animation in an Entity?

Since Factorio requires the animation property/node you have to give it something, if it won't accept an empty one (just animations = {}), which it probably won't, then give it a transparent 'animation' with a single frame. Factorio gets to treat it as an animation, so it's happy, but since it doesn...
by FreeER
Mon Jan 26, 2015 6:56 pm
Forum: Modding help
Topic: How Do I Delete a Recipe or Item From Vanilla?
Replies: 11
Views: 6264

Re: How Do I Delete a Recipe or Item From Vanilla?

i simply read over it as i am using a small phone to catch up on some topics here. As i didn't see that particular bit of information i thought it worth mentioning. Understandable, though I personally would have waited until I could give a more detailed response about how to accomplish the goal rat...
by FreeER
Mon Jan 26, 2015 3:50 am
Forum: Modding help
Topic: Making trees that heal
Replies: 7
Views: 1721

Re: Making trees that heal

an excellent, simple idea for a mod Not so simple it turns out :lol: in game you can set entity.active = false or entity.active = true (default for most), assuming entity is a valid reference gained through onbuiltentity, findentities, etc. From my understanding some entities can't be active... but...
by FreeER
Mon Jan 26, 2015 12:14 am
Forum: Modding help
Topic: Is It Possible to Change the Player Starting Equipment?
Replies: 9
Views: 4520

Re: Is It Possible to Change the Player Starting Equipment?

... Here's a list of events with playerindex (as of 11.11) with event.playerindex onplayercrafteditem onpreplayermineditem onplayermineditem onplayercreated onbuiltentity onpickedupitem onguiclick onplayerrotatedentity onshiplandingstart no event.playerindex *onputitem (not sure why this doesn't ha...
by FreeER
Sun Jan 25, 2015 11:26 pm
Forum: Modding help
Topic: How Do I Delete a Recipe or Item From Vanilla?
Replies: 11
Views: 6264

Re: How Do I Delete a Recipe or Item From Vanilla?

completely removing the stone furnace has some complications though, the burner miner requires it so that will throw an error. um, cartmen180 did you read my reply? I mean it is the first reply so it isn't like it was hard to see, but it certainly seems like you didn't because ...of course you'd ne...
by FreeER
Sun Jan 25, 2015 11:10 pm
Forum: Modding help
Topic: Is It Possible to Change the Player Starting Equipment?
Replies: 9
Views: 4520

Re: Is It Possible to Change the Player Starting Equipment?

game.player.character Slight issue here, it will only work in single player. MP would need to use game.player[event.playerindex] instead (btw, I'd forgotten about the clearitemsinside method, and the wiki shows it on the player but testing shows it works on the character too, hm wiki version histor...

Go to advanced search