Jump to content

0.4.2 API Update - Chase attributes


LMS

Recommended Posts

  • Management Team

Hi fellow developers,

 

@PNWParksFan and I have been busy discussing a wide range of possible internal values exposed via the API that concern arguably the most core part of LSPDFR: chases. Since it is such an integral part I would like to also get some feedback and suggestions from you to make sure we don't have to go back and forth too much and get it right the first time. Ideally, in a later release some of the values could be shipped as presets to make life a little easier. Please note that while some of the attributes are already implemented others are just suggestions and might not be included in a future release. The current list can be loosely grouped as "Chances" and "Attributes".

 

Chances

  • Surrender chance for when the car is badly damaged
  • Surrender chance for when the car was pitted
  • Surrender chance for when the car was pitted and slowed down significantly as a result
  • Surrender chance for when the car was pitted and crashed as a result
  • Surrender chance for when a tire burst
  • Surrender chance for when a tire burst and the car crashed as a result
  • Average time after which a suspect will surrender once one or most tires have burst

 

Attributes

  • Maximum driving speed
  • Minimum driving speed
  • Maximum running speed
  • Exhaustion interval (after a certain time, the suspect slows down a little)
  • Exhaustion duration (how long the suspect will remain exhausted)
  • Handling ability (general improvement of the suspect's handling over the stock V AI)
  • Handling ability during turns (this is slightly higher than the normal handling ability)
  • Maximum turn aggressiveness (this specifies how early and how fast a suspect will take a turn)
  • Minimum turn aggressiveness (like above)

 

The ones above should all be fairly simple and self explanatory. They are also already used internally for the most part and hence will simply be exposed via the API. The values below are a little bit more "experimental" and any feedback would be greatly appreciated.

 

  • Handling ability change per burst tire: I am thinking a scale of 0.0f - 1.0f which will affect the handling ability of the suspect like a multiplier (negatively). A value of 0.0f would have no effect at all, whereas a value of 1.0f would reduce the handling ability to 0 if just one tire had burst. The formula would work like this: HandlingAbility = SituationalHandlingAbility (no turn/turn) * (1 - (BurstTireMult * tires burst)). Setting it to 0.25f would thus gradually lower the handling ability for a 4-wheel vehicle until it reaches 0 for when all tires are burst. Good idea, bad idea?
  • Average time for surrendering after a tire burst multiplier, affecting the time per burst tire. Could work much like above, a value of 1.0 would immediately reduce the average time to 0 per burst tire.

 

Another suggestion that came up was setting the maximum speed once at least one tire had burst. I think the handling ability change will tie in with this, but a multiplier like above that lowers it from the current maximum speed could also work. Or do you think a separate fixed maximum value would make more sense?

 

Thanks for your help and please feel free to suggest other values too!

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

  • The title was changed to 0.4.2 API Update - Chase attributes

I would welcome the ability to set chances on whether or not a suspect fleeing on foot will attempt to hijack a vehicle (or perform other actions that "raise the stakes" of the crimes they have thus far committed) -- it seems to me that not all fleeing suspects would want to escalate  things as they do sometimes in 0.4.

As you might guess, I make PeterUCallouts. I love working to bring LSPDFR players the kind of callouts that strike a good balance between realism and fun and are stable & varied!

Unfortunately I cannot offer support via PM -- please use the forums, so that others may benefit from your solutions!

Link to comment
Share on other sites

  • Management Team
18 hours ago, PeterU said:

I would welcome the ability to set chances on whether or not a suspect fleeing on foot will attempt to hijack a vehicle (or perform other actions that "raise the stakes" of the crimes they have thus far committed) -- it seems to me that not all fleeing suspects would want to escalate  things as they do sometimes in 0.4.

 

I've added an option as to whether suspects can steal cars in general. However, I am not quite sure about chances for that. The issue being, when is the chance evaluated? Per car they encounter? Per valid car they encounter? Every few seconds or so? I think it leaves a lot of room for different interpretations even if specified, so my suggestions would be to either have a flag whether they can steal or not steal which can be randomized by the developer, if they want to (randomized on ped creation by LSPDFR first). Or having a chance but this chance would only really be evaluated once (i.e. when the chase starts or when the chance is changed) and then based on the chance an internal flag will be set. What do you think?

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
Share on other sites

9 hours ago, LMS said:

 

I've added an option as to whether suspects can steal cars in general. However, I am not quite sure about chances for that. The issue being, when is the chance evaluated? Per car they encounter? Per valid car they encounter? Every few seconds or so? I think it leaves a lot of room for different interpretations even if specified, so my suggestions would be to either have a flag whether they can steal or not steal which can be randomized by the developer, if they want to (randomized on ped creation by LSPDFR first). Or having a chance but this chance would only really be evaluated once (i.e. when the chase starts or when the chance is changed) and then based on the chance an internal flag will be set. What do you think?

 

For my use, having this evaluated when a chase begins would be enough... I am thinking that, for my purposes, I'd set this at ped creation time in pretty much all cases.

As you might guess, I make PeterUCallouts. I love working to bring LSPDFR players the kind of callouts that strike a good balance between realism and fun and are stable & varied!

Unfortunately I cannot offer support via PM -- please use the forums, so that others may benefit from your solutions!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...