Jump to content

Photo

AI Speed and Rubber-Banding


  • Please log in to reply
20 replies to this topic

#1
Creator

Creator

    The AI Car Recolouring Guy

  • Silver Members
  • PipPipPip
  • 147 posts
So, yeah, I'm still trying to make the game harder for myself by means of messing with the opponents and their A.I.

I was just wondering, what file determins the speed at which AI opponents move. I believe it has to be something located within the track-folders, but I have no idea what file it could be. I know that their maximum speed is linked to their starting position - Having the Baron von Barron start from Achu's spot will cause him to be far slower than usual, and vice versa. However, I also noticed that all opponents in the mirrored version of each track seem to be moving slightly faster than in the original, not-mirrored version. Can anyone confirm/falsify this observation?

As for the rubber-banding, as most of you probably know already, it too varies depending on the slot form which a racer starts. Some racers have rather extreme rubber-banding on all of their tracks (again, I'm looking at you, Baron von Barron!), but some minor opponents only seem to exhibit a watered-down version of this behaviour on some but not all tracks. Specifically, I noticed Alpha Dragonis possessing weak rubber-banding on Knightmare-Athon and Islander on Amazon Adventure Alley and possibly Royal King on Ice Planet Pathway. As for the rubber-banding, I again suspect it's being controlled by files within each track's folder, yet again, I am somewhat clueless as of where to find it.

So, yeah, can anyone help me with this? Does anyone have any idea on how to increase/decrease opponents' maximum speed or remove/add rubber-banding?
  • Lair thanked this

#2
CaptainGolem

CaptainGolem

    Some guy

  • Silver Members
  • PipPipPip
  • 64 posts
I think that their speed and rubber-banding is set in the path files.I copied the Captain Redbeard path and renamed it to the demo car path and they had the same speed (and started at the same place).But I don't know how to edit it.

#3
Creator

Creator

    The AI Car Recolouring Guy

  • Silver Members
  • PipPipPip
  • 147 posts
It's interesting none the less... what are those path files called?

#4
CaptainGolem

CaptainGolem

    Some guy

  • Silver Members
  • PipPipPip
  • 64 posts
The path files are the RRB files (example: R0_F_0.RRB). They are located in the track folder.
  • Creator and MrElephant thanked this

#5
Creator

Creator

    The AI Car Recolouring Guy

  • Silver Members
  • PipPipPip
  • 147 posts
Thank you, Captain, your help is appreciated :)

#6
CaptainGolem

CaptainGolem

    Some guy

  • Silver Members
  • PipPipPip
  • 64 posts
No problem. I always try to help where it's possible. :P

#7
MrElephant

MrElephant

    Modder

  • Silver Members
  • PipPipPip
  • 60 posts
I thought that when two cars started in the same place that the game automatically places them a few feet from each other?

#8
Creator

Creator

    The AI Car Recolouring Guy

  • Silver Members
  • PipPipPip
  • 147 posts

I thought that when two cars started in the same place that the game automatically places them a few feet from each other?


Apparently, this is only true for player cars in Multiplayer and for AI cars without corresponding RRB file. AIl regular AI cars are glued to their invisible paths and can't be pushed out of the way, except by teleporting them to 0,0,0.

#9
MrElephant

MrElephant

    Modder

  • Silver Members
  • PipPipPip
  • 60 posts
So I can give one character another characters path file inside a regular circuit race?

#10
Creator

Creator

    The AI Car Recolouring Guy

  • Silver Members
  • PipPipPip
  • 147 posts
Yes. Yes, you can. You'll find that RRB files are named like this: "R2_M_2" or "R5_S_0", which translates to "2nd Racer, Medium Speed, 3rd Path" and "5th Racer, Slow Speed, 1st Path" respectively. The "S", "M", "F" part of the name is apparently not read by the game, changing the "F" in Redbeard's name to "S" does not prevent the game from using it. Technically, any given AI racer can have up to nine different path files, but High Voltage never gave them more than two or three. Lazy programmers!

By the way, can anyone tell me what's up with RACEC2R2\R5_S_2? It's one of Alpha Dragonis' path files for the third Adventurers track, but it's slightly larger than all the other RRB files and contains two blocks of what may be different values for the game to pick from.
  • MrElephant thanked this

#11
MrElephant

MrElephant

    Modder

  • Silver Members
  • PipPipPip
  • 60 posts
So what can you do to change the speed of the driver

#12
WillKirkby

So what can you do to change the speed of the driver


Speaking as the resident expert on all things LR1:
I'm not sure, but I'm working on it :)

#13
MrElephant

MrElephant

    Modder

  • Silver Members
  • PipPipPip
  • 60 posts

So what would happen if you typed path 9 in for a racer, since I dont have my game right now?



#14
RobExplorien

Yes, I'm late on replying here, but I figured I'd better post here what I found concerning AI speed.

It is indeed defined in the .RRB files, but not in a way that changing one particular value (e.g. set speed 10 to 11) would set a different speed for the whole AI path in an .RRB file. The AI path is made up of nodes, you could see them as waypoints for the AI path. The byte in each node (when viewed with origamiguy's Binary File Editor) defines the speed an AI has to pass a waypoint. Since each path is made up of +600 nodes, it would be a big job changing the byte of every node to another value in order to set a new (faster/slower) speed for the AI path.



#15
MrElephant

MrElephant

    Modder

  • Silver Members
  • PipPipPip
  • 60 posts

Yea I am back.  But what you said is interesting RobExlorien.  I dont think I have enough time to change all of the file names and notice how each does their tiny change to the game...