Godot Version
Godot 4.5.1-stable
Question
I desire to make a open source game based in the Carnivores series, but i have a insertenty about this. The code bellow is a modified version of the Carnivores 2 _res.txt file, i want to know how i can port this to gdscript. Note that already have made some export variables to my res.gd file.
weapons {
{
name = ‘Tranq Rifle’
file = ‘tranq.car’
pic = ‘.tga’
shots = 6
power = 2.5
fall = 1
loud = 2
rate = 2
reload= 1
}
{
name = ‘M975 Pistol’
file = ‘pistol.car’
pic = ‘bullet1.tga’
power = 2
prec = 0.8
loud = 0.8
rate = 1.6
shots = 8
}
{
name = ‘KS-23 Shotgun’
file = ‘shotgun.car’
pic = ‘bullet2.tga’
power = 1
prec = 0.3
loud = 1.5
rate = 1.0
trace = 6
shots = 7
}
{
name = ‘DB Shotgun’
file = ‘dbsgun.car’
pic = ‘bullet2.tga’
fall = 1
power = 1
prec = 0.2
loud = 1.9
rate = 1.2
trace = 6
shots = 6
reload= 2
}
{
name = ‘CrossBow’
file = ‘cbow.car’
pic = ‘bullet4.tga’
shots = 6
power = 6
prec = 1.0
loud = 0.4
rate = 1.0
}
{
name = ‘SemiAuto Rifle’
file = ‘rifle.car’
pic = ‘bullet3.tga’
power = 4
prec = 1.8
loud = 1.5
rate = 1.6
shots = 15
}
} //==== end of weapons =========//
characters {
{
name = ‘Hunter’
file = ‘hunter1.car’
ai = 0
health = 1
}
{
name = ‘Moschops’
file = ‘mosh.car’
ai = 1
wlkspeed = 0.3
runspeed = 0.6
health = 2
mass = 0.15
}
{
name = ‘Halszkaraptor’
file = ‘.car’
wlkspeed = 0.32
runspeed = 0.9
ai = 2
health = 2
mass = 0.1
}
{
name = ‘Dimorphodon’
file = ‘dimor2.car’
wlkspeed = 1.3
runspeed = 1.5
ai = 3
health = 1
mass = 0.05
}
{
name = ‘Pteranodon’
file = ‘ptera.car’
wlkspeed = 1.3
runspeed = 1.5
ai = 4
health = 1
mass = 0.25
}
{
name = ‘Dimetrodon’
file = ‘dimet.car’
wlkspeed = 0.3f
runspeed = 0.6f
ai = 5
health = 3
mass = 0.22
}
{
name = ‘Mamenchisaurus’
file = ‘.car’
ai = 6
mass = 9
length = 12
wlkspeed = 0.2
radius = 400
health = 1024
basescore = 0
smell = 0.4
hear = 0.8
look = 0.6
shipdelta = 168
}
{
name = ‘Oryctodromeus’
file = ‘.car’
ai = 10
wlkspeed = 0.4
runspeed = 1.6
mass = 1.5
length = 3.9
radius = 320
health = 20
basescore = 5
smell = 0.8
hear = 1.0
look = 0.4
shipdelta = 48
}
{
name = ‘Falcaris’
file = ‘.car’
ai = 11
scale0 = 1200
scaleA = 600
wlkspeed = 0.28
runspeed = 0.75
mass = 0.8
length = 2.9
radius = 280
health = 25
basescore = 6
smell = 0.4
hear = 0.8
look = 0.6
shipdelta = 16
}
{
name = ‘Beipianosaurus’
file = ‘.car’
ai = 12
mass = 7
wlkspeed = 0.36
runspeed = 0.96
length = 5.8
radius = 480
health = 25
basescore = 7
smell = 0.4
hear = 0.8
look = 0.6
shipdelta = 128
}
{
name = ‘Pachyrhinosaurus’
file = ‘.car’
ai = 14
mass = 2.6
scale0 = 1200
scaleA = 100
runspeed = 1.2
wlkspeed = 0.30
length = 4.6
radius = 400
kradius = 300
aggress = 16
health = 25
basescore = 9
smell = 0.6
hear = 0.5
look = 0.4
shipdelta = 108
}
{
name = ‘Qianzhousaurus’
file = ‘.car’
ai = 13
mass = 0.5
length = 4.2
wlkspeed = 0.428
runspeed = 1.2
jumpspeed = 1.1
swimspeed = 0.4
radius = 256
kradius = 256
aggress = 130
health = 15
basescore = 10
scale0 = 1000
scaleA = 600
smell = 1.0
hear = 0.3
look = 0.5
shipdelta = 0
danger = TRUE
}
{
name = ‘Velociraptor’
file = ‘.car’
ai = 15
mass = 0.51
length = 4.0
wlkspeed = 0.428
runspeed = 1.5
jumpspeed = 1.3
swimspeed = 0.4
radius = 256
health = 15
kradius = 256
aggress = 160
basescore = 12
scaleA = 400
smell = 1.3
hearK = 0.7
lookK = 0.5
shipdelta = -32
danger = TRUE
}
{
name = ‘Becklespinax’
file = ‘.car’
ai = 16
mass = 1.6
length = 5.9
wlkspeed = 0.70
runspeed = 1.6
swimspeed = 0.5
jumpspeed = 1.4
radius = 256
kradius = 300
health = 20
aggress = 180
basescore = 25
scaleA = 400
smell = 1.1
hearK = 0.6
lookK = 0.6
shipdelta = 60
danger = TRUE
}
{
name = ‘Ceratosaurus’
file = ‘.car’
ai = 17
mass = 4.2
length = 7.8
radius = 256
health = 30
wlkspeed = 0.75
runspeed = 2.2
kradius = 350
basescore = 18
aggress = 210
scaleA = 400
smell = 1.2
hearK = 0.7
lookK = 0.6
shipdelta = 96
danger = TRUE
}
{
name = ‘Maip’
file = ‘.car’
ai = 17
mass = 4.2
length = 7.8
radius = 256
health = 30
wlkspeed = 0.75
runspeed = 2.2
kradius = 350
basescore = 18
aggress = 210
scaleA = 400
smell = 1.2
hearK = 0.7
lookK = 0.6
shipdelta = 96
danger = TRUE
}
{
name = ‘Tyrannosaurus’
file = ‘.car’
ai = 18
mass = 6
length = 10.5
radius = 400
wlkspeed = 0.76
runspeed = 2.49
swimspeed = 0.70
kradius = 380
health = 1024
basescore = 25
smell = 0.85
hear = 0.8
look = 0.8
shipdelta = 168
danger = TRUE
}
} //===== end of characters ==========//
prices {
start = 100
area = 20
area = 35
area = 50
area = 100
area = 200
area = 300
area = 500
dino = 10
dino = 15
dino = 20
dino = 30
dino = 50
dino = 100
dino = 250
dino = 300
dino = 500
dino = 1000
weapon = 20
weapon = 150
weapon = 200
weapon = 250
weapon = 300
acces = 0
acces = 5
acces = 10
acces = 15
}