Difference between revisions of "Development:Quests & Campaigns"

From VsWiki
Jump to: navigation, search
m (See also: HowTo:Edit News)
Line 2: Line 2:
 
----
 
----
 
{{Template:Spoiler}}
 
{{Template:Spoiler}}
 +
 +
This page is meant to provide a platform for campaign/mission programmers to merge their ideas and best practices...
 +
 +
=Python Scripting=
 +
 +
==Scripting Basics==
 +
 +
VS has a lot of different ways of doing one thing. Just pick the most appropriate one for the job. It supports campaigns, missions, independent fixers, quests, etc., all of them having their specific ways of hooking them up into the game.
 +
 +
Quests are run inside of "random_encounters.py". If it returns 1 or True, it will keep going. If it returns 0, False or None (python returns None if you don't say what to return) then the quest will stop Execute()ing and be deleted until you jump into that system again or reload.
 +
 +
==Getting Objects==
 +
{{Fixme}} Improve/expand it.
 +
 +
==More Topics==
 +
{{Fixme}} Improve/expand it.
 +
 +
==Flight Groups==
 +
You can use "flightgroup directives" to give units specific orders (which is cool if you want to generate two drones and make one blow up another)
 +
 +
The list of is in C++ (undocumented) but I've decided to look through the code. This should probably go to the wiki sometime
 +
 +
H,h (help) -- leader of flightgroup requests help.
 +
B,b (break and attack) -- default, everyone attacks like normal
 +
A,a (attack target) -- attack their current targets
 +
lowercase k -- something undocumented, says something about capships. Probably it's an order to take out capship turrets with priority, or it's a pure bomber order to attack capships and ignore fighters.
 +
F,f (flagship?) -- Ship being escorted. I would imagine that it's an order to attack a ship being escorted by the hostile faction. Alternatively, it could be an order to fly in formation.
 +
L,l -- undocumented, like F but has complicated formation rules. Could be a shortcut for "Leave" - ships heading out.
 +
E,e -- half of this is copy and pasted from L but I have no idea. I'd say it is "escort", escort a designated ship.
 +
P,p (protect)-- I want to help out
 +
 +
You can also add a "." to the end to ensure that the unit will not change targets on its own.
 +
Also, a capital letter overrides the AI script, and lower case will allow it to be changed.
 +
 +
Unfortunately I don't see any codes for acting like a sitting duck... You could try something like making it target itself, or making it target NULL (which you get by calling the constructor VS.Unit() ) and then using something like "A."
 +
 +
Or, just try doing a "B." and having it target you, and make sure it is friendly... then it might just fly near you.
 +
 +
I believe you can get it to fly places by having it target them and then force it to do unit.setFgDirective("B.") which I think forces it to act like normal and fly to this target.
 +
 
=Quests, Missions, Campaigns & Adventures=
 
=Quests, Missions, Campaigns & Adventures=
This page is meant to provide a platform for campaign/mission programmers and story writers to discuss and merge their ideas etc...
 
 
 
==The first major campaign written (Jenek)==
 
==The first major campaign written (Jenek)==
See also the [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=3246 forum thread] (comments & feedback) when this mission was first put into [[CVS]].
+
See also the [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=3246 forum thread] (comments & feedback) when this mission was first put into [[SVN]].
===To do===
 
 
{{Fixme}} Improvements/expend it?
 
{{Fixme}} Improvements/expend it?
  

Revision as of 15:08, 28 March 2008

thumb_arrow_up.png Development

This page may contain SPOILERS of missions and other content of the game. Please do not read this if you want to play the game from the beginning and without knowledge you shouldn't have yet ;)

This page is meant to provide a platform for campaign/mission programmers to merge their ideas and best practices...

Python Scripting

Scripting Basics

VS has a lot of different ways of doing one thing. Just pick the most appropriate one for the job. It supports campaigns, missions, independent fixers, quests, etc., all of them having their specific ways of hooking them up into the game.

Quests are run inside of "random_encounters.py". If it returns 1 or True, it will keep going. If it returns 0, False or None (python returns None if you don't say what to return) then the quest will stop Execute()ing and be deleted until you jump into that system again or reload.

Getting Objects

FIXME Improve/expand it.

More Topics

FIXME Improve/expand it.

Flight Groups

You can use "flightgroup directives" to give units specific orders (which is cool if you want to generate two drones and make one blow up another)

The list of is in C++ (undocumented) but I've decided to look through the code. This should probably go to the wiki sometime

H,h (help) -- leader of flightgroup requests help. B,b (break and attack) -- default, everyone attacks like normal A,a (attack target) -- attack their current targets lowercase k -- something undocumented, says something about capships. Probably it's an order to take out capship turrets with priority, or it's a pure bomber order to attack capships and ignore fighters. F,f (flagship?) -- Ship being escorted. I would imagine that it's an order to attack a ship being escorted by the hostile faction. Alternatively, it could be an order to fly in formation. L,l -- undocumented, like F but has complicated formation rules. Could be a shortcut for "Leave" - ships heading out. E,e -- half of this is copy and pasted from L but I have no idea. I'd say it is "escort", escort a designated ship. P,p (protect)-- I want to help out

You can also add a "." to the end to ensure that the unit will not change targets on its own. Also, a capital letter overrides the AI script, and lower case will allow it to be changed.

Unfortunately I don't see any codes for acting like a sitting duck... You could try something like making it target itself, or making it target NULL (which you get by calling the constructor VS.Unit() ) and then using something like "A."

Or, just try doing a "B." and having it target you, and make sure it is friendly... then it might just fly near you.

I believe you can get it to fly places by having it target them and then force it to do unit.setFgDirective("B.") which I think forces it to act like normal and fly to this target.

Quests, Missions, Campaigns & Adventures

The first major campaign written (Jenek)

See also the forum thread (comments & feedback) when this mission was first put into SVN. FIXME Improvements/expend it?

See also