NASCAR Thunder 2004 Tools
Three tools for EA Sports' NASCAR Thunder 2004 on PC, written in Visual Basic 6 in 2005 under the name Attis Solutions.
Pre-AI: no AI codeSim racingWindowsVisual Basic 6Crew Chief · PhysEd · CamCaptain
Crew Chief NT2004
Carset and season manager

- Every race event of the season with its track, best time, laps and fastest lap, per driver profile.
- Career totals: races, laps, wins, poles, championships, points, average start and finish.
- Copies complete car setups from one driver profile to others, with or without overwriting.
From the original code: DisplayPlayerStats - a tab per driver: every race event with track, time, laps and fastest lap, then career totals · Visual Basic 6, 2005, written by hand.
Private Sub DisplayPlayerStats()
Dim c, c2 As Long
ListView1(0).View = lvwReport
With ListView1(0).ColumnHeaders
.Add , "key1", "Race Event", 2050
.Add , "key2", "Track", 1200
.Add , "key3", "Time", 500
.Add , "key4", "Laps", 500
.Add , "key5", "Fastest (See help)", 1200
End With
TabStrip1.Tabs.item(1).Caption = List1.list(0)
For c = 1 To nnot
With ListView1(0).ListItems
.Add , , Rstats(0, c).eventname
End With
With ListView1(0)
.ListItems(c).SubItems(1) = Rstats(0, c).trackname
If Rstats(c2, c).time <> 0 Then .ListItems(c).SubItems(2) = Format(Rstats(0, c).time, "00.000") Else .ListItems(c).SubItems(2) = ""
If Rstats(c2, c).laps <> 0 Then .ListItems(c).SubItems(3) = Rstats(0, c).laps Else .ListItems(c).SubItems(3) = ""
.ListItems(c).SubItems(4) = Rstats(0, c).fastest
End With
Next
For c2 = 1 To List1.ListCount - 1
Load statframe(c2)
Load ListView1(c2)
TabStrip1.Tabs.Add , , List1.list(c2)
statframe(c2).Caption = List1.list(c2)
For c = 1 To nnot
With ListView1(c2).ListItems
.Add , , Rstats(c2, c).eventname
End With
With ListView1(c2)
.ListItems(c).SubItems(1) = Rstats(c2, c).trackname
If Rstats(c2, c).time <> 0 Then .ListItems(c).SubItems(2) = Format(Rstats(c2, c).time, "00.000") Else .ListItems(c).SubItems(2) = ""
If Rstats(c2, c).laps <> 0 Then .ListItems(c).SubItems(3) = Rstats(c2, c).laps Else .ListItems(c).SubItems(3) = ""
.ListItems(c).SubItems(4) = Rstats(c2, c).fastest
End With
Next
Next
curtab = 2
statframe(0) = List1.list(0)
Frame2.Caption = List1.list(0)
Label16.Caption = Format(Pstats(0).AbortedSeasons, "##0")
Label17.Caption = Format(Pstats(0).TotalLaps, "#####0")
Label18.Caption = Format(Pstats(0).TotalRaces, "###0")
Label19.Caption = Format(Pstats(0).TotalRacesWithAI, "###0")
Label20.Caption = Format(Pstats(0).TotalPointsScored, "####0")
Label21.Caption = Format(Pstats(0).TotalChampionships, "###0")
Label22.Caption = Format(Pstats(0).TotalWins, "###0")
Label23.Caption = Format(Pstats(0).TotalPoles, "###0")
Label24.Caption = Format(Pstats(0).TotalLapRecords, "###0")
Label25.Caption = Format(Pstats(0).AvgStartPosition, "#0.0")
Label26.Caption = Format(Pstats(0).AvgFinishPosition, "#0.0")
Label27.Caption = Format(Pstats(0).AvgRaceDistance, "##0.00")
Label28.Caption = Format(Pstats(0).AvgOpponentStrength, "##0.00")
For c = 0 To List1.ListCount - 1
ListView1(c).Sorted = True
ListView1(c).SortOrder = lvwAscending
Next
File1.Path = nascarpath & "\save\" & List1.list(0) & "\Settings" & "\Talladega"
Dir2.Path = nascarpath & "\save\" & List1.list(0) & "\Settings" & "\Talladega"
File1.FileName = "*.svm"
File2.FileName = "*.svm"
CheckForFastestFile
Label30.Caption = TabStrip1.SelectedItem
currraceeventindex = 1
SelectInListview currraceeventindex
currraceeventname = GetTrackName(ListView1(0).SelectedItem)
DoEvents
End Sub
PhysEd NT2004
Car physics editor

- Browses the game's cars and opens their physics files.
- Lists every physics section (front and rear wings, fenders, body aero, diffuser and more) and every value in it, with its meaning.
- Edits values with Revert, Revert All, Save To Game, and backups.
From the original code: ParseString - reads one line of a NASCAR Thunder physics file into category, description, comment and its 1 to 4 values · Visual Basic 6, 2005, written by hand.
Private Sub ParseString(sstring As String, index As Long)
Dim c, noc, strt, eend As Long
strt = InStr(1, sstring, "[")
If strt > 0 Then
eend = InStr(strt + 1, sstring, "]")
catagory = Mid$(sstring, strt + 1, eend - 2)
List2.AddItem catagory
Exit Sub
End If
If sstring = "" Then
physics(index).fileindex = index
If catagory = "" Then physics(index).catagory = "Comment" Else physics(index).catagory = catagory
physics(index).description = "Blank Line"
physics(index).comment = "Blank Line"
physics(index).datatier = 0
physics(index).data1 = "Null"
physics(index).data2 = "Null"
physics(index).data3 = "Null"
physics(index).data4 = "Null"
Exit Sub
End If
If Left$(sstring, 2) = "//" Then
physics(index).fileindex = index
If catagory = "" Then physics(index).catagory = "Comment" Else physics(index).catagory = catagory
physics(index).description = "Comment Line"
physics(index).comment = Mid$(sstring, 4, Len(sstring))
physics(index).datatier = 0
physics(index).data1 = "Null"
physics(index).data2 = "Null"
physics(index).data3 = "Null"
physics(index).data4 = "Null"
Exit Sub
End If
strt = InStr(1, sstring, "=")
eend = InStr(1, sstring, " ")
'If strt > 0 And strt < eend Then
'If catagory = "REARRIGHT" Then Stop
physics(index).description = Left$(sstring, strt - 1)
Select Case Mid$(sstring, strt + 1, 1)
Case Is = "("
physics(index).fileindex = index
If catagory = "" Then physics(index).catagory = "Comment" Else physics(index).catagory = catagory
strt = InStr(1, sstring, "//"): If strt = 0 Then strt = 1
physics(index).comment = Trim(Mid$(sstring, strt, Len(sstring)))
strt = InStr(1, sstring, "(")
eend = InStr(strt, sstring, ")")
noc = 0
For c = strt To eend
If Mid$(sstring, c, 1) = "," Then noc = noc + 1
Next
physics(index).datatier = noc + 1
If noc = 0 Then
strt = InStr(1, sstring, "=(") + 1
eend = InStr(strt, sstring, ")")
physics(index).data1 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
End If
If noc = 1 Then
strt = InStr(1, sstring, "=(") + 1
eend = InStr(strt, sstring, ",")
physics(index).data1 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
strt = eend + 1
eend = InStr(strt, sstring, ")")
physics(index).data2 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
End If
If noc = 2 Then
strt = InStr(1, sstring, "=(") + 1
eend = InStr(strt, sstring, ",")
physics(index).data1 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
strt = eend + 1
eend = InStr(strt, sstring, ",")
physics(index).data2 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
strt = eend + 1
eend = InStr(strt, sstring, ")")
physics(index).data3 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
End If
If noc = 3 Then
strt = InStr(1, sstring, "=(") + 1
eend = InStr(strt, sstring, ",")
physics(index).data1 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
strt = eend + 1
eend = InStr(strt, sstring, ",")
physics(index).data2 = Val(Mid$(sstring, strt + 1, eend - strt - 1))
strt = eend + 1
eend = InStr(strt, sstring, ")")CamCaptain
Camera viewport editor

- Shows the car from the side, the top and the back at once.
- Marks every in-car camera position on all three views, with guide lines.
- Moves cameras by position, pitch, yaw and roll, adds cameras, and saves them to the game, with emergency backups.
From the original code: List1_Click - draws the car from the side, top and back and marks every camera position on all three · Visual Basic 6, 2005, written by hand.
Private Sub List1_Click()
Dim c As Long
Picture1.Cls
Picture2.Cls
Picture3.Cls
Picture1.Line (0, yo)-(Picture1.Width, yo + 2), QBColor(8), BF
Picture3.Line (0, yo)-(Picture1.Width, yo + 2), QBColor(8), BF
carcenterX = Picture1.Width / 2: carcenterY = Picture1.Height / 2 - s(wheelheight)
Picture1.Line (carcenterX - s(carwidth), carcenterY)-(carcenterX - s(carwidth), carcenterY - s(carheight))
Picture1.Line (carcenterX - s(carwidth), carcenterY - s(carheight))-(carcenterX + s(carwidth), carcenterY - s(carheight))
Picture1.Line (carcenterX + s(carwidth), carcenterY)-(carcenterX + s(carwidth), carcenterY - s(carheight))
Picture1.Line (carcenterX - s(carwidth), carcenterY)-(carcenterX + s(carwidth), carcenterY)
carcenterX = Picture1.Width / 2: carcenterZ = Picture1.Height / 2
Picture2.Line (carcenterX - s(carwidth), carcenterZ + s(carlenght))-(carcenterX - s(carwidth), carcenterZ - s(carlenght))
Picture2.Line (carcenterX - s(carwidth), carcenterZ - s(carlenght))-(carcenterX + s(carwidth), carcenterZ - s(carlenght))
Picture2.Line (carcenterX + s(carwidth), carcenterZ + s(carlenght))-(carcenterX + s(carwidth), carcenterZ - s(carlenght))
Picture2.Line (carcenterX - s(carwidth), carcenterZ + s(carlenght))-(carcenterX + s(carwidth), carcenterZ + s(carlenght))
carcenterX = Picture1.Width / 2: carcenterZ = Picture1.Height / 2 - s(wheelheight)
Picture3.Line (carcenterX - s(carlenght), carcenterZ)-(carcenterX - s(carlenght), carcenterZ - s(carheight))
Picture3.Line (carcenterX - s(carlenght), carcenterZ - s(carheight))-(carcenterX + s(carlenght), carcenterZ - s(carheight))
Picture3.Line (carcenterX + s(carlenght), carcenterZ)-(carcenterX + s(carlenght), carcenterZ - s(carheight))
Picture3.Line (carcenterX - s(carlenght), carcenterZ)-(carcenterX + s(carlenght), carcenterZ)
Dim d As Long
If Check2 = 1 Then
For c = 1 To List1.ListCount
GetPositions c
GetOrientations c
Picture1.Circle (s(Xpos) + xo, s(-Ypos) + yo), 5, QBColor(0)
Picture2.Circle (s(Xpos) + xo, s(-Zpos) + yo), 5, QBColor(0)
Picture3.Circle (s(-Zpos) + xo, s(-Ypos) + yo), 5, QBColor(0)
If Check1 = 1 Then
Picture1.Line (s(Xpos) + xo, s(-Ypos) + yo)-(s(Xpos) + xo, Picture1.Height), QBColor(0)
Picture1.Line (s(Xpos) + xo, s(-Ypos) + yo)-(Picture1.Width, s(-Ypos) + yo), QBColor(0)
Picture2.Line (s(Xpos) + xo, s(-Zpos) + yo)-(s(Xpos) + xo, 0), QBColor(0)
Picture3.Line (s(-Zpos) + xo, s(-Ypos) + yo)-(0, s(-Ypos) + yo), QBColor(0)
End If
Next
End If
GetPositions List1.ListIndex + 1
GetOrientations List1.ListIndex + 1
Picture1.Circle (s(Xpos) + xo, s(-Ypos) + yo), 5, QBColor(12)
Picture2.Circle (s(Xpos) + xo, s(-Zpos) + yo), 5, QBColor(12)
Picture3.Circle (s(-Zpos) + xo, s(-Ypos) + yo), 5, QBColor(12)
If Check1 = 1 Then
Picture1.Line (s(Xpos) + xo, s(-Ypos) + yo)-(s(Xpos) + xo, Picture1.Height), QBColor(12)
Picture1.Line (s(Xpos) + xo, s(-Ypos) + yo)-(Picture1.Width, s(-Ypos) + yo), QBColor(12)
Picture2.Line (s(Xpos) + xo, s(-Zpos) + yo)-(s(Xpos) + xo, 0), QBColor(12)
Picture3.Line (s(-Zpos) + xo, s(-Ypos) + yo)-(0, s(-Ypos) + yo), QBColor(12)
End If
End Sub