Project Zomboid

Project Zomboid

Vehicle Tweaker API
58 comentarios
Davi GO 24 JUN a las 14:59 
soul mano me salva ai meu game b42 e chapado de mods nesta ultima atualizaçao meu mini map e painel de veiculos sumirao nao sei q fazer entao talvez eles esteja dimencionados fora da tela se este for o cazo como posso trazelos novamente q arquivos devo procura por favor me ajuda ai
]
Elentári 23 JUL 2024 a las 2:29 
Is it somehow possible to change how much a car can pull?
hakob 18 JUL 2024 a las 7:55 
couldnt figure out what mod needs this, checked mod I installed same time as this (Expanded Hotwire and Autotsar Dadge), but neither of them needed this or maybe they updated back then
Jacques the Crab 16 AGO 2023 a las 17:26 
Thanks for the reply, if I test it out I'll come by with the results :)
soulfilcher  [autor] 16 AGO 2023 a las 9:51 
@Kitsune: I have no idea what the link was supposed to show me.

@Kyrox: I don't know, I do have an example mod called Paint it Black.

@Percyrus: Yes, it is possible to add templates, but I have not tested that in a very long time.
Jacques the Crab 16 AGO 2023 a las 0:14 
Hi, does this allow inserting values besides changing existing ones? Imagine I want to add the capability to craft amor and such, would this allow me to insert templates into the vehicle txt file? Thanks!
Kyrox 18 JUN 2023 a las 10:29 
What mods use this?
Kitsune 15 MAY 2023 a las 11:07 
i get tis, any idea how to fix it? https://gyazo.com/eec94f8caede926b942c6766c44e599d
Rodahtnov 12 FEB 2023 a las 17:57 
Changing the particular truckbed item may work, thing is it would apply to all cars using it instead of a particular one (in theory)
May have to think a diff solution ^^
soulfilcher  [autor] 12 FEB 2023 a las 17:17 
Did you try changing the item? I remember that at some point trying to change that value from inside a vehicle script was bugged. You always got the value set in the item. I can't say what is the current situation as I have not tried that for a long time.
Rodahtnov 12 FEB 2023 a las 17:14 
Hey soulfilcher, is it possible to alter the truckbed? tried with something like
TweakVehicle("Base.Van", "part TruckBed", "container", "capacity", "130");
and
TweakVehicle("Base.Van", "part TruckBed", "container { capacity = 130 }");
etc at no avail

Or is it not possible to edit it at all?
PD: Reference:
part TruckBed
{
container
{
conditionAffectsCapacity = false,
capacity = 125,
}
}
soulfilcher  [autor] 2 FEB 2023 a las 8:04 
Hoods have their health defined by the item, so you can't do that using this mod.
Brynjar 1 FEB 2023 a las 20:33 
Is it possible to modify hoods and engines to have more health / take less damage? MP server has it set to as low as possible for damage to cars, just isn't enough. thx for your work !
Brynjar 1 FEB 2023 a las 20:30 
is it possible to increase the health of hoods with this that will retain the health after being installed. Low damage on MP is just not enough.
Jack Rossman 21 ENE 2023 a las 14:05 
Yep. Much appreciated. Keep up the great work my man.
soulfilcher  [autor] 21 ENE 2023 a las 13:58 
Hi, I will try to test that and update when I can.
Jack Rossman 21 ENE 2023 a las 13:52 
Hey Soulfilcher. How's life been treating you? Hope things have been well.
So anyways, I did discover something VTAPI's missing: The ability to redefine horns!
Here's what I found works. Though it's exclusively for horns, and could probably be refined later?
Note: I just shoved this right underneath "part" in the tweakVehicles function.

elseif t == "horn" then
vehicle:Load(name, "{".."sound".."{ horn ="..y..",}".."}");
Jack Rossman 5 OCT 2022 a las 10:00 
ok, so. It's very rude to go to other people's mods with issues in a mod that depends on said mod. You are aware it's STR doing it, so why bother poor Soulfilcher?
Also, I just got back to my PC, so I wasn't ignoring you. Does the spam still occur when you make a new save after enabling VTAPI? If not, then it's the fact you didn't enable it in your save file.
Anyways, this isn't the place to continue this, so please move back to STR's page or maybe the discord?
JxmmyJxmes 5 OCT 2022 a las 7:37 
*It is now broken
JxmmyJxmes 5 OCT 2022 a las 7:37 
and yet here we are. It is not broken due to the fact that it constantly flashes in my face that I need to use the API tweaker
soulfilcher  [autor] 5 OCT 2022 a las 7:18 
I guess all you need to do is to subscribe to the mod.
JxmmyJxmes 4 OCT 2022 a las 20:28 
I don't want to tweak any of them though. I'm coming here from STP vehicles.
soulfilcher  [autor] 4 OCT 2022 a las 8:01 
You need a lua file in your media/shared/ folder that follows the example in the description. Then you add a line for each vehicle's stat you want to tweak.
JxmmyJxmes 4 OCT 2022 a las 6:02 
Nice, so now I will be forced into eternal spamming because I have no clue how to implement this API...
soulfilcher  [autor] 26 SEP 2022 a las 12:58 
Fixed!
Jack Rossman 26 SEP 2022 a las 11:06 
Welp. I feel a bit stupid. Remember the method for multiple skins? Guess who forgot to mention using "t" in *vehicle:Load(name, "{"..t.."{ texture ="..y..",}".."}");* needs to be changed to *vehicle:Load(name, "{".."skin".."{ texture ="..y..",}".."}");*... Otherwise it'll put "skin1" into that field. My apologies man...
soulfilcher  [autor] 23 SEP 2022 a las 18:37 
Mod updated, thank you for your suggestions.
Jack Rossman 21 SEP 2022 a las 18:41 
Ok, found the cause for it doing nothing on servers. The "VehicleTweaker_Core" file needs to be moved to "shared" instead of "client". Just thought you should know. Keep up the great work my friend :)
Jack Rossman 21 SEP 2022 a las 9:25 
Odd. Seems the mod doesn't do anything in MP anymore... No errors, just seems the server isn't registering the changes.
Jack Rossman 19 SEP 2022 a las 16:11 
Np my guy. Keep up the great work!
soulfilcher  [autor] 19 SEP 2022 a las 16:03 
@Zudakas: I don't have a list but it is a matter of trying to see what happens, because some values seem to be recalculated once the vehicle is spawned and the changed value doesn't seem to take effect. One thing I know is problematic right now is adding parts.

@NightScale5755: Thank you for testing that. I will try to check your suggestion and update the mod.
Jack Rossman 19 SEP 2022 a las 15:25 
Heyo, after messing around with the code, I figured out a method for adding multiple skins to a vehicle.
Instead of: *if t == "skin" then*
Use: *if t:contains("skin")*

Therefore one could specify multiple entries, like "skin1, skin2, etc" or even more complex entries like "skincool, skinawesome, etc".
Hope this helps, as this mod's a lifesaver. Have a wonderful day!
Zudakas 3 SEP 2022 a las 12:54 
or is it just those 4, color, mass, maxSpeed, machinicType?
Zudakas 3 SEP 2022 a las 12:53 
So out of curiosity, is there a list of possible variables I could change with this? e.g. mass, hp, etc

I run a small dedicated server, and I'd love people to be able to actually make it from one town to the next without swapping vehicles 3-4 times. Zed population is rather high ;)
Jack Rossman 29 AGO 2022 a las 14:19 
alright. Sounds good
Keep up the great work!
soulfilcher  [autor] 29 AGO 2022 a las 13:38 
Most probably a limitation due to how I coded it. I will have to take a look.
Jack Rossman 29 AGO 2022 a las 12:59 
Hi there. So uhhh, I've encountered a minor issue. Say I want to add several textures to a car using this. If I use the logical route of 1 TweakVehicle() entry per texture, it'll only add the one at the end of the list. Is there something I'm doing wrong, or is that a limitation?
KV Productions 29 JUL 2022 a las 12:11 
Which mods? because i haven't found any (apart from "paint your ride" maybe, which doesn't work in MP)
soulfilcher  [autor] 29 JUL 2022 a las 9:25 
@Gas.Pimienta: You have permission for that.

@KV Productions: There is no need to use this mod for that. I think there are mods that do that already.
AndyLoco 28 JUL 2022 a las 20:53 
Permission Request:
Hi, @soulfilcher ! I would like to ask your permission to use your mod in our server modpack. I will give you full credit for your mod in every media I can. If you allow us to do this our community would be very grateful. Thank you!
KV Productions 8 JUN 2022 a las 19:02 
Could this be used to make a mod that allows you to remove rust off of cars?
soulfilcher  [autor] 15 MAY 2022 a las 15:12 
As far as I know this is still working. It isn't used for specific cars but all cars of a certain type. I don't remember if I did any tests for changing skins though.
Axebeard 15 MAY 2022 a las 13:31 
Is this still working in 41 and if so, is there a property to change a vehicle's skin? (if skin =1 change to skin 2 for example). Thanks!
soulfilcher  [autor] 1 FEB 2021 a las 11:25 
Thank you Aiteron for the code, I hadn't seen it yet. I will add it in the next update.

@geras: Currently adding parts doesn't work as it should.
Aiteron 28 SEP 2020 a las 11:22 
Wrote some extension on modify areas. Maybe will be interesting (Raw code) - https://pastebin.com/9NYP3c9B
geras 27 SEP 2020 a las 7:02 
Is it possible to add more seats or add additional doors to cars with this? Is it possible to edit "area SeatFrontLeft" or "area SeatFrontRight" values?
soulfilcher  [autor] 31 AGO 2020 a las 10:00 
I have not tested it with build 41 if that's what you want to know. It most probably still works with build 40.
TurtleShroom 15 AGO 2020 a las 14:16 
Does this Mod still work?
soulfilcher  [autor] 28 ABR 2020 a las 10:21 
This mod will not help you with that, it is meant to change stats for a car type when they are spawned, not for existing cars on the map.
Öysterboi 27 ABR 2020 a las 2:10 
Could you please help me understand how to change the color of a car? I'm using Filibuster Rhymes' Used Cars and my favorite car which appears to be the only one in the map, has such an ugly color that I NEED to change it.

Thanks in advance but I don't really know nothing about modding and barely know what's an API lol