Single Player Netgame
About
Single
Player Network Game is a set of Lua, physics, and shapes to simulate a network game using bots. The lua
script automatically populates maps with the bot monsters, and the shapes and physics make them look and act
like players in a multiplayer game. Note that this only works on netmaps that don't have embedded physics (this
is the vast majority of netmaps). There are many configurable settings you can tweak to get just the multiplayer
experience you're looking for.
This project is based on RadBurn's Marathon Conflict mod, and wouldn't exist without
the work he put in to create the shapes and the original set of physics. I have tweaked the physics a bit from
the original conflict physics, mostly to make the bots act more like real players in a network game. I have also
added gore to the shapes file, and put the original AR back in place, but otherwise RadBurn did all of the work
on the shapes file.
If you're just wanting to be able to revive in a single player game without reloading the map/saved game, then
there's also a script for that that doesn't have any of the bot stuff.
Setup
If you're looking to play a simulated netgame with bots:
- From the main menu in Infinity, go to Preferences -> Environment
- Select any map pack with netmaps (can't have embedded physics)
- Select SpNet.phyA for physics
- Select SpNet.shpA for shapes
- Check the "Use Solo Script" checkbox
- Select the single_player_netgame.lua script. If you can't find it, you may have to hit "Up" a few times
to get to a location on your computer that you're familiar with. Then you can drill down into the folder
that contains the script.
- Optionally tweak any settings at the top of single_player_netgame.lua, to customize the game to your
liking. The settings are easy to understand and you don't need to know how to write code or anything.
- Begin a new game on a netmap and play
If you want to play some other type of game, and just want to be able to revive without loading the map from
scratch, or reload your save:
- From the main menu in Infinity, go to Preferences -> Environment
- Check the "Use Solo Script" checkbox
- Select the revive_in_single_player.lua script. If you can't find it, you may have to hit "Up" a few
times
to get to a location on your computer that you're familiar with. Then you can drill down into the folder
that contains the script.
Configurable Settings
If you open up the single_player_netgame.lua script in a text editor, there are a number of settings you can
tweak at the top of the file to customize the game. These are easy things to edit and include instructions, so
it doesn't require any coding knowledge.
- TimeLimit - Optional time limit for the game. If set, the bots will disappear and you will stop being able
to control your player once the time ends. If you have fog turned on, your screen will black out. The score
will still be visibile, so you can see how you did. You will then be able to quit out of the game. If you do
not want a time limit, set this value to nil. If you do want a time limit, set the value to a number of game
ticks. For example, if you want a 3 minute time limit, set the value to 30 * 60 * 3, or 5400.
- SlidingBots - This can be true or false. If it's set to true, the bots will slide around as they shoot,
to better simulate real players that can move and shoot at the same time. This makes it more
challenging, but looks a little silly. If you don't like how it looks and don't need the challenge, just
set this setting to false.
- NumBots - The number of bots in the game. Ever wanted to try out a 24 player netgame? Now is your
chance.
- ForceWeapons - The default for this is nil, which means the feature is not turned on. However, if you
want everyone in the game to have shotguns only for example, you can set this to "shutgun". You will
only be able to use shotguns, and only shotgun bots will spawn. The possible options are nil, "fist",
"pistol", "fusion pistol", "assault rifle", "missile launcher", "alien weapon", "flamethrower",
"shotgun", or "smg".
- RestrictBotWeapons - This can be true or false. If true, only bots with the weapons available on the map
will spawn. Otherwise, bots with any type of weapon can spawn. This setting is ignored if ForceWeapons
is set to something.
- EMFH - This can be true or false. If true, all bots will fight each other as well as you. If false, all
of the bots will be on one team against you.
- AllowMADDs - This can be true or false. If true, MADDs can spawn in game. If you don't like MADDs and
want a more true netgame experience, set this to false. This setting is ignored if ForceWeapons is
enabled.
- Game.monsters_replenish - This can be true or false. If false, it will disable monsters that regularly
appear on the netmap, and only bots will spawn. If you want both monsters placed on the maps as well as
bots to spawn, set this to true.
- BRUTAL - This can be true or false. If true, monsters will explode into extra gore when killed. To get more
or less gore, change the scripted effects quality in the settings (Preferences -> Graphics -> Rendering
options -> Scripted Effects Quality. It must be turned up to at least low to get any gore.
- WEIGHT_* - A set of values assigned to each weapon type that determines how likely bots of this weapon
type are to spawn. A higher number means bots of that type will appear more often. I chose defaults
based on what weapons people are actually likely to use in a real netgame. However, if you're not a big
fan of rockets, for example, you could give the rockets a very low weight so that rocket bots will
rarely spawn. Or you can turn them off completely if you'd like, by setting the weight to 0. These
variables let you balance the bots however you'd like.
Troubleshooting
I started a game, and I don't see any bots. I see things on my radar that get in my way, but it isn't working
right!
This happens because the netmap you're attempting to use has embedded physics. This project only works out of
the box with maps that don't have physics embedded into them. If you really want to play on a netmap with this
problem, you can try splitting the map with atque, removing the physics file, and remerging the map. There may
be side effects of doing this, of course. You also may want to take a look at RadBurn's Marathon Conflict, and see if the map you want is
included there. That mod uses specially prepared maps, so you'll need to use that set of files.
I selected some maps specifically designed for Marathon Conflict, but things aren't working!
Marathon Conflict was designed for use with maps set up in a very specific way. This project does not require
special setup of maps, and in fact, will not work correctly if you try to use those maps. Instead, pick regular
netmaps that weren't designed for Conflict.
Credits
As stated before, this project would not exist without RadBurn's Marathon Conflict mod. The shapes included in this
package were made by RadBurn, and most of the physics work. The lua scripts and physics tweaks were done by
W'rkncacnter. The marine gore is taken from the BRUTAL MARATHON mod, and Tooncinator did the marine gore.