Mortars in Ace of Spades [v1.18 released]

The original, free Ace of Spades game powered by the Voxlap engine. Known as “Classic,” 0.75, 0.76, and all 0.x versions. Created by Ben Aksoy.
30 posts Page 1 of 2 First unread post
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


Download the script from this topic
I've made a video demonstrating how to use my mortar script located here. That forum doesn't get much traffic, though, so I thought I'd post it here so more people are aware it exists.

Watch the video in 720p to be able to see the commands typed, although I do (badly) narrate throughout and tell you of most commands.

If you decide to download it and are stuck on how to use them, typing /mhelp will bring up the help text. A lot of commands are prefixed with "m" or "mortar" to avoid conflict with default commands (such as /mortarban or /mortarkick) or any other commands that may exist that I don't know of yet.

Suggestions/comments are welcome!
Last edited by Influx on Sun Mar 17, 2013 10:02 pm, edited 12 times in total.
Articsledder
Deuced Up
Posts: 209
Joined: Mon Nov 12, 2012 5:13 pm


Wow, that's awesome! I would love to try it out on a full server.
Vucgy
Deuced Up
Posts: 226
Joined: Sun Nov 18, 2012 1:57 pm


Awesome , Thats a weapon AOS needs ! Its a pity Ben the traitor never made the Mortar come to life even he promised!
Anyway its pretty hard to use such a script mortar , While a game implanted one would be much easier and better to use.
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


Articsledder wrote:
Wow, that's awesome! I would love to try it out on a full server.
So would I, just hope that it becomes popular enough to make it onto the big servers so I can see it in full. I actually have a server again, and it's up to test the script over a proper server and not just localhost - [url=aos://4003940428:32887]Mortar Testing Server[/url]
Vucgy wrote:
Awesome , Thats a weapon AOS needs ! Its a pity Ben the traitor never made the Mortar come to life even he promised!
Anyway its pretty hard to use such a script mortar , While a game implanted one would be much easier and better to use.
Well, it's something I would have loved to have properly implemented in-game, and I saw a lot of posts from others throughout the different forums saying the same thing. Like I said, it is command-heavy but there's no real other alternative I'm afraid.
TheGeekZeke101
Deuced Up
Posts: 116
Joined: Sun Dec 02, 2012 6:54 pm


I had the opportunity to test these bad boys out and see them in action. Tons of fun. I'd definitively recommend going into the server and trying them out for yourself.

If you happen to go into the server, use the commands as much as possible to help get through things. Don't be overwhelmed.
CommunistBlock
Deuce
Posts: 17
Joined: Fri Nov 02, 2012 3:37 am


I think it'd be interesting if it would play the noise of a falling mortar if you are in the distance of getting hit. If it's possible of coarse.
H@nkthet@nk
Deuced Up
Posts: 145
Joined: Thu Dec 13, 2012 5:40 pm


... All of my want!!!
If you can get this main stream you would have a lot of praise and much glory!!!!!!! Blue_Happy3
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


TheGeekZeke101 wrote:
I had the opportunity to test these bad boys out and see them in action. Tons of fun. I'd definitively recommend going into the server and trying them out for yourself.

If you happen to go into the server, use the commands as much as possible to help get through things. Don't be overwhelmed.
Thanks, it was good having such a thorough tester help me with trying them out. Hope to see you back in there soon!
CommunistBlock wrote:
I think it'd be interesting if it would play the noise of a falling mortar if you are in the distance of getting hit. If it's possible of coarse.
There's 2 things wrong with this, though.

1) As far as I'm aware, there is no way to implement custom sounds in PySnip/PySpades.
2) The whole 'mortars/bombs whistling as they fall' is a myth. That noise is the sound of a bullet/artillery shell breaking the sound barrier. Mortar rounds travel slower than the speed of sound, so can't break the sound barrier.

Plus, when I've been on the recieving end of a mortar bombardment, it's pretty scary when the world suddenly starts exploding. Any noise could prepare people to get under cover, which lowers the fear of being caught in the open, and surprise when the rounds start falling.
H@nkthet@nk wrote:
... All of my want!!!
If you can get this main stream you would have a lot of praise and much glory!!!!!!! Blue_Happy3
Well, it depends on how well-recieved it is, and whether it's to a server admin's taste. Scripts can sometimes fly under-the-radar because they don't get popular, or an admin just might not think these are suitable to their server's style. I'd really like to see them make it onto a big server, though, I'd love to see it in operation on a full map.
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


I've added a new video showcasing some new features. The script seems to be completely stable now with no crashes, and most of the features I initially planned out are in the script, plus some neat ones (such as satchel charges) that were a response to testing gameplay.

I don't think there's much left to add now, mostly just new maps, bugfixes (if any), and tweaks. Hope you enjoy the script.
10se1ucgo
3 Years of Ace of Spades
3 Years of Ace of Spades
Posts: 198
Joined: Sun Dec 16, 2012 4:29 pm


Okay, my server is now running this thing :D
[url=aos://2715047491:32887]The Sun Server - Mortars! v1.15[/url]
HoboHob
Winter Celebration 2013
Winter Celebration 2013
Posts: 979
Joined: Mon Nov 05, 2012 5:02 pm


I tried these out. Extremely boring and hard to use. Make it moar user friendly.
10se1ucgo
3 Years of Ace of Spades
3 Years of Ace of Spades
Posts: 198
Joined: Sun Dec 16, 2012 4:29 pm


While using the script for a while, I noticed some bugs.

When the grownade.py script is enabled, advancing to another map causes this:
Code: Select all
2013-02-17 18:35:10-0500 [-] Loading map 'Normandie'...
2013-02-17 18:35:14-0500 [-] Map loaded successfully.
2013-02-17 18:35:14-0500 [-] Unhandled Error
	Traceback (most recent call last):
	  File "run.py", line 1037, in <module>
	    reactor.run()
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1162, in run
	    self.mainLoop()
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1171, in mainLoop
	    self.runUntilCurrent()
	--- <exception caught here> ---
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 793, in runUntilCurrent
	    call.func(*call.args, **call.kw)
	  File "run.py", line 742, in set_map_name
	    self.on_map_leave()
	  File "C:\PySnip\feature_server\scripts\grownade.py", line 309, in on_map_leave
	    for grower in self.growers[:]:
	exceptions.TypeError: 'NoneType' object is not subscriptable
And when running the basicbots.py script by hompy, the following error appears when someone tries to connect to the server.
Code: Select all
2013-02-17 17:48:14-0500 [IRCBot,client] Joined channel #TheSunServer
2013-02-17 17:49:47-0500 [-] Traceback (most recent call last):
2013-02-17 17:49:47-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:49:47-0500 [-]     self.on_connect(peer)
2013-02-17 17:49:47-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:49:47-0500 [-]     connection.on_connect()
2013-02-17 17:49:47-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:49:47-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:49:47-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:49:56-0500 [-] Traceback (most recent call last):
2013-02-17 17:49:56-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:49:56-0500 [-]     self.on_connect(peer)
2013-02-17 17:49:56-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:49:56-0500 [-]     connection.on_connect()
2013-02-17 17:49:56-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:49:56-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:49:56-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:50:24-0500 [-] Traceback (most recent call last):
2013-02-17 17:50:24-0500 [-]   File "..\pyspades\protocol.py", line 163, in update
2013-02-17 17:50:24-0500 [-]     self.on_disconnect(peer)
2013-02-17 17:50:24-0500 [-]   File "..\pyspades\protocol.py", line 111, in on_disconnect
2013-02-17 17:50:24-0500 [-]     connection.on_disconnect()
2013-02-17 17:50:24-0500 [-]   File "C:\PySnip\feature_server\scripts\mortar.py", line 1109, in on_disconnect
2013-02-17 17:50:24-0500 [-]     return connection.on_disconnect(self)
2013-02-17 17:50:24-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 336, in on_disconnect
2013-02-17 17:50:24-0500 [-]     for bot in self.protocol.bots:
2013-02-17 17:50:24-0500 [-] TypeError: 'NoneType' object is not iterable
2013-02-17 17:50:26-0500 [-] Traceback (most recent call last):
2013-02-17 17:50:26-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:50:26-0500 [-]     self.on_connect(peer)
2013-02-17 17:50:26-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:50:26-0500 [-]     connection.on_connect()
2013-02-17 17:50:26-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:50:26-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:50:26-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:50:37-0500 [-] Received SIGBREAK, shutting down.
2013-02-17 17:50:37-0500 [IRCBot,client] Lost connection to IRC server ([Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
2013-02-17 17:50:37-0500 [IRCBot,client] ]), reconnecting in 20 seconds
2013-02-17 17:50:37-0500 [IRCBot,client] Stopping factory <irc.IRCClientFactory instance at 0x017EBE68>
If it helps, basicbots.py alters the server.py in the /pyspades/ director.y
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


HoboHob wrote:
I tried these out. Extremely boring and hard to use. Make it moar user friendly.
I understand these are not for some people, it's impossible to be able to please everyone. That's why these are an optional feature - players can still run around and kill each other if they want, but the mortars are there to add an extra dynamic to the game if anyone wants to use it. As for user-friendliness, there's not much more I can do to improve it since it's just a script and not actually hard-coded into the game.
10se1ucgo wrote:
While using the script for a while, I noticed some bugs.

When the grownade.py script is enabled, advancing to another map causes this:
Code: Select all
2013-02-17 18:35:10-0500 [-] Loading map 'Normandie'...
2013-02-17 18:35:14-0500 [-] Map loaded successfully.
2013-02-17 18:35:14-0500 [-] Unhandled Error
	Traceback (most recent call last):
	  File "run.py", line 1037, in <module>
	    reactor.run()
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1162, in run
	    self.mainLoop()
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 1171, in mainLoop
	    self.runUntilCurrent()
	--- <exception caught here> ---
	  File "C:\Python27\lib\site-packages\twisted\internet\base.py", line 793, in runUntilCurrent
	    call.func(*call.args, **call.kw)
	  File "run.py", line 742, in set_map_name
	    self.on_map_leave()
	  File "C:\PySnip\feature_server\scripts\grownade.py", line 309, in on_map_leave
	    for grower in self.growers[:]:
	exceptions.TypeError: 'NoneType' object is not subscriptable
And when running the basicbots.py script by hompy, the following error appears when someone tries to connect to the server.
Code: Select all
2013-02-17 17:48:14-0500 [IRCBot,client] Joined channel #TheSunServer
2013-02-17 17:49:47-0500 [-] Traceback (most recent call last):
2013-02-17 17:49:47-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:49:47-0500 [-]     self.on_connect(peer)
2013-02-17 17:49:47-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:49:47-0500 [-]     connection.on_connect()
2013-02-17 17:49:47-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:49:47-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:49:47-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:49:56-0500 [-] Traceback (most recent call last):
2013-02-17 17:49:56-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:49:56-0500 [-]     self.on_connect(peer)
2013-02-17 17:49:56-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:49:56-0500 [-]     connection.on_connect()
2013-02-17 17:49:56-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:49:56-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:49:56-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:50:24-0500 [-] Traceback (most recent call last):
2013-02-17 17:50:24-0500 [-]   File "..\pyspades\protocol.py", line 163, in update
2013-02-17 17:50:24-0500 [-]     self.on_disconnect(peer)
2013-02-17 17:50:24-0500 [-]   File "..\pyspades\protocol.py", line 111, in on_disconnect
2013-02-17 17:50:24-0500 [-]     connection.on_disconnect()
2013-02-17 17:50:24-0500 [-]   File "C:\PySnip\feature_server\scripts\mortar.py", line 1109, in on_disconnect
2013-02-17 17:50:24-0500 [-]     return connection.on_disconnect(self)
2013-02-17 17:50:24-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 336, in on_disconnect
2013-02-17 17:50:24-0500 [-]     for bot in self.protocol.bots:
2013-02-17 17:50:24-0500 [-] TypeError: 'NoneType' object is not iterable
2013-02-17 17:50:26-0500 [-] Traceback (most recent call last):
2013-02-17 17:50:26-0500 [-]   File "..\pyspades\protocol.py", line 161, in update
2013-02-17 17:50:26-0500 [-]     self.on_connect(peer)
2013-02-17 17:50:26-0500 [-]   File "..\pyspades\protocol.py", line 105, in on_connect
2013-02-17 17:50:26-0500 [-]     connection.on_connect()
2013-02-17 17:50:26-0500 [-]   File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:50:26-0500 [-]     if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:50:26-0500 [-] TypeError: object of type 'NoneType' has no len()
2013-02-17 17:50:37-0500 [-] Received SIGBREAK, shutting down.
2013-02-17 17:50:37-0500 [IRCBot,client] Lost connection to IRC server ([Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
2013-02-17 17:50:37-0500 [IRCBot,client] ]), reconnecting in 20 seconds
2013-02-17 17:50:37-0500 [IRCBot,client] Stopping factory <irc.IRCClientFactory instance at 0x017EBE68>
If it helps, basicbots.py alters the server.py in the /pyspades/ director.y
If you notice, these aren't caused by mortar.py. The first one fails at this line;
File "C:\PySnip\feature_server\scripts\grownade.py", line 309, in on_map_leave
for grower in self.growers[:]:
exceptions.TypeError: 'NoneType' object is not subscriptable
which is in grownade.py, and will probably be caused by a line that says self.growers = None somewhere. The second fails at this line;
2013-02-17 17:50:26-0500 [-] File "C:\PySnip\feature_server\scripts\basicbots.py", line 331, in on_connect
2013-02-17 17:50:26-0500 [-] if len(protocol.connections) + len(protocol.bots) > max_players:
2013-02-17 17:50:26-0500 [-] TypeError: object of type 'NoneType' has no len()
Which is in basicbots.py. Again, it'll be most likely caused by either a line saying protocol.connections = None or protocol.bots = None (or both).

Since I don't know how either of them work, I suggest you contact the people who made them for help. Thanks for putting it on your server, though, and I hope you get it working.
hompy
Scripter
Scripter
Posts: 3
Joined: Sun Feb 03, 2013 12:33 pm


Influx the error is in your script... you're swallowing the on_map_change event.
In mortar.py, Line 1164, add
Code: Select all
protocol.on_map_change(self, map)
(you really should fix this since it can potentially break a lot of things)

_______________________________________________________________________________________


I really like the idea, it was fun to try locally. I'd love to see stuff getting blown away in a full server!

To be honest though, I couldn't figure out how to use it with only the ingame help, and I think some things could be improved a lot.

I strongly believe players shouldn't EVER have to insert commands, much less cryptic codewords with verbose feedback hard to read in a populated server.

This is a tough limitation, I know! How to make it intuitive and accessible to the average user...

I'm asking a lot, but to show that I care I took some time to try and come up with solutions. (full image here)

Image
Influx
Mapper
Mapper
Posts: 163
Joined: Sat Dec 15, 2012 5:11 pm


hompy wrote:
Influx the error is in your script... you're swallowing the on_map_change event.
In mortar.py, Line 1164, add
Code: Select all
protocol.on_map_change(self, map)
(you really should fix this since it can potentially break a lot of things)
Oops, this is a proper amateur error, and although I still class myself as 'amateur' at coding, I can't believe I overlooked something so simple. Fixed, thanks for pointing it out. I guess I just had my blinkers on.
hompy wrote:
I really like the idea, it was fun to try locally. I'd love to see stuff getting blown away in a full server!

To be honest though, I couldn't figure out how to use it with only the ingame help, and I think some things could be improved a lot.

I strongly believe players shouldn't EVER have to insert commands, much less cryptic codewords with verbose feedback hard to read in a populated server.

This is a tough limitation, I know! How to make it intuitive and accessible to the average user...
It certainly is high praise indeed when it's coming from arguably the best scripter for AoS. I have started working away from relying wholly on commands (such as spade-to-fire and spade-to-destroy), and there are a couple of ideas fizzing around in my head for how to handle use, elevation/traverse and ammo selection.
hompy wrote:
I'm asking a lot, but to show that I care I took some time to try and come up with solutions. (full image here)
There are a lot of good ideas in that graphic, and thanks for taking the time to produce it. I have a few comments on it, though;

Calibration
- Locking the player's movement, in my opinion, is probably going to lead to frustration. Since the current system relies on kicking a player out of use mode when they stray too far away from the mortar, locking them im-place would then require an /unuse command. This would be annoying when you want to run from the area quickly, like when an enemy grenade comes into the bunker.
- I've delved deep into the PySpades code and can't find where the client-side values are kept, so I'm not sure how I would go about making the traverse show up for the health. If you know the way of doing this, I'd love to hear it, because it's caused me some headaches in the past where server-side and client-side values aren't matching.

Alternative to /fire
- I think requiring grenades would severely underpower the mortar, as well as decreasing the overall rate of fire (ROF) to unrealistic and unuseful amounts. Real mortars have a ROF of about 20-30 rounds per minute, which is 1 round every 2-3 seconds. They also don't require an external propellant, the propulsion is caused by a small charge in the bottom of the mortar which explodes when it hits the baseplate.
- Using grenades also limits a player's ability to use them. At the moment, servers can decide whether mortars require any minimum kills and they can also give every player who joins X amount of rounds so they can jump straight on to one.
- Lastly, this would be open to abuse. I've been extremely careful to avoid most, if not all, ways this script could be abused, and using this method of firing would throw a curveball into the mix. How would you stop a team-mate throwing grenades into your mortar when you didn't want to fire it? How would the script differentiate between a team-mate working as a team with you and a team-mate trying to aggravate you? What happens if you have terrible aim with the grenade and miss?

- I really like the idea of transferring a player's vision to the target zone. There are just a few problems that I can see. Firstly, I wouldn't know how to even start going about scripting this. Second, how would a player fire a salvo (a burst of rounds) off if they're instantly transported to the target zone? And lastly, this could be a bit unfair if an enemy is about to destroy the mortar and the player suddenly teleports back in from limbo and kills them.

Mortar Sounds

- I think most of the rounds do have a distinctive sound (High Explosives aside, which are just 1 grenade at the moment). The type of round you've described in the graphic would really be a cluster bomb. I have thought of adding these, but the main round explodes high in the air to ensure maximum scattering of all subsequent bombs. Shrapnel from normal rounds aren't explosive since they're just bits of metal, and shrapnel is also modelled well enough in the base grenades to really nullify adding it manually to the script.

Thanks for the ideas, though. It's nice to see someone come through with such detailed suggestions and it's certainly food for thought. If you have any more, or comments to my comments, I'd love to hear them as well.
30 posts Page 1 of 2 First unread post
Return to “Ace of Spades 0.x Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests