Fractal Softworks Forum
May 24, 2017, 11:43:07 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.8.1a In-Development Patch NotesStarsector 0.8a is out (hotfix is up!)
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 ... 31
  Print  
Author Topic: [0.7.2a] Console Commands v2.7b (released 2017-03-16; 0.8a WIP available)  (Read 171805 times)
Alex
Administrator
Admiral
*****
Posts: 10594


View Profile
« Reply #15 on: September 18, 2012, 11:17:31 AM »

Hah, very interesting. Haven't had a chance to try it, but kudos for putting this together Smiley
I don't suppose you would be willing to try the main branch and see if it runs in the latest development version? Cheesy I've been using a lot of guesswork, but I'm almost certain it will work without tweaking given the changes you mentioned in our conversation.

Sure, I'll give it a try if you can post a download link. Not set up w/ Mercurial.
Logged
xenoargh
Admiral
*****
Posts: 3491


View Profile
« Reply #16 on: September 18, 2012, 11:18:23 AM »

Linky
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #17 on: September 18, 2012, 11:18:34 AM »

You can grab it here: https://bitbucket.org/LazyWizard/sfconsole/get/default.zip
The mod folder is SFConsole in the zip.

Edit:
That's the released version, not the development version.
« Last Edit: September 18, 2012, 11:20:45 AM by LazyWizard » Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
Alex
Administrator
Admiral
*****
Posts: 10594


View Profile
« Reply #18 on: September 18, 2012, 11:24:38 AM »

You can grab it here: https://bitbucket.org/LazyWizard/sfconsole/get/default.zip
The mod folder is SFConsole in the zip.

Sweet - works like a charm. Very good work, sir - I think I'll just leave it enabled Smiley
Logged
The Soldier
Admiral
*****
Posts: 3553


Quartermaster


View Profile
« Reply #19 on: September 18, 2012, 11:56:31 AM »

Psst! Be honored LazyWizard!
Smiley
Anyways, from what I've been playing around with, it's a pretty good tool.  Though I managed to *** up my system pretty badly after I changed some relations and money.  Very fun, and no doubt very useful when put to the right job.
Logged

Quote from: Trylobot
I am officially an epoch.
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #20 on: September 18, 2012, 12:19:56 PM »

I realized I forgot to include the AddItem command (same as AddWeapon, but for CargoItemType.RESOURCE). I'll update the download link in a moment.

Sweet - works like a charm. Very good work, sir - I think I'll just leave it enabled Smiley

Wow, that's just awesome. Thank you for testing it, and I'm glad you like it. I hope it helps. Smiley I knew I should have put code in to upload the user's Starfarer directory...

Anyways, from what I've been playing around with, it's a pretty good tool.  Though I managed to *** up my system pretty badly after I changed some relations and money.  Very fun, and no doubt very useful when put to the right job.

You say that like spreading chaos isn't the right job.  Grin
Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
doodlydee
Lieutenant
**
Posts: 54


View Profile
« Reply #21 on: September 18, 2012, 03:23:46 PM »

This is probably a stupid question how do you use the add ship command, I keep trying to add a onslaught but it keeps giving me a error saying variant id or something like that
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #22 on: September 18, 2012, 03:28:02 PM »

This is probably a stupid question how do you use the add ship command, I keep trying to add a onslaught but it keeps giving me a error saying variant id or something like that

You need to use the variant ID of the ship. You can find them in starfarer-core/data/variants (or a mod's data/variants folder). For example, "addship onslaught_Elite" should work.

If you don't know any of the variants, you can always just spawn an empty hull ("addship onslaught_Hull"), which is an auto-generated variant for every ship.
Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
doodlydee
Lieutenant
**
Posts: 54


View Profile
« Reply #23 on: September 18, 2012, 03:34:33 PM »

Thanks for quick reply I just read that in your first post should have done that in first place stupid me, but thanks again
Logged
DeathPhoenyx
Ensign
*
Posts: 6


View Profile Email
« Reply #24 on: September 18, 2012, 04:32:08 PM »

Is there any way to edit the key that brings up the console? I am Spanish, therefore I use a Spanish keyboard and when I press the key that corresponds to your ~ (the one on the left of the 1) and nothing pops up. I have tried to change the keyboard's locale through the windows' language bar but that doesn't make it work.

Also, on a related note: the console pops up nomather in what part of the game are you (in combat, flying through the system, docked in a station etc) or is it more specific?
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #25 on: September 18, 2012, 04:37:16 PM »

Is there any way to edit the key that brings up the console? I am Spanish, therefore I use a Spanish keyboard and when I press the key that corresponds to your ~ (the one on the left of the 1) and nothing pops up. I have tried to change the keyboard's locale through the windows' language bar but that doesn't make it work.

Yes, you can change the key the console uses. You'll need to edit data.scripts.console.ConsoleManager. Just change CONSOLE_KEY (it's near the top of the file) from Keyboard.KEY_GRAVE to any of the keys listed on this page.

Quote
Also, on a related note: the console pops up nomather in what part of the game are you (in combat, flying through the system, docked in a station etc) or is it more specific?

It only works while on the campaign map, while the game is unpaused. This is because the keyboard handler is implemented as a spawn point, and checks for key input once per game frame on the campaign map. I might change this later. Smiley
Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
DeathPhoenyx
Ensign
*
Posts: 6


View Profile Email
« Reply #26 on: September 18, 2012, 04:40:15 PM »

Well, that was a quick response. Thanks, I will try it out when I get an opportunity, will report back if something doesn't work.
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #27 on: September 18, 2012, 04:45:26 PM »

I'm actually coding the next update of this mod in another window, so I can just tab over when my phone alerts me to a new reply. Smiley

Speaking of updates, what would be the equivalent key on a Spanish keyboard layout? I can make the next version change the default key based on the locale (or is that too obnoxious?).
Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
xenoargh
Admiral
*****
Posts: 3491


View Profile
« Reply #28 on: September 18, 2012, 04:48:28 PM »

Hey, stupid question:  if I want to write some code that executes a command via the console, then runs the command and updates the text displayed in the console, how would I go about that, roughly? 

I'm trying to figure out how to get this thing to let me give the user some feedback, basically, while executing some commands.
Logged
LazyWizard
Global Moderator
Admiral
*****
Posts: 1142


Addicted to complexity


View Profile WWW
« Reply #29 on: September 18, 2012, 05:01:20 PM »

What do you mean, update the text displayed in the console? It's just an input popup, it's completely disposable.

And for security reasons, I set up the access modifiers in the mod to make it difficult to run commands through code. The only access point to command execution is through Console.getInput(), which spawns the popup window and handles input itself.

However, you can directly create a BaseCommand object and run it, but it might be buggy (you will have problems with commands that need access to the current location/starsystem or persistent variable storage if you haven't used the console this session, since certain references are only set when the console is called).

Example:
Code:
     BaseCommand spawnShip = new AddShip();
     spawnShip.runCommand("onslaught_Elite");
Logged

0.8a: LazyLib | Version Checker | Common Radar | Autosave
0.7.2a: Omnifactory | Console Commands | Simulator Overhaul
Feel free to use any code I've written or PM me for help with your own.
Pages: 1 [2] 3 4 ... 31
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!