[0.12.0] Bulldozer

Topics and discussion about specific mods
Post Reply
hassad
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Mar 05, 2015 6:23 pm
Contact:

[0.12.0] Bulldozer

Post by hassad »

I updated the bulldozer mod by Cheata. Along with the changes brought on by the Great Renaming of 2015, I've also tweaked a number of balance issues I had with the original mod:
  • Lowered vehicle health from 2500 to 1500.
    Lowered the weight from 20000 to 5000.
    Changed the tech requirements from Tanks to Automobilism.
    Lowered the research requirements from 1R 1G 1B x450 to 2R 1G x150.
    Changed the crafting recipe from 1 tank, 2 processing units, and 50 steel plates to 1 car, 10 electronic circuits, 20 iron gear wheels, and 50 steel plates.
I made these changes because I used the bulldozer for scouting in RSO maps, and the tank is too slow and arrives on the scene way too late to accomplish that. The bulldozer still pops biter bases, but you get slowed down quite a bit and could easily get murdered by violently evicted biters.

You can download the updated mod here.

If you have any bugs to reports, send them here or on the reddit post. I'll keep an eye on things.

slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: [0.12.0] Bulldozer

Post by slindenau »

In case people still want to try this mod, the game event register calls have to be updated to script.
So in control.lua: replace "game.on_" with "script.on_".
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545

ckhawks
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jun 27, 2016 8:44 pm
Contact:

Re: [0.12.0] Bulldozer

Post by ckhawks »


devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [0.12.0] Bulldozer

Post by devilwarriors »

ckhawks wrote:I've updated this to .13. https://mods.factorio.com/mods/ckhawks/bulldozer
It's not working, the GUI won't show up, did you test it??

edit: oh yeah I started working on fixing it and you obviously just updated the info.json and called it a day without testing anything just so you can post a mod on the mod portal..... :roll:

it's full of bug.

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [0.12.0] Bulldozer

Post by devilwarriors »

Here an actual 0.13 update..

change:
- changed those get_surface to surfaces['nauvis']
- removed a pcall around get_inventory since the game no longer crash but give a nil value when the entity doesn't have an inventory
- added "fire" and "stream" (stream of fire from the fire thrower turret) to the types blacklist.
- stone-rock now give 13 stone directly instead of 5. Since 7 stone are dropped on the ground when the stone-rock is destructed and immediately picked up by the bulldozer it now give you a total of 20 stone. Same as mining it by hand.
- "straight-rail" and "curved-rail" give "rail" instead of themselves. Since inserting "straight-rail" and "curved-rail" into the inventory crash the game.
- changed ipairs to pairs when looping on game.players so the GUI will show up (still not sure why this is needed or what the difference between the two)

I haven't tested all new stuff in 0.13 yet.. so it might not be perfect.
Attachments
bulldozer_1.2.2.zip
I accidentally pasted some crap in one of the file just before zipping it.. if you get a error on line 149 just download this again!
(2.55 MiB) Downloaded 163 times

Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: [0.12.0] Bulldozer

Post by Jupiter »

The mod crashes when trying to bulldozer curved rail. It says:
Error while running the event handler:
bulldozer.lua:243: Unknown item name:curved-rail

Also posted this on the mod portal site at mods.factorio.com

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [0.12.0] Bulldozer

Post by devilwarriors »

Downloads my version, I'm almost certain I fixed that.

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [0.12.0] Bulldozer

Post by devilwarriors »

welp I updated other mod and is bugged version overwrited mine even tho it was installed manually.. -_-

ckhawks, to fix that bug add this line on line 64 of bulldozer.lua

Code: Select all

local placedrailname = { "straight-rail", "curved-rail" }
and then in the same file between line 242 and 243 add the following code

Code: Select all

    for _, t in pairs(placedrailname) do
      if item == t then
        item = 'rail'
      end
    end
thx...

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [0.12.0] Bulldozer

Post by devilwarriors »

There also another bug in your version that I fixed in mine.. if you attempt to go through fire or a flamethrower stream of fire with the bulldozer it will crash because it can't insert an item of type fire in the player inventory..

to fix that one, replace line 59 with this.

Code: Select all

["entity-ghost"]=true, ["leaf-particle"]=true, ["fire"]=true, ["stream"]=true
or you know add this to that array of blacklisted item..

Code: Select all

, ["fire"]=true, ["stream"]=true

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.12.0] Bulldozer

Post by steinio »

How about an update to 0.14 please?
Image

Transport Belt Repair Man

View unread Posts

Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: [0.12.0] Bulldozer

Post by Jupiter »

steinio wrote:How about an update to 0.14 please?
I second it.

As a work around, manually changing the version number in the info.json file works.

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

Re: [0.12.0] Bulldozer

Post by shanemadden »

Update for 0.16:

Code: Select all

--- bulldozer_1.3.4/bulldozer.lua
+++ bulldozer_1.3.5/bulldozer.lua
@@ -56,7 +56,7 @@
     ["unit-spawner"]=true, player=true, decorative=true, resource=true, smoke=true, explosion=true,
     corpse=true, particle=true, ["flying-text"]=true, projectile=true, ["particle-source"]=true, turret=true,
     sticker=true, ["logistic-robot"] = true, ["combat-robot"]=true, ["construction-robot"]=true, projectile=true, ["ghost"]=true,
-    ["entity-ghost"]=true, ["leaf-particle"]=true, ["death-chest"]=true
+    ["entity-ghost"]=true, ["leaf-particle"]=true, ["death-chest"]=true, ["cliff"]=true
   }

   local blacklistname = {
@@ -135,9 +135,6 @@
         entity.die()
       end
     end
-    if self.settings.collect then
-      self:pickupItems(pos, area)
-    end
     self:blockprojectiles(pos,area)
     for _, entity in ipairs(game.surfaces[1].find_entities{{area[1][1], area[1][2]}, {area[2][1], area[2][2]}}) do
       if not blacklisttype[entity.type] and not blacklistname[entity.name] then
@@ -171,30 +168,23 @@
             end
           end

-          if self:addItemToCargo(entity.name, 1) then
-            entity.destroy()
-          else
-            self:deactivate("Error (Storage Full)",true)
-          end
-        else
-          entity.die()
-        end
-      end
-    end
-
-    if removeStone then
-      for _, entity in ipairs(game.surfaces[1].find_entities_filtered{area = area, name = "stone-rock"}) do
-        if self.settings.collect then
-          if self:addItemToCargo("stone", 5) then
+          if entity.prototype.count_as_rock_for_filtered_deconstruction then
             entity.die()
           else
-            self:deactivate("Error (Storage Full)",true)
+            if self:addItemToCargo(entity.name, 1) then
+              entity.destroy()
+            else
+              self:deactivate("Error (Storage Full)",true)
+            end
           end
         else
           entity.die()
         end
       end
     end
+    if self.settings.collect then
+      self:pickupItems(pos, area)
+    end
   end,


--- bulldozer_1.3.4/control.lua
+++ bulldozer_1.3.5/control.lua
@@ -147,6 +147,6 @@
   script.on_event(defines.events.on_tick, onTick)
   script.on_event(defines.events.on_gui_click, onGuiClick)
   script.on_event(defines.events.on_player_mined_item, on_player_mined_item)
-  script.on_event(defines.events.on_preplayer_mined_item, on_preplayer_mined_item)
+  script.on_event(defines.events.on_pre_player_mined_item, on_preplayer_mined_item)
   script.on_event(defines.events.on_built_entity, on_built_entity)
   script.on_event(defines.events.on_entity_died, on_entity_died)
--- bulldozer_1.3.4/GUI.lua
+++ bulldozer_1.3.5/GUI.lua
@@ -56,8 +56,8 @@
     createGui = function(player)
       if player.gui.left.bull ~= nil then return end
       local bull = GUI.add(player.gui.left, {type="frame", direction="vertical", name="bull"})
-      local rows = GUI.add(bull, {type="table", name="rows", colspan=1})
-      local buttons = GUI.add(rows, {type="table", name="buttons", colspan=3})
+      local rows = GUI.add(bull, {type="table", name="rows", column_count=1})
+      local buttons = GUI.add(rows, {type="table", name="buttons", column_count=3})
       GUI.addButton(buttons, {name="start"}, GUI.toggleStart)

       GUI.add(rows,{type="checkbox", name="collect",caption={"stg-collect"}},"collect")
--- bulldozer_1.3.4/info.json
+++ bulldozer_1.3.5/info.json
@@ -1,10 +1,10 @@
 {
   "name": "bulldozer",
-  "version": "1.3.4",
+  "version": "1.3.5",
   "title": "Bulldozer",
   "author": "Cheata, hassad the hittite. Updated by ckhawks. Fixed by AMWDRIZZ. Updated again by ckhawks.",
   "contact": "",
   "description": "Bulldozer for tearing up your base",
-  "dependencies": ["base >= 0.15","? roadtrain >=1.0.0"],
-  "factorio_version": "0.15"
+  "dependencies": ["base >= 0.16","? roadtrain >=1.0.0"],
+  "factorio_version": "0.16"
 }
--- bulldozer_1.3.4/locale/en/bulldozer.cfg
+++ bulldozer_1.3.5/locale/en/bulldozer.cfg
@@ -1,6 +1,6 @@
-text-start = Start
-text-stop = Stop
-stg-collect = Collect
+text-start=Start
+text-stop=Stop
+stg-collect=Collect

 [entity-name]
 bulldozer=Bulldozer
--- bulldozer_1.3.4/prototypes/entity.lua
+++ bulldozer_1.3.5/prototypes/entity.lua
@@ -4,6 +4,7 @@
     type = "car",
     name = "bulldozer",
     icon = "__bulldozer__/graphics/icons/bulldozer.png",
+    icon_size = 32,
     flags = {"pushable", "placeable-neutral", "player-creation"},
     minable = {mining_time = 1, result = "bulldozer"},
     max_health = 1500,
@@ -174,22 +175,22 @@
           stripes = util.multiplystripes(2,
           {
            {
-            filename = "__base__/graphics/entity/tank/base-shadow-1.png",
+            filename = "__base__/graphics/entity/tank/tank-base-shadow-1.png",
             width_in_frames = 1,
             height_in_frames = 16,
            },
            {
-            filename = "__base__/graphics/entity/tank/base-shadow-2.png",
+            filename = "__base__/graphics/entity/tank/tank-base-shadow-2.png",
             width_in_frames = 1,
             height_in_frames = 16,
            },
            {
-            filename = "__base__/graphics/entity/tank/base-shadow-3.png",
+            filename = "__base__/graphics/entity/tank/tank-base-shadow-3.png",
             width_in_frames = 1,
             height_in_frames = 16,
            },
            {
-            filename = "__base__/graphics/entity/tank/base-shadow-4.png",
+            filename = "__base__/graphics/entity/tank/tank-base-shadow-4.png",
             width_in_frames = 1,
             height_in_frames = 16,
            }
--- bulldozer_1.3.4/prototypes/item.lua
+++ bulldozer_1.3.5/prototypes/item.lua
@@ -4,6 +4,7 @@
     type = "item",
     name = "bulldozer",
     icon = "__bulldozer__/graphics/icons/bulldozer.png",
+    icon_size = 32,
     flags = {"goes-to-quickbar"},
     subgroup = "transport",
     order = "b[personal-transport]-c[bulldozer]",
--- bulldozer_1.3.4/prototypes/styles.lua
+++ bulldozer_1.3.5/prototypes/styles.lua
@@ -50,6 +50,6 @@
 data.raw["gui-style"].default["bull_checkbox"] =
   {
     type = "checkbox_style",
-    parent = "checkbox_style",
+    --parent = "checkbox_style",
     font = "bull-small",
   }
--- bulldozer_1.3.4/prototypes/tech.lua
+++ bulldozer_1.3.5/prototypes/tech.lua
@@ -4,6 +4,7 @@
     type = "technology",
     name = "bulldozer",
     icon = "__bulldozer__/graphics/icons/bulldozer.png",
+    icon_size = 32,
     effects =
     {
       {
Attachments
bulldozer_1.3.5.zip
(2.55 MiB) Downloaded 89 times

Post Reply

Return to “Mods”