gruppe-adler / grad_civs

Arma 3 mod that adds ambient civilians
18 stars 6 forks source link

limit speed for all spawned vehicles to a uniform speed to prevent accidents. #169

Closed musaa01 closed 2 years ago

musaa01 commented 2 years ago

When spawning some modded vehicles, the various speeds of the cars results in numerous crashes. I tried to get a uniform speed of all vehicles to improve the flow of traffic by editing the fnc_sm_business_state_transit_enter.sqf and fnc_sm_business_state_voyage_enter.sqf scripts by changing it to "_this forceSpeed 25;" but whenever I try to repack the PBO, the grad script won't run. It will spawn the foot traffic, but no vehicles will spawn. I tried using PBO manager and BI tools to repack without luck. Any possibly of releasing a patch to make the traffic all travel at the same speed. Something moderatly slow such as 25-30 to reduce the risk of collisions and fire? I love this mod, but after running for 30 minutes, the map is filled with accidents.

Fusselwurm commented 2 years ago

ooh somehow I wasnt aware that forceSpeed worked on vehicles. :laughing: yes good point!

to build grad_civs, you should use hemtt . if you feel uncomfortable doing that, in a pinch, you could also fork the repo & wait for the github build action to build it for you.

musaa01 commented 2 years ago

thanks for the suggestion.haven't used hemtt before, but I will give it a try. Im glad this mod is still getting constant updates. Grad civs is by far the best for giving any arma map and campaign a living feel to it without killing FPS

Fusselwurm commented 2 years ago

re: limiting vehicle speeds - There is also limitSpeed but I guess the best course of action would be to use forceSpeed as you did , so vehicles try to match speeds (which prevents even more accidents)

musaa01 commented 2 years ago

I'll try out the forcespeed as the original script had "_this forceSpeed -1;" which I assume means it used the car's original speed config, but as some modded vehicles speed ranges wildly from 100 to 300, some cars travel at autobahn style speeds causing some spectacular accidents. slowly trying to test the use of HEMTT using https://www.youtube.com/watch?v=hLsVjDIax5Q as a guide, aber mein Verständnis der deutschen Sprache ist sehr begrenzt

Fusselwurm commented 2 years ago

ah wait.

_this in the mentioned script is the unit, and works only if it is on foot. to affect the vehicle, you need to for example do (vehicle _this) forceSpeed 25;

musaa01 commented 2 years ago

ah, i did not notice that. good catch!

ColinM9991 commented 2 years ago

slowly trying to test the use of HEMTT using https://www.youtube.com/watch?v=hLsVjDIax5Q as a guide

As I recently set up HEMTT, it's still quite fresh in my head.

What I did was

  1. Install HEMTT
  2. Update my environment variables to include the path to HEMTT in my PATH variable
  3. Run hemtt build in the addon folder where hemtt.toml is
  4. Add the repository root folder as a local addon
musaa01 commented 2 years ago

thanks for the tip. I've been playing BI games since the good old days of OFP, but never knew HEMTT existed as a tool until today (I mistook it for an American prime mover made in oshkosh). I assume the editing and repacking of the original open source pbo didnt work due to something to do with the prefix.

Fusselwurm commented 2 years ago

first stab at it: https://github.com/gruppe-adler/grad_civs/pull/170

musaa01 commented 2 years ago

many thanks. wow, you guys are fast. I'm still trying to rename all the prefixes in the various files so I can test it out.

Fusselwurm commented 2 years ago

it would be neat to vary speed depending on surroundings

musaa01 commented 2 years ago

Agreed. Trying to figure out how or if it would be possible to create a module for reducing the speed similar to the exclude civ module, especially for the "pedestrians in vicinity" issue. I tried to reduce the amount of road kill by using mods such as "liablilty insurance" https://steamcommunity.com/sharedfiles/filedetails/?id=2492941015&searchtext=insurance, but it's incompatable with ace due to the ragdoll damage system.