Page 2 of 5

Re: [0.11.x] Y.Petremann's mods (5 mods)

Posted: Tue Mar 24, 2015 2:57 pm
by Twisted
Testing Creative mod 1.4.0 with Factorio 0.11.19 Win7 x64 and it does crash if I put mouse over the lab-looking 2 things. Other items don't seem to crash.


EDIT: Seems to be Factorio issue with short number format. I guess it gets fixed soon. As a hotfix you could update your mod not to have any value over 999TJ/TW and maybe limiting the capacity well under 999TJ so people don't crash if building multiple energy-sources and exceeding the 999TJ that way.
999TW is a single item limit, having multiple such items does not crash but having a single 1000TW item does crash.
https://forums.factorio.com/forum/vie ... f=7&t=9274

Re: [0.11.x] Y.Petremann's mods (5 mods)

Posted: Tue Mar 24, 2015 11:48 pm
by y.petremann
I am actually working on some projects that could be really cool, the first one should be really interesting because it would let you planning your base with precision, without having a tons of objects in the inventory and without using gui too much ...
Creative Mode (1.5.0) :
  • Changes:
    • Potential fix for tooltip issue again

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Thu Mar 26, 2015 12:07 am
by y.petremann
I've made a new mod to make vehicles easier to use.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Fri Apr 10, 2015 7:50 am
by Choumiko
I just noticed your vehicle control doesn't check whether the vehicle is a locomotive/cargo wagon.
Looks a bit strange when your locomotive is on the start of a curved rail and slides towards horizontal/vertical :D

Replacing line 22 in control.lua with

Code: Select all

    if vehicle ~= nil and vehicle.valid and not(vehicle.type == "locomotive" or vehicle.type == "cargo-wagon") then
should fix it

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sun Apr 12, 2015 6:24 pm
by y.petremann
Choumiko wrote:I just noticed your vehicle control doesn't check whether the vehicle is a locomotive/cargo wagon.
Looks a bit strange when your locomotive is on the start of a curved rail and slides towards horizontal/vertical :D

Replacing line 22 in control.lua with

Code: Select all

    if vehicle ~= nil and vehicle.valid and not(vehicle.type == "locomotive" or vehicle.type == "cargo-wagon") then
should fix it
Thanks for the advice, I've used another method by creating a separated blacklist in case in the future more vehicles need to be blacklisted.

Better Vehicle Control (1.0.1) :
  • Fix:
    • Blacklisted locomotives and wagons
[/quote]

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Tue Apr 21, 2015 10:16 am
by matpmag
Just spent the last half hour wondering what was wrong with my game. Turns out I installed 'no hand mining' instead of 'no hand crafting'
*facepalm*

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Wed Apr 22, 2015 2:52 pm
by y.petremann
matpmag wrote:Just spent the last half hour wondering what was wrong with my game. Turns out I installed 'no hand mining' instead of 'no hand crafting'
*facepalm*
But, you know, you can combine the two mods ...

The dificulty increase of no hand mining is about less than 50% because after we reach electricity we put mining drills everywhere, it's easier ... but with no hand crafting ... you need to make production lines for everything ... it's about more than 200%

In all case, I've worked a lot on the method to autodetect recipes that need to be put under the autocraft category, basicaly I started by the idea to simulate the game, now the idea is more simple :
Everything (resources, recipes, recipes-groups, technology, entity) would be translated into a "tech" like table. and the system would try to unlock everything, if in the loop it can't unlock nothing, it would go in a mode to search the item that you could craft by hand before and that would unlock the situation. Once all things have been unlocked it would register things inside the burner-assembler.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Wed Apr 22, 2015 4:35 pm
by matpmag
y.petremann wrote:
matpmag wrote:Just spent the last half hour wondering what was wrong with my game. Turns out I installed 'no hand mining' instead of 'no hand crafting'
*facepalm*
But, you know, you can combine the two mods ...

The dificulty increase of no hand mining is about less than 50% because after we reach electricity we put mining drills everywhere, it's easier ... but with no hand crafting ... you need to make production lines for everything ... it's about more than 200%

In all case, I've worked a lot on the method to autodetect recipes that need to be put under the autocraft category, basicaly I started by the idea to simulate the game, now the idea is more simple :
Everything (resources, recipes, recipes-groups, technology, entity) would be translated into a "tech" like table. and the system would try to unlock everything, if in the loop it can't unlock nothing, it would go in a mode to search the item that you could craft by hand before and that would unlock the situation. Once all things have been unlocked it would register things inside the burner-assembler.
Cool, I wasnt aware of that, ill check it out :)

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Thu Apr 23, 2015 1:13 am
by y.petremann
matpmag wrote:
y.petremann wrote:
matpmag wrote:Just spent the last half hour wondering what was wrong with my game. Turns out I installed 'no hand mining' instead of 'no hand crafting'
*facepalm*
But, you know, you can combine the two mods ...

The dificulty increase of no hand mining is about less than 50% because after we reach electricity we put mining drills everywhere, it's easier ... but with no hand crafting ... you need to make production lines for everything ... it's about more than 200%

In all case, I've worked a lot on the method to autodetect recipes that need to be put under the autocraft category, basicaly I started by the idea to simulate the game, now the idea is more simple :
Everything (resources, recipes, recipes-groups, technology, entity) would be translated into a "tech" like table. and the system would try to unlock everything, if in the loop it can't unlock nothing, it would go in a mode to search the item that you could craft by hand before and that would unlock the situation. Once all things have been unlocked it would register things inside the burner-assembler.
Cool, I wasnt aware of that, ill check it out :)
Oh, for now this is not integrated in the mod ... I'm still working on it ...

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Thu Apr 23, 2015 1:23 am
by matpmag
y.petremann wrote:
matpmag wrote:
y.petremann wrote:
matpmag wrote:Just spent the last half hour wondering what was wrong with my game. Turns out I installed 'no hand mining' instead of 'no hand crafting'
*facepalm*
But, you know, you can combine the two mods ...

The dificulty increase of no hand mining is about less than 50% because after we reach electricity we put mining drills everywhere, it's easier ... but with no hand crafting ... you need to make production lines for everything ... it's about more than 200%

In all case, I've worked a lot on the method to autodetect recipes that need to be put under the autocraft category, basicaly I started by the idea to simulate the game, now the idea is more simple :
Everything (resources, recipes, recipes-groups, technology, entity) would be translated into a "tech" like table. and the system would try to unlock everything, if in the loop it can't unlock nothing, it would go in a mode to search the item that you could craft by hand before and that would unlock the situation. Once all things have been unlocked it would register things inside the burner-assembler.
Cool, I wasnt aware of that, ill check it out :)
Oh, for now this is not integrated in the mod ... I'm still working on it ...
I meant the combo of both mods ;)

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Mon May 25, 2015 12:02 pm
by y.petremann
I know it"s been some times I've not posted anything about updates ... I'm hardly working on no-hand-crafting to be totally automatic and as I have mentioned, I need my mod to simulate a simplified version of the game to add dynamically recipes to the burner-assembler.

For making that I have opted for the idea that all things are represented the same way and rely. on some simple things :
  • type : like in prototype, to re-inject data correctly if needed
  • name : like in prototype, to re-inject data correctly if needed
  • state : state of the element, locked or unlocked
  • conditions : for unlocking elements, I used something to make logic operations simple since sometimes we need all element to be unlocked (like in recipes, technologies ...) and other times we need at least one element to be unlocked (like with fuel, mining drill, furnace, assemblers ...)
    Logic equations are generated based on reading data files, so crafting based on script would not work for example.
  • check : this would be a equal opposite of conditions, it will permit to gain performance when running the simulation by limiting the element to check
Here is a graph I've used to design the simulation that explain the process of unlocking things:
View the document on Google Drive (Draw.io is needed)
Image

As you can see there is two category that don't exist in factorio but that have been added in the graph :
  • energy-category : this category is here to have the possibility to check if one type of energy is now possible, in fact you can place a lab at the moment you get the resources you need, but if you don't have electricity, you can't start making researchs, unless a mod add a lab that work on fuel ...
  • technology-category : this category is completely abstract since it is done by combining researchs needs and labs capabilitys ... Why, because I think that mods can use something else than science-packs for their researchs.
I will report some other news later ...

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sun May 31, 2015 2:34 pm
by y.petremann
No Hand Mining (2.0.0) :
  • Changes:
    • No longer modify resources, modify player instead
No Hand Crafting (2.0.0) :
  • Changes:
    • Burner assembler can craft all recipe the player could craft by hand
    • Burner assembler scale by itself
    • No longer use whitelist/blacklist system
While making this version, I made a auto-discovery system to analyse the game and I came in conclusion that it would be a bit dificult to create a generic system to select recipes that block the game progression, the system could still be used to analyse the game to show what can or can't be made in a complete playthrough, so I decided to make it to do so.

Also the main reason I made this mod is not to create no crafting challenge 2.0 but to consider the fact we are playing not as a craftsman but as an industrial engineer. One thing it permit is to force us to completely design factories for such type of items instead of crafting them by hand. So I take the decision that the burner assembler would have the possibility to craft everything the player could craft before.

This version would also change something really important ... Compatibility. This mainly because now the system can craft all item the player could craft by hand without the mod.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Wed Jun 10, 2015 3:11 pm
by Takezu
Is there some way to drop the railgridalingment out of your better vehicle control mod?

Stoped counting the times where it's draged me in a tree stone Gateedge ect.
In theroy its a nice idea in praxis its a nuisance.
Also it looks pretty weired when the car slides left/right for the alingment.

The part to get it on a straight line North/south or east/west is pretty good and imho sufficent.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Wed Jun 10, 2015 5:23 pm
by y.petremann
Takezu wrote:Is there some way to drop the railgridalingment out of your better vehicle control mod?

Stoped counting the times where it's draged me in a tree stone Gateedge ect.
In theroy its a nice idea in praxis its a nuisance.
Also it looks pretty weired when the car slides left/right for the alingment.

The part to get it on a straight line North/south or east/west is pretty good and imho sufficent.
I think I would not drop it but add a way to configure it through commands.

For now you can edit the code to change this :

Code: Select all

function ontick(event)
  for k,v in pairs(game.players) do
    local vehicle = v.vehicle
    if vehicle ~= nil and vehicle.valid and not vehicle_blacklist[vehicle.type] then
      local orientation = vehicle.orientation
      for angle,linear in pairs(angles) do
        if orientation > angle - angle_delta and orientation < angle then
          v.vehicle.orientation = math.min(angle, orientation + angle_step)
        elseif orientation > angle and orientation < angle + angle_delta then
          v.vehicle.orientation = math.max(angle, orientation - angle_step)
        elseif orientation == angle then
          if linear.x ~= 0 then
            local xv = (vehicle.position.x + linear_offset) % linear.x
            if xv > 0 and xv < linear_delta then
              vehicle.teleport{x = vehicle.position.x - math.min(xv, linear_step), y = vehicle.position.y}
            elseif xv < linear.x and xv > linear.x - linear_delta then
              vehicle.teleport{x = vehicle.position.x + math.min(linear.x - xv, linear_step), y = vehicle.position.y}
            end
          end
          if linear.y ~= 0 then
            local yv = (vehicle.position.y + linear_offset) % linear.y
            if yv > 0 and yv < linear_delta then
              vehicle.teleport{x = vehicle.position.x, y = vehicle.position.y - math.min(yv, linear_step)}
            elseif yv < linear.y and yv > linear.y - linear_delta then
              vehicle.teleport{x = vehicle.position.x, y = vehicle.position.y + math.min(linear.y - yv, linear_step)}
            end
          end
        end
      end
    end
  end
end
Into this :

Code: Select all

function ontick(event)
  for k,v in pairs(game.players) do
    local vehicle = v.vehicle
    if vehicle ~= nil and vehicle.valid and not vehicle_blacklist[vehicle.type] then
      local orientation = vehicle.orientation
      for angle,linear in pairs(angles) do
        if orientation > angle - angle_delta and orientation < angle then
          v.vehicle.orientation = math.min(angle, orientation + angle_step)
        elseif orientation > angle and orientation < angle + angle_delta then
          v.vehicle.orientation = math.max(angle, orientation - angle_step)
        end
      end
    end
  end
end

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Wed Jun 10, 2015 5:36 pm
by Takezu
Well i'll try that.

I'd say drop because i really see no benefit from it. If i want to lay a rails its really no matter where the car is relativ to the to build track,
as long as it goes straight and you're in reach of the placing restrictments. Same for other things that you want to build in a straight line.
Well in short, i don't see why it would be important to ever orientate a car automaticly at the railgrid. It's really counterproductiv to do so,
because it makes driving in narrow passages through forestst or Gates really harder then it has to be. It counteracts almost the benefits of having your car
go in a straight line if somthing in your way dosen't matchs the grid and hell there are a lot of things that aren't.

But thats after all only my thoughts about that.
Maybe a good solution would be to add a config option to turn it of? If it's possible of course.

Edit: Thanks for the code change, was able to implement it. It works brilliant, keeps me on the straight lane i choose.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Fri Jun 26, 2015 9:24 pm
by y.petremann
Fun fact : since the last update of no-hand-crafting (when I've modified the way the mod works) you can craft what you want from the inventory in sandbox (god/ghost mode).

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sat Jun 27, 2015 4:26 am
by Nafen
I wonder with the no hand-mining, could you tie that to a research?
Hand-mining at the start of a game is useful to get things up and running faster, mining a few Stone to make more Drills and Furnaces, mining the first Coal to put into your Coal drill, etc.
But after you get things automated, hand-mining can just be a real pain. For example if you are removing buildings, belts or chopping down trees etc. over a resource deposit, it will get stuck trying to mine the resource tile below the thing you just removed, but if there was a research that disabled hand mining you wouldn't have the problem anymore.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sat Jun 27, 2015 6:51 am
by Koub
Nafen wrote:For example if you are removing buildings, belts or chopping down trees etc. over a resource deposit, it will get stuck trying to mine the resource tile below the thing you just removed
Not OCD enough my friend :mrgreen: I obey the command "Thou shall not build on a ressource field". Btw, I have notices mining radius is smaller than deconstruct radius. That's how I mass deconstruct over ressources.

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sat Jun 27, 2015 9:29 pm
by Nafen
Koub wrote:
Nafen wrote:For example if you are removing buildings, belts or chopping down trees etc. over a resource deposit, it will get stuck trying to mine the resource tile below the thing you just removed
Not OCD enough my friend :mrgreen: I obey the command "Thou shall not build on a ressource field". Btw, I have notices mining radius is smaller than deconstruct radius. That's how I mass deconstruct over ressources.[/quote

Really? You somehow avoid putting belts, electric poles, etc. next to your miners? Also, can't really avoid the placement of trees over resources :P

Re: [0.11.x] Y.Petremann's mods (6 mods)

Posted: Sun Jun 28, 2015 12:05 am
by y.petremann
Nafen wrote:I wonder with the no hand-mining, could you tie that to a research?
Hand-mining at the start of a game is useful to get things up and running faster, mining a few Stone to make more Drills and Furnaces, mining the first Coal to put into your Coal drill, etc.
But after you get things automated, hand-mining can just be a real pain. For example if you are removing buildings, belts or chopping down trees etc. over a resource deposit, it will get stuck trying to mine the resource tile below the thing you just removed, but if there was a research that disabled hand mining you wouldn't have the problem anymore.
I can tie it to a research but I made it to limit player actions so the player design factories that do stuff and not the player doing them, for this is a engineer, not a miner or a craftsman.