Page 1 of 2

[MOD 0.17.x] AyrAs BasicKit

Posted: Tue Nov 03, 2015 9:07 pm
by AyrA
Type: Mod
Name: AyrAs BasicKit
Description: No-Crafting challenge as simple as possible
License: WTFPL
Version: 2.1.1
Release: 2019-05-26
Tested-With-Factorio-Version: 0.17.43
Category: Gameplay
Tags: Free, No crafting, no additional items
Download-Url: GitHub Release 2.1.1
Website: GitHub project

This is my first mod. It's simple and small. And it does exactly that I needed from it.
I have not looked into many other 'no crafting' Mods. But most of them seem to create their own items, which I thought was not needed.
License
Liability
Long description
Pictures
Version history
Type 3 assembler
Development

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Fri Nov 06, 2015 1:53 pm
by Dark-Water
Hello,

I think i have found a bug in your :(

Wenn i use this mod in combination with the actual version of bob's mods

1. I can craft bobs mods only items in my hands (changed vanilla items are still not cratfable)

2. In the (changed) assembly machine 1 , i can choose only bob mods items, no vanilla items.

Actual i must deactivate your mod to play with bobs mods, the it is impossible to get a assembly machine 2 or higher

I hope you can found the bug :)

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Fri Nov 06, 2015 4:55 pm
by AyrA
Dark-Water wrote:1. I can craft bobs mods only items in my hands (changed vanilla items are still not cratfable)

2. In the (changed) assembly machine 1 , i can choose only bob mods items, no vanilla items.
Thanks for your report. My mod changes the items to "machine craftable only" when the mod is initialized by factorio. If a mod is loaded after mine, I have no control over its items.

Since "Bob" comes after "Basic" in the alphabet, it is likely, that my mod is loaded before bob's mods. I do the item changes in the last possible moment, but if bob's mods does that as well, I can't do anything against that.

I don't know if it works, but you can try to move around my mod entry in the "mod-list.json" file in your mods directory. Also you can try to do this:

1. Extract my mod into the mods directory. Rename "BasicKit_0.0.1" to "ZZZBasicKit_0.0.1"
2. Inside the ZZZBasicKit_0.0.1 folder, there is a info.jsom. Open it and change the name entry to "ZZZBasicKit"

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Tue Nov 10, 2015 9:04 am
by hoho
You can also use the data-final-fixes.lua/data-updates.lua files. I think at least one of those is ran after all mods have added all their items to the game.

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Tue Nov 10, 2015 9:27 am
by AyrA
hoho wrote:You can also use the data-final-fixes.lua/data-updates.lua files
I am already doing that. I have not decompiled bobs mods, but I assume, that his mods use that file as well. Factorio just needs "up" and "down" arrows in the mod manager, so we can define an order, or an event, that is triggered when an item is added. This way I could dynamically change items as needed, if they are added after my mod has loaded. After all, this game is still in alpha. Plans for 0.13 seem to include a basic mod managing and downloading system. This is probably fixed then.

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Wed Nov 11, 2015 9:09 am
by hoho
AyrA wrote:
hoho wrote:You can also use the data-final-fixes.lua/data-updates.lua files
I am already doing that.
And it still doesn't work? Weird, I would have expected that change to be enough.

Well, if everything else fails you can just add soft dependencies to info.json for the often used mods in style "? bobplates >= 0.12" or something. Sort of ugly but should make it work at least.

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Wed Nov 11, 2015 12:01 pm
by AyrA
hoho wrote:And it still doesn't work? Weird, I would have expected that change to be enough.
If two mods use the data-final-fixes.lua, one is going to go first and the other second. I assume my mod goes first, probably because of alphabet, as "AyrA" and "BasicKit" come before "Bob's".
hoho wrote:Well, if everything else fails you can just add soft dependencies to info.json for the often used mods in style "? bobplates >= 0.12" or something. Sort of ugly but should make it work at least.
I give that a go. I probably also rename the mod to something that is most likely always coming last in the list.

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Mon Dec 07, 2015 12:23 am
by GrimerX
I had a similar problem with bob's mods. Few things I noticed:

1) Renaming to zzz is not sufficient - you need to add a dependency in info.json to ensure processing order.

2) Most items couldn't be crafted in a Type 1 assembly machine. Changing the category to 'crafting-machine' fixed that.\

3) Bob's mods has his own categories. This is why electronics boards still show up as hand-craftable. To work around this I just added v.category=="electronics" to the list. This is a bit hacky for a real solution but is quick. I'll fix up others as I go.

Cheers,

Ian

Re: [MOD 0.12.x] AyrAs BasicKit

Posted: Mon Dec 07, 2015 11:22 pm
by AyrA
GrimerX wrote:1) Renaming to zzz is not sufficient - you need to add a dependency in info.json to ensure processing order.
I figured that out as well. It seems the code is loaded in the order it is specified in your mod-list.json file.
Until we can easily define, where to insert a mod, users have to manually move it to the end. I have added bobs mods as optional dependencies in the hope it will resolve some issues.
GrimerX wrote:2) Most items couldn't be crafted in a Type 1 assembly machine. Changing the category to 'crafting-machine' fixed that.\
This type is not available in the main game. In an unmodded game, the type 1 assembly machine is technically not different from hand crafting.
GrimerX wrote: Bob's mods has his own categories. This is why electronics boards still show up as hand-craftable. To work around this I just added v.category=="electronics" to the list. This is a bit hacky for a real solution but is quick. I'll fix up others as I go.
I just published a new release, that should address some issues:

1. I added soft dependencies for Bob's mods. This should ensure, that our mod runs last.
2. I added a category filter in data-final-fixes.lua. This causes the mod to also scan custom categories.
3. I added an exclusion filter for categories, so certain groups (for example oil-processing) can be excluded.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Tue Jun 28, 2016 11:50 am
by AyrA
The mod has been updated for Factorio 0.13: https://github.com/AyrA/BasicKit/releases

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jun 29, 2016 7:26 pm
by DarkSlayerEX
I'd been running into issues with this mod deleting recipes from modded assemblers (bob's greenhouse, chemical furnace) and even the Tier 1 Assembling machine.

I found that commenting out:

Code: Select all

for i,v in pairs(data.raw["recipe-category"]) do
	local add=true
	for j,w in pairs(exceptions) do
		if string.find(i,w) then add=false end
	end
	categories[i]=add
end

for i,v in pairs(data.raw.recipe) do
	-- Enable all items for debugging purposes
	if DEBUG then
		v.enabled=true
	end
	-- check if hand-craftable, and if so, make it machine only
	if v.category==nil or categories[v.category] then
	--if v.category=="crafting" or v.category==nil then
		v.category="advanced-crafting"
	end
end

and simply using:

Code: Select all

data.raw.player.player.crafting_categories = {nil}
or if they only want certain categories enabled: (Example)

Code: Select all

data.raw.player.player.crafting_categories = {"side-inserters"}
does the same thing, while only affecting the player's crafting capabilities, and leaving everything else unaffected. It works for me just fine this way. However, I haven't confirmed if this method works for multiplayer.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jun 29, 2016 9:24 pm
by AyrA
I have updated the mod and will publish the changes to the repository ASAP. Until then, you can get it here: https://github.com/AyrA/BasicKit/releases/tag/v0.0.4

As an additional change you now get a pickaxe when starting a new game.

Since the mod does not causes any changes that would be reflected in the world file, you can just update it and it should work as intended.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jun 29, 2016 9:39 pm
by DarkSlayerEX
Thanks for the update. Hopefully my fix won't cause any unforseen issues.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Thu Jun 30, 2016 5:44 am
by AyrA
DarkSlayerEX wrote:Thanks for the update. Hopefully my fix won't cause any unforseen issues.
It shouldn't. What can happen is that a mod, which is loaded after mine adds a recipe to the player crafting list again.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Tue Jul 05, 2016 9:54 pm
by DarkSlayerEX
I just noticed that this mod only gives items to the host player. Any joining players seem to spawn with nothing. Is this intended?

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jul 06, 2016 11:26 am
by AyrA
I use a factorio event to assign the inventory: https://github.com/AyrA/BasicKit/blob/m ... ol.lua#L78

Code: Select all

script.on_event(defines.events.on_player_created,function(param)
This event is fired only once per player. If a player joins a map of yours, where he was once he will not get the item again, even if you update the server or copy the map onto another installation. If you want to get the item each time, change the event on Line 78 in control.lua from on_player_created to on_player_joined_game. But then he will get it each time he joins and this would allow him to "stack up" the items with repeated joins.

The on_player_created event is supposed to fire for each player if he has never joined that map before. At least that is what it did for factorio 0.12.0. Please test this on a new map. If the event is not called for each new player once, then I assume this is a 0.13 bug and we should report it.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jul 06, 2016 3:01 pm
by DarkSlayerEX
Yes that is the issue. Even after starting a completely new world, and then having others join, half of the players do not get the items. Something definately seems wrong.

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Wed Jul 06, 2016 6:19 pm
by AyrA
DarkSlayerEX wrote:...half of the players do not get the items
So some players are getting the items?

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Fri Jul 08, 2016 6:47 am
by DarkSlayerEX
It's odd really...

Pretty much almost every time, no one gets any items aside from the host after starting a new world.
Extremely rarely for us(Discovered after lots of testing, and after having initially posted about this issue), 1 other person gets the items alongside the host, but no one else gets anything.

The issue happens regardless of who hosts as well..

I'm wondering if this issue could also be more prevalent when a world is generated in SP first, and then loaded through MP afterwards...

Re: [MOD 0.13.x] AyrAs BasicKit

Posted: Fri Jul 08, 2016 7:15 am
by AyrA
I have opened a bug report (viewtopic.php?f=7&t=28540&p=180884#p180884). Let's see how it turns out, because in 0.12 it was working fine and I have not changed the event handler since the update.