Question for Angex regarding his script editor....

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

Question for Angex regarding his script editor....

Post by grb »

Hello,
You wrote the following in response to my original question asking if one
can change the script editor from NOTEPAD to another while in the console:
"OMG, theres really a built in script editor, I spent a month writing my own !!!!!!!!!! ", then you showed a screen capture of your MOHAA Editor.

I was wondering if you could indicate how you run your editor while in the console. It was indicated that the NOTEPAD editor that runs in the game is not actually the Microsoft NOTEPAD.exe program but a look alike that is
called from the console command. In which case it is "hard coded into MOHAA engine so to speak". BUT apparently you have discovered how to run a different editor, so there must be something you changed in a cfg or init file..........that governs what editor to run while in game.

Would you share this info with me and others? I am not interested in using your editor ONLY would like to know how you start yours verse the "canned" editor while in console mode.

Thanks in advance for any help/info.
grb
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

You can make your own notepad with urc files...
Image
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

I wrote my editor in java, and so it runs externally from MoH. It was just a little project to help me practice using the language. Its a bit buggy (I'm still working on it !) but I could always make a version available.
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

Thanks Angex and Jv_map...

Post by grb »

Angex, I am not badgering you nor in any way trying to project a negative thought...... but I was curious HOW you call up your Editor while in the console. I assumed that is what you where doing.
OR .....do you go to the windoze desktop then run your editor?


Jv, thanks for help, but I do not know how to work with/use the urc files.
I do not want you to have to waste precious time explaining it.

To both of you... I am aware that I can simply go to the windoze desktop then use any editor I want to in order to modify existing or make new script files then go back to the game, and in console mode, simply type restart. I don't need any editors, I have powerful GNU/UNIX type editors on my windoze machines.

The question I had wanted answered is can one change the default editor (the psedo NOTEPAD editor as jv_map indicated earlier.... with another
editor. He already said no, but then Angex came along and made his statement saying he uses his own Java designed editor......And I thought
perhaps he discovered a way to run HIS editor from the console without having to leave the game.


Thanks both for at least responding...
cheers.
grb
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

in-game editor

Post by tltrude »

There is a build-in editor in the game already. You only have to type "editscript" to see it. Sounds like you think these editor will write scripts for you, but they are only text editors.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well 'editscript' is just short for 'notepad maps/[mapname]'.

I personally prefer to run mohaa in a window and be able to use powerful 8-) text editors by just pressing alt+tab :) . It's also safer if you (like me ;)) often make the game crash :oops:

Sometimes I get weird mouse issues though :(
Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

yeah i tried editscript and i coudlnt close the window.
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Re: Thanks Angex and Jv_map...

Post by Angex »

Angex wrote:it runs externally from MoH.
grb wrote:do you go to the windoze desktop then run your editor ?
Yes, that's what I meant but it didn't come out clearly, I donot run it in-game from the console. I use it as jv suggested, running moh in a window and switching between the two programs.
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

Thanks for clarification...

Post by grb »

That is what I suspected. As jv indicated, one cannot execute an external program from the console.

thanks for the feedback,
cheers
grb
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

In-game text editor

Post by tltrude »

Well, I like the in-gaime editor. You can minimize it to the top of the screen. When I need the mouse pointer, I just hit Escape. I should probably bind a key to bring up the script editor, but I don't use it that often.

Why don't one of you programing geniuses make one that is called up by the console (or a key) and automatically shifts the game to a window on the left with the text editor in a window on the right. Put in a "save" button and it will be perfect!
Tom Trude,

Image
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

tltrude...

Post by grb »

All we have to know is if there is a console command that allows one to run an external program. Then all one would have to do is type the command followed by the program name. This assumes that the called program creates it's own window and doesn't interact with the game.
I have been looking through the command files with no success for such a command. Exec, run, do not work, where I typed for instance,
exec c:\full_path\editor_name.exe. Perhaps I simply am missing the command in the cmdlist that allows one to have the system execute a program.
Bottom line is..........if there is no command that allows one to execute a
program other then a script file, then no one could create a editor program in the way you suggested. As Jv_Map indicated earlier in the thread, it appears that the "notepad" command executes a editor that looks like notepad which is integral to the mohaa.exe, that is, the code is built into the main game program.

cheers
grb
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

wait a minute. so with this thing, you can edit scripts when your playing it? for example you could add a game message when a thread is called?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Nope

Post by tltrude »

No, you edit the script, hit Ctrl S to save it, and restart the game in the console by typing restart.

The keys for makeing the game switch to a window are Alt +Enter, but I think you need to have developer mode set.
Tom Trude,

Image
grb
Warrant Officer
Posts: 136
Joined: Fri Jun 06, 2003 12:22 am
Location: USA Philadelphia

Alcoholic...

Post by grb »

As tltrude indicated, to go into windoze desktop, type either ALT ENTER
or on my system the only thing that works is ALT TAB keys. Once in the
desktop you can obviously use any editor you have on your system. In my
case the editor I use saves the original file without fiddling around with the extention (.scr). Make sure the editor you select to use does not try to save the script file to a file with a ".txt" or other extension combo, or as
you realize the changes you make will not effect the original script file you are modifying.

cheers.
grb
Post Reply