Author Topic: AimMode - Aim practise gamemode script  (Read 15215 times)

0 Members and 1 Guest are viewing this topic.

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
AimMode - Aim practise gamemode script
« on: February 08, 2016, 12:21:57 pm »
Script Name: AimMode.
Author: Fryer.
Core Version: 2.8.0 (Soldat 1.7.0), using SC3.
Description: A scripted 1on1 gamemode for aim practise. Map included in download.

Installation:
  • Backup 'weapons.ini' and 'mapslist.txt' from your soldatserver folder if you need them later.
  • Remove (and optionally backup) all maps from 'maps/...'.
  • Extract the contents of the attached zip to your soldatserver folder.
  • Set "Sandboxed=1" and "Scripting=1" in 'server.ini', and "GameStyle=2" in 'soldat.ini'.

Features:
  • Resets HP and ammo (+ knife) after each kill to ensure fair aim duels.
  • Selfkill gives the opponent the kill. (/brutalkill and /mercy disabled.)
  • !help shows a list of commands.
  • Commands to restrict available weapons and max grenade count.
  • Team selection and map restart commands.
  • Configure all of the above in 'scripts/AimMode/data/config.ini'.

Bugs and issues:
  • Spas only reloads to 6 ammo after killing. Setting it to 7 would cause it to jump back to 0 if the reload animation was active.
  • Weapon mod required to make Barrett reload instantly after killing.
  • A problem with sandboxed mode 2 requires the script to run in mode 1 to load the config.
« Last Edit: February 12, 2016, 01:18:22 pm by Fryer »
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #1 on: February 09, 2016, 01:14:21 pm »
Update: Fixed some file clutter, no changes in the script.
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline CCalp

  • Global Moderator
  • Soldier
  • *****
  • Posts: 238
  • calp (SN)
Re: AimMode - Aim practise gamemode script
« Reply #2 on: February 09, 2016, 03:56:58 pm »
Thank you! Is there any server running the script yet?

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #3 on: February 09, 2016, 05:33:36 pm »
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.

EDIT: I'm no longer hosting a server for AimMode.
« Last Edit: April 19, 2016, 01:06:48 pm by Fryer »
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: AimMode - Aim practise gamemode script
« Reply #4 on: February 12, 2016, 08:36:12 am »
Line: 32
Code: [Select]
procedure SpawnNades();
var
    SpawnedAt: Array[1..255] of Boolean;
begin
    for I := 1 to 255 do begin
        SpawnedAt[I] := False;
    end;
end;

As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #5 on: February 12, 2016, 01:19:16 pm »
Line: 32
Code: [Select]
procedure SpawnNades();
var
    SpawnedAt: Array[1..255] of Boolean;
begin
    for I := 1 to 255 do begin
        SpawnedAt[I] := False;
    end;
end;

As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.

https://github.com/remobjects/pascalscript/blob/master/Source/uPSRuntime.pas#L1764 agrees, updated.
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline urraka

  • Soldat Developer
  • Flagrunner
  • ******
  • Posts: 703
Re: AimMode - Aim practise gamemode script
« Reply #6 on: February 12, 2016, 04:30:01 pm »
Are you sure InitializeVariant is called for local variables though? Local variables aren't initialized with default values, usually (they are left off with garbage). Maybe they are initialized on this particular pascalscript implementation, but if it's not documented to behave like that it's probably not a safe assumption to make.

Free Pascal documentation says:

Quote
By default, variables in Pascal are not initialized after their declaration. Any assumption that they contain 0 or any other default value is erroneous: They can contain rubbish.

http://www.freepascal.org/docs-html/ref/refse23.html
urraka

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: AimMode - Aim practise gamemode script
« Reply #7 on: February 13, 2016, 05:51:04 am »
Every variable in PascalScript is initialized, both global and local, even inside of records. I even think it has some simple GC in case you forgot to free TNewPlayer or sth.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline machina

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1117
  • The world isn't nice. Why should I be...?
Re: AimMode - Aim practise gamemode script
« Reply #8 on: April 19, 2016, 07:22:30 am »
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #9 on: April 19, 2016, 01:07:34 pm »
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.
Indeed, I stopped hosting it. Post edited.
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
Re: AimMode - Aim practise gamemode script
« Reply #10 on: April 19, 2016, 01:25:26 pm »
And no one in this not played, so there was no chance even test.

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #11 on: April 20, 2016, 12:28:10 pm »
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline %%%%%%%

  • Soldier
  • **
  • Posts: 205
Re: AimMode - Aim practise gamemode script
« Reply #12 on: April 20, 2016, 11:09:47 pm »
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?

My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.

Offline Fryer

  • Camper
  • ***
  • Posts: 261
  • Game dev
Re: AimMode - Aim practise gamemode script
« Reply #13 on: April 21, 2016, 05:06:31 am »
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
...PC vs Mac is like AK47 vs M4A1...
<DutchFlame`> i once heard running runescape in the background gave you a speedboost
<Mr> yes, it allocates more electrons, so there are more electrons available for Soldat -> they are streched less and it is more fluent

Soldat PolyWorks 1.5.0.13 - AimMode - Aim practise gamemode script - Fryer's SoldatStream Mod

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
Re: AimMode - Aim practise gamemode script
« Reply #14 on: April 21, 2016, 10:12:16 am »
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?

My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.

Because of his polish nickname is a frajer.

Offline %%%%%%%

  • Soldier
  • **
  • Posts: 205
Re: AimMode - Aim practise gamemode script
« Reply #15 on: April 21, 2016, 12:52:29 pm »
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
Fair enough, thanks for expounding; mind you, I wasn't criticizing you for taking your server down -- that's your prerogative and you have every right.

Because of his polish nickname is a frajer.
If you have nothing of value to say, don't say anything.
« Last Edit: April 21, 2016, 12:54:19 pm by %%%%%%% »