AAO25.com

Assist => Support => Server Support => Topic started by: H.Blacksmith on Thursday, January 28, 2016, 05:34:06 AM

Title: Random weapons
Post by: H.Blacksmith on Thursday, January 28, 2016, 05:34:06 AM
Hey folks, how is it going?
Yesterday [w].^W.e.ll.o^ asked me how to do random weapon scripts on a server. I know that some threads here are covering this topic already but seemingly there are open questions.
Ok, here is what i did to get it working:

1. Download the 'weapon_randomizer_v1_5'. I found it here: http://www.gamefront.com/files/files/6559722/weapon_randomizer_v1_5.zip (http://www.gamefront.com/files/files/6559722/weapon_randomizer_v1_5.zip)
Maybe this is not the newest version - but i dont mind
2. Unzip the file
3. The readme file recommends to put the WeaponRandomizer.exe into your America's Army system folder but doing this prompts an error in 25Assist. For me it worked in any directory so skip this step. Just leave it in the extracted folder.
4. Open WeaponRandomizer.exe
5. Choose the weapons or weapon set you want to randomize
6. Push 'Star Randomizer'. After a few seconds (be patient) it creates a file in the same directory named 'random.txt'. It's just a file with 1000 rows and each of them is a command to force class a player slot (slot 1 - 1000). The first row is an admin message. You can edit the message in text editor.
7. Rename this file (to keep it nice and short i named it 'r1.txt')
8. If u want to play more than one round on the row with the same set of random weapons you should repeat steps 6 and 7 because: If nothing has changed in the player list, each player will have the same weapons again because player slots are still the same. So you need several files - lets say 'r2.txt', 'r3.txt'. 'r4.txt' and so on.
9. After this put these files into your America's Army system folder
10. Now you can use them in game by typing in console 'exec r1.txt' (for the 1st round), 'exec r2.txt' (for the 2nd round), 'exec r3.txt' (for the 3rd round) and so on...

Thats it. I don't know if there are ways to do this more elegant than creating a bunch of files - if so, tell me please. At least this is working.
Hope this helps.

Happy randomizing...
Title: Re: Random weapons
Post by: SASF-DarkShooter on Thursday, January 28, 2016, 05:40:58 AM
It sounds about right. If they don't work properly, I have got some scripts that will work, however be aware that if you forceclass too often your server might lose tracking. Well, at least sort of.
Title: Re: Random weapons
Post by: H.Blacksmith on Thursday, January 28, 2016, 05:45:30 AM
Ye, heard about that. Is it verified?
Title: Re: Random weapons
Post by: teddy_grizzly_bear on Thursday, January 28, 2016, 05:59:09 AM
This is the way the tracking should behave:

If you're not forceclassing, everything tracks as is.
If you run an automatic mod (as in the server automatically forceclass in the beginning of every round), 50% of score and no kills/deaths will be tracked.
Just using the Admin Forceclass commands (which is what the files do) will be the same as a normal server.

Another possibility is to use the "afc" command (http://aao25.com/forum/aa-support/new-admin-command-included-in-8-15-to-forclass/msg79714/#msg79714) to more efficiently forceclass a weapon to everyone. It also effectively falls on the Admin Forceclass category.
I know ELiZ was working on "afc random" but I couldn't find confirmation that he finished it (but I'm pretty sure he did), you can have a try with that as well.
In fact I had a look and the "afc random" should take a random from most all weapons (if not all) including Recruit, 25 altogether.
Title: Re: Random weapons
Post by: ronski on Thursday, January 28, 2016, 06:01:45 AM
It sounds about right. If they don't work properly, I have got some scripts that will work, however be aware that if you forceclass too often your server might lose tracking. Well, at least sort of.
There are also rumours that your server might crash if you force guns too much, but haven't seen it happening so Im having hard time believing in it or I just haven't forceclassed enough lol.

Forceclasses are fun imo, but usually you can't use them in maps that has VIP. If you force a gun to VIP, will round end immediately when someone dies. ( Oh yet another place where to dream about new version of Hospital with no VIP and SF guns nor RPG's, maybe night- or a bit darker map and briefcase as objective :) ) I have made a tool which allows you to create totally random scripts without forcing VIP, the tool has instructions how to run it. I know it's a bit clumsy when compared to desktop application, but if you have two displays, you can open the tool and notepad to your secondary display and play with your main one, then creating and saving new scripts can be done in 10 seconds.

Here's the tool (http://susirajavolley.com/randomizer/)
Title: Re: Random weapons
Post by: ronski on Thursday, January 28, 2016, 06:04:42 AM
This is the way the tracking should behave:

If you're not forceclassing, everything tracks as is.
If you run an automatic mod (as in the server automatically forceclass in the beginning of every round), 50% of score and no kills/deaths will be tracked.
Just using the Admin Forceclass commands (which is what the files do) will be the same as a normal server.

Another possibility is to use the "afc" command (http://aao25.com/forum/aa-support/new-admin-command-included-in-8-15-to-forclass/msg79714/#msg79714) to more efficiently forceclass a weapon to everyone. It also effectively falls on the Admin Forceclass category.
I know ELiZ was working on "afc random" but I couldn't find confirmation that he finished it (but I'm pretty sure he did), you can have a try with that as well.
In fact I had a look and the "afc random" should take a random from most all weapons (if not all) including Recruit, 25 altogether.
so if that afc random would work, we would be able to run totally random weapon servers by forcing random gun from .ini. I need to test this straight away
Code: [Select]
weaponforcer=1
forceweapon=random
Title: Re: Random weapons
Post by: teddy_grizzly_bear on Thursday, January 28, 2016, 06:07:52 AM
so if that afc random would work, we would be able to run totally random weapon servers by forcing random gun from .ini. I need to test this straight away
Code: [Select]
weaponforcer=1
forceweapon=random
I'm not entirely sure how the server side of things work, but if the setting was there (in the .ini) before the "afc" command was introduced, I'd be willing to bet random won't work there.
Title: Re: Random weapons
Post by: ronski on Thursday, January 28, 2016, 06:12:33 AM
I'm not entirely sure how the server side of things work, but if the setting was there (in the .ini) before the "afc" command was introduced, I'd be willing to bet random won't work there.
well either one of them worked. With .ini setting I got no gun :) Then afc random gave same error than afc alrwieahltaethateh = forced weapon cannot be found.

Damn, this totally random forceclass would be awesome
Title: Re: Random weapons
Post by: teddy_grizzly_bear on Thursday, January 28, 2016, 06:29:46 AM
Interesting, I could see the source for random forceclassing, but I suppose maybe it's not implemented.
Title: Re: Random weapons
Post by: SASF-DarkShooter on Thursday, January 28, 2016, 06:56:55 AM
There are also rumours that your server might crash if you force guns too much, but haven't seen it happening so Im having hard time believing in it or I just haven't forceclassed enough lol.

Forceclasses are fun imo, but usually you can't use them in maps that has VIP. If you force a gun to VIP, will round end immediately when someone dies. ( Oh yet another place where to dream about new version of Hospital with no VIP and SF guns nor RPG's, maybe night- or a bit darker map and briefcase as objective :) ) I have made a tool which allows you to create totally random scripts without forcing VIP, the tool has instructions how to run it. I know it's a bit clumsy when compared to desktop application, but if you have two displays, you can open the tool and notepad to your secondary display and play with your main one, then creating and saving new scripts can be done in 10 seconds.

Here's the tool (http://susirajavolley.com/randomizer/)
About not being able to force on VIP maps and such, that's why there used to be modified map files, with weapon classes being re-assigned automatically. I remember playing Dusk with sf weapons on FUBAR server, back on 2.6.0.
I've also heard the stuff about forceclassing being able to make a server crash, however it has never happened to me. Was doing it from time to time years ago, back when my server was constantly online, filled with about 20 people and never experienced any issues.
Title: Re: Random weapons
Post by: Vanoke on Thursday, January 28, 2016, 11:50:44 AM
Hey folks, how is it going?
Yesterday [w].^W.e.ll.o^ asked me how to do random weapon scripts on a server. I know that some threads here are covering this topic already but seemingly there are open questions.
Ok, here is what i did to get it working:

1. Download the 'weapon_randomizer_v1_5'. I found it here: http://www.gamefront.com/files/files/6559722/weapon_randomizer_v1_5.zip (http://www.gamefront.com/files/files/6559722/weapon_randomizer_v1_5.zip)
Maybe this is not the newest version - but i dont mind
2. Unzip the file
3. The readme file recommends to put the WeaponRandomizer.exe into your America's Army system folder but doing this prompts an error in 25Assist. For me it worked in any directory so skip this step. Just leave it in the extracted folder.
4. Open WeaponRandomizer.exe
5. Choose the weapons or weapon set you want to randomize
6. Push 'Star Randomizer'. After a few seconds (be patient) it creates a file in the same directory named 'random.txt'. It's just a file with 1000 rows and each of them is a command to force class a player slot (slot 1 - 1000). The first row is an admin message. You can edit the message in text editor.
7. Rename this file (to keep it nice and short i named it 'r1.txt')
8. If u want to play more than one round on the row with the same set of random weapons you should repeat steps 6 and 7 because: If nothing has changed in the player list, each player will have the same weapons again because player slots are still the same. So you need several files - lets say 'r2.txt', 'r3.txt'. 'r4.txt' and so on.
9. After this put these files into your America's Army system folder
10. Now you can use them in game by typing in console 'exec r1.txt' (for the 1st round), 'exec r2.txt' (for the 2nd round), 'exec r3.txt' (for the 3rd round) and so on...

Thats it. I don't know if there are ways to do this more elegant than creating a bunch of files - if so, tell me please. At least this is working.
Hope this helps.

Happy randomizing...
  This works great i juse it for years now   Random.TXT