Project Zomboid

Project Zomboid

Vehicle Tweaker API
58 件のコメント
Davi GO 6月24日 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 2024年7月23日 2時29分 
Is it somehow possible to change how much a car can pull?
hakob 2024年7月18日 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 2023年8月16日 17時26分 
Thanks for the reply, if I test it out I'll come by with the results :)
soulfilcher  [作成者] 2023年8月16日 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 2023年8月16日 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 2023年6月18日 10時29分 
What mods use this?
Kitsune 2023年5月15日 11時07分 
i get tis, any idea how to fix it? https://gyazo.com/eec94f8caede926b942c6766c44e599d
Rodahtnov 2023年2月12日 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  [作成者] 2023年2月12日 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 2023年2月12日 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  [作成者] 2023年2月2日 8時04分 
Hoods have their health defined by the item, so you can't do that using this mod.
Brynjar 2023年2月1日 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 2023年2月1日 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 2023年1月21日 14時05分 
Yep. Much appreciated. Keep up the great work my man.
soulfilcher  [作成者] 2023年1月21日 13時58分 
Hi, I will try to test that and update when I can.
Jack Rossman 2023年1月21日 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 2022年10月5日 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 2022年10月5日 7時37分 
*It is now broken
JxmmyJxmes 2022年10月5日 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  [作成者] 2022年10月5日 7時18分 
I guess all you need to do is to subscribe to the mod.
JxmmyJxmes 2022年10月4日 20時28分 
I don't want to tweak any of them though. I'm coming here from STP vehicles.
soulfilcher  [作成者] 2022年10月4日 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 2022年10月4日 6時02分 
Nice, so now I will be forced into eternal spamming because I have no clue how to implement this API...
soulfilcher  [作成者] 2022年9月26日 12時58分 
Fixed!
Jack Rossman 2022年9月26日 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  [作成者] 2022年9月23日 18時37分 
Mod updated, thank you for your suggestions.
Jack Rossman 2022年9月21日 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 2022年9月21日 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 2022年9月19日 16時11分 
Np my guy. Keep up the great work!
soulfilcher  [作成者] 2022年9月19日 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 2022年9月19日 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 2022年9月3日 12時54分 
or is it just those 4, color, mass, maxSpeed, machinicType?
Zudakas 2022年9月3日 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 2022年8月29日 14時19分 
alright. Sounds good
Keep up the great work!
soulfilcher  [作成者] 2022年8月29日 13時38分 
Most probably a limitation due to how I coded it. I will have to take a look.
Jack Rossman 2022年8月29日 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 2022年7月29日 12時11分 
Which mods? because i haven't found any (apart from "paint your ride" maybe, which doesn't work in MP)
soulfilcher  [作成者] 2022年7月29日 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 2022年7月28日 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 2022年6月8日 19時02分 
Could this be used to make a mod that allows you to remove rust off of cars?
soulfilcher  [作成者] 2022年5月15日 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 2022年5月15日 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  [作成者] 2021年2月1日 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 2020年9月28日 11時22分 
Wrote some extension on modify areas. Maybe will be interesting (Raw code) - https://pastebin.com/9NYP3c9B
geras 2020年9月27日 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  [作成者] 2020年8月31日 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 2020年8月15日 14時16分 
Does this Mod still work?
soulfilcher  [作成者] 2020年4月28日 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 2020年4月27日 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