Page 1 of 2

[0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 12:08 am
by Cheata
Bulldozer

This is a mod which adds a bulldozer to the game, designed for quickly ripping up a base where logistic drones are not an option (i.e. long runs of rail that are no longer necessary)
bulldozer.png
bulldozer.png (982.42 KiB) Viewed 23240 times
latest version bulldozer1.0.5
Changelog
Current features
-Removes structures and places them in bulldozers inventory
-Picks up loose items on the ground
-"Projectile Shield" when active the "Blade" will also act as a projectile shield effectively negating ranged damage from the front
-Removes trees (adds wood to inventory)
-Removes rocks (adds stone to inventory)

To use:
- place vehicle like normal
- enter vehicle
- start/stop button will appear in top left of screen
- in stop mode bulldozer will roll over and destroy things like the tank
- in start mode bulldozer will "pickup" everything in front of the "blade" (except biters)
- blade is in the front of the bulldozer so reversing over things will destroy them as if you are in stop mode
- can tow trailers added with roadtrain mod
- can dump "collected" items into trailers

Should work with most mods
Multi-player untested

TO DO
- possible modification / balancing of the collection toggle
- suggestions please

Please post any bug reports, feature requests, balance suggestions etc to my GitHub https://github.com/Cheata/bulldozer

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 12:27 am
by Klonan
This looks really interesting, Definitely something i think can be expanded upon, roving trailer wagons, maybe a smelter wagon could be towed too, if the ou fuel it from any ore you pickup.

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 1:32 am
by XyLe
Pretty cool idea )) thumbs up!

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 1:50 am
by darkshadow1809
Awesome:) Mind if i throw it in the modpack?

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 3:26 am
by Cheata
darkshadow1809 wrote:Awesome:) Mind if i throw it in the modpack?
go for it but be aware that i haven't tested it with a lot of mods and there is likely to be errors with mods that add new entity "types"

at the moment i'm using the game.findentitys method to get a list of everything in-front of the blade then blacklisting the entity types i don't want picked up (and there are a lot of them).

the other method i can see is to use the game.findentitysfiltered method but that would require white-listing all the types i do want picked up, i rejected this method as it would increase processing time considerably as each type would need its own findentitys table which would need to be looped through and every mod that adds new types constructible by the player would need additional white-listing to make it compatible.

if anyone thinks i'm looking at this backward or can come up with a better way of doing it let me know and list your arguments please :)

the other section of code that worries me is where it checks the inventory's of the found entity. (see my github - link above - bulldozer.lua lines 55 and 133)
I'v cheated my way round a potential problem by setting up an errorcheck and ignoring the error if there is no inventory this works but its messy. Does anybody know of a way to check which inventory index's apply to an entity before referencing them with entity.getinventory(i)

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 9:44 am
by Choumiko
Went on a little rampage in an old save, very funny :D
Cheata wrote: the other section of code that worries me is where it checks the inventory's of the found entity. (see my github - link above - bulldozer.lua lines 55 and 133)
I'v cheated my way round a potential problem by setting up an errorcheck and ignoring the error if there is no inventory this works but its messy. Does anybody know of a way to check which inventory index's apply to an entity before referencing them with entity.getinventory(i)
Don't know another way, would be nice if getinventory returned nil or false when the inventory doesn't exist i guess.
As for findentitys: i can't think of a better/faster way right now.
I created a pull request with some minor tweaks, as well as an issue. Though i forgot adding that your locale misses the text-start/text-stop translation for the button

Re: [0.11.19] Bulldozer MOD

Posted: Mon Mar 30, 2015 10:36 am
by Cheata
New Version bulldozer 1.0.1

Re: [0.11.19] Bulldozer MOD

Posted: Thu Apr 02, 2015 9:06 am
by Cheata
MOD causes crash when bulldozing areas with Ghost buildings

to fix this until i release a new version just add the following to the end of line 58 in the bulldozer.lua

Code: Select all

, ["ghost"]=true
or copy the current version of the bulldozer.lua from my github (linked in the first post)

Re: [0.11.19] Bulldozer MOD

Posted: Sun Apr 05, 2015 2:49 pm
by bormoshka
here another error
QIP Shot - Screen 075.png
QIP Shot - Screen 075.png (187.14 KiB) Viewed 23487 times

Re: [0.11.19] Bulldozer MOD

Posted: Sun Apr 05, 2015 8:57 pm
by Gusop
Good idea but the bulldozer is ugly, sorry. Would be great if trees wouldn´t stop him but he must have slow speed.

Re: [0.11.19] Bulldozer MOD

Posted: Mon Apr 06, 2015 12:33 pm
by Cheata
Gusop wrote:Good idea but the bulldozer is ugly, sorry. Would be great if trees wouldn´t stop him but he must have slow speed.
yep the bulldozer is ugly if someone is interested it creating a proper texture pack for it id be happy to include it

not sure what you mean by trees stopping it ... if the bulldozer is active then trees should be collected like everything else, iv been driving it at top speed without a problem unless the inventory was full

Re: [0.11.19] Bulldozer MOD

Posted: Mon Apr 06, 2015 1:49 pm
by Cheata
well easter weekend is over and iv just finished my latest project for factorio

The roadtrain mod

trailers for factorio

with this comes a new version of the bulldozer mod updated to support towing and loading of trailers

bulldozer_1.0.2

Re: [0.11.19] Bulldozer MOD

Posted: Fri Apr 10, 2015 9:33 am
by Cheata
well i decided to have a go at creating some proper textures.

As a result of about a week messing round in blender and other image editors iv updated the bulldozer mod with some new graphics.

let me know your thoughts :)

New Version bulldozer_1.0.3

Re: [0.11.19] Bulldozer MOD

Posted: Fri Apr 10, 2015 10:44 am
by MasterBuilder
No more mustache. Looks nice. I think I would be better if the color matched the tank though.

Feature Request: Any chance for an option to destroy that which is bulldozed? I get clogged with wood going through forests.

Re: [0.11.19] Bulldozer MOD

Posted: Fri Apr 10, 2015 11:39 am
by Cheata
MasterBuilder wrote: I get clogged with wood going through forests.
which is rather impressive considering you only get 1 wood per tree as apose to the 5 for manual mining...

easy enough to do in code ill have a think about it :)

Re: [0.11.19] Bulldozer MOD

Posted: Fri Apr 10, 2015 12:57 pm
by aRatNamedSammy
something strange :S.. my game is updated 11.21 but playing on my map 11.20 with mod treefarm lite/ treefarm AC
i wanted to test your bulldozer 1.0.3
was cleaning out a forest close to bitters spawner, throw some combat robot to cover me a bit.. combat robot stopped attacking, as well as laser turrets at all bases and outpost :shock:
ouch.. cant say what went wrong
i include autosave which is before, you can reproduce it
the other save , i have save right next to a wall of turrets not attacking
and the logfile

Re: [0.11.19] Bulldozer MOD

Posted: Fri Apr 10, 2015 9:35 pm
by Cheata
aRatNamedSammy wrote:something strange :S.. my game is updated 11.21 but playing on my map 11.20 with mod treefarm lite/ treefarm AC
i wanted to test your bulldozer 1.0.3
was cleaning out a forest close to bitters spawner, throw some combat robot to cover me a bit.. combat robot stopped attacking, as well as laser turrets at all bases and outpost :shock:
ouch.. cant say what went wrong
i include autosave which is before, you can reproduce it
the other save , i have save right next to a wall of turrets not attacking
and the logfile

thats a weird one ... bulldozer shouldn't affect the combat at all.
thanks for the saves ill look into it and see if i can track down what happened

Re: [0.11.19] Bulldozer MOD

Posted: Sat Apr 11, 2015 4:05 am
by Cheata
lol got it...


The "Bullet shield" feature of the bulldozer blade is swallowing the shots from the drones. because the game logic decides how many shots are needed to kill a mod, once the required number of shots have been fired it ignores the mob and moves on ... this prevents wastage of ammo. however if the shots are destroyed ( or never hit the target for some reason) the game thinks the target is dead and wont allow fire to be directed at it again, even if its still alive.

for now ill limit it to only the projectiles the biters throw (if i can)

besides .. it was swallowing the thrown drone capsules as well

Re: [0.11.19] Bulldozer MOD

Posted: Sat Apr 11, 2015 6:10 am
by Cheata
New version bulldozer1.0.4

Re: [0.11.19] Bulldozer MOD

Posted: Thu Apr 23, 2015 5:15 am
by aRatNamedSammy
i like your mod much... i just think its available a bit late.. meaning, need a tank to build it... maybe a way to build it with green circuit, but not with a tank as itself.. OR, as it have no gun, change that turret for a flame thrower (extra long range) ..like the Churchill Crocodile in WW2 https://www.youtube.com/watch?v=0rpEO3oiuos