info on the mission file format

A forum for the discussion and development of programs to assist working on or playing with the Vegastrike engine and data sets.
Post Reply
Beowulf
Mercenary
Mercenary
Posts: 121
Joined: Thu Jan 15, 2004 5:42 pm

info on the mission file format

Post by Beowulf »

Hi,

I'm looking for information on the mission files. I found a section in the wiki that is dealing with how to use python to build missions but I didn't find anything on the .mission xml files. Is there already a tool for creating/editing/viewing these files? If not and somebody can provide me with the necessary information I might write one...
"History is on the move, Captain. Those who cannot keep up will be left behind, to watch from a distance. And those who stand in our way, will not watch at all."
Grand Admiral Thrawn
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

.mission files are not used any more... except for a few situations, since they are embedded into the way the way the game works.

Editing starting parameters would involve changing the New_Game saved game in the root directory.

Adding a new mission for the mission computer would involve creating a new python module, kind of like cargo_mission.py or defend.py, and adding it to dynamic_missions.py.

Could you explain in more detail what you want to do? Most likely, the *.mission files are not what you want to change.
Beowulf
Mercenary
Mercenary
Posts: 121
Joined: Thu Jan 15, 2004 5:42 pm

Post by Beowulf »

I'd like to create missions like TIE Fighter or X-Wing vs TIE Fighter had them, that means two large fleets of ships attacking one another inside one system with certain conditions to be met for the mission to end successfully. From the few things that I found about the .mission files I concluded that they would be a good place to start for building that kind of mission. Is the python API documented somewhere? Is vegastrike even capable of such missions at the moment? Can starfighters be launched from capital ships or ordered to retreat to them if appropriate conditions are met? Can starfighters rearm at utility vehicles?
TIE Fighter had a pretty straightforward way missions worked. If you take a look at TIE Fighter Workshop available at http://membres.lycos.fr/sosleader/links.htm you get an impression what I have in mind. But maybe vegastrike's mission concept is completely different and that kind of mission editor wouldn't make sense at all?
"History is on the move, Captain. Those who cannot keep up will be left behind, to watch from a distance. And those who stand in our way, will not watch at all."
Grand Admiral Thrawn
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Open up just about any mission file. Say explore_universe.mission since that's the main one used.

You will see one or more flightgroups. In addition you will see a <python> tag. if you don't want any python, take out the entire <python> ... </python> tags.

Then, you can add four flightgroups for the four ships you want, and put them on two opposing factions, say confed and aera. You will start out flying the first ship (nr_ships) of the first flightgroup, no matter what.

Each flightgroup needs a distinct name. Make sure you use ships that exist (in units.csv) or you will see a LOAD_FAILED.

Should be pretty simple... a lot of copy/paste and modifying the faction="", name="" and type="".
Also, modify the <pos> tag for each one and add about 1000 to each position unless you use big capships in which case go for 10000.

Also, delete the <var name="savegame" > tag so that you don't worry about saved games. You can change the system to be "testsystems/absolutelynothing" if you want a blank system with no planets anywhere.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

The test missions are good examples i have been cut and pasting with a few of them to check various models in game.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Beowulf
Mercenary
Mercenary
Posts: 121
Joined: Thu Jan 15, 2004 5:42 pm

Post by Beowulf »

Ok, that sounds quite good. I have a few questions though:

<var name="continuousterrain" value="continuousterrain.txt"/>
what does this do?

<order priority="0" order="superiority" target="enemy"/>
<order priority="1" order="bomber" target="omikron"/>
<order priority="2" order="escort" target="blue"/>
are there any other orders that are possible besides these?

How would I solve the following tasks:
- capturing a ship, that is a ship of the opposing faction docks with it and after they separate it fights for the faction that initiated the docking maneuver
- rearming a ship, that is a ship of it's own faction docks with it and afterwards it's damage is repaired and it's missile magazines are full
- disabling a ship - I'm not sure if that's possible at all in vegastrike. For this a weapon would be necessary that doesn't damage the ships armor and hull but instead takes out it's engine, thrusters and weapons so it becomes immobilized
- setting conditions for mission success and mission failure (for example 'own carrier must survive', 'at least 75% of all enemy forces must be destroyed', 'enemy capital ship must retreat', ...). I'm not sure if this concept exists in vegastrike.
"History is on the move, Captain. Those who cannot keep up will be left behind, to watch from a distance. And those who stand in our way, will not watch at all."
Grand Admiral Thrawn
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

I don't believe that the damage model is fine enough for what you want ATM.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Those are all scriptable via python.
But it's a lot of work to do... so it all depends how much work you want to put into this.

the <order> tags do nothing and are ignored. I believe they follow basic AI.
.mission files allow for a quick game, but not much more.

For mission success and failure... well the issue is that missions run for the whole game. What do you want to happen when you fail that mission? You might as well count that for yourself in that case.
Disabling a ship probably can be done... there are different ways of doing that like changing the AI or you can also physically downgrade the ship by calling downgrade.
Rearming can be done with upgrades from python
Capturing... you can probably set the faction of the ship. I don't know what the function is called, but pretty much every function that exists is exported to python.

This is all documented in the old manual:
http://vegastrike.sourceforge.net/manual/00_fullmanual/
Look in chapter 28 and above for missions and python scripting.
Post Reply