Need help
#1
Hello guys


Let me introduce myself, my name is Sam and i'm from belgium.
I'n graduating this year and working on my thesis, it's about brandplacement in videogames :D
For my research i woul like to use assault cube.
Now i just need some help with the adjusting of the game.
I should need the game to start in singleplayer, a 8x8 team deathmatch, AI worse and in the scaffold map mode, and that just from one click on the .exe file.


Could anyone help me with this?
Thanks given by:
#2
Hi Sam.

The --loadmap argument chooses which map loads upon starting. Unfortunately, this is solely the map and not the mode or related options, as far as I can tell.
There probably is a "real" solution for your question, however I don't know it and it doesn't seem to be where I'd expect in the docs.
My suggestion for you is that you use the -e argument to run a command which sets that map/mode.
Read the documentation. It has lots of good information.

Note: These arguments go in your assaultcube.bat. You will need to run the game via this file instead of the .exe.
Thanks given by:
#3
1. Create a file in your config folder called btdmscaffold.cfg, containing:
sleep 2000 [team cla; mode 7; map ac_scaffold; addnbot 7 CLA worse; addnbot 8 RVSF worse]
2. Edit your game launcher (.bat or .sh or whatever the Mac one is) and add:
-e"exec config/btdmscaffold.cfg"
to the end of the line that launches AC.
Thanks given by:
#4
Hi


thx for the quick answer.
I made a nex cfg file in the configmap.
But where in the .bat file do i need to put the code you gave me?

this is what in it normally:
bin_win32\ac_client.exe --home="..\..\Data\settings" --init %1 %2 %3 %4 %5

where does the code (-e"exec config/btdmscaffold.cfg") come?

thx
Thanks given by:
#5
Anywhere after that line is fine.

If you're still having trouble, you can always just place "exec config\btdmscaffold.cfg" (without the quotation marks) into config\autoexec.cfg.
Thanks given by:
#6
You'd think you can do that Aekom, but when I tried it, it didn't execute the mode or map changes, only the addnbot commands.
Thanks given by:
#7
It has to do with when the execution of the operations occur. There might be a mapstartonce that you could use, however jamz' method is much cleaner.

The operations get executed in this order:

AC boots.
1. config files (including autoexec.cfg) get loaded
2. load the starting map
3. execute the initscript (what jamz gave)

Remember how loading maps restart all the sleeps?

Aekom's method will work in SVN as sleeps do not get reset on map loads.



Sorry SamDep, this post was mostly for jamz and Aekom. An extrapolation on what they said.
Essentially this you were given a script to be run at the beginning of the game. This script was doing what you wanted to do.
This is that script:
[cubescript]
sleep 2000 [team cla; mode 7; map ac_scaffold; addnbot 7 CLA worse; addnbot 8 RVSF worse]
[/cubescript]
There is a sleep in here, which delays the execution of the script such that it will occur when AC is fully loaded.

You place that in a file that AC can execute, so that script could get loaded up.

The command line switch that jamz gave you:
-e"exec config/btdmscaffold.cfg"
This command line argument tells AC to execute the command (script):
exec config/btdmscaffold.cfg
which executes the previous script.

This is what happens in the initscript (see what I said earlier).

Aekom's method puts the script in the autoexec, which is a config file that AC automatically executes. This would be all fine and dandy, except for the fact that the current version of AC resets all sleeps (makes them not happen) when it loads a new map. So, his script won't get executed as it gets canceled (essentially).

It all has to do with the order that the scripts get loaded in relation to the initial map loading.


HTH

Oh, also, Aekom struck out. This is what your new .bat should look like:
bin_win32\ac_client.exe --home="..\..\Data\settings" -e"exec config/btdmscaffold.cfg" --init %1 %2 %3 %4 %5
Thanks given by:
#8
(06 May 12, 08:55AM)Ronald_Reagan Wrote:
bin_win32\ac_client.exe --home="..\..\Data\settings" -e"exec config/btdmscaffold.cfg" --init %1 %2 %3 %4 %5

If I do,

bin_win32\ac_client.exe --home="..\..\Data\settings" --init %1 %2 %3 %4 %5 -e"exec config/btdmscaffold.cfg"

it works fine too, but what does "--init %1 %2 %3 %4 %5" denote?
Thanks given by:
#9
http://assault.cubers.net/docs/commandline.html Wrote:All arguments need to be placed after the phrase: bin_win32\ac_client.exe
... and before the phrase: %1 %2 %3 %4 %5

I guess it isn't essentially, but it is recommended.
Thanks given by:
#10
If anyone else was interested, GeneralDisarray kindly explained the significance of "--init %1 %2 %3 %4 %5".

http://pastebin.com/qBzMwZ1E
Thanks given by:
#11
Er, point of clarification. At that point in the conversation I thought the %x referred to things inside the .bat, not arguments passed to the .bat when running it. That quote is of me noobin.

Thanks given by:
#12
Thx for the help.

It works now. But i had a script for to close the game after 5 mins. But like you said earlier, the sleeps dont get executed when you load a new map... So is there another way to close the game after x minutes?



grtz
Thanks given by:
#13
Put that script in "btdmscaffold.cfg" as this file is one that gets executed after the map loads.
Thanks given by: