[Guide] How to enable and use the developer console.

Post Reply
User avatar
Cadde
Posts: 6806
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

[Guide] How to enable and use the developer console.

#1 Post by Cadde » 25 Oct 2013 17:18

How to enable the developer console

The developer console is not just a powerful tool to gain immediate access to certain game variables and commands for power users, mappers, modders and so on.
It's also something your average user might want to have enabled for reporting bugs, taking screenshots (though the new photo edit mode is good for that as well) and for mod users who want to see if that new mod he installed has any issues. Errors will be shown in red in the console so you don't have to check your game log to know if the mod worked or not.

What do i need to do to enable it?

Don't worry, this isn't advanced at all. Just follow these 5 simple instructions.

1. Locate your Euro Truck Simulator 2 home directory and config file

The home directory is where all your settings, profiles, mods, save files and in game screenshots are stored.
You can find it in your "My Documents\Euro Truck Simulator 2" folder.

Fig 1. Your ETS 2 home directory with the config file to edit for developer console.
[ external image ]


2. Open the config file with Notepad

Right click the file, select "Open with" and pick "Notepad". (If "Notepad" doesn't show up in the list then click on "Choose default program..." and find Notepad in there. (Post in thread if this is unclear to you)

Fig 2. Open the config file with Notepad.
[ external image ]


3. Change two lines to enable developer console in game

The two lines you need to change are:

Code: Select all

uset g_developer "0"    → Change the "0" to a "1"
uset g_console "0"      → Change the "0" to a "1"
Fig 3. Edit the config file.
[ external image ]


4. Save the file

In Notepad, click on "File" → "Save".

Fig 4. Save the file.
[ external image ]


5. Run the game, open and close your console to ensure it works

Start the game, press the "~" key (console key) to open and close the console.
Due to the many many keyboard layouts in the world this key may not have a "~" character on it. Therefore, press the key that is depicted in Fig 5.

Fig 5. The console open/close key.
[ external image ]


ALL DONE, YOU HAVE SUCCESSFULLY ENABLED DEVELOPER CONSOLE IN ETS 2!

____________________________________________________________________________________________________

Now, what can one do with the developer console activated?
Hold on, before we start using the console. Let me tell you about the TAB key. (That is the key below the one you used to open the console with)
Using the tab key you can list all commands available in the console and it also serves as an "auto completion" key. If you type a partial command you can press tab and get suggestions for the commands that match your input so far. Or if there's only one command that matches so far, it will be completed for you which can be quite useful.

Bug reports

By pressing SHIFT+F11 your game will take a screenshot AND save the coordinates in the same folder as the config file (see Fig 1.) that you can then paste into your bug reports using CODE tags.
Here's an example set of coordinates...

Code: Select all

 Nav issue ; [23/10/2013  20:18] (sec-0012-0011);-44831.8;112.729;-40232.4

Free roaming camera

By pressing the 0 (Zero) on the top row of numbers on your keyboard you enter the "developer camera" mode. This mode lets you (just like in photo editor mode) move your camera around the world freely.

Using the numpad (the collection of numbers on the far right of your keyboard) 8, 4, 5, 6 you can move Forwards, Sideways left, Backwards and Sideways right in the world.
Pressing 9 or 3 you can move up and down in the world.
Using your mouse you can look around.

This is useful for taking screenshots of your truck, especially when you have FXAA injectors active as the photo editor will not do so well with that.

But it's also useful when you need to get your truck out of a bind.
Say there's an AI glitch where the AI gets stuck at an intersection and refuses to move.
Entering developer camera mode you can look at where the traffic is stuck and you can also move the camera past that location, close to the road surface and pointing in the direction you want to be traveling.

Then by pressing F9 your truck (and trailer) will be teleported to that location. Thus saving you from having to restart the game.

Another possibility (for say video makers and people who want to show off cool stuff) for this teleport feature is that you can teleport as far away as you want.
If the camera is moving too slow for you then you can open the console and enter the following command...

Code: Select all

g_flyspeed X
Where "X" would be a number. 100 is the default speed, setting it to 1000 would make the camera 10 times as fast. Setting it to 10 would make the camera 10 times slower.

So imagine you wanted to skip a job or just record you parking your trailer with some recording software. You can use the developer camera to fly over to the location of delivery and press F9 (making sure you are close to ground or your truck will fall) and save yourself the time of driving between locations to get a shot at recording.

Additionally, according to Rhythmosaur, SCS have added scroll wheel control of this fly speed. So by scrolling the mouse scroll wheel, you can change the flyspeed up and down by some amount instead of issuing a console command.

Finally, a related and very useful console command is the "goto" command.
Using the coordinates i presented above for the bug report you could type in... (Copy pasting with CTRL+C and CTRL+V also works btw)

Code: Select all

goto -44831.8;112.729;-40232.4
And your developer camera would immediately be moved to that location on the map.

After 1.11.1 you can also issue the "goto" command with a city name. Such as...

Code: Select all

goto berlin
Which would take your camera to the city of Berlin in an instant. Really useful addition.
The developers are working on a fix for cities that contain non standard characters. (Going east cities for example, Łódź in Poland)


Simulation speed

A very nice feature is the "warp" console command.
It allows you to set the simulation speed of the game.
For example...

Code: Select all

 warp 0.8
Would make the game run at 80% the normal speed (without slowing down the graphics) so going at 90 kph will now feel like you are going at 72 kph instead. Personally i feel that having the game run at this rate makes it feel more realistic and you can take those tight turns a bit easier.
It no longer feels (in terms of real life) like you are taking a sharp highway turn at 115 kph.

One the other side of the spectrum, you can increase the warp speed to some high number and watch traffic flying by around you as well as seeing the sun and it's shadows move as if shot in stop motion mode. Cool (and time saving) effect for videos etc.


Set time

Don't like darkness? Running without lights because of performance reasons? Or maybe you want to advance time in game for some other reason?
There's a command for that too!

Code: Select all

g_set_time XX [YY]
Will set the game time of day to XX hours and optinally YY minutes.
For instance, if you want the time to be 1500 hours (3 pm) in the day then you use "g_set_time 15" and the time will advance to the specified time.
Likewise, if you want the time to be 0300 hours (3 am) in the night then you would use "g_set_time 3" and the time will advance to the specified time.
Using the optional second argument you can also set time with minutes. Such as "g_set_time 21 30" which would set the time to 9:30pm.

With special thanks to Moh1336 for the minutes argument.

Note that this will ALWAYS advance the time, if the time is 6 in the morning and you set the time to 5 in the morning then time will advance by 23 hours!
You cannot reverse time so be careful using this while you have a delivery to make.


Set weather

Did it just start to rain at the wrong time or are you tired of the sun? You can change the weather from sunlight to thunderstorm or from rain to sunlight in an instant.

Code: Select all

g_set_weather X f/i
Where X is a number representing the "weather index", 0 or 1 (larger numbers work as well, uneven numbers are rain and even numbers are sunny)
The last f/i is how fast you want that weather to be applied. If you supply an "f" (forced) that means the weather will switch right away.
If however you supply an "i" (intermediate) then the weather will gradually change to what you selected. (approximately 20 minutes game time)

Currently (version 1.11.1) there's only two weather types but that may change in the future.


Show fps

Will show your current Frames Per Second in the game.

Code: Select all

g_minicon 1
g_fps 1
You should now have a miniature console in the top left corner (after closing the main console window) that shows details about your FPS as well as some other performance numbers.

____________________________________________________________________________________________________

There are of course many more things one can do with the console, these where just a couple of highlights.
Last edited by Cadde on 02 Dec 2013 13:47, edited 3 times in total.
On extended hiatus.
User avatar
Reef
Posts: 3907
Joined: 27 Dec 2012 23:16
Location: Everywhere and nowhere baby

Re: [Guide] How to enable the developer console.

#2 Post by Reef » 25 Oct 2013 17:28

Great tut Cadde should help a lot of new members out 8-)

One slightly useless bit of information to add though the Key on the keyboard you call the console key is also called the tilde key (what does that mean i have no idea)

I can see your tut getting linked to for the foreseeable future ;)

Coincidently i did a similar tutorial many moons ago on crockettsetshouse but thats gone to the ether since crockett dumped the forum in the trash.
User avatar
n4gix
Posts: 1390
Joined: 18 Mar 2013 00:59
Location: Hammond, Indiana

Re: [Guide] How to enable the developer console.

#3 Post by n4gix » 25 Oct 2013 17:30

tilde: The tilde (/ˈtɪldə/, /ˈtɪldi/; ˜ or ~ ) is a grapheme with several uses. The name of the character comes from Portuguese and Spanish, from the Latin titulus meaning "title" or "superscription", though the term "tilde" has evolved and now has a different meaning in linguistics. Some may refer to it as a "flourish".

See: http://en.wikipedia.org/wiki/Tilde
Fr. Bill
Interests: Gauge Programming - 3d Max Modeling for Eaglesoft Development Group & Military Visualizations
It is not wise to contest forum moderators; they have more ways to admonish than you have of evading, (Shin'a'in Proverb) :)
User avatar
Cadde
Posts: 6806
Joined: 24 Apr 2013 18:08
Location: Have no fear, i am from the internets!

Re: [Guide] How to enable the developer console.

#4 Post by Cadde » 25 Oct 2013 17:34

Yeah Reef i know but thanks anyways. I just didn't think of it like that when i wrote the guide because some people will go like "Who is tilde and why isn't she in the kit... Oh never mind." .


EDIT: And as a 1337 G4M3R that has always been the "Console key" no matter what to me. On my layout it prints...

§ and ½
Last edited by Cadde on 25 Oct 2013 17:35, edited 1 time in total.
On extended hiatus.
User avatar
Reef
Posts: 3907
Joined: 27 Dec 2012 23:16
Location: Everywhere and nowhere baby

Re: [Guide] How to enable the developer console.

#5 Post by Reef » 25 Oct 2013 17:34

Thanks for that Bill now i know :) (why i never think of using wiki i'll never know)
User avatar
AlphaDiode
Posts: 64
Joined: 29 Jun 2013 23:01
Location: Ohio, USA

Re: [Guide] How to enable the developer console.

#6 Post by AlphaDiode » 28 Oct 2013 03:08

Wow great info! Thanks for sharing!
User avatar
n4gix
Posts: 1390
Joined: 18 Mar 2013 00:59
Location: Hammond, Indiana

Re: [Guide] How to enable the developer console.

#7 Post by n4gix » 28 Oct 2013 17:34

Reef wrote:Thanks for that Bill now i know :) (why i never think of using wiki i'll never know)
I actually use Google many times every day. It's ever so much faster to get the correct spelling of a questionable word than trying to use a dead-tree dictionary.

I've always questioned a teacher's sanity whenever they'd reply to a question of proper spelling with a curt "Look it up!" If you are unsure of the spelling, just how is one to "Look it up?" :roll:

As for the various Wiki sources around the web, I accept them as only a "first source approximation" for reliable answers. I would fail any student who dared to use them as a primary reference source in a paper. Many times though good reference citations are provided that will assist a researcher to dig deeper for more factual information.

I wish that SCS themselves would host an official Wiki for ETS2... :mrgreen:
Fr. Bill
Interests: Gauge Programming - 3d Max Modeling for Eaglesoft Development Group & Military Visualizations
It is not wise to contest forum moderators; they have more ways to admonish than you have of evading, (Shin'a'in Proverb) :)
User avatar
zrex01
Posts: 368
Joined: 22 Mar 2013 12:52
Location: Moncton N.B. Canada

Re: [Guide] How to enable the developer console.

#8 Post by zrex01 » 25 Nov 2013 16:50

Thanks for the information.
Got things working but I can't locate warp 0.8
is it in the config folder ???? :!:
User avatar
Reinhard
Posts: 4709
Joined: 20 Dec 2012 16:46
Location: Berlin, Germany

Re: [Guide] How to enable the developer console.

#9 Post by Reinhard » 25 Nov 2013 17:23

No file. Just type it. When console is active. Will work immediately.

Try higher settings like warp 3 and see what happens. Warp 0 for freezing everything, nice for taking pictures.
User avatar
ohaha
Posts: 11350
Joined: 07 Dec 2012 06:31
Location: Watchin' y'all
Contact:

Re: [Guide] How to enable the developer console.

#10 Post by ohaha » 25 Nov 2013 17:54

Code: Select all

g_set_time XX
will forward the time to the input value (careful, only forward, don't use it during a job)...
Retired, but still loving it.
Post Reply

Return to “Frequently Asked Questions”

Who is online

Users browsing this forum: No registered users and 4 guests