So I've been playing with trying to add new features to GP2Lap and I've been making good progress. Before I send them to the official GP2Lap repo (which make take time to review them, approve and release a new version with them) I'd like to make them available for you guys to test because there's only a limited amount of testing I can do myself to catch bugs and edge cases.
Before anyone asks: these won't work with x86GP2 because it doesn't use GP2Lap. Hatcher is aware of them and may adopt them in the future. I've been testing with several versions of DOSBox in both Windows and Linux (I highly recommend DOSBox Staging. It's super fast).
v1 features:
1. Per-car tyre automatic compound selection
In stock GP2 there are 4 tyre types (A-D, harder-softer) and the tyre used in a session is decided in the track file. All cars use the same type. This feature changes things a little bit. Once activated, the tyre type will be a mix of the track default + strategy.
GP2Lap will look into the pit strategy with more cars from the track file and if possible, use the default tyre for it. Then it will distribute softer tyres for strategies with more pits and harder tyres for strategies with less pitstops. It will try to reconcile edge cases always aiming for more variety but I haven't tested all the possibilities so if something crashes the game or GP2Lap choices look wrong, let me know so I can fix it.
This will also add a change to GP2Lap's At The Line so it displays the tyre selected for each car. You can turn this off.
There's also a second cfg so all cars use the softest compund in qualifying (D). When turned off, they will use the default tyre in qualifying (like they did for the Saturday qualy in post 92 90s)
Parameters in gp2lap.cfg:
PerCarTyreCompounds activates it
Code: Select all
[Tyres]
PerCarTyreCompounds = 0 ; 0 = stock single compound; 1 = per-car compounds by pit strategy (experimental) - [b]
SoftTyresInQuali = 1 ; (needs PerCarTyreCompounds=1) 1 = everyone runs D in qualifying; 0 = stock
ShowTyreCompoundBadge = 1 ; (needs PerCarTyreCompounds=1) 1 = show (X) compound badge in the ATL; 0 = blind (no letters)When you start a session there's a total image limit of around 2.84MB for all jams loaded (that's why some tracks work in practice and freeze the game in race. Race will load some extra jams). This allows you to set extra memory to that limitation, so now you can load those tracks in races and track makes can make tracks with more/bigger images for us to play. I've been testing this with DOSBox. It's default memory size is 16MB and it has to be enough for DOS, GP2 and GP2Lap, so if you extend the jam limit, 16MB won't be enough (extending by 2MB makes it fail under 16MB, so I've been testing with 32MB which gives it plenty of room. More than 1MB will only be necessary if someone actually makes a track using a lot more total image than any track available today, so until that happens I wouldn't use more than 1MB).
Parameters in gp2lap.cfg:
Code: Select all
JamTextureExtraMB = 0 ; 0 = stock (~2.84MB JAM texture limit); N = add N MB on TOP of stock (so 2 -> ~4.84MB)
; to load bigger/more team+circuit JAMs without the load-time freeze. Needs that much
; free RAM (raise DOSBox memsize if needed). (experimental)Stock GP2 only loads tracks with 62kb at most. GP2Limit / Slot and Tyre editor extend this to 65kb. This feature allows you to extend it even more (up to 320kb). The only problem now is that the Track Editor can't build tracks bigger than 65kb. I've already submitted a change to the official repo to allow it to handle files up to 320kb. Hopefully it will be accepted soon.
Parameters in gp2lap.cfg:
Code: Select all
[Track]
ExtraTrackFileKB = 0 ; 0 = stock (~62KB track-data / 64KB file limit); N = allow N KB more, so bigger
; .dat files load instead of freezing. Relocates the read/data buffers at startup
; and raises the read cap. Needs a matching editor-produced (or inflated) file. (experimental)Stock GP2 has a limit of 1600 track units (including the track + the pitlane), which is around 7.8km. If you make the track longer GP2 will crash. With this feature you can set an extra limit. My limited testing proved it works but there's a hard limit (not one I can extend) of the square world where the track must be (the Track Editor shows it in the option "show grid"). It's 2.49Km x 2.49Km so we will never be able to build Targa Florio or even a faithful Nordschleife. But hey we already have some impressive "Norschleifes", they may become even better.
Parameters in gp2lap.cfg:
Code: Select all
[Track]
ExtraTrackSegments = 0 ; 0 = stock (~1600 track+pit segments, ~7-8km); N = allow N MORE segments (so the
; track+pitlane budget becomes 1600+N). Relocates the segment buffer at startup.
; Lets you build longer circuits. Needs a little extra RAM. (experimental)With GP2Edit we can set the pit speed limit for the player, but not for the ccs. This allows us to set the same limit for those. It won't work properly if you disabled the limit in GP2Edit, so keep it enabled (the value there doesn't matter, GP2Lap will override it). If you want to disable it, just set a big value like 350kph. At high speeds the ccs and the player will brake from very far, so be cautious. I haven't tested enough to know what tragedies this can create
Parameters in gp2lap.cfg:
Code: Select all
[Pit]
PitSpeedKmh = 80 ; pit-lane speed limit in km/h, applied to BOTH the AI and the player so they
; match (stock is ~80 but the AI/player differ slightly). 0 = leave stock untouched.When you use a low power carset (like F3, or 60s F1) the computer cars will be very slow at the race start and going out of slow corners. That's because GP2 scales its acceleration so it doesn't go too fast with normal 1994 engine power. This feature will disable that scaling up to the speed set by AILaunchFadeKmh making them accelerate normally.
Parameters in gp2lap.cfg
Code: Select all
[AI]
AILowHpLaunchFix = 0 ; 0 = stock. 1 = fix the "slow AI launch" artifact that appears when a carset's
; HP is edited well below stock (~550 PS and down): the AI accel scales linearly
; with HP at every speed, but the human is traction-limited at low speed, so low-HP
; AI cars launch / exit slow corners far too slowly. The fix fades the HP penalty in
; with speed (none at a standstill, full by AILaunchFadeKmh). No effect at stock HP.
AILaunchFadeKmh = 128 ; crossover speed for the fade, in km/h (only used when AILowHpLaunchFix = 1). Below
; this the HP penalty is suppressed (cars launch at the reference level); above it the
; car's real HP applies. Higher = relief over a wider speed range. Tune by feel.7. Banking improvement for computer cars
This is only visual. With this enabled, the cc will roll with banked corners, reducing their ugly effect. I could not remove all the other glitches caused by banking, especially with extremely banked corners. This doesn't require any changes to the tracks. If has a side effect of replicating the bug where the player's car rides banked verges that doesn't exist (making it look like it is floating) to the cc, but I think that's a minor problem compared to the ccs not rolling. The RCR jams don't roll yet (if ever), so it is recommended to extend the RCR distances in gp2lap.cfg.
Parameters in gp2lap.cfg
Code: Select all
AIBankingRoll = 0 ; 0 = stock (cars sit level on banked track, "floating flat"). 1 = roll the drawn
; opponent car models (external/TV/replay) AND the cockpit view onto the per-segment
; banking (track cmd 0xAD) so cars lean with the surface. Self-disables on flat track.8. The Season Override file
This adds another configuration file to GP2Lap (default name override.cfg). You will need that file for the following features. I've done this so gp2lap.cfg doesn't get too crowded and because the configurations it will host are very tied to the especific carset and kind of season you are simulating in game.
Parameters in gp2lap.cfg
Code: Select all
[Season]
SeasonOverrides = "override.cfg" ; file listing per-car overrides (e.g. car textures).
; Commented or missing file = disabled. Paths in it are
; relative to the GP2 directory. (experimental)All the following features must be enabled in the season override files (it won't work if you add them to gp2lap.cfg). There is a [General] section in the file and there's a section for each team ([Team 1], [Team 2], etc).
9. Refuel and pitstop timing parameters
This allows you to disable refueling (cars will start with full fuel load and won't refuel during pitstops) and/or change the time it takes to refuel, change tyres or repair damage. The minimum pitstop time I could see in the game was 4.6 second because that's the time it takes for the "cleaning the helmet's visor" animation to complete.
Parameters in the override file:
Code: Select all
[General]
;Pit stops (global; affects AI and player; omit a key to keep it stock)
PitTyreChangeMs = 7000 ; tyre-change base time in ms (stock 7000)
PitDamageRepairMs = 18000 ; damage-repair base time in ms (stock 18000)
PitRefuelBaseMs = 2750 ; fixed per-stop refuel overhead in ms (stock 2750)
PitRefuelCapMs = 20000 ; max refuel duration cap in ms (stock 20000)
PitRefuelSpeed = 100 ; refuel speed, % of stock (200 = twice as fast)
DisableRefuel = 0 ; 1 = cars start full and add no fuel (tyre stops still happen)This allows you to set a carshape .dat file for each team. You can also chose nose 0 (low nose) and nose 1 (high).
11. Per-team physics
This allows you to set physics parameters for each team. At the moment they are the car mass and a downforce multiplier. Mass has the same effect as changing the player's car weight in GP2Edit. The downforce multiplier will be applied to the calculated downforce for each team (100 will have no effect, lower values give less downforce, higher values give more downforce). It is applied equally between the front and rear wings.
12. Per-car liveries
This allows you to set a .bmp file for each car instead of having both cars in a team using the same one.
13. Per-car cockpit colors
This allows you to set the cockpit colors for each car separatedly instead of both cars in a team using the same colors. The color order is the same as it appears in GP2Edit and here you are picking the first color of a "X shades" range
Code: Select all
;==========================================================================
; override.cfg -- per-team / global overrides (pointed to by SeasonOverrides)
;==========================================================================
; Turn this on in gp2lap.cfg:
; SeasonOverrides = "override.cfg"
; A missing file, or a commented-out line, means that override stays stock.
; Lines starting with ';' or '#' are comments. Keys are case-insensitive and
; may appear in any order within their section; anything you leave out is left
; stock. Paths are relative to the GP2 folder; '\' or '/' both work.
;
; The file is organised into INI-style sections:
;
; [General] global settings (pit/refuel; more over time)
; [Team N] everything about team slot N (N = 1..14, the team ORDER -- the
; same order the teams appear in the exe). You never type car
; numbers: GP2Lap resolves a team's two drivers itself.
;
; Per-team keys:
; car1 / car2 = path\to.bmp livery for the team's 1st / 2nd driver
; cp1 / cp2 = a,b,c cockpit colours (three palette indices 0-255)
; shape = path\to.dat car shape (.dat object)
; nose = 0 | 1 0 = low nose, 1 = high nose
; mass = <kg> chassis weight in kg (stock ~595)
; downforce = <pct> downforce as % of stock (100 = stock, 1-200)
;
; car1/cp1 = the team's first driver slot, car2/cp2 = the second. If a team has
; only one driver (a slot is disabled in the exe), the key for the missing slot
; is simply ignored (a note is logged) -- so for a 1-driver team you may need
; car2 rather than car1 (see Osella below).
;
; Liveries are 256x164, 8-bit BMPs in the car-atlas palette (e.g. from GP2Edit).
;==========================================================================Code: Select all
[Team 1] ; McLaren
car1 = liv\01a.bmp
car2 = liv\01b.bmp
cp1 = 1,100,180
cp2 = 1,100,180
shape = shapes\1989tk.dat
nose = 1
mass = 500
downforce = 100