If you'd like to try modding for GearHead-2, arena missions would be a good place to start. First off they're pretty simple to create and to understand. Second, the game needs a whole lot more of them.
Go to the series directory and take a look at the ARENAMISSION_*.txt files; that's where the missions are stored. You can create a new file with a filename like ARENAMISSION_foo.txt and store your missions there; it will be automatically located and loaded by the game as needed.
The arenamission itself contains the following information:
- A description of the scene where the mission will take place
- The contents of the scene where the mission will take place
- The name, description, and pay rate for the mission
- Elements needed by the mission. These elements are the same as the elements used by plots.
- A description of what arena units can be given this mission
BASIC INFORMATION
==============
Start a new arenamission by entering the line "ArenaMission" into your file. First fill out the basic information. The mission must have a name, desc, and requires string attributes.
The name is the name of the mission. The desc is the text shown when browsing the missions in the ArenaHQ. It's usually a good idea to have both of these before doing anything else, just so that you know what you're doing.
The requires SAtt tells what kind of arena units will be given this mission. It holds the faction type (Military, Corporate, Police, or Criminal), the designation of the faction (a five letter code telling exactly what faction this unit belongs to; SILKN=Silver Knights, L5LAW= L5 Law), and the rank code of the unit (!Ne, !Lo, !Md, !Hi, !Ex in ascending order). The rank code can be used to limit missions to certain difficulcy levels.
The requires string uses the same format as in the core story; basically all the tags present must be found in the unit's context or the mission is rejected. If a tag is preceded by "-" it must not be present in the unit's context. A group of tags can be surrounded by ( ) and separated by | to create an or-list; at least one of the tags in the list must be present. See the xxranplotgen.txt doc for more information.
You can also set the payrate; basic payrate is 400%. You can make it higher or lower at your whim. If the payrate is undefined, it will be 400%.
MAP TYPE
======
Next you can define what kind of map this battle will take place on. The easiest thing to do is find another mission that uses a map you like, and copy the data from there. You may see things like "WildMap" or "CaveMap" or "SpaceMap SpaceScroll MicroGravity Vacuum".
ELEMENTS
=======
Like a plot, an arena mission can request elements. There are really only two kinds of elements to worry about: Factions and Prefabs. A faction is, as it sounds, a faction. A Prefab is a premade component found in the inventory of the mission; typically this is how you will define NPCs for a mission, since if you just stick them there without declaring them as elements they won't be given persona IDs.
See the "element search.txt" doc for some cryptic details of how element searches work.
MAP SCRIPTS
=========
Next come the map scripts. When the map is first visited (or when the player returns after reloading a saved game), the START script is executed. Usually at the start I print an introductory message or cause an NPC to address the party; see the actual missions for examples.
Two other important script lines are "NU1" and "NU2". No, I am not being dirty in French... these scripts are executed every time the number of master gears (characters, mecha, or props) on Team 1 and Team 2 change. You can define additional teams, in which case you can define additional scripts (as NU[team number]).
MAP SUBCOMS
==========
Next come the subcoms of the mission. There are two main things to place here- teams and personas. A team defines a team. You can give it a name if you want. The most important thing is to define its enemies and allies, which can be done with the SetEnemy and SetAlly commands.
For the enemy team, it's also important to give them some mecha! This can be done with the following script:
Deploy <SetSelfFaction M1 WMecha 2 Threat ArenaRenown 400>
This will set the team's faction to M1 (which means Mission Element 1; if you don't want to give them a faction or want to set it to something other than element 1 you can change this). WMecha adds some mecha to the scene, on team 2; the number of mecha added is determined by the Threat function, which takes as its parameters the arena unit's renown score and a percentage (in this case, 400%).
You can also set starting locations for the teams with the commands ParaX and ParaY. All mecha on these teams will start out close to the location you provide.
Team 1 is always the player team.
MAP INVCOMS
=========
Here you place physical things that will appear on the map. Characters should be declared as prefab elements in order to give them a character ID. If you assign a negative faction to a character (say, -n), when initialized they will be given element Abs(N) as their faction. So, set a character's faction to -1 to assign it to the faction picked for element 1.
ENDING THE MISSION
==============
Somewhere in your scripts you need the commands WinArenaMission and LoseArenaMission. These commands will end the mission in either a win or a loss. You may want to pair WinArenaMission with Salvage if you want this mission to give salvage.
That's about it. Post some ideas for missions, and I'll discuss how they could be modeled in this system.