Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: "externalCommand" for Torque3D. #41

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

just-bank
Copy link
Contributor

@just-bank just-bank commented Sep 27, 2012

A new feature for Torque3D: "externalCommand".

How to use "externalCommand" it in Torsion:
(instructions for other IDE should be similar)

  1. In Torsion open "Tools" menu and select "External Tools"
  2. Select first empty slot and enter following:
    Title: &Reload current script
    Command: $(ConfigExe)
    Arguments: externalCommand 1 $(FilePath)
    Initial Directory: $(ProjectWorkingDir)
    Press OK

Now you can reload the currently-edited script directly from Torsion with two mouse-clicks!
Click Tools, then Reload current script.

See comments in Templates/Full/game/tools/main.cs for more examples.

As a protection (for shipped games), the ectual execution is wrapped with TORQUE_SHIPPING and the scripted function "parseExternalCommand" is placed under "tools" folder.

@just-bank just-bank mentioned this pull request Sep 27, 2012
@jamesu
Copy link
Contributor

@jamesu jamesu commented Oct 3, 2012

Shouldn't this be part of the Telnet debugger?

@just-bank
Copy link
Contributor Author

@just-bank just-bank commented Oct 3, 2012

It is not really the same thing.
If you running Torque from the VS or started it directly (without Torsion attached) this allows you to exec script or do any additional command. It will work for multiple Torque at once too.
Like you are running two instances of T3D (client/server + client) and changes one script... By two mouse clicks in Torsion it allows you to reload the script.. Or call function you want.

P.S. "Telnet debugger" is not that stable as I want it to be, and I rarely use it tbh.. And with complex projects (as our is) Torsion sometimes goes crazy when debugging scripts and tries to use built-in "script reload" feature.
We use this "externalCommand" feature a lot, and I can't imagine working without this.

@DavidWyand-GG
Copy link
Member

@DavidWyand-GG DavidWyand-GG commented Nov 7, 2012

Before we can accept any changes to the repositories we'll need you to sign the Open Source Software Agreement. We've outlined the steps in the wiki: Contributing Page Please follow those steps and let me know when you're done. Thanks!

@just-bank
Copy link
Contributor Author

@just-bank just-bank commented Nov 8, 2012

Have done it a week or so ago.

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Mar 28, 2014

@just-bank How do you feel about these changes? Still want them reviewed and merged? Is is useful for anything but Torsion? Is there a better solution? For example, there's a resource by Dan Keller to automatically reload scripts that are saved while the engine is running. Wouldn't it have the same effect?

@just-bank
Copy link
Contributor Author

@just-bank just-bank commented Apr 3, 2014

@eightyeight

to automatically reload scripts that are saved while the engine is running

I really don't like this, as I (and I believe a lot of others) do save often during typing, even when the part of code is not finished, and it will give errors during exec.
Another thing it could break - is GUIs. You don't want to re-exec GUI scripts.. And scripts like main.cs or init.cs.

We at Dedicated Logic use that externalCommand a lot, and I believe it can give some benefit to others.

We can vote - do we include this or not into the repo.

See comments in game/tools/main.cs for description.
@just-bank
Copy link
Contributor Author

@just-bank just-bank commented Jun 11, 2014

Is is useful for anything but Torsion?

Any IDE that can edit scripts and have ability to run custom commands can use this.
It is possible to setup "External Tools" to do anything from Visual Studio.

@crabmusket
Copy link
Contributor

@crabmusket crabmusket commented Jun 13, 2014

I guess I don't have a problem with this in principle.

@crabmusket crabmusket added this to the 3.6 milestone Jun 13, 2014
@crabmusket crabmusket added this to the 3.7 milestone Jun 13, 2014
@crabmusket crabmusket removed this from the 3.6 milestone Jun 13, 2014
@crabmusket crabmusket removed this from the 3.7 milestone Feb 8, 2015
@crabmusket crabmusket added this to the 3.8 milestone Feb 8, 2015
@crabmusket crabmusket added this to the 3.8 milestone Feb 8, 2015
@crabmusket crabmusket removed this from the 3.7 milestone Feb 8, 2015
@crabmusket crabmusket removed this from the 3.8 milestone Jun 24, 2015
@crabmusket crabmusket removed this from the 3.8 milestone Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants