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

  • Members
  • PipPipPip
  • 145 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

  • 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

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

#4
CaptainGolem

CaptainGolem

    Some guy

  • 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

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

#6
CaptainGolem

CaptainGolem

    Some guy

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

#7
MrElephant

MrElephant

    Modder

  • Members
  • PipPipPip
  • 55 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

  • Members
  • PipPipPip
  • 145 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

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

#10
Creator

Creator

    The AI Car Recolouring Guy

  • Members
  • PipPipPip
  • 145 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

  • Members
  • PipPipPip
  • 55 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

  • Members
  • PipPipPip
  • 55 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

  • Members
  • PipPipPip
  • 55 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...



#16
Michal James

Michal James

    Newbie

  • Members
  • Pip
  • 6 posts
What techniques and method do you used to check the speed of drivers?

#17
RobExplorien

What techniques and method do you used to check the speed of drivers?

 

That depends on what program you like to use to open and edit the binary files, in which AI paths and speed is determined (the latter isn't completely determined in those files). For the time being, I personally favor editing with the Binary File Editor (made by origamiguy), but if you feel challenged, go ahead and use a hex editor. You mind as well would like to check 

Please Login or Register to see this Hidden Content

to get to know more about those .RRB files. I myself am hoping to develop a (simple) program to edit those files in a faster way, but that program won't be done any time soon (have not even started on it).



#18
RobExplorien

I don't know if this information is relevant here.

 

So I've been working on the difficulty increase overhaul mod, but there is one main question that I run into: should I focus on speed-editing for circuit races or single races?

I tested some races, and I experience that you're chances of winning are slim to none, when you make two or three mistakes during the race (e.g. bumping into a wall (and severely slowing you down), caught in a magnet). These mistakes are common, and could occur to anybody. So if you were to enter a circuit, you'd have to race four tracks close to perfect, and the odds of performing four perfect races aren't always in your favor. If you get behind too far, it's over. The AI has no rubber-banding concept of slowing down if this occurs to you. In a single race, it wouldn't be a big problem; you can start the race over and try again.

 

So the point is, I could make each race really hard, but still beatable (and fun), or I could tone the difficulty a bit down for the circuit races. My vote goes out for the latter. I like to make the 'story mode' harder, and that was my initial concept for this overhaul. But I'd better ask your opinion first, before I go any further with modding on it.



#19
plakrast

I don't know if this information is relevant here.

 

So I've been working on the difficulty increase overhaul mod, but there is one main question that I run into: should I focus on speed-editing for circuit races or single races?

I tested some races, and I experience that you're chances of winning are slim to none, when you make two or three mistakes during the race (e.g. bumping into a wall (and severely slowing you down), caught in a magnet). These mistakes are common, and could occur to anybody. So if you were to enter a circuit, you'd have to race four tracks close to perfect, and the odds of performing four perfect races aren't always in your favor. If you get behind too far, it's over. The AI has no rubber-banding concept of slowing down if this occurs to you. In a single race, it wouldn't be a big problem; you can start the race over and try again.

 

So the point is, I could make each race really hard, but still beatable (and fun), or I could tone the difficulty a bit down for the circuit races. My vote goes out for the latter. I like to make the 'story mode' harder, and that was my initial concept for this overhaul. But I'd better ask your opinion first, before I go any further with modding on it.

 

I think the single races should be hardest, but that you should still increase the difficulty of the circuits, too. The circuit leader's path should probably stay rather hard, though, so that first place is actually challenging. Are you attempting to make it so warps aren't overpowered, or will those still ensure an easy win? Is there even a way to tone the warps down?



#20
RobExplorien

I think the single races should be hardest, but that you should still increase the difficulty of the circuits, too. The circuit leader's path should probably stay rather hard, though, so that first place is actually challenging. Are you attempting to make it so warps aren't overpowered, or will those still ensure an easy win? Is there even a way to tone the warps down?

So you vote for single races or circuit races? I'm not going for both at the moment, that would take even longer. I had already thought of having the boss racer a bit faster at some points, but even without it is challenging. And my aim is to not exclude the use of warps and shortcuts, I want to give the player full freedom and not having him/her restricted to such rules as no warping allowed.