nolanri Posted June 4, 2016 Posted June 4, 2016 (edited) Official Web Page: http://undeniable.info/pz/DrivingCarsMod.php List of all the Vehicles with their information here: http://undeniable.info/pz/DrivingCarsMod.php#list Please Help Contribute if you can! TO DO LIST: Fix Problems on Multiplayer: GridSqaure:transmitRemoveItemFromSquare(item) seems to occasionally fail or time out when used multiple times per second. This problem is causing cars to duplicate themselves from time to time as you drive along. I have yet to find a solution to this Maybe we can kindly ask the devs if they can provide a method for the IsoWorldInventoryObject class such as setPosition(newX, newY) though I understand this could be more difficult then it sounds as these world inventoy objects are relative to what square they exists on. So if thats too much to ask, I can live with just a setTextureOffset(newX, newY) method so I can just change the offset of the car Until it moves onto a different square. This would reduce my item drop and pickup command spamming by like 80% which should fix the problems experienced in MP. What do you say devs? Make isometric car images for other kinds of cars with all 8 angles We should really make our own art as I just found most of these cars on google images, though I made slight adjustments to them, we really need you artists to whip us up some isometric vehicles from the 8 angles you see. Including one image of the car being broken. Off Topic: Feeling Bored? Try these gamesThe game of StonesThe game of Lights Edited June 29, 2016 by nolanri info stewydeadmike, xNeariax, Virindi_Screenwriter and 9 others 12
Hydromancerx Posted June 5, 2016 Posted June 5, 2016 (edited) On 6/3/2016 at 6:16 PM, nolanri said: - add car spawning on world load, cars to spawn ON THE FLOOR in random areas Here is the car spawn code from Hydrocraft awhile back. Spoiler function HCSprites.Cars(square) if not square:getModData().Hydrocraft then local cBagDistro = nil; local cBag = nil; local street = square:getObjects(); if not square then return false end if street:size() > 0 then for x=0, street:size()-1 do if street:get(x):getTextureName() and string.find(street:get(x):getTextureName(), "blends_street") then if ZombRand(1000) == 0 then carType = ZombRand(100); if carType == 0 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCTowtruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCTowtruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCTowtruckDirty"]; elseif carType == 1 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCMixertruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCMixertruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCMixertruckDirty"]; elseif carType == 2 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCSchoolbusDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCSchoolbusDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCSchoolbusDirty"]; elseif carType == 3 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCFiretruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCFiretruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCFiretruckDirty"]; elseif carType == 4 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCPolicecarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCPolicecarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCPolicecarDirty"]; elseif carType == 5 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCAmbulanceDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCAmbulanceDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCAmbulanceDirty"]; elseif carType > 5 and carType < 11 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCJeepDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCJeepDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCJeepDirty"]; elseif carType > 10 and carType < 21 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCTruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCTruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCTruckDirty"]; elseif carType > 20 and carType < 31 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCMotorhomeDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCMotorhomeDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCMotorhomeDirty"]; elseif carType > 30 and carType < 41 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCSportscarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCSportscarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCSportscarDirty"]; else if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCCarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCCarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCCarDirty"]; end end end end end square:getModData().Hydrocraft = "squareused"; if cBagDistro then ItemPicker.rollContainerItem(cBag, nil, cBagDistro); end end end Events.LoadGridsquare.Add(HCSprites.Cars); Also here is an example on how to get the car to have its own loot ... Spoiler -- Add items for Dirty Car SuburbsDistributions["HCCarDirty"] = { rolls = 2, items = { "Base.CorpseMale", 1, "Base.CorpseFemale", 1, "Hydrocraft.HCAirfreshener", 1, "Hydrocraft.HCCarkey", 1, "Hydrocraft.HCMap", 0.1, "Base.Wallet", 1, "Base.Disc", 1, "Base.WaterBottleEmpty", 1, "Base.Tissue", 1, "Hydrocraft.UmbrellaClosed", 0.1, }, fillRand = 5, }; Hope this helps. Please credit Hydocraft mod if you use it. Yoss worked hard on it with me. Also if you know how to improve it so cars do not appear in walls, please let me know. Edited June 5, 2016 by Hydromancerx GoodOldLeon and Kuren 2
Spracky Posted June 5, 2016 Posted June 5, 2016 It's exciting to see the community contribute to this mod, I can't wait to see where this will go.
DresdenBBQ Posted June 5, 2016 Posted June 5, 2016 This mod looks absolutely amazing but one question. Why is there a WW2 Willy's Jeep there wouldnt it make more sense to have a more modern version such as the J8? Willies VS. J8 (minus the gun obviously)
Virindi_Screenwriter Posted June 6, 2016 Posted June 6, 2016 I have no coding or imaging skill whatsoever.... You have my emotional support, good vibes, and all around awe at your awesomeness though!
nolanri Posted June 6, 2016 Author Posted June 6, 2016 17 hours ago, Hydromancerx said: Here is the car spawn code from Hydrocraft awhile back. Reveal hidden contents function HCSprites.Cars(square) if not square:getModData().Hydrocraft then local cBagDistro = nil; local cBag = nil; local street = square:getObjects(); if not square then return false end if street:size() > 0 then for x=0, street:size()-1 do if street:get(x):getTextureName() and string.find(street:get(x):getTextureName(), "blends_street") then if ZombRand(1000) == 0 then carType = ZombRand(100); if carType == 0 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCTowtruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCTowtruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCTowtruckDirty"]; elseif carType == 1 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCMixertruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCMixertruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCMixertruckDirty"]; elseif carType == 2 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCSchoolbusDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCSchoolbusDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCSchoolbusDirty"]; elseif carType == 3 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCFiretruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCFiretruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCFiretruckDirty"]; elseif carType == 4 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCPolicecarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCPolicecarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCPolicecarDirty"]; elseif carType == 5 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCAmbulanceDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCAmbulanceDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCAmbulanceDirty"]; elseif carType > 5 and carType < 11 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCJeepDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCJeepDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCJeepDirty"]; elseif carType > 10 and carType < 21 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCTruckDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCTruckDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCTruckDirty"]; elseif carType > 20 and carType < 31 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCMotorhomeDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCMotorhomeDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCMotorhomeDirty"]; elseif carType > 30 and carType < 41 then if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCSportscarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCSportscarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCSportscarDirty"]; else if ZombRand(2) == 0 then cBag = square:AddWorldInventoryItem("Hydrocraft.HCCarDirty", 0.0, 0.0, 0.0); else cBag = square:AddWorldInventoryItem("Hydrocraft.HCCarDirty2", 0.0, 0.0, 0.0); end cBagDistro = SuburbsDistributions["HCCarDirty"]; end end end end end square:getModData().Hydrocraft = "squareused"; if cBagDistro then ItemPicker.rollContainerItem(cBag, nil, cBagDistro); end end end Events.LoadGridsquare.Add(HCSprites.Cars); Also here is an example on how to get the car to have its own loot ... Reveal hidden contents -- Add items for Dirty Car SuburbsDistributions["HCCarDirty"] = { rolls = 2, items = { "Base.CorpseMale", 1, "Base.CorpseFemale", 1, "Hydrocraft.HCAirfreshener", 1, "Hydrocraft.HCCarkey", 1, "Hydrocraft.HCMap", 0.1, "Base.Wallet", 1, "Base.Disc", 1, "Base.WaterBottleEmpty", 1, "Base.Tissue", 1, "Hydrocraft.UmbrellaClosed", 0.1, }, fillRand = 5, }; Hope this helps. Please credit Hydocraft mod if you use it. Yoss worked hard on it with me. Also if you know how to improve it so cars do not appear in walls, please let me know. The cars are spawning with this, but no items inside. where exactly did you put the second hidden code block?
nolanri Posted June 6, 2016 Author Posted June 6, 2016 https://youtu.be/95w2MfIS12E Geras and Kuren 2
Spracky Posted June 6, 2016 Posted June 6, 2016 Looks awesome! A few suggestions that I really feel would benefit this mod: Vehicle Handling: 1.) Add acceleration if possible. Start slower and speed up the longer you move 2.) Reduce the drifting Vehicle damage: 1.) Zombies should do more damage, maybe 3-5% depending on your speed 2.) Only the mechanic profession should be able to repair cars. Any other profession should have to find a magazine or book. 3.) Using just a screwdriver is way overpowered. Maybe require some duct tape, electronic scrap, wire, and a screwdriver to directly repair or make a car repair kit. Maybe you could use the same menu as repairing a weapon when you right-click the car and mouse over repair. If you did this, you could use the current weapon repair system and show what parts are required for a fix, what chance it has to work, how much it will fix, and what the car's current durability is. I'm not sure if all of that can be done in Lua, however. Kuren 1
Last_Man_Standing Posted June 6, 2016 Posted June 6, 2016 Spracky stole almost all my suggestions - brilliant idea to use the weapon repair system - but I wonder if it should be possible for Z's to still scratch/bite you if your speed is low enough and the car is damaged enough? Kuren and Spracky 2
nolanri Posted June 6, 2016 Author Posted June 6, 2016 Test Run - AND ALSO: please direct any Modders you know to the TO DO list on the first post of this thread so we can resolve the few pending issues and release this Kuren 1
Der_Kaptein Posted June 6, 2016 Posted June 6, 2016 Mod looking pretty good, that engine sound gets annoying though Geras 1
Hicks Posted June 6, 2016 Posted June 6, 2016 (edited) Would be interesting to see a motor bike in this. Daryl on a Harley anyone? http://thumbs.dreamstime.com/z/isometric-flat-d-vehicle-bikers-set-high-quality-tiles-icon-collection-motorbiker-motorcycle-assemble-your-own-world-web-53779809.jpg Edited June 6, 2016 by Hicks Kuren 1
nolanri Posted June 7, 2016 Author Posted June 7, 2016 Single Player Version Released! - http://undeniable.info/pz/DrivingCarsMod.php cool daddy shark and Kuren 2
Atoxwarrior Posted June 7, 2016 Posted June 7, 2016 I want to give a little idea for the realization of tiles required, in this case using vehicle models made in (sketchup) are good reference to draw your art or even design your own car, positioning it in the right way could remove all the faces in pictures and make them perfect for the mod tiles, only the task to some extent is a lot of work but it could work. https://3dwarehouse.sketchup.com/model.html?id=b7dcce972806d2d72543e01b3a3ce7d9 An example https://mega.nz/#!7ZZ2yaRa!_c_C-gxFr42SRmv_KNer6TMGEV0p08_uJo4eNlTGbv0
Kuren Posted June 7, 2016 Posted June 7, 2016 First off, thanks for the release and all your great work on this 21 hours ago, Spracky said: Vehicle damage: 1.) Zombies should do more damage, maybe 3-5% depending on your speed 2.) Only the mechanic profession should be able to repair cars. Any other profession should have to find a magazine or book. 3.) Using just a screwdriver is way overpowered. Maybe require some duct tape, electronic scrap, wire, and a screwdriver to directly repair or make a car repair kit. Maybe you could use the same menu as repairing a weapon when you right-click the car and mouse over repair. If you did this, you could use the current weapon repair system and show what parts are required for a fix, what chance it has to work, how much it will fix, and what the car's current durability is. I'm not sure if all of that can be done in Lua, however. I will say I couldn't agree with all of this more though . Zombies at high speeds would be quite the hit in reality and repairing a car is definitely something that should require a bit of materials and skills/recipes from a trait and/or profession (it's only right to lock things behind traits and professions in Project Zomboid lol).
benkuhnert6 Posted June 7, 2016 Posted June 7, 2016 (edited) i seem to be having a bug where cars dont come up as contaniors for me and i cant add fuel to them D: Edited June 7, 2016 by benkuhnert6
nolanri Posted June 7, 2016 Author Posted June 7, 2016 1 hour ago, benkuhnert6 said: i seem to be having a bug where cars dont come up as contaniors for me and i cant add fuel to them D: can you show a screen shot?
markusm Posted June 7, 2016 Posted June 7, 2016 Fantastic work! Getting a similar bug to benkuhnert6 unfortunately .. cars show up as containers but I can't seem to do anything with them. If I do find one with gas in it and find the key, choosing "Start Car" doesn't do anything except spawn a new registration paperwork item. I've added a couple of screenshots.
markusm Posted June 7, 2016 Posted June 7, 2016 Screenshots on my previous post aren't showing up in order .. the 1st screenshot is actually after I've tried to start the car (and the papers have appeared) The car has gas (I can see the gas icon if I hover over it) Hope that helps!
Tapsilog Posted June 8, 2016 Posted June 8, 2016 MarkusM and Benkuhnert6, I had the same problem you guys were having. I figured out via trial and error that the bug on my game was caused by a mod, particularly ZomboidXBow. Once I disabled it, I can finally access the vehicle as a separate container. Hope this helps! Kuren 1
nolanri Posted June 8, 2016 Author Posted June 8, 2016 (edited) 9 hours ago, Tapsilog said: MarkusM and Benkuhnert6, I had the same problem you guys were having. I figured out via trial and error that the bug on my game was caused by a mod, particularly ZomboidXBow. Once I disabled it, I can finally access the vehicle as a separate container. Hope this helps! I was gonna suggest to start disabling other mods one by one and see what happens. I hope your sure it was mod " ZomboidXBow " because i'll add a note that you might have incompatibility with this enabled Edited June 8, 2016 by nolanri
Tapsilog Posted June 8, 2016 Posted June 8, 2016 It was in my case. I tried to reinstate the bug by activating the mod to try and confirm, and I can say that ZomboidXBow does indeed cause it for my end.
Blasted_Taco Posted June 8, 2016 Posted June 8, 2016 One question, does car makes sound that attracts zombies?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now