Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2

Author Topic: [0.9.1a] SSMS Controller  (Read 6441 times)

Razuhl

  • Ensign
  • *
  • Posts: 13
    • View Profile
[0.9.1a] SSMS Controller
« on: June 29, 2020, 08:01:13 AM »

SSMS Controller
GitHub - Releases

Dependencies

Features
  • Provides controller support for combat controls.
  • Freely configurable.
  • Comes with a free flight and a lockon orbiting control scheme.
  • Supports broadsides.
  • Default Mapping for XBox 360 Controller

The mod uses the mod menu(F12 by default) from SSMS QoL to allow configuring the features while in game. The settings are stored application wide.

FAQ

Can this be added to and removed from an ongoing save? Yes.

Can't see my controller, controller stopped working. The controller must be plugged in when the game starts and can not be disconnected throughout the game.

Can I still use keyboard and mouse? Yes the controller works alongside them. Joysticks with few buttons will need the keyboard. In order to use the mouse the controller steering can be switched off during combat.

Default Controls

Weapons are aimed automatically and individually, even if the player fires them as a linked group. Omni shields will be raised in the direction of the broadside(by default front) and are controlled by the AI afterwards. Activating autopilot disables controller steering.

Directional Steering



In this mode the left stick controls the facing of the ship. Triggers control forward and backward acceleration and bumpers allow strafing.

Orbital Steering (Requires Target)



The ship will face the target with the selected broadside while accelerating and strafing to reach the desired position automatically. The desired position is marked with a green pentagon. The left stick controls the relative position of the ship to the target. The triggers change the desired distance to the target.

Targeting



While targeting the combat is paused and the available targets can be cycled through using the bumpers. The targets are ordered by distance to the players ship. After selecting or clearing the target the battle resumes immediately.

Battle Menu



Combat is paused when the menu is open. The available menu entries can be cycled through using the bumpers. After selecting an entry the battle resumes immediately.
« Last Edit: August 03, 2020, 04:00:27 PM by Razuhl »
Logged

SirHartley

  • Global Moderator
  • Admiral
  • *****
  • Posts: 839
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #1 on: June 29, 2020, 01:36:52 PM »

Honestly, your mods are super interesting and seem to be very advanced, but there is a serious problem with how you name them.
All your names read like some kind of development tool.

If you want this, or any of your other cool stuff, to gain any attention, you should consider naming it something that is understandable on first look.
I thought this was an additional options menu until I read the description twice.

edit - for anyone reading this and wondering, This mod adds controller/gamepad support to Starsector.
edit2 - it is now a really nice mod post, well done!
« Last Edit: October 04, 2022, 03:03:15 PM by SirHartley »
Logged

Terethall

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #2 on: June 30, 2020, 08:10:33 AM »

Will try this out tonight. I can already predict that it needs more autoaim so the mouse+keyboard crowd can complain about the controller crowd and vice versa.

Out of curiosity, what does "supports broadsides" mean? Like, you can lock on to an enemy ship in a non-frontal manner or something?
Logged

Razuhl

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #3 on: June 30, 2020, 12:28:48 PM »

@SirHartley Yeah the documentation is done with the bare minimum, I got lots to do but since this isn't a steam release but instead a forums post, it's more beneficial to release it in parts anyways. Since you can bump it to the front everytime you expand on it. Plus I needed it out of the way.

@Terethall Exactly, targeting an enemy and switching to the orbital mode turns the left/front/right side to the enemy. You can select the broadside when opening the controller menu during battle. In the directional mode the broadside only dictates on which side an omni shield is being raised(after it was raised it is AI controlled).
Logged

Terethall

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #4 on: July 02, 2020, 03:56:50 PM »

When I use this mod, pressing tab to toggle from the tactical map to the regular battle screen and vice versa causes a fatal error with the message "Fatal: null Check starsector.log for more info." The log message that I think is relevant is below:

Spoiler
48050 [Thread-4] INFO  ssms.qol.ModPlugin  - CombatPlugin_Init
48244 [Thread-4] INFO  ssms.qol.ModPlugin  - loading settings
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - Found controller: Controller (XBOX 360 For Windows)
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with axis: Y Axis
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with axis: X Axis
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with axis: Y Rotation
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with axis: X Rotation
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with axis: Z Axis
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 0
48311 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 1
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 2
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 3
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 4
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 5
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 6
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 7
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 8
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 9
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - Found controller: HID-compliant consumer control device
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 0
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Consumer Control
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Numeric Key Pad
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 3
48312 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 4
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 5
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 6
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 7
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 8
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 9
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 10
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 11
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 12
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 13
48313 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 14
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 15
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 16
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 17
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 18
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 19
48314 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 20
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 21
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 22
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 23
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 24
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 25
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 26
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 27
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 28
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 29
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: Button 30
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - Found controller: HID-compliant system controller
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: System Power
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: System Sleep
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - with button: System Wake Up
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - Found controller: Gaming Mouse
48315 [Thread-4] INFO  ssms.controller.SSMSControllerModPlugin  - Found controller: 2.4G Mouse
52437 [Thread-4] INFO  org.histidine.chatter.combat.ChatterCombatPlugin  - Chatter plugin initialized
52437 [Thread-4] INFO  ssms.qol.ModPlugin  - CombatPlugin_Init
52505 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [chatterConfig.json]
52506 [Thread-4] INFO  ssms.qol.ModPlugin  - loading settings
54980 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at ssms.controller.EveryFrameCombatPlugin_Controller$PlayerShipCache.createSteeringController(EveryFrameCombatPlugin_Controller.java:131)
   at ssms.controller.EveryFrameCombatPlugin_Controller$PlayerShipCache.setShip(EveryFrameCombatPlugin_Controller.java:101)
   at ssms.controller.EveryFrameCombatPlugin_Controller.processInputPreCoreControls(EveryFrameCombatPlugin_Controller.java:328)
   at com.fs.starfarer.combat.oOOO.B.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

This happens when I'm only running this mod and its listed dependencies. It happens even in combat missions -- reproduction steps are enable the mod and its dependencies only, start Starsector, click missions, start any mission, deploy all ships, press tab.
Logged

Razuhl

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #5 on: July 03, 2020, 10:05:43 AM »

You can start/load a game and press F12 to bring up the configuration. Once you open the SSMSController menu option it writes the default configuration and the problem should be gone.
Logged

Terethall

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #6 on: July 03, 2020, 06:27:37 PM »

Thank you, that fixed it. I'm configuring it now; liking it as I test it out, but running into some questions:

1. It won't accept "-Z Axis" or any non-numerical value as the input for firing a weapon -- I suspect I would not be alone among many players in thinking the right-hand trigger button on a standard "Xbox for Windows" controller is the appropriate place for the "fire weapons" input.
2. There doesn't seem to be a strafing axis or any kind of input -- am I just missing it? It seems impossible to strafe at all with the controller, even though there's a perfectly good X Axis .
3. Y Axis inversion for Acceleration seems to do nothing. Pulling down on the left stick, which is to say providing a negative Y axis input, regardless of whether the Acceleration Inversion setting is true or false, always provides forward acceleration to the ship, when the Y Axis is used as the Acceleration input.

My feedback is that in general it's pretty good, I just wish I could strafe (or "sideways accelerate") on the X Axis and use a non-inverted Y Axis for forward/backward acceleration. There are a few button-only options I wish I could map to axes. It might be a good idea to pre-map for the most common controller layouts (Xbox for Windows, and DualShock... if there is a USB Dualshock???) and let users just pick from those configurations, as otherwise there's a bit of a steep learning curve. Once I get a mapping worked out that makes sense to me, I'll post it here along with a basic guide to get the mod working and setting it up, for anyone else that might benefit. But without being able to figure out a way to strafe, de-invert the Y axis for acceleration, and fire on the Z axis I'm going to keep using the keyboard for the moment.

I think I recall seeing a thread a long time ago where people responded to the idea of controller support with a mixture of disgust/anger/fear/heresy/etc. and I have to say, actually it works really well, and it's clear a lot of work went in under the hood here to get things to work (AI control of omni-shield direction is nice). Phase 2 design would include controls for the battle map, Phase 3 for the campaign, but controlling an individual ship actually feels quite nice, with the above caveats.
Logged

Razuhl

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #7 on: July 09, 2020, 03:20:37 AM »

Thx for the feedback.

The latest version fixes the inversion of axis and other rare cases. It also changes how targeting and menus handle, which freed up two buttons for strafing. It does require editing the previous mapping.

1. It won't accept "-Z Axis" or any non-numerical value as the input for firing a weapon -- I suspect I would not be alone among many players in thinking the right-hand trigger button on a standard "Xbox for Windows" controller is the appropriate place for the "fire weapons" input.

1. Button fields specify in their tooltip that they require a number, you can not map an axis to a single button only to button pairs that are exclusive.

2. There doesn't seem to be a strafing axis or any kind of input -- am I just missing it? It seems impossible to strafe at all with the controller, even though there's a perfectly good X Axis .

2. The X Axis should be part of the joystick, the ship is controlled by pointing the joystick in a direction. It's not a remapping of keys to controller signals, like third party tools do.

Mapping will change in the next refactor, so user will map their controller to something like an xbox 360 layout and the individual functions are a different category. Since users cannot be expected to map functions they don't know.
Should also allow displaying of indicators on screens to make it more akin with game standards.
Logged

Razuhl

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #8 on: August 03, 2020, 04:10:37 PM »

Released new version with button prompts and changed mapping. The user now maps buttons and axis of a typical game controller instead of individual functions. A default mapping for the xbox 360 controller is present if no former configuration exists.

To remove previous configuration the file "[starsector installation]/saves/common/SSMSQoL.json.data" has to be either deleted(removes all configured settings) or edited to remove the "SSMSController" property.

Code
{
  From Here ===>
  "SSMSController": [{
    ...
    "indicators#conf": "SSMSControllerIndicators",
    "primarySteeringMode": "ssms.controller.steering.SteeringController_FreeFlight",
    "usesConfigurationState": false
  }],
  <=== To Here
  "SSMSQoLSettings": [{
    ...

Requires the newest version from SSMSQoL.
« Last Edit: August 03, 2020, 04:13:02 PM by Razuhl »
Logged

DUBlajes

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #9 on: July 28, 2021, 10:57:26 AM »

I have a problem: I'm using DS4 with a PS4 controller and, even though the game recognises the controller, once configured it doesn't work.

Is there any solution?
« Last Edit: July 28, 2021, 01:54:08 PM by DUBlajes »
Logged

nocluewhatimdoing

  • Ensign
  • *
  • Posts: 31
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #10 on: July 28, 2021, 02:24:46 PM »

That's pretty shocking that there's no vanilla controller support, it'd work quite nicely
Logged

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #11 on: July 29, 2021, 01:03:51 PM »

VERY COOL

does this work with 95?
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Jaghaimo

  • Admiral
  • *****
  • Posts: 661
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #12 on: July 29, 2021, 01:32:23 PM »

There is a 0.95a release. Personally, I have never tested it, and I wonder how calls to obfuscated code work across platforms.
Logged

DUBlajes

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #13 on: July 30, 2021, 07:33:04 AM »

VERY COOL

does this work with 95?

Yes but, at least for me, doesn't work when using DS4Windows
Logged

MartialDoctor

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.9.1a] SSMS Controller
« Reply #14 on: January 04, 2023, 08:50:14 PM »

Is this mod still supported in the current version? I was thinking how I'd like to try out starsector with a controller...
Logged
Pages: [1] 2