How hard would it be to mod the keyboard so there.....

Freeform discussion about anything related to modding Transcendence.
Post Reply
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

How hard would it be to mod the keyboard so there would be two alternative ship-rotation keys (one left and one right) or key-combinations that would rotate the the playership one facing each time you hit the key, rather than continuously rotate the ship as long as you hold the key? I like to sit at long range and snipe at stationary targets with direct-fire weapons, and this would be a lot easier if I could rotate my ship just one facing when I want to. As it is now, unless I'm piloting a very slow-turning ship, when I try to rotate just one facing I usually overshoot and rotate two or three.

For me the most natural setup would be one where the ship rotates normally using just the left & right arrow keys, but if you hold the Alt key and hit the right arrow key it'd rotate just one facing clockwise. Conversely, if you hold the Alt key and hit the left arrow key it'd rotate just one facing counter-clockwise. If that's not doable, then having two separate keys would be OK (maybe the Delete key for one facing clockwise and the End key for one facing counter-clockwise).
"A good ship should not look like a plumber's nightmare."
- Atarlost
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

If you go into "Settings.xml" you can edit what key does what to your heart's content, but I don't think you can add new functions for keys to do.
(unless maybe you can do a key="=(lambda)"???)
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

Drako Slyith wrote:If you go into "Settings.xml" you can edit what key does what to your heart's content, but I don't think you can add new functions for keys to do.
(unless maybe you can do a key="=(lambda)"???)
Thanks Drako. :) At your suggestion I just checked out the settings.xml file and see that indeed, the key-mapping part of the solution can be addressed there. However, that still leaves me in need of help on how to limit the ship's rotation to one facing per key strike.

Anyone else have a an idea?
"A good ship should not look like a plumber's nightmare."
- Atarlost
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

i think that would require work on Georges part...
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

If you could do the lambda (I don't think you can, but maybe) you could try this.

Code: Select all

(lambda nil
(block (canTurn turnNumber)
(if canTurn
(block nil
RotateRight
)
)
(if (not canTurn)
(setq turnNumber (add turnNumber 1))
(if (geq turnNumber 10)
(setq canTurn true)
)
)
)
)
That would make it turn only 1/10 times the key is pressed. I think you should be able to tap it out. If not, increase the "10" in the code until you are happy with it. (this hasn't been tested)
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

sdw195 wrote:i think that would require work on Georges part...
Thanks sdw195. Does that mean I should have posted this in the "Ideas & Suggestions" section of the forum?
Drako Slyith wrote:If you could do the lambda (I don't think you can, but maybe) you could try this.

Code: Select all

(lambda nil
(block (canTurn turnNumber)
(if canTurn
(block nil
RotateRight
)
)
(if (not canTurn)
(setq turnNumber (add turnNumber 1))
(if (geq turnNumber 10)
(setq canTurn true)
)
)
)
)
That would make it turn only 1/10 times the key is pressed. I think you should be able to tap it out. If not, increase the "10" in the code until you are happy with it. (this hasn't been tested)
Thank you again Drako. Unfortunately that all went way over my head. :? I'm going to have to spend more time reading tutorials 'til I figure out how to test it.
Last edited by Yama on Tue Apr 26, 2011 12:57 am, edited 1 time in total.
"A good ship should not look like a plumber's nightmare."
- Atarlost
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

Nevermind my code, I tested it. It doesn't work. sorry
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

Yama wrote:
sdw195 wrote:i think that would require work on Georges part...
Does that mean I should have posted this in the "Ideas & Suggestions" section of the forum?
post a request on the bug tracker http://wiki.neurohack.com/transcendence/trac/
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Yama
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Mon Feb 07, 2011 1:32 am
Location: in the apprenticeship program at a Tinker station....

Drako Slyith wrote:Nevermind my code, I tested it. It doesn't work. sorry
No apology necessary. I really appreciate your taking a stab at it.
sdw195 wrote:
post a request on the bug tracker http://wiki.neurohack.com/transcendence/trac/
Many thanks. I'll do it.
"A good ship should not look like a plumber's nightmare."
- Atarlost
Post Reply