Re: Changing cars and fuel consumption

Kartik Mohta <[email protected]>
Newsgroups gmane.games.torcs.general
Message-ID <CABPY-Jc5K7FqJJxFkk_cajrr_ivzGsW9wK279pzAtMu-pfhmmw@mail.gmail.com>
I believe there are two ways to change this for the berniw robot.

1. The simpler option (at least for the berniw robot, may not apply to
others) is to add a section to the driver's default.xml file (eg
/usr/share/games/torcs/drivers/berniw/3/default.xml) specifying the
fuel per lap:

  <section name="berniw private">
    <attnum name="fuelperlap" val="3.0"/>
  </section>

Tune the val to whatever seems correct.

2. The other option is to recompile the robot code. The robot
calculates the initial fuel based on a max fuel per meter variable in
the code. For the berniw robot, you can change the value of the
MyCar::MAX_FUEL_PER_METER variable in src/drivers/berniw/mycar.cpp
file and recompile.

On Sat, Sep 1, 2012 at 7:34 PM, Schnuck68 <[email protected]> wrote:
>
> First of all I'm a long time fan of Torcs.
>
> When driving with the help of ABS and ASR and as a "rookie" you
> don't have to go through a difficult time or steep learning curve
> before it starts being fun.
> So it provides fun right from the start on different levels.
>
> Recently I prefer to race in a F1 car against opponents also in F1 cars.
> The drivers that are by default seated in "car-ow1" (means "openwheel" I
> guess)
> are not really hard opponents.
>
> So I prefer to take other drivers and change their ancestral cars to
> something
> more suitable. At the moment I play with driver "berniw" and let them race
> with
> the car "f1-vicente", which is a car I downloaded somewhere.
>
> This F1 car offers more traction, grip and overall speed.
>
> There's only one problem: They're not able to calculate their fuel
> consumption
> correctly. So those "berniw" drivers run out of fuel during the end of the
> race.
>
> I edited the "initial fuel" section in the file f1-vicente.xml, but to no
> avail.
> So I guess the initial fuel is actually calculated by the driver with the
> knowledge of their original car ?
>
> So, do I have to recompile something to make it work?
> What do I have to do?
>
> Thank you for your time.
>
> Greetings
>
> --
> View this message in context: http://old.nabble.com/Changing-cars-and-fuel-consumption-tp34377285p34377285.html
> Sent from the torcs-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Torcs-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/torcs-users



-- 
Kartik

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.