Suggestion : a quick character switch

For discussion about Trine 2, released in December 2011 on Windows, Mac, Xbox, PlayStation Network and later on Linux and Wii U.
Nono
Posts: 31
Joined: Mon Sep 13, 2010 2:11 am

Suggestion : a quick character switch

Postby Nono » Fri Dec 23, 2011 5:38 pm

Hi,

People who tried Trine 2 told me that character switching is like in Trine 1. When all available characters are controlled by a player, it means pausing the game and go to the inventory, then choosing one character each, and go back to the game. This system works well, but players have to be cut from the action a few seconds.

Characters switching without pausing the game could be a great idea too. Here is an example of what I'm thinking about, assuming we are in 3 players coop', or in 2 player coop' when the knight is dead :
- The thief pushes "next character" button, because she wants to be the wizard.
- The player who controls the wizard gets an invitation to switch his character for the thief. The invitation could be for example a little pop up in a corner of the screen.
- The wizard can accept or deny the switching invitation.[/list]

This very simple and quick system could allow people to stay focused in the action, without pausing the game.

Perhaps developpers have already thought about such a system, and they were problems I never thought about... What is your opinion about that ?

User avatar
FB_JussiE
Posts: 267
Joined: Wed Nov 23, 2011 4:09 pm
Location: Finland
Contact:

Re: Suggestion : a quick character switch

Postby FB_JussiE » Fri Dec 23, 2011 6:06 pm

Hello Nono

That actually is the way the game handles the character switching in 3player classic mode co-op.

When all characters are taken and one wants to switch character the other player he wants to switch with gets a flashing portrait to lower left corner of the screen telling that other player wants to switch characters with you.

User avatar
FB_Lauri
Posts: 903
Joined: Fri Mar 11, 2005 1:51 pm

Re: Suggestion : a quick character switch

Postby FB_Lauri » Fri Dec 23, 2011 6:07 pm

There should be already a system where anyone who wants to switch character opens a 5 second window indicated by the flashing character portrait in the lower left corner. On consoles it opens the possibility to anyone, on PC/Mac it opens with the character player wants to switch to.

Edit: Jussi was there first, heh. :D

Nono
Posts: 31
Joined: Mon Sep 13, 2010 2:11 am

Re: Suggestion : a quick character switch

Postby Nono » Fri Dec 23, 2011 6:37 pm

It's wonderful !My crazyest dreams become true :mrgreen:

I will practice physical torture to those who tells craps about that, and thank you for this system !

darthyoda6
Posts: 7
Joined: Sat Nov 12, 2011 9:16 pm

Re: Suggestion : a quick character switch

Postby darthyoda6 » Sat Dec 24, 2011 7:29 am

So when you see the character flickering, how do you switch to that character, or allow that person to switch to your character?

fb_jlarja
Posts: 219
Joined: Fri Nov 11, 2011 4:45 pm

Re: Suggestion : a quick character switch

Postby fb_jlarja » Sat Dec 24, 2011 9:27 am

darthyoda6 wrote:So when you see the character flickering, how do you switch to that character, or allow that person to switch to your character?


Just press next or previous character, if playing on gamepad (left and right shoulder button) or corresponding character button if playing on keyboard and mouse (1, 2, 3). For example, if wizard's face is flickering, press 1 to change with him.

I've been told that there's some bugs in the system, though I didn't actually test it very thoroughly myself. If you have trouble, try holding down change button.

We have actually implemented an improved system with better GUI, but it didn't make it to the latests patch (it will probably be in the next one). The basic idea will remain the same as it is now, however.

-JLarja

User avatar
Kein
Posts: 169
Joined: Sat Aug 29, 2009 5:34 pm
Location: Soviet Empire
Contact:

Re: Suggestion : a quick character switch

Postby Kein » Sat Dec 24, 2011 7:20 pm

There is bugs, yeah. Sometimes the icon does not appears, i guess it is ping/latency related issue.

User avatar
MAN-biker
Posts: 7
Joined: Mon Dec 26, 2011 4:35 am
Location: Russian Federation, Moscow
Contact:

Re: Suggestion : a quick character switch

Postby MAN-biker » Mon Dec 26, 2011 4:51 am

Hello, guys. I just finished re-play Trine (1) and i used the mouse wheel to switch characters (it's very handy to me switch characters by wheel instead of switching weapons type). Now i start to play Trine 2 and stuck with a controls: i can config my GamePad to use PREVIOUS \ NEXT character actions, but can't do that using keyboard+mouse! WHY?! I want to switch PREVIOUS\NEXT characters by mouse wheel (or a pair of keys on a keyboard at least) but have no that option. Please, can you add this options?
Thanks.
PS: Trine 1 & 2 are BRILLIANT games, nearly like "The Lost Vikings" series, but much better graphics and PERFECT stereo 3D!!! But this controls thing at Trine 2... :cry:
Image
Image

fb_jlarja
Posts: 219
Joined: Fri Nov 11, 2011 4:45 pm

Re: Suggestion : a quick character switch

Postby fb_jlarja » Mon Dec 26, 2011 11:01 am

MAN-biker wrote:Hello, guys. I just finished re-play Trine (1) and i used the mouse wheel to switch characters (it's very handy to me switch characters by wheel instead of switching weapons type). Now i start to play Trine 2 and stuck with a controls: i can config my GamePad to use PREVIOUS \ NEXT character actions, but can't do that using keyboard+mouse! WHY?! I want to switch PREVIOUS\NEXT characters by mouse wheel (or a pair of keys on a keyboard at least) but have no that option. Please, can you add this options?
Thanks.
PS: Trine 1 & 2 are BRILLIANT games, nearly like "The Lost Vikings" series, but much better graphics and PERFECT stereo 3D!!! But this controls thing at Trine 2... :cry:


If you go to Controller Configuration menu, click on any of the "Select Wizard/Thief/Warrior" and roll the wheel, it should bind mouse wheel for character change (roll up for next, down for previous).

-JLarja

User avatar
MAN-biker
Posts: 7
Joined: Mon Dec 26, 2011 4:35 am
Location: Russian Federation, Moscow
Contact:

Re: Suggestion : a quick character switch

Postby MAN-biker » Mon Dec 26, 2011 3:56 pm

fb_jlarja wrote:
MAN-biker wrote:...to switch PREVIOUS\NEXT characters by mouse wheel...

If you go to Controller Configuration menu, click on any of the "Select Wizard/Thief/Warrior" and roll the wheel, it should bind mouse wheel for character change (roll up for next, down for previous).
-JLarja

Yes, but it works VERY buggy: it always select ONE of three characters, but if you try to roll wheel very strong, sometimes you can catch another one, but in very rare case, generally selects certain character.

PS: Thanks for your so fast answer, i love your team!
Image
Image

fb_jlarja
Posts: 219
Joined: Fri Nov 11, 2011 4:45 pm

Re: Suggestion : a quick character switch

Postby fb_jlarja » Mon Dec 26, 2011 6:54 pm

MAN-biker wrote:
fb_jlarja wrote:
MAN-biker wrote:...to switch PREVIOUS\NEXT characters by mouse wheel...

If you go to Controller Configuration menu, click on any of the "Select Wizard/Thief/Warrior" and roll the wheel, it should bind mouse wheel for character change (roll up for next, down for previous).
-JLarja

Yes, but it works VERY buggy: it always select ONE of three characters, but if you try to roll wheel very strong, sometimes you can catch another one, but in very rare case, generally selects certain character.

PS: Thanks for your so fast answer, i love your team!


It sounds like your mouse (driver) may be doing something we didn't expect. It should change the character once per mouse wheel click. Do you have the sort of mouse with a wheel that clicks when it is rolled or do you have one of the smooth wheel mice? If you have a smooth wheel mouse, it may not work that well.

There are ways to modify how the controllers are used, if you are up to some text file editing. I recently wrote instructions on how to bind 1, 2 and 3 to wheel up, wheel button push and wheel down. I'll paste the whole controller FAQ/Howto here, since we don't yet have it published:

1. Simple

1.1. Where are keyboard and gamepad binds saved to and how can I modify them?

All binds included are in game's compressed data files and are not directly viewable or modifiable. To make custom modifications, you must first edit the binds in controller config menu. This makes the game save modified version to UserBinds folder under game's configuration folder.


1.2. Where is game's configuration folder?

Games configuration folder is on Windows systems located in %appdata%\Trine2. This usually corresponds to something like Users/johnsmith/AppData/Roaming/Trine2. Easiest way to navigate to the folder is to just copy paste %appdata%\Trine2 to explorers address bar.

On OS X systems configuration folder is in users home folder's Library/Trine2 folder.


1.3. So what are all these files in UserBinds folder?

For every controller that has been configured, there are four files: one for each character and one for GUI. Files are named like "User_Custom_[index_]GUI_Binds_for_[Controller_name][_Controller_ID].txt". Some parts may be missing: Keyboards and mice don't have [index_] and [_Controller_ID] parts. Note that for keyboards and mice there will be separate files.


1.4. Some thumb stick on my gamepad work backwards. How can I fix this?

First you need to use game's Controller Configuration menu and change some binding, so that game will generate user custom binds files to UserBinds folder. Then for each of controller's four bindings files, do the following:

1) Open file and find section labeled [Controller]. It should look something like this:

[Controller]

IDNumber = 1
IDString = Logitech Cordless RumblePad 2 [C219046D-0000-0000-0000-504944564944ID4]
ControllerType = 3
ControllerSubType = 6

2) To the end of [Controller] section, add following line:

InvertAxis = JoystickAxis3

If you need to invert more axises, or some other axis than 3, just add more lines and replace 3 with whatever value you wish (numbering starts from 1. Usually left thumb stick is axises 1 and 2, right thumb stick 3 and 4, but there may be triggers or some other stuff there too, or they may be completele different). Note that both labels "InvertAxis" and "JoystickAxis" are case sensitive. Make sure to write them correctly.

Extra: Due to a bug, adding InvertAxis for any character will invert the axis everywhere else too, unless you are using multiple keyboards and mouse mode. There is a fix for this (it is needed for mkam mode, thus enabled there), but we don't want to unnecessarily apply it without some more testing. It will probably get applied at some point though.


1.5. I wish to add another key to jump/move left/something else

First you need to use game's Controller Configuration menu and change some binding, so that game will generate user custom binds files to UserBinds folder. Then for each of controller's four bindings files, do the following:

1) Open file and find section labeled [Bindings]. There should be lines looking something like this:

jump = 1, Button, Undefined, 2
sword = 1, Button, Undefined, 0
hammer = 1, Button, Undefined, 0

This is the long binding form, but we can use shorter and easier to read form here.

2) Add line corresponding to action you wish to Bind. For example, if you wish to make your character jump from "U", add line

jump = KeyU

For gamepads, this could be

jump = JoystickButton3


TODO:

- List of keynames, button names, axis names (this is already in binds_readme.txt, although that list is not quite up to date)
- List of bindings (probably makes most sense to copy these from keyboard and mouse binds and default XInput gamepad binds. That way we get default bindings in human readable form too).

2. Advanced

Warning: Before going to advanced questions and answers, some technical things need to be discussed. Stuff here gets pretty complicated, so unless you have a passion for config files, you may wish to settle with simple tweaks described above.

General note: Pretty much everything is case sensitive, including file names if you are running case sensitive file system (Linux, some configurations of OS X).


2.1. Override binds

For more complex tweaks, rather than modifying files in UserBinds directory, you may want (and in some cases need) to use override binds. To do that, create folder named "OverrideBinds" to UserBinds folder. Inside that folder, you can create folders named "Controller_X", where X is a number between 0 and 15. Controllers 0 to 3 correspond to XInput controllers (XBox 360 gamepad and compatibles), 4 to 9 correspond to other (DirectInput) gamepads, 10 to 15 correspond to keyboard and mouse controllers. Each "Controller_X" folder should include binds for gui and all characters, named gui_binds.txt, wizard_binds.txt, thief_binds.txt and warrior_binds.txt.

Note that with override binds it is possible to make one controller appear as many. That way you could leave normal version of controller (for example first keyboard and mouse, controller 10) as it is and add a modified version (for example, keyboard and mouse 6, or controller 15) instead of replacing the original. In that case, however, you must heavily modify gui_binds.txt not to include overlapping keys, as having same physical controller correspond to two logical ones will make keypresses happen twice (you couldn't open gameplay menu, for example, since it would be immediately closed by following second ESC press).


2.2. Binds File Format: [Controller] Section

Each binds file has a [Controller] section. If file is for more than one physical controller, like with keyboard and mouse, there's a section for each controller. Here's two examples from keyboard and mouse binds:

[Controller]

IDNumber = 1
IDString = DirectInput System Keyboard
ControllerType = 1
ControllerSubType = 6

[Controller]

IDNumber = 2
IDString = System Mouse
ControllerType = 2
ControllerSubType = 6


Take note of IDNumber, each controller must have its own. In [Bindings] section (see below) each binding must be tied to a controller defined by an IDNumber.

IDString specifies which physical controller to use. IDString can be obtained from user custom binds.

Controller type specifies whether controller is keyboard, mouse or gamepad (or more generally, joystick). Either a number or keyword can be used. Interesting keywords and numbers are the following:

Number Keyword
1 Keyboard
2 Mouse
3 Joystick

ControllerSubType should always be 6 (that means "General").


2.2.1 Binds File Format: Emulated Elements and Inverted Axises

Inverting axises was already discussed in Simple section, so we just skip it here. Emulated elements refer to handling one type of element, like a thumb stick axis, as other kind of element, like button. To create emulated elements, a line starting with keyword EmulatedElement is added to [Controller] section (see below for examples). To use emulated element, binding line referring to EmulatedX, where X is the number of emulated element, is used (see further below for examples). There are several conversions available:

Pair of axises to pointer:

EmulatedElement = Pointer, JoystickAxis1, JoystickAxis2

Point-of-view hat (or dpad) to pair of axises:

EmulatedElement = Axis, JoystickPOVHat1

Axis to pair of buttons:

EmulatedElement = Button, JoystickAxis1

Point-of-view hat to quartet of buttons

EmulatedElement = Button, JoystickPOVHat1

Mouse wheel to pair of buttons

EmulatedElement = Button, MouseWheel

As stated above, emulated elements are referred with keyword EmulatedX, where X is number of element. Number depends on how many Emulated elements line [Controller] section has. Each line represents certain number of elements: one for pointer, two for button pair, four for button quarted and so on. For example, if you have one axis changed to button pair, those buttons will be referred as Emulated1 and Emulated2. If you add a pointer, it will be referred as Emulated3 and so on.


2.3. Binds File Format: [Bindings] Section

There are two formats for bindings. The one used in user custom binds files represents more closely the actual low level information of binding line, the other, shorter one is designed to be more human-readable. It is ok to mix them together. Format in user custom binds files looks like this:

breakObject = 1, Button, Undefined, 16
up = 1, Button, Undefined, 17
jump = 1, Button, Undefined, 17

Translate that to human-readable format and you get:

breakObject = 1, KeyQ
up = 1, KeyW
jump = 1, KeyW

Another examples from gamepad binds file:

moveHorizontal = JoystickAxis1
moveVertical = JoystickAxis2
moveDirection = JoystickPOVHat1
use = JoystickButton2
jump = JoystickButton3

The first word on a line is name of binding, the first number is controller IDNumber (see [Controller] Section above), last one specified the button, thumb stick axis, mouse wheel etc. referred. As you can see, the human-readable format includes type of element (button, axis, etc.) while for long format it is specified separately.

Note: Emulated elements are specified like this:

ropeWindUp = Emulated1
ropeSwingRight = Emulated2

That is an actual example thief rope swinging using dpad. Corresponding EmulatedElement line is

EmulatedElement = Button, JoystickPOVHat1


2.4. Questions and Answers

If you just skipped here and have trouble understanding something, please take a look at 2.1, 2.2 and 2.3. If you still have trouble, feel free to post to forums.


2.4.1. How do I get override binds files for keyboard and mouse? UserBinds folder has separate binds for keyboard and mouse, but override binds need just one?

You need to combine each User_Custom binds for keyboard with corresponding User_Custom binds for mouse. To do that:

1) Copy keyboard bindings files to override binds folder
2) Rename override bindings files to gui_binds.txt, wizard_binds.txt, thief_binds.txt and warrior_binds.txt
3) Open mouse bindings file and copy paste [Controller] section and [Bindings] section to override bindings file
4) Change IDNumber specified in [Controller] section copied from mouse file to 2
5) Change all controller IDNumbers in [Bindings] section (the first number after equal sign ("=") on each line) copied from mouse file to 2

Note: User_Custom binds can be created by modifying any binding of the controller in Controller Configuration menu.


2.4.2. How do I bind character change to mouse wheel so that rolling up changes to wizard, rolling down to warrior and pressing wheel button to thief?

First you need to create override binds (see above). You don't need to change GUI binds, but you need to change bindings for every character. So do the following for each character's bindings file:

1) Add to mouse controller section following line:

EmulatedElement = Button, MouseWheel

If the line already exists, you don't need to add it again.

2) Add following lines to [Bindings] section

selectWizard = 2, Emulated1
selectThief = 2, MouseButtonMiddle
selectWarrior = 2, Emulated2

3) If the EmulatedElement line mentioned in 1) isn't the first one in that controller section, change Emulated1 and Emulated2 to values that correspond to the EmulatedElement line.

4) If IDNumber of mouse isn't 2, change the IDNumber on binds lines to correct one.


2.4.3. How do I bind weapon change (or any other activity) to keyboard key G (or any other key) while playing with gamepad?

First you need to create override binds for your gamepad. Once done, edit the thief_binds.txt and warrior_binds.txt:

1) Add following [Controller] section for keyboard:

[Controller]

IDNumber = 2
IDString = Any keyboard
ControllerType = 1
ControllerSubType = 6

2) Add following binding to [Bindings] section

pushToTalk = 2, KeyG


Note that since IDString specified in [Controller] section doesn't specify any particular keyboard, the first one will be used. This will only matter, of course, if you are using multiple keyboards and mice mode.


2.4.4. How can I use one keyboard and two mice to play local multiplayer?

Note: Normal keyboards have trouble detecting too many buttons pressed at once. Even if you can manage the hassle of two people at one keyboard, the end result may still be dissatisfactory. We really recommend rather investing to another keyboard.

First create User_Custom binds files for keyboard and both mice (you need to turn on multiple keyboard and mouse mode for that). Then:

1) Create two sets of override binds using the same keyboard but different mice for both
2) Modify the binding lines so that each set of binds has different keys bound. This is especially important for GUI, although you can probably just delete most of the bindings

Note that if you change from multiple keyboards and mice mode to normal mode, the override binds may not work correctly and may mess up your normal binds. If that happens, delete or rename corresponding Controller_X folders in OverrideBinds folder.

User avatar
MAN-biker
Posts: 7
Joined: Mon Dec 26, 2011 4:35 am
Location: Russian Federation, Moscow
Contact:

Re: Suggestion : a quick character switch

Postby MAN-biker » Mon Dec 26, 2011 8:53 pm

fb_jlarja wrote:It sounds like your mouse (driver) may be doing something we didn't expect.
It should change the character once per mouse wheel click.

But it doesn't work. Selection (3 heads at left upper corner) fast jumps to another character, but returns to current char.
If I scroll a wheel VERY strong and fast it can jumps and stuck at random character, but in any case, 1-click of wheel return me to current character.
I have tested all versions from 1.07 to 1.10 - all the same.

fb_jlarja wrote:Do you have the sort of mouse with a wheel that clicks when it is rolled or do you have one of the smooth wheel mice?
If you have a smooth wheel mouse, it may not work that well.

No i have tried a pair of perfect mice (Logitec MX-310 and my favorite A4Tech X7 XL-755K - it's a programmable mouse, but wheel is NOT re-binded to anything) and both of mice works identically as I told you before.

fb_jlarja wrote:...I recently wrote instructions on how to bind 1, 2 and 3 to wheel up, wheel button push and wheel down...

Understood, but you told before it's possible to bind a wheel to CHANGE characters sequentially (as it was at Trine 1 and how it works here in Trine 2, but when you play using gamepad - PREVIOUS\NEXT), NOT binding one key to one character.
Image
Image

fb_jlarja
Posts: 219
Joined: Fri Nov 11, 2011 4:45 pm

Re: Suggestion : a quick character switch

Postby fb_jlarja » Tue Dec 27, 2011 12:01 am

MAN-biker wrote:Understood, but you told before it's possible to bind a wheel to CHANGE characters sequentially (as it was at Trine 1 and how it works here in Trine 2, but when you play using gamepad - PREVIOUS\NEXT), NOT binding one key to one character.


Ahem, seems to have broken in one of the patches. Not something that our testers would test very often :oops: . I'll have to take a look at this when I'm back to work (which is some time next week).

-JLarja

User avatar
FB_Lauri
Posts: 903
Joined: Fri Mar 11, 2005 1:51 pm

Re: Suggestion : a quick character switch

Postby FB_Lauri » Wed Dec 28, 2011 1:42 am

fb_jlarja wrote:
MAN-biker wrote:Understood, but you told before it's possible to bind a wheel to CHANGE characters sequentially (as it was at Trine 1 and how it works here in Trine 2, but when you play using gamepad - PREVIOUS\NEXT), NOT binding one key to one character.


Ahem, seems to have broken in one of the patches. Not something that our testers would test very often :oops: . I'll have to take a look at this when I'm back to work (which is some time next week).

-JLarja


It's nice to spend vacation knowing whats waiting at work :)

We'll try to pile-up as much of bugs as we can for you :D

User avatar
MAN-biker
Posts: 7
Joined: Mon Dec 26, 2011 4:35 am
Location: Russian Federation, Moscow
Contact:

Re: Suggestion : a quick character switch

Postby MAN-biker » Thu Dec 29, 2011 2:24 am

Thanks, and please look at this topic:
viewtopic.php?f=15&t=4043

This font should work for Trine 2 too.
Image
Image


Return to “Trine 2”

Who is online

Users browsing this forum: No registered users and 5 guests