SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Help

Reply
 
Thread Tools Search this Thread
Old 07-14-2016   #1
YevaEA
Christmas is no longer here
 
YevaEA's Avatar
Default An extreme autoexec.cfg undertaking

After recently learning the camera's height and distance could be changed, I found new ways to play SRB2. Since then I've got my own, simple, autoexec.cfg up and running just fine. It sets custom camera options not available in the game's settings menu, enters a netgame with a golden knuckles, and binds the screenshot button to M. But I have a bigger project in mind.

The first thing I want to add (and the only simple one) is binding gif recording buttons to the brackets. I'm on a laptop and the function keys that normally control screenshots and gifs are coupled with volume, brightness, and other commands that make it very awkward to utilize them in-game. Everything else here on is something I'm not sure will even work.

The next thing I want to deal with is that pesky chasecam. It's nice and all for ringslingers, but when I'm loading up a netgame that automagically turns it on (and thus turning off analog mode), I immediately turn it off for hide and seek. When I do that, the cam_dist is reset to default meaning I have to not only turn analog back on, but also reset the cam_dist. If there's a way to keep the cam_dist from resetting when exiting chasecam, or to set it back to the way I had it (analog on included) I'd be more than happy to hear it.

The biggest and toughest part (or so it seems to me) is this: switching predetermined control schemes on the fly. I'm an antsy gal on a laptop, and I need to be able to drop using my wireless mouse at a moment's notice. I want to have six (6) control schemes set up: P1 mouse and keyboard, P1 keyboard analog on, P1 keyboard analog off, and P2 equivalents of these. All of them will utilize some, but not all, of the same buttons and will overlap one another, so to turn only one on at a time and cycle through them with a single button (or each scheme set to it's own button, I'm thinking the symbols would work fine) is my end goal. I need the keyboard only scheme to automatically turn analog on as well as turn it off when switching to keyboard and mouse, or non analog keyboard scheme. I only want the P2 controls for the times I'm playing as Sonic and Tails and need to pick myself up and fly somewhere.

So, does anybody have experience with autoexecs? Who can tell me what's possible and what isn't? Anything and everything could help me at this point. Thank you in advance!

---------- Post added at 09:40 PM ---------- Previous post was at 08:51 PM ----------

After some time on IRC, I was taught aliases and the like. Now my final goal can be achieved! All that's left to figure out is how to bind to symbol keys, shift, capslock, tab, alt, enter, that kind of stuff. I have a feeling I can figure it out, but we'll see.

Also, I figured posting my current autoexec.cfg wouldn't hurt any. If you wanna test it out, just drop it into SRB2's root folder. Just remember this is an incredibly early version of the final product.
Spoiler: Copy and paste this into notepad, and then save it as "autoexec.cfg"
@echo off; chasecam 0; analog 1; cam_height 220; cam_dist 50; cam_speed 2; bind m screenshot; name autocfg test; skin knuckles; color gold


Once again, a HUGE thank you to all those on IRC for helping me out with this so far! I know sometimes people like me seem to ask questions that only come across as pure ignorance, but it's people like you that make a difference and lasting impression for us beginners and our learning processes!
__________________
Quote:
Originally Posted by toaster View Post
Fuck.wad isn't the whole picture.
YevaEA is offline   Reply With Quote
Old 07-14-2016   #2
CobaltBW
I do things sometimes
 
CobaltBW's Avatar
Default

As for special keys, I believe this is what you were looking for.

Don't sweat it; we all gotta start somewhere.
__________________
~CobaltBW

Check out my soundcloud profile for music stuff
CobaltBW is offline   Reply With Quote
Old 07-14-2016   #3
choalover
チャオノコイビト
Default

Also, don't start out too big like I did in 2014. It is a bad idea to start out big, because you will fail badly if you do.
__________________
I love the new SRB2 2.1.17 update so far.
choalover is offline   Reply With Quote
Old 07-14-2016   #4
CobaltBW
I do things sometimes
 
CobaltBW's Avatar
Default

Nah, of all the things you can product in SRB2, I'd have to say that console scripting is by far the least time consuming once you get a good handle on it. Go nuts, I'd say.
__________________
~CobaltBW

Check out my soundcloud profile for music stuff
CobaltBW is offline   Reply With Quote
Old 07-14-2016   #5
YevaEA
Christmas is no longer here
 
YevaEA's Avatar
Default

Cobalt, you're an angel for digging that up for me~

I've got a proof of concept now with a working gif recording key binding and dedicated messages (and accompanying sound effects) to me know what control scheme I've switched to next. Gif recording is on N, Screenshot on M, and control cycle is on \ (backslash). What do you guys think of the sound effect? Should I switch it to the sound that netplay chat makes, or something else?

Spoiler: The only problem so far is that it still makes the sound effect in the main menu, but I suppose that can't be helped.
chasecam 0; analog 1; cam_height 220; cam_dist 50; cam_speed 2; bind m screenshot; name autocfg test; skin knuckles; color gold
alias recordgif "bind n savegif; startmovie"
alias savegif "bind n recordgif; stopmovie"
bind n recordgif
alias combop1 "bind \ combop2; CECHODURATION 1; CECHO Combo P1 Set; soundtest 0; soundtest 151;"
alias combop2 "bind \ keyboardanalogp1; CECHODURATION 1; CECHO Combo p2 Set; soundtest 0; soundtest 151;"
alias keyboardanalogp1 "bind \ keyboardanalogp2; CECHODURATION 1; CECHO Analog P1 Set; soundtest 0; soundtest 151;"
alias keyboardanalogp2 "bind \ keyboardnop1; CECHODURATION 1; CECHO Analog P2 Set; soundtest 0; soundtest 151;"
alias keyboardnop1 "bind \ keyboardnop2; CECHODURATION 1; CECHO Classic P1 Set; soundtest 0; soundtest 151;"
alias keyboardnop2 "bind \ combop1; CECHODURATION 1; CECHO Classic P2 Set; soundtest 0; soundtest 151;"
bind \ combop1

The next problem that I've run into is making sure the mouse is disabled when the controls that DON'T include the mouse are activated. I'm also going to have to write in something that makes my normal "chasecam" button alternate between normal view, first person, and my custom camera, but I think I can get that one done no problem. Right now, the majority of this is just setting all the key bindings and testing them.

EDIT: Solved the mouse issue, AND removed combo and analog p2 controls for the sake of simplifying into a single Player 2 control scheme. Also, new control scheme names are coming~
__________________
Quote:
Originally Posted by toaster View Post
Fuck.wad isn't the whole picture.

Last edited by YevaEA; 07-14-2016 at 05:28 AM. Reason: Added (and later edited) a paragraph
YevaEA is offline   Reply With Quote
Old 07-15-2016   #6
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Quote:
Originally Posted by CobaltBW View Post
As for special keys, I believe this is what you were looking for.

Don't sweat it; we all gotta start somewhere.
Huh, had no idea these would work with the bind command, but thanks to you I went and checked the source code ...and yep, that does seem to be the case after all. Probably worth adding that info to the SRB2 Wiki then, that article there I made assumed they were just for SETCONTROL/SETCONTROL2.

...so in a way, thanks indirectly for uncovering undocumented info \o/
Monster Iestyn is offline   Reply With Quote
Old 12-03-2016   #7
RobertXPlayer
RobXPlayer
 
RobertXPlayer's Avatar
Default

I worked with this mode before. Autoexec.cfg has the power to execute various commands or proceses that can modify the game or just do anything like that.
Example:
- Alias "Characters" "SonicTH"
- Alias "SonicTH" "
Alias Character TailsTF;Skin Sonic;Color Blue;Say /me changed to Sonic The Hedgehog"
- Alias "TailsTF" "Alias Character KnucklesTE;Skin Tails;Color Orange;Say /me changed to Tails 'Miles' Prower"
- Alias "KnucklesTE" "Alias Character SonicTH;Skin Knuckles;Color Red;Say /me changed to Knuckles The Echidna"
Scripting AutoExec.cfg it was the best idea that i never thought playing Srb2 2.1.

Maybe this could help you

Last edited by RobertXPlayer; 03-03-2017 at 04:07 PM.
RobertXPlayer is offline   Reply With Quote
Old 04-13-2017   #8
YevaEA
Christmas is no longer here
 
YevaEA's Avatar
Default

Around half a year ago I lost my srb2 install, and my autoexec with it. Today I found this old thread, grabbed what I had a few posts back, and remade what I lost. Major differences are a few new commands at the start, a different sound effect for the cycling, and lowering to 2 control schemes. Here's what it's looking like now (STILL UNFINISHED).
Spoiler: 2017 autoexec.cfg, simplified edition
skipintro; itemfinder on; flipcam yes; soniccd on; homremoval yes; gr_anisotropicmode 16; shadow on; name autocfg test; skin knuckles; color gold
bind m screenshot
bind n recordgif
alias recordgif "bind n savegif; startmovie"
alias savegif "bind n recordgif; stopmovie"
bind x cam2
alias cam1 "bind x cam2; chasecam 1; resetcamera; soundtest 0; soundtest 56;"
alias cam2 "bind x cam3; chasecam 1; resetcamera; cam_dist 250; cam_height 50; soundtest 0; soundtest 56;"
alias cam3 "bind x cam1; chasecam 0; resetcamera; analog 0; soundtest 0; soundtest 56;"
bind b SRB2scheme
alias SRB2scheme "bind b SA2scheme; CECHODURATION 1; CECHO Default Controls; analog 0; soundtest 0; soundtest 56;"
alias SA2scheme "bind b SRB2scheme; CECHODURATION 1; CECHO SA2 Style; analog 1; cam_speed 2; soundtest 0; soundtest 56;"

I made new threads about questions regarding commands. I wasn't sure if they would be answered properly if they were asked here. If they should be merged with this thread, I invite the admins to do their magic. I have no idea when this will be finished, if at all. Thanks again everyone for the help!
__________________
Quote:
Originally Posted by toaster View Post
Fuck.wad isn't the whole picture.
YevaEA is offline   Reply With Quote
Old 04-16-2017   #9
Kitoko
Click on me for help! YAHOO
 
Kitoko's Avatar
Default

When my little sister was maybe three or four years old, she didn't exactly know how to read or write, meaning she did not know how to use the menus. So, out of courtesy for her, I made three files that basically created four toggle buttons. The first one would cycle through the skins, the second one would cycle through the colours, the third one would cycle through a bunch of chat macros and the fourth one would let her say the message. Obviously the third and fourth buttons were for when she got older. I did this for skin and color because you couldn't use the toggle command to cycle them anymore.

I've known about cycle binds for quite a while and I even made a simple calculator using it!

YevaEA uses cycling buttons for some pretty cool purposes which I find neat!
__________________
<Chaos> go hitneo
<Chaos> she can walk on lava
Kitoko is offline   Reply With Quote
Old 04-16-2017   #10
GreenKnight9000
Default

Quote:
Originally Posted by Kitoko View Post
When my little sister was maybe three or four years old, she didn't exactly know how to read or write, meaning she did not know how to use the menus. So, out of courtesy for her, I made three files that basically created four toggle buttons. The first one would cycle through the skins, the second one would cycle through the colours, the third one would cycle through a bunch of chat macros and the fourth one would let her say the message. Obviously the third and fourth buttons were for when she got older. I did this for skin and color because you couldn't use the toggle command to cycle them anymore.

I've known about cycle binds for quite a while and I even made a simple calculator using it!

YevaEA uses cycling buttons for some pretty cool purposes which I find neat!
aww
you're a great brother/sister/brister (male-female hybrid)
how's her skills on SRB2?
GreenKnight9000 is offline   Reply With Quote
Old 04-16-2017   #11
YevaEA
Christmas is no longer here
 
YevaEA's Avatar
Default

I'm done early, folks. I mapped some controls that made the script a lot less heavy than I originally planned. Here's the final version.
Spoiler: autoexec.cfg
skipintro; itemfinder on; flipcam yes; soniccd on; homremoval yes; use_mouse on; gr_anisotropicmode 16; shadow on; name autocfg test; skin knuckles; color gold
bind p screenshot
bind o recordgif
alias recordgif "bind o savegif; startmovie"
alias savegif "bind o recordgif; stopmovie"
bind x cam2
alias cam1 "bind x cam2; chasecam 1; resetcamera; cam_dist 128; cam_height 20; soundtest 0; soundtest 56;"
alias cam2 "bind x cam3; chasecam 1; resetcamera; cam_dist 250; cam_height 50; soundtest 0; soundtest 56;"
alias cam3 "bind x cam1; chasecam 0; resetcamera; analog 0; soundtest 0; soundtest 56;"
bind g SA2scheme
alias SRB2scheme "bind g SA2scheme; CECHODURATION 1; CECHO Mouse & Keyboard; resetcamera; cam_dist 128; cam_height 20; analog 0; use_mouse on; soundtest 0; soundtest 56;"
alias SA2scheme "bind g SRB2scheme; CECHODURATION 1; CECHO Keyboard Only; analog 1; cam_speed 2; resetcamera; cam_dist 250; cam_height 50; use_mouse off; soundtest 0; soundtest 56;"

Spoiler: My keymaps, taken from my config.cfg
setcontrol "forward" "w"
setcontrol "backward" "s"
setcontrol "strafeleft" "a"
setcontrol "straferight" "d"
setcontrol "turnleft" "KEY0"
setcontrol "turnright" "KEY0"
setcontrol "weaponnext" "Wheel 1 UP"
setcontrol "weaponprev" "Wheel 1 Down"
setcontrol "weapon1" "1"
setcontrol "weapon2" "2"
setcontrol "weapon3" "3"
setcontrol "weapon4" "4"
setcontrol "weapon5" "5"
setcontrol "weapon6" "6"
setcontrol "weapon7" "7"
setcontrol "weapon8" "8"
setcontrol "weapon9" "9"
setcontrol "weapon10" "0"
setcontrol "fire" "MOUSE2"
setcontrol "firenormal" "e"
setcontrol "tossflag" "q"
setcontrol "use" "SPACE" "k"
setcontrol "camtoggle" "KEY0"
setcontrol "camleft" "u"
setcontrol "camright" "i"
setcontrol "camreset" "z"
setcontrol "lookup" "KEY0"
setcontrol "lookdown" "KEY0"
setcontrol "centerview" "KEY0"
setcontrol "mouseaiming" "v"
setcontrol "talkkey" "t"
setcontrol "teamtalkkey" "y"
setcontrol "scores" "TAB"
setcontrol "jump" "MOUSE1" "j"
setcontrol "console" "TILDE"
setcontrol "pause" "MOUSE3"
setcontrol "custom1" "r"
setcontrol "custom2" "f"
setcontrol "custom3" "c"
setcontrol2 "forward" "h"
setcontrol2 "backward" "n"
setcontrol2 "strafeleft" "b"
setcontrol2 "straferight" "m"
setcontrol2 "turnleft" ","
setcontrol2 "turnright" "/"
setcontrol2 "weaponnext" ";"
setcontrol2 "weaponprev" "'"
setcontrol2 "weapon1" "KEY0"
setcontrol2 "weapon2" "KEY0"
setcontrol2 "weapon3" "KEY0"
setcontrol2 "weapon4" "KEY0"
setcontrol2 "weapon5" "KEY0"
setcontrol2 "weapon6" "KEY0"
setcontrol2 "weapon7" "KEY0"
setcontrol2 "weapon8" "KEY0"
setcontrol2 "weapon9" "KEY0"
setcontrol2 "weapon10" "KEY0"
setcontrol2 "fire" "RSHIFT"
setcontrol2 "firenormal" "RCTRL"
setcontrol2 "tossflag" "g"
setcontrol2 "use" "."
setcontrol2 "camtoggle" "UP ARROW"
setcontrol2 "camleft" "KEY0"
setcontrol2 "camright" "KEY0"
setcontrol2 "camreset" "\"
setcontrol2 "lookup" "KEY0"
setcontrol2 "lookdown" "KEY0"
setcontrol2 "centerview" "KEY0"
setcontrol2 "mouseaiming" "KEY0"
setcontrol2 "talkkey" "KEY0"
setcontrol2 "teamtalkkey" "KEY0"
setcontrol2 "scores" "KEY0"
setcontrol2 "jump" "l"
setcontrol2 "console" "KEY0"
setcontrol2 "pause" "KEY0"
setcontrol2 "custom1" "LEFT ARROW"
setcontrol2 "custom2" "DOWN ARROW"
setcontrol2 "custom3" "RIGHT ARROW"

There it is. All done. I'll enjoy playing with the script commands I've made, and I invite others to try out mine or tinker with it. Thanks again for the help, everyone!
__________________
Quote:
Originally Posted by toaster View Post
Fuck.wad isn't the whole picture.
YevaEA is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.