factoriolib / flib

A set of high-quality, commonly-used utilities for creating Factorio mods.
https://mods.factorio.com/mod/flib
MIT License
61 stars 15 forks source link

Is it possible use flib in scenario with minimal changes? #42

Closed kevinmama closed 2 years ago

kevinmama commented 2 years ago

I try to copy the whole project into my scenario. When starting scenario, there's a error in require function. I'd like to run scenario without mod that more players like to join. So is there a way integrate flib into a scenario.

raiguard commented 2 years ago

Could you post the error? All requires in flib should be absolute, which should avoid this problem.

kevinmama commented 2 years ago

I figure it out. create a flib subdirectory, copy files, and replace all path that prefixed '__filb__/' with 'flib/'

factorio assume path prefixed with '__fib__' is a mod path. It can't be used in scenario.

raiguard commented 2 years ago

Ah, I see. I didn't think about that. Glad you figured it out!