PDA

View Full Version : Command line arguments???



weiner cat jihad
03-26-2002, 02:35
I was kicking around an idea for a mod with a friend and we determined that we would need the STW application to take a some sort of command line arguments. Does anyone know this? I did a search on the whole forum for "command line" and no joy..

Basic idea was our own Client/Server java strat game thingy that would fire up the shogun app to do the battles. It would still be set in Japan but the overall strategy and politics would be a bit more complex..


Anyone Remember Nobunaga's ambition 2? Why don't they sell the newer verions in the US????

Thanks for any info....

qwertyuiop
03-28-2002, 11:51
Intresting idea, you are looking for battle set up aguments I guess?
.... maybe they exist for debuging, but I don't think CA released any beside the battle recorder flag.

Another thing, how do you plan to get around the java security policy to execute system commands (if you are planning to make it web based)!?

If you are making it a client side app and not multiplayer I wouldn't recommend this approach other then to practice your programming and java skills. If not the shogun editors are good enough, standard enough, and convienient enough to make a good mod that is easy for the player to use.

But if you want multiplayer thats another story http://www.totalwar.org/ubb/smile.gif

qwertyuiop
03-28-2002, 12:09
Follow up:

If you ever need to use the JNI you should not be using java

-You can probably get the command line args by finding them with a hex editor, but they can probably send you to jail for that http://www.totalwar.org/ubb/smile.gif

You can get around args by:
A)the pain in the ass window messagaging approach.... (If you could pull that off you are either a genuis or have to much time)
B) Taking over the procces and finding out where all the proc's are addressed, oh and that little problem of how the game works http://www.totalwar.org/ubb/smile.gif (they can deffinitly send you to jail for that http://www.totalwar.org/ubb/smile.gif )


So it looks like you are stuck unless they really did release the command line args or a plugin pack.... which I only slightly doubt http://www.totalwar.org/ubb/tongue.gif

[This message has been edited by T (edited 03-28-2002).]

weiner cat jihad
03-28-2002, 19:58
thanks for the info...
This is mainly an excuse for practicing java.

what was the command line arg for the battle recorder?


I was hoping for somthing like the following:
shogunw.exe
as in some sort of refrence to a .bdf file
or maybe even an IP for a multiplayer game.

I have a example sitting in a book of how to start another program with a java app but I have not tried it yet. My thought was to write something that spits out .bdf and .adf
files into the appropriate directories based on what I am doing in my simple GUI game. Then have the java applications(not applet) fire up shogunw.exe with whatever arguments.

probabaly an oversimplification but it since command line args for shogunw.exe seem to be non existant then i'll have to sit an wait for Medieval total war http://www.totalwar.org/ubb/wink.gif

what was the command line arg for the battle recorder?

qwertyuiop
03-29-2002, 07:48
Off the news archives:
Quote
To record a battle
Find any shortcut for your Shogun executable - right click and click on properties. Go to the tab Shortcut and find the field Target. It should read (wherever it is installed)\Shogun.exe
Now change that to: (wherever it is installed)\ShogunM.exe ER Use ShogunW.exe if you're using the Warlord Edition. Now you got the Recorder installed. Just run the game through that shortcut and your most recent battle will be recorded to the folder /DumpLog. Unfortunately, recordings are always saved to the same file name, so each battle that is recorded will overwrite the previous recording.

To playback the battle
Make a copy of a shortcut for the Shogun executable and do the same process as above, but this time change the target path to:
(wherever it is installed)\ShogunM.exe mEP Use ShogunW.exe if you're using the Warlord Edition. Then just run the game from this shortcut - and this will replay the most recently recorded battle. At the end of the battle, all the troops will freeze and just escape out.
[/QUOTE]


"Oversimplification", not at all.... that would deffinitly work in a perfect world, but alas http://www.totalwar.org/ubb/smile.gif

To execute system apps you are going to need to use the JNI to interface with your native system code, in this case the windows api.
The exact code to do it varies, but you are going to probably end up getting a console handle then sending it the file to execute with the args. I don't recall if there are any ready coded api proc's to do this, but it might be worth looking for.

If you need any help with the programming or shogun I'll be around....