| File |
Date |
Author |
Commit |
|
.vegastrike
|
2003-01-04
|
hellcatv
|
[r5218]
added the new songs to peace and vicotry
|
|
History_and_backstory
|
2002-12-23
|
hellcatv
|
[r5004]
jack's new dgn desc
|
|
ai
|
2003-02-03
|
hellcatv
|
[r5379]
better role lookups :-) removed dumb files
|
|
animations
|
2003-01-04
|
hellcatv
|
[r5209]
fixed static to be clear
|
|
bases
|
2003-02-20
|
hellcatv
|
[r5415]
fixed a missing VS.
|
|
bomber-cockpit.cpt
|
2002-07-26
|
hellcatv
|
[r4000]
added the objective vdu
|
|
characterdevelopment
|
2002-11-30
|
jacks
|
[r4880]
Intro story for player character
|
|
communications
|
2002-06-16
|
hellcatv
|
[r3620]
bye voices
|
|
disabled-cockpit.cpt
|
2003-03-19
|
hellcatv
|
[r5471]
oops forgot tocommit gauge
|
|
enigma_sector
|
2003-01-06
|
hellcatv
|
[r5248]
heaven's gate sun size fixed
|
|
force_feedback
|
2002-03-17
|
alexannika
|
[r2312]
Initial revision
|
|
gemini_sector
|
2002-07-01
|
hellcatv
|
[r3809]
oop
|
|
heavy-cockpit.cpt
|
2002-12-31
|
ace123
|
[r5077]
fixed things to stay in your faction when getti...
|
|
hornet-cockpit.cpt
|
2002-07-26
|
hellcatv
|
[r4001]
added obj
|
|
light_cockpit.cpt
|
2002-08-20
|
hellcatv
|
[r4391]
made colors diff
|
|
medium_cockpit.cpt
|
2002-08-20
|
hellcatv
|
[r4391]
made colors diff
|
|
meshes
|
2002-08-08
|
hellcatv
|
[r4299]
fixed ani
|
|
mission
|
2003-03-20
|
hellcatv
|
[r5479]
added jumping crash mission
|
|
mission_sector
|
2002-06-14
|
ace123
|
[r3543]
fixing stuff
|
|
modules
|
2003-04-09
|
hellcatv
|
[r5609]
baleted!!!!!!!!!!!!!!!!!!
|
|
nav
|
2003-03-25
|
hellcatv
|
[r5520]
chagned some art
|
|
rlaan-cockpit.cpt
|
2002-08-20
|
hellcatv
|
[r4391]
made colors diff
|
|
sol_sector
|
2002-12-31
|
hellcatv
|
[r5096]
bye sirisu
|
|
sounds
|
2003-01-02
|
ace123
|
[r5138]
committed new sound fx
|
|
sprites
|
2002-12-31
|
hellcatv
|
[r5086]
the upper left map
|
|
stardatafiles
|
2003-03-26
|
jacks
|
[r5536]
star data
|
|
terrain
|
2002-08-27
|
dandandaman
|
[r4446]
well, it is doing something
|
|
textures
|
2003-03-20
|
mamiyaotaru
|
[r5480]
remaining BMPs changed to PNG
|
|
unexplored_space
|
2002-02-26
|
hellcatv
|
[r2008]
fixed days and years to align
|
|
units
|
2003-04-07
|
jacks
|
[r5602]
Radar ranges edited
|
|
universe
|
2003-01-01
|
ace123
|
[r5104]
fixed delta,gamma,beta,delta_prime planet lists
|
|
vega_sector
|
2002-12-31
|
hellcatv
|
[r5095]
bye wasted space
|
|
visit_from_the_aera
|
2002-02-28
|
alexannika
|
[r2024]
initstarsystem,pirates,re-launch of waves
|
|
.emacs
|
2003-03-29
|
hellcatv
|
[r5582]
modified
|
|
021.nsi
|
2002-07-21
|
ace123
|
[r3957]
fixed privateer mission!
|
|
9x12.alp
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
9x12.font
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
CelesteStory.txt
|
2002-06-16
|
hellcatv
|
[r3614]
yay new sotry
|
|
IntroMonologue.txt
|
2002-11-06
|
jacks
|
[r4765]
Intro story
|
|
Launcher.exe
|
2002-12-31
|
ace123
|
[r5077]
fixed things to stay in your faction when getti...
|
|
Makefile
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
Makefile.am
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
Makefile.dist
|
2001-11-09
|
alexannika
|
[r1075]
joystick deadzone bugfix
|
|
Makefile.in
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
OLDmission_launcher.exe
|
2002-06-17
|
ace123
|
[r3644]
Fixed path issues with console execute
|
|
OpenALwEAX.exe
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
SDL.dll
|
2002-06-17
|
ace123
|
[r3660]
fixed joystick problems
|
|
SDL_mixer.dll
|
2002-08-08
|
ace123
|
[r4294]
added dlls
|
|
Vega.icns
|
2003-01-05
|
hellcatv
|
[r5222]
committed icon file
|
|
blank.png
|
2001-11-21
|
hellcatv
|
[r1178]
added grand canyon dataset :-)
|
|
blank.system
|
2002-06-15
|
ace123
|
[r3603]
removed demdata to make things smaller
|
|
blank2.system
|
2002-02-11
|
hellcatv
|
[r1799]
modified a lot of files to have new backgrounds...
|
|
blank256.png
|
2001-12-01
|
hellcatv
|
[r1247]
addedf blank256
|
|
blank512.png
|
2002-07-18
|
dandandaman
|
[r3947]
added this file to make terrain work
|
|
blank_q.system
|
2002-04-08
|
hellcatv
|
[r2578]
added some new blank systems
|
|
blank_r.system
|
2002-06-03
|
hellcatv
|
[r3328]
fixed systems to have 2 jump
|
|
blank_x.system
|
2002-06-03
|
hellcatv
|
[r3328]
fixed systems to have 2 jump
|
|
blank_y.system
|
2002-06-03
|
hellcatv
|
[r3328]
fixed systems to have 2 jump
|
|
blank_z.system
|
2002-06-03
|
hellcatv
|
[r3328]
fixed systems to have 2 jump
|
|
borken.py
|
2002-10-04
|
jacks
|
[r4623]
derelict ai
|
|
builddatarpm
|
2002-06-28
|
hellcatv
|
[r3784]
modified the spec
|
|
car.system
|
2002-10-21
|
hellcatv
|
[r4700]
die sonne
|
|
config.py
|
2002-07-21
|
ace123
|
[r3957]
fixed privateer mission!
|
|
cunerpicus.system
|
2002-02-11
|
hellcatv
|
[r1799]
modified a lot of files to have new backgrounds...
|
|
factions.xls
|
2002-12-13
|
jacks
|
[r4922]
removed outdated faction
|
|
factions.xml
|
2002-09-03
|
hellcatv
|
[r4487]
factions committed
|
|
favicon.ico
|
2003-01-03
|
hellcatv
|
[r5155]
new icons
|
|
gdk-1.3.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
glib-1.3.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
glut32.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
gmodule-1.3.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
gnu-intl.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
gtk-1.3.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
iconv-1.3.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
jtest.mission
|
2003-02-01
|
jacks
|
[r5366]
Simple AI capship test
|
|
libjpeg.dll
|
2002-11-12
|
ace123
|
[r4784]
Added jpeg support!
|
|
libpng2.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
lineup.mission
|
2003-01-03
|
jacks
|
[r5167]
changed player ship
|
|
linux_vegastrike-0.2.9.sh
|
2002-06-17
|
hellcatv
|
[r3658]
added a nice installer script
|
|
mars_station.system
|
2002-02-11
|
hellcatv
|
[r1799]
modified a lot of files to have new backgrounds...
|
|
msvcp60.dll
|
2002-06-17
|
ace123
|
[r3651]
mvcp
|
|
msvcp60d.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
msvcrt.dll
|
2002-06-17
|
ace123
|
[r3652]
mvcp
|
|
msvcrtd.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
|
mtest.mission
|
2002-11-27
|
hellcatv
|
[r4860]
mtest is done
|
|
newmission.py
|
2002-07-21
|
ace123
|
[r3957]
fixed privateer mission!
|
|
nothing.mission
|
2002-07-02
|
hellcatv
|
[r3824]
onothign
|
|
nothing.system
|
2002-07-02
|
hellcatv
|
[r3824]
onothign
|
|
novas.mission
|
2003-01-31
|
hellcatv
|
[r5346]
novas galore
|
|
pluto_hq.system
|
2002-02-11
|
hellcatv
|
[r1799]
modified a lot of files to have new backgrounds...
|
|
printhello.py
|
2002-07-21
|
ace123
|
[r3957]
fixed privateer mission!
|
|
python22.dll
|
2002-07-26
|
ace123
|
[r4021]
python dlls
|
|
python22_d.dll
|
2002-07-26
|
ace123
|
[r4021]
python dlls
|
|
readme.txt
|
2003-01-05
|
ace123
|
[r5242]
new release readme
|
|
setup.config
|
2002-08-08
|
ace123
|
[r4334]
fixed 5 columns
|
|
setup.exe
|
2002-06-17
|
ace123
|
[r3650]
readme can now shell execute
|
|
simple_test.py
|
2002-07-21
|
ace123
|
[r3957]
fixed privateer mission!
|
|
smpeg.dll
|
2002-08-08
|
ace123
|
[r4294]
added dlls
|
|
soundserver.exe
|
2002-08-20
|
ace123
|
[r4394]
fixed stuff
|
|
spalling.mission
|
2002-10-17
|
jacks
|
[r4666]
box smashing
|
|
terrain.mission
|
2002-03-01
|
hellcatv
|
[r2040]
added a pyramid terrain mission
|
|
test1.mission
|
2002-12-31
|
ace123
|
[r5077]
fixed things to stay in your faction when getti...
|
|
test2.mission
|
2002-02-07
|
hellcatv
|
[r1720]
moved textures to rlaan directory... added a ni...
|
|
test3.mission
|
2002-02-21
|
hellcatv
|
[r1959]
added a test for docking
|
|
test4.mission
|
2002-02-28
|
hellcatv
|
[r2023]
aded docking test
|
|
test5.mission
|
2002-03-13
|
hellcatv
|
[r2276]
added test6.mission
|
|
test6.mission
|
2002-12-31
|
ace123
|
[r5077]
fixed things to stay in your faction when getti...
|
|
testai.system
|
2002-02-27
|
alexannika
|
[r2010]
ai_flyto_jumppoint, ai_explorer, ai_flyto_waypo...
|
|
testworks.xml
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
update_list.txt
|
2002-08-20
|
ace123
|
[r4397]
adeded 4
|
|
vega.ico
|
2002-01-16
|
dandandaman
|
[r1461]
Thought it looked better than the other...
|
|
vega_icon.png
|
2002-01-16
|
dandandaman
|
[r1462]
same as vega.ico, but for linux
|
|
vegastrike-data.spec
|
2003-01-23
|
dandandaman
|
[r5303]
updated
|
|
vegastrike.1
|
2002-06-26
|
hellcatv
|
[r3764]
modified the man pages
|
|
vegastrike.config
|
2003-02-23
|
ace123
|
[r5426]
adding some more config options... added maximu...
|
|
vegastrike.config.10x
|
2003-01-04
|
jacks
|
[r5178]
fixed stupid typos
|
|
vegastrike.config.2player
|
2002-09-14
|
hellcatv
|
[r4557]
hehe
|
|
vegastrike.config.3player
|
2002-05-05
|
ace123
|
[r2987]
added 3players mission
|
|
vegastrike.config.4player
|
2002-05-05
|
ace123
|
[r2987]
added 3players mission
|
|
vegastrike.exe
|
2003-01-18
|
ace123
|
[r5283]
fixed jumpdrive/afterburner not being red,
|
|
vegastrike.ico
|
2003-01-03
|
hellcatv
|
[r5155]
new icons
|
|
vegastrikedb.xls
|
2002-10-29
|
jacks
|
[r4752]
updated
|
|
vsinstall
|
2003-01-23
|
dandandaman
|
[r5303]
updated
|
|
vsinstall.1
|
2002-06-26
|
hellcatv
|
[r3764]
modified the man pages
|
|
vslauncher.1
|
2002-06-26
|
hellcatv
|
[r3764]
modified the man pages
|
|
vssetup.1
|
2002-06-26
|
hellcatv
|
[r3764]
modified the man pages
|
|
weapon_list.xml
|
2003-01-06
|
ace123
|
[r5243]
fixed tractor beam
|
|
xmlparse.dll
|
2001-10-23
|
hellcatv
|
[r911]
Initial revision
|
|
zlibd.dll
|
2002-06-16
|
ace123
|
[r3634]
Fixed readme...check in bins
|
Read Me
* 1) Contents*
1. Contents <#i1>
2. New Features <#i2>
3. Tutorial <#i3>
4. Saving and Loading <#i4>
5. The Update Utility <#i5>
6. Running Vegastrike In Windows <#i6>
7. Running Vegastrike From the Command Line <#i7>
8. Playing Music in Vegastrike <#i8>
9. Docking to a Planet or a Capship <#i9>
10. Accepting Missions <#i10>
11. Trading Cargo <#i11>
12. Upgrading and Downgrading your Ship <#i12>
13. Buying a new ship <#i13>
14. Briefings and News (Experemintal) <#i14>
15. Interstellar Warp Transit (Jump Drive) <#i15>
16. Time Compression / Autopilot <#i16>
17. Match velocity <#i17>
18. Tractor Beam <#i18>
19. ReSpawn <#i19>
20. Ordering Wingmen <#i20>
21. Communications with Friends and Foes <#i21>
22. Transfer Command <#i22>
23. Pilot turrets <#i23>
24. Single-Player Controls <#i24>
25. Multiplayer Controls <#i25>
26. Changing Controls <#i26>
27. Cockpit views <#i27>
28. Editing Missions <#i28>
29. Editing AI <#i29>
30. Creating Ships <http://vegastrike.sourceforge.net/texturizer/>
31. Ship Database <http://vegastrike.sourceforge.net/vsdb/index.html>
32. Troubleshooting <#i30>
33. License <#i31>
* 2) New Features*
Owning a Whole Fleet With the new *One Fleet Plan* You can own as many
starships as you wish. Shipping to your system is only 6000 per ship!
See the *My Fleet* Section in the ship dealer.
Original Music Ken Suguro and PeteyG have come up with an original score
for Vega Strike that beats out commercial games. Listen to it and be
immersed in Vega Strike as it should be.
Polishing the Engine Docking boxes come up automatically, the Upgrade
interface has a repair option
Plot Mission and Fixers You can meet people in the various bars and
strike deals with them. Dont cross anyone or you may suffer retribution!
Python Scripting Upgraded various for-pay missions and the basic missions
Quests And News Linked the local happenings to gameplay challenges and
cash opportunities
Surpluses and Shortages Trading is now affected by the live news model
Rendered Bases To Explore Beautifully rendered bases to explore--but
there's more than meets the eye
Locals to converse with The bartender always has the latest news for j00
Trading with the enemy It's always profitable to run the front lines,
selling pricey weapons to evil Aera, or running back high tech bionics
for terran research!
Music Player A music player is now included in vega strike...it can play
midis, ogg, or mp3... just dump the files into music/ and edit the
playlists in .vegastrike
Ingame Map A map of the local sector may be accessed with Shift-M. Sure
accurate maps are expensive, but this one should be well worth whatever
you didn't pay
Installer/Uninstaller Allows players to easily install OpenAL and VS
Autoupdater Keeps the player up to date and allows players to restore
edited versions
Splitscreen Multiplayer Coop gauntlet with a friend or blow him to
shreds--even trading and exploration i spossible in this mode!
Save Games Having persistent gameplay over multiple sections is possible
Large Star System Size Vegastrike engine has been upgraded to use double
precision floating values so that realistic system size is possible
Communications/Orders Allows the player to contact neutrals and taunt
enemies. Wingmen can be ordered.
Autopilot Lets the player quickly go from one zone of combat to another
Trading Lets players run guns to make money
Missions for cash Players can now contract out for spare cash
Ship Upgrades Don't like your ship? buy a new one or get some better
weapons or engines!
Missiles Missile can lock on to their targets and track them with ease
ECM systems err...almost ease
Autotracking Weapons Guns may be updated to seek to their targets
Tractor beams Small pieces of cargo may be taken into a hold. look for
these when a large cargo-laden ship has exploded
Energy Removing Guns Leech energy down to nada on their targets
System Damage Hud displays flicker and weapons blow off...
maneuverability decreases and many more horrible things happen when you
get damage... don't get damage
3d Cockpits With accurate lighting and damage effects these cockpits add
a whole new dimension to vegastrike
* 3) Tutorial -- Starting a New Game -- Making a few Credits *
*Windows Users*
To start a new Vegastrike game, click on the Vega Strike Launcher from
the Start Menu.
Click on "New Game"
Type in the save game you wish to save to when you choose save at a base.
Click "ok" and Vegastrike should launch. Be patient while it generates
BSP trees for the system. This will only happen the first time.
*Mac Users*
Drag VegaStrike.app to the Applications directory.
Double Click on VegaStrike.app
*Linux Users*
Install the rpm
run vsinstall from the terminal
run vslauncher from the terminal
When the game starts you will be docked to a station. You can walk
around the station by clicking on various doors or if you cannot see a
mouse cursor you can right click to select the different options and
left click to select the corresponding door.
Look in the bar to see if there are any people to talk to. If you run
into one you will find that they often offer good deals--and sometimes
launch you into great plots! You may find particularly interesting
people in Heinlein and other interesting systems. Scout about, use
shift-M in flight to bring up a nice map of nearby sectors. These are
the ones where most of the plot points take place.
You will find yourself at the controls of an old starship known as the
wayfarer. You may wish to read the introduction story for some
information about how you got to where you are sitting.
Your wayfarer has an old, out of date, targetting system. You will need
to face the targets on your radar before you can necessarily target them.
Press t a few times to survey your surroundings. Locate a planet named
Agricultural:Barnoose by turning and pressing 't' consecutively until
you see it in your right hud. Then press *a* to turn on autopilot. This
will move the camera into pan- mode and speed up time until your ship
has arrived near your target.
When you exit Autopilot you _may_ encounter pirates, Aera, or other
unfriendlies. If this is the case you perhaps should turn your ship,
press *h* a few times to pick the targets in front of you, and engage
them! *H* cycles through hostile targets. They should not be difficult
at this stage of the game, so they should be easy kills.
If your "AUTO" Light is on, however, you know that you are home free.
Your radar, however does not give an indication of starships intent
towards you, so you must be cautious until you can afford a better one.
Turn back to the large earth-like Agricultural planet and press *p*
until "Agricultural:Barnoose" is in your right screen (If you miss it
hit *p* until you are back). P picks the target closest to your nose...
it is an easy way to select targets. keep it target. request docking
clearence. A green or red box should appear around your planet. A box
turns red if it is behind the unit or in a wall, and turns green if it
is on your side of the unit
With the onset of life-sized planets, you must spend a large chunk of
time to actually get near enough to the surface to dock, so you could
engage time compression.
press "+" until your speed is around 300, then hit F9 around 10-16 times
to speed time enough to quickly engage the dockin clamps. Around 300
seconds later (compressed as you have into about 10), a green box will
appear indicating that you are close enough to dock. press 'd' and your
comm screen will tell you if you have success.
Once the comm screens say "Docking Operation Begun". You immediately
step out of your ship onto the planet.
Agricultural planets sell food, so peruse the cargo list and get food by
clicking on Natural Resources then "Food". Stock up with your cash. You
should be able to get enough Grain and Generic Food to fill your cargo bay.
Buy the food and then Click on the Save/Load button on the top right
Then go to the menu (where the cargo used to be) and click SAVE
You will get a confirmation dialog. Next time you run the Launcher you
should Open up your saved game to continue from where you left off.
Click done on the bottom right. We have some nice foodstuffs, lets
deliver them to a base where they are needed.
Find your way back to your ship and click on it to launch.
We want to run this food to a mining base. Lets try our good mining base
Outer Rings--they're often in need of food with these pirates around,
and cut off trade routes.
Target Outer Rings with *t*, and then hit *a* to get there.
Again you may encounter some enemies.... prepare to engage them!
When you reach close enough to see and then fly into a green guide box,
press 'd' again to dock.
Once inside the base, you will se the docking screen, like before.
Except this time, you should click on SellMode to get a list of Items.
Browse through the Food categories like you did before. You should see
the same cargo that you bought back at the planet. Select both of them.
Notice that the prices are greater; you can sell them for more than you
bought them for! so click on the SellCargo button until all of your
cargo is gone.
By doing this, you get some cash for spending. You should maybe buy
something usefil with this money, like an afterburner to allow you to go
a lot faster. Go to UpgradeShip an select Engines. Then you will see
Light and Engine Enhancements Light. To get an afterburner, choose
afterburner_generic from the Engine Enhancements Light category. about
2700 credits should have immediately been deducted from your account and
you should immediately have an afterburner installed on your ship.
Make sure to go to the Load/Save button in the top right and click on
SAVE. Otherwise if you forgot you could go to the launcher and recover
your auto save to your game, but if you encounter an undesirable
situation, this could leave you with fewer options. We recommend saving
after conducing landing operations.
You can do missions as well to earn money. To find a list of missions,
go to the MissionBBS. The categories are listed by who offered the
mission or who you have to kill. Make sure not to take missions where
you kill someone you wish to be an ally of. Killing units of a given
race affects your relationship with them far more than merely taunting
them, so be careful who you choose to be your friends.
In the beginning it would be wise to take cargo missions and simple
scout and patrol missions. Make sure you select missions that occur "in
system"... many missions require you to jump out of system to complete
them, and you need at least 9000 credits to afford a jump drive.
This is one of the most important improvements you can get for your
starship. It will allow you to complete many more missions and explore a
better part of the galaxy.
If mission directions get lost in the battle chatter use page up and
page down to scroll through the messages and find the directions you
need to complete a mission.
So take a mission, take off, and prepare to meet your destiny!
* 4) Saving and Loading*
*This is for PC and Linux users only! Mac users: don't worry; all the
Vega Strike savegames are in your home directory under .vegastrike.
change the save game by editing save.txt* There should be a program
named "Launcher" in the vegastrike directory or start menu. This will
give you a list of choices:
Select mission button This allows you to select which mission vegastrike
will start the next time you press one of the keys below it. Most
missions do not involve save games and will ignore those options,
however the default, in the mission/exploration folder will indeed
ustilize the save games you specify. If you ignore this option you begin
in the standard trading/bounty hunting mission.
Start a new game button Start a new game in the Vegastrike universe. You
start with a dinged up old wayfarer and head from the vega sector with
the hope of finding profit and adventure on the frontier. To begin
afresh you must choose a new saved game.
Load game button This opens up a saved game you had finished playing
before. To save you must dock at the base and click on the save/load
button and choose the save option. /NOTE that if you choose the LOAD
button from a base IN GAME, your ship will be destroyed so you can press
respawn (semicolon) and continue where you last saved from!/ This is not
quite as intuitive as we would have hoped :-(.
Recover autosave button This button allows a player to recover their
most recently played game into the selected save game upon next run. If
the player quits or the player docks, and then dies, it will restore to
the last saved position.
Launch last savegame button Use this button to launch Vegastrike with
from a saved game or mission. If you do not choose a mission, you will
start in the standard trading/bounty hunting mission.
Launch no savegame button This button allows you to launch the selected
mission without using a saved game.
Help button This will print tis on a help window.
Exit launcher button exits the launcher.
* 5) The Update Utility*
The "Get Recent Update" program will allow you to get the most recent
data for vegastrike.
It will first ask you whether you wish to update the update list. This
will allow you to get the most recent working code if you click "Update".
After choosing that option, you will be presented with a checkbox and a
number of buttons.
The check box labeled "Restore Factory Defaults" will allow you to
revert all of your modified files to the "factory defaults".
The next button says "Update to recent experimental data" and will
update to the most recent developmental data. When using this button,
you may get a better game, but it will be experimental.
The rest of the buttons will update to previous or more recent releases.
* 6) Running Vegastrike In Windows*
Make sure you have the most recent nVidia drivers. Old nvidia drivers
cause problems with display lists and compiled vertex arrays.!!
After completing setup, run the Launcher program. Select the mission you
wish to play then run it by clicking on "New Game" and typing in a save
game (or else by clicking run without save game if it is a simple mission)
The default mission is recommended for an introduction to the Vegastrike
trading universe. To get the default mission you need not select the
mission initially.
* 7) Running Vegastrike From the Command Line*
Vegastrike takes a single command parameter indicating which mission it
should load
.\vegastrike mission/explore_universe.mission
is an example of a valid mission call.
The -j flag (must be flush with the system) will force a player to begin
in a star system.
.\vegastrike -jvega_sector/vega mission/n_vs_n/confed/confed_2v2.mission
will force the 2v2 mission to run in the vega sector.
* 8) Playing Music in Vegastrike*
Make sure music is on. Some of the plot depends on it! it's all included
this time!.
* 9) Docking to a Planet or a Capship*
If you wish to earn money, you will need to know how to dock.
First of all, plabnets without a type on them on the right vdu are
inhabitable and do not have any cargo on them.
Myplanet
But if it has a type on it on the right vdu, feel free to dock to it!
industrial:Myplanet
If you wish to get clearence to land at the base or planet, you must
communicate that you wish to land by targetting a base and flying near it.
In order to dock to starships, you must press 'd' once inside the green box.
* 10) Accepting Missions*
You must accept missions to earn money. The first step is to click on
the "Mission BBS" button. This will give you a list of mission
categories. You will then need to click on the category name
There will be missions to attack targets in the Attack categories.
In the Neutral category, there will be neutral missions like patroling,
escorting and scouting.
Finally, the Confed, Aera, Pirate, Rlaan or Retro categories will give
you missions to diliver cargo, search for contraband or escort ships to
other places.
Once you have bought the missions, you may check your cockpit screen to
see the instructions for the missions.
When you have completed them, your credits will immediately be added to
your account.
* 11) Trading Cargo*
You may buy cargo at the base that you are docked to.
To find the list of cargo, use the Buy Mode button. When you click on
it, you will most likely find a list of categories. (If you don't, then
the planet or capship that you are docked at doesn't sell cargo.)
After browsing through the categories, you should select the Cargo that
you want to buy.
The selected item will be blue, with the name and the quantity in the
base in parentheses.
Jade (3)
On the right side of the screen, there will be the item, the price, the
mass and the volume.
Jade
Price: 124.83
Mass: 0.01
Cargo Volume: 1.00
To buy it, simply click the "Buy Cargo" button at the bottom.
Different planets or bases will have different prices and quantities for
groups of items. For example, Mining Bases will have cheaper minerals.
After buying cargo, you may want to go to a planet that is in need of
that cargo. When you are done docking at that planet, you may go the
Sell Cargo screen.
In the sell mode, you will see the same categories, except only those of
the items that you bought. Find your item again and click on it. Notice
that the price has changed, but everything else has stayed the same.
Click The "Sell Cargo" button if you wish to sell it, and you will
immediately be rewarded with your credits.
Note: you should NOT go the "upgrades" or "starships" categories if you
want to buy a ship or upgrade it UNLESS you wish to have a starship or
upgrade in your cargo hold.
* 12) Upgrading and Downgrading your Ship*
If you want your ship to get better (so you can do more missions and
kill harder enemies), you will have to eventually upgrade your junky ship.
You must click on the "Upgrade Ship" button to get a list of possible
upgrade categories. Browse through them until you find a good Upgrade
that you need.
The screen will look similar to the cargo section, with the name and the
quantity in parentheses. If you click "Buy", you may see one of many things:
If the computer says that the ship may not entirely fit on your ship, it
is saying that not all of the upgrade may be used. For example, if you
add fuel to your ship and you have only used up half of a fuel item, it
will say that the fuel may not fit. You usually should just click Yes.
It may also ask you which mount to place the gun, missle or turret on.
Mounts with brackets [] on are empty mounts. Select which mount to put
it on.
Laser
[LIGHT MEDIUM HEAVY ]
ImageRecognition
Here you could put another laser or beam in the LIGHT MEDIUM HEAVY mount
because it can hold those categories.
Downgrading works the same way. If you need to earn more money, just
click the Downgrade button. It will give you a list of caregories of
items on your ship.
When you have the item that you wish to sell, make sure that you have
selected the best item in that category. For example, you may have an
"engine_level_0" and an "engine_level_1" in the list you should
downgrade the engine_level_1 if you want to get more money out of the item.
* 13) Buying a new ship*
Buying a ship is simple, if you have enough money. Just go to the Ship
dealer and select the ship that you want.
The ships ending with ".blank" are blank ships. You will have to buy
upgrades to put on them before they are flyable.
The wayfarer.begin may also be listed; it is the same ship that you
started with.
There are a very few ships without these endings that come pre-equipped
without those endings. You can buy those ships and then you will not
have to put upgrades on.
Once you buy a new ship, your old ship is stored in the current system.
You can switch between ships of different type for free. You can own up
to one ship of each type (you can own a blank and non blank version of a
ship even). It costs 6000 to ship a starship to a different system, and
it is free to switch to a ship in your own system. Click on My Fleet in
the Ship Dealer section of the computer. You will find that you wish to
"collect them all" so to speak. All your upgrades are saved, so you
needn't sell them back for half price. Enjoy this new feature.
* 14) Briefings and News (Experemintal)*
Briefings and news have not been added yet. They will come in next release.
* 15) Interstellar Warp Transit (Jump Drive)*
Most starships come equipped with a warp drive. Unfortunately they can
only be used at large singularities in the space-time continuum. Your
computer signals these points by placing glowing blue balls in those
areas. Their relative size indicates how small a starship must be to fit
through the jump point.
To engage a jump drive, position your ship inside and press 'j'.
Regulations state that starships should be stopped before jumping--
disasters have resulted from starships travelling at any great speed
into a jump point.
You do not come equipped with one at the beginning, so you must do
missions to earn enough money to buy one.
* 16) Time Compression / Autopilot*
Often interstellar travel requires going great distances. To facilitate
this, we have provided time compression. Press F9 to increase time
compression to get where you're going. Press F10 to drop out of time
compression. F10 will happen automatically if enemies are nearby.
If going towards a big object, like a planet, you may autopilot there by
pressing Shift-A.
* 17) Match Velocity Key*
In space all speeds are relative...Flightrgroups can be travelling at
great velocity with respect to a surrounding sun yet appear to be idly
drifting into space. A player may instruct his computer to match
velocity of a starship by pressing the 'home' key on the keypad. This
will set '0' to be the speed of that starship. Backspace will assure
that your ship is stationary relative to the other starship (unless it
accelerates faster than you and is accelerating).
To stop matching velocity press the 'end' key on the keypad.
* 18) Tractor Beam*
A tractor beam is just like a normal beam weapon except that it exerts a
small force upon its target. If the target is small relative to your
ship or is a chunk of cargo, holding a tractor beam on it will cause the
cargo to come towards you and eventually enter your hold. It is almost
impossible to tractor cargo that is moving with respect to your ship, so
the suggestion is to press 'home' to match velocity with the cargo, and
then to press backspace to stop... this will allow one to pick up cargo
with ease.
* 19) ReSpawn*
If you sadly lose your life in combat you may respawn by pressing ';'
(Player 2 can respawn with '.' )
Your game will be loaded with your last saved file..
* 20) Ordering Wingmen*
If you are in a mission with more than 1 ship in your flightgroup you
may order them to do certain things.
Press shift-F to have them form on your wing and follow you through jump
points
Press shift-D to have them attack your target
press shift-H to have them attack the object attacking you
Press shift-B to release them from the above orders
Wingmen are fickle and may not always obey your commands. They will
inform you if they do or not.
Certain missions will require you to escort people to places. Your
escorts will follow you whever you go, and they will autopilot with you
to your destination. If you hit auto just before the jump point they
will go beside you. Then stop in the jump point, wait until they get
near, and then press 'j'. They will follow you through the jump and
appear on the other side. Voilla! Then continue to the next destination.
Getting escorts right is essential to completing the plot missions in
Heinlein.
* 21) Communications with Friends and Foes*
When flying in space one may wish to engage in casual conversation with
nearby starships.
Target a starship and press a number key to communicate with the ship.
Conversation topics are generally ordered from nice (low numbers) to
threatening (high numbers), however you may wish to change your vdu to
comm mode (press 'v' to cycle to it) in order to see exactly what you
will say to your target.
If you choose particularly menacing taunts, the target may get angry and
attack you instead of its current target.
Likewise often one can use the comms to restore relationships with
hostile people.
Be careful as the local authorities may choose to scan your ship for
contraband. If you refuse to fly straight during this process you may be
attacked!
* 22) Transfer Command*
if you wish to transfer command to another starship, simply press '[' to
switch over. This is useful if you have died and do not wish to upset
the blaance. The AI that took over for the ship you left will attack
your previously targetted unit, be it friendly or enemy. You can use
this to in effect give orders to friends.
* 23) Turrets*
Turrets do not begin with their own AI at all times. To toggle the AI of
your turret, you must press 'o'. Pressing this when your turret is off
will turn on your turret and tell it to attack your target. Pressing o
again will turn off your turret and make it sit idle.
Turrets can be told to attack your target. do this by pressing
'shift-P'. once they attack your target you may switch your target and
they will continue to attack the target you told them to.
Press ']' to physically go to a turret.
Press ']' to return to cockpit again. Another press of ']' will get you
to your next turret, and so forth.
Like with Transfer command, the AI of the turret will attack your
previously targetted object when you leave the turret.
* 24) Single-Player Controls*
esc Quit
Arrow keys Flight Sim style turning (you can also use the keypad arrows)
\ full throttle
backspace zero throttle
=,+ accel
- decel
enter fire missile
space Fire Guns
backspace stop
tab Afterburners
j engage interstellar warp (use at clear blue balls after purchasing a drive)
*,ins Spin Right
/,del Spin Left
~ shelton slide while holding key
y match speed
t target
p target nearest to center of screen
u target all manmade units
h target enemy targetting you
n target Nav Points (Capships, Jump Points, Planets)
Shift-T reverse cycle through targets (shift of other target keys will do the same)
l lock your target so that it will not switch
m change active missile
g change active gun
shift-M De/Activate Inflight Map
v switch targetting computer mode to navigation mode and then view mode
w switch left targetting cpu
c cloak
Shift-W shift weapons computer mode to damage mode
Shift-S next music track
F1 toggle cockpit
F2 left cockpit
F3 right cockpit
F4 back cockpit
F5 Chasecam
F6 Panning Cam (s,a,w,z pan)
F7 Target Cam
F8 Strange Cam
F9 Increase Time Compression
F10 Reset Time Compression
F11 Zoom in
F12 Zoom out
s,f,q,z pan ghost cam
; respawn -- use after death to recreate your starship
] switch to a turret onto your ship
Shift-A autopilot to the target
a autopilot to the target
Shift-P target enemies for your turret
Shift-N Turret Nearest Target
Shift-! Suicide
Shift-| Pause
page down Scroll VDUs down
page up Scroll VDUs up
home Set Velocity Frame of Refrence
end Reset Velocity Frame of Refrence
Shift-F Tell wingmen to form up
Shift-B Tell wingmen to stop forming up
Shift-H Tell wingmen to help you out
Shift-D Tell wingmen to attack targetted starship
1-8 Communicate to your allies
0 Request clearence to land
Shift-E Eject
Shift-Z Eject cargo
, and . Change Sound Volume
< and > Change Music Volume
* 25) Multiplayer Controls*
--------------------
Both Players
--------------------
F9 Increase Time Compression
F10 Reset Time Compression
F11 Zoom in
F12 Zoom out
Shift-| Pause
esc Quit
--------------------
Player 1
--------------------
Shift-S next music track
F1 toggle cockpit
F2 left cockpit
F3 right cockpit
F4 back cockpit
F5 Chasecam
F6 Angle Cam
F7 Target Cam
F8 Strange Cam
v switch targetting computer mode to navigation mode and then view mode
w switch left targetting cpu
q Set Velocity Frame of Refrence
z Reset Velocity Frame of Refrence
Shift-F Tell wingmen to form up
Shift-B Tell wingmen to stop forming up
Shift-H Tell wingmen to help you out
Shift-D Tell wingmen to attack targetted starship
1 Say somthing nice to your target
2 Say neutral things to your target
3 Taunt the enemy
4 Dock/Undock
5 Request clearence to land
i,j,k,l Flight Sim style turning
space Fire Guns
y Match Speed
Shift-J engage interstellar warp drive (use at clear blue balls)
Shift-A autopilot to the target
a autopilot to the target
Shift-c cloak
Shift-E Eject
Shift-Z Eject Cargo
return fire missile
g change active gun
; respawn -- use after death to recreate your starship
[ switch ships in battle (use to control allies)
] switch to a turret onto your ship
m change active missile
t target
p target nearest to center of screen
n target nearest target
h target enemy targetting you
Shift-T reverse cycle through targets
Shift-P target enemies for your turret
Shift-N Turret Nearest Target
Shift-H Tell wingmen to help you out
~ shelton slide while holding key
=,+ accel
- decel
backspace zero throttle
\ full throttle
tab Afterburners
Shift-! Suicide
--------------------
Player 2
--------------------
Keypad Arrow Flight Sim style turning
6 Say somthing nice to your target
7 Say neutral things to your target
8 Taunt the enemy
9 Dock/Undock
0 Request clearence to land
Shift-@ SuicideKey
. (period) respawn -- use after death to recreate your starship
Num lock zero throttle
Keypad 0 Afterburners
Keypad enter fire missile
insert Fire Guns
delete shelton slide while holding key
home change active gun
end change active missile
pageup engage interstellar warp drive (use at clear blue balls)
pagedown cloak
Keypad 9 autopilot to the target
Keypad 3 target enemies for your turret
Keypad 7 Set Velocity Frame of Refrence
Keypad 1 Reset Velocity Frame of Refrence
Keypad del target nearest target
Keypad - Decel
Keypad + Accel
Keypad / target
Keypad * target nearest to center of screen
up arrow toggle cockpit
down arrow Chasecam
left arrow switch left targetting cpu
right arrow switch targetting computer mode to navigation mode and then view mode
* 26) Changing Controls*
If you wold like to change the controls of Vegastrike, open either
vegastrike.config or vegastrike.config.2player
They will both have a section at the very top called "bindings":
<bindings>
<bind key="S" player="0" modifier="none"
command="Cockpit::SkipMusicTrack" />
The above will start the bindings section and then bind the "S" key to
SkipMusicTrack for player 0.
The player defaults to and should only be 1 in multiplayer.
<bind mouse="0" player="0" button="0" modifier="none" command="FireKey" />
This line will bind the FireKey command to the mouse button #0 (the left
button) for player 0. Button 1 and 2 will be the midle and right
buttons. After that, buttons are experimental...
<axis name="x" mouse="0" axis="0" inverse="false" />
<axis name="y" mouse="0" axis="1" inverse="false" />
This binds the axes of the mouse... should you wish the mouse to drag in
opposite direction set inverse to true.
<bind joystick="0" player="0" button="0" modifier="none"
command="FireKey" />
The previous line will bind the FireKey command to the joystick button
#0 for player 0. You can add as many buttons as you want, as long as
your joystick has them.
<axis name="x" joystick="0" axis="0" inverse="false" />
<axis name="y" joystick="0" axis="1" inverse="false" />
This binds the axes of the joystick... should you wish the joystick to
move in opposite direction set inverse to true.
</bindings>
* 27) Cockpit Views*
<cockpit1.jpg> <hud1.jpg>
On the left you see a screenshot of the cockpit
On the right you see a screenshot of the HUD (head-up-display) mode
You can use the following keys to switch between different views:
* F1 cockpit/hud mode
toggles between cockpit and HUD only mode, with/without background
* You may have to press F1 several times to get back to the cockpit
F2 left view
* you're looking through the left window F3 right view
* F4 backward view
* you're looking behind you F5 follow-mode
* the camera is positioned directly behind your ship and follows it
F6 pan
the camera is positioned outside your ship, showing your ship
if you steer the ship (with cursor-arrows or joystick), the camera
* will show different sides of the ship F7 follow target
* shows your target F8 pan target
* shows your fighter and your target F11 zoom in
* works when you're looking at a target in modes F5-F8 F12 zoom out
There are the following instruments:
* In the middle of the screen, there's the crosshair - it shows
where you're gonna fire your lasers :
Use your joystick or keyboard arrows to steer your ship until the
crosshair is over your target - fire!
* At the top left of the cockpit you see the message display:
o The game will print out messages for you to notify you of
certain events (like the launching of new ships)
o The 'story' will also be told on the message display
o The first line of the message display shows the targeted
flightgroup (yellow-2), the shiptype (tian), the AIname of
your target (ignore it for now), and the current gametime
(0.05 minutes)
o The lines below are messages, they most current message is
printed at the bottom of the list
o you can scroll the list of messages up and down with pageup
and pagedown keys
* The Radar is located in the bottom middle of the cockpit:
use the radar to have an overview about what's going on
o friendly ships are green blips
o enemy ships are red blips
o enemies which target you (and will attack you) are
light-blue blips
o neutral ships will be yellow
o the currently targeted ship is painted twice as big as the
other blips
* Shield Display
shows your current shield status (front, back, left and right
shields)
Blue indicates the potency of your energy shields. As your shields
absorb more energy they get closer to failing. When all blue lines
are gone your starship itself (armor) takes damage. Armor is a
thin layer of protection before actual internal damage is wreaked
on your starship. How much interal structure after armor is
depleted is not displayed on the status screen, but instaed in a
video display
* You have got two VDU (Video Display Unit):
Left VDU Right VDU:
each VDU can by cycled through different modes to see different views
o press 'w' to cycle the left VDU
o press 'v' to cycle the right VDU
The Left VDU is weapon and defense VDU, and the right VDU is
targetting and navigation. You can use each VDU for different
options; however certain starships have merely 1 VDU that has some
of the features of both VDU's. Look forward to more cockpits in
the future.
* the left VDU can be cycled between the following modes:
o Weapons: show your selected weapons
o Hull: shows your hull status
o Shields: show ?your? Shield status
This your starships shield status in case the cockpit
does not have view.
* the right VDU can be cycled between these modes:
o Target status
This display shows on top the targeted flightgroup
(yellow-2) and it's ship type (tian)
At the bottom you can see the distance to the target
In the middle you see the shield status of the target
The target's hull is unknown from external scans.
o Navigation
shows the name of the system (Wasteland), the target ship
type, and the relative location of the target
o various target camera modes
* 28) Editing Missions*
Mission Scripting Tutorial:
Chapter 1: Introduction <#i28_1>
Chapter 2: Basic XML integration <#i28_2>
Chapter 3: Python Inheritance In Missions <#i28_3>
Chapter 5: Suppery about python-Vegastrike class relationships
<#i29_1>
Chapter 6: Python - Vega Strike Bindings <#i29_2>
Chapter 7: Writing Add On Adventures <#i29_3>
Chapter 8: Conclusion <#i29_4>
-------------------------------------------
Chapter 1: Introduction
-------------------------------------------
Vega Strike has a powerful missions scripting interface that
allows you to nearly modify Vega Strike at whatever level you
choose, from the AI scripts (and the physics thereof) to the
missions... to the overall plot and goal of the game.
-------------------------------------------
Chapter 2: Basic XML integration
-------------------------------------------
First let me start by explaining how to run a python class... in
this case we start with the prebuild "privateer.py" script to run
our mission.
Open up mission/exploration/explore_universe.mission
First come the variables that designate how the mission should
normally start. By normally I mean if they don't have any save
game present.
<mission>
<variables>
<var name="defaultplayer" value="blue"/>
<var name="mission_name" value="Test Mission" />
<var name="num_players" value="2"/>
<var name="credits" value="3500"/>
<var name="difficulty" value=".05"/>
<!--good starting difficulty here-->
<var name="splashscreen" value="bad_guys_vs_good_guys.bmp"/>
<var name="system" value="sol_sector/celeste" />
<var name="description" value="This is a fun mission." />
<var name="author" value="Me" />
<var name="briefing"
value="In this mission, you will have to have fun, or you will fail." />
<var name="savegame" value="explore_universe_difficulty"/>
</variables>
it loads sol_sector/celeste.system as the star system (which is in
XML and stores all present planets)
After this, comes the actors in the mission, the flightgroups of
fighters. If a mission has more than one player, then each player
is the leader (first ship) in each respective flightgroup.
<flightgroups>
<flightgroup name="blue" faction="privateer" type="wayfarer.begin" ainame="default"
waves="1" nr_ships="1">
<pos x="20400"
y="-35400" z="84700000.0"/>
<rot x="180.0"
y="180.0" z="180.0"/>
</flightgroup>
</flightgroups>
The rot flag is ignored, and the position specifies the x,y,z
coords of the blue flightgroup, which is of type wayfarer.begin.
Notice that so far there are a lot of values you don't see for
long in the default vegastrike game. Credits, System, first
flightgroup fighter, difficulty--these are all initial values but
can change.... since there is specified a savegame. The savegame
makes the mission more of a campaign type mission where things may
be saved to disk and reloaded at a later point. If no savegame
variable is specified (this is where the autosave goes) then the
mission will not save and will be a one time play mission.
Future note:
If you wanted to add a campaign to the privateer mission you would
most likely modify privateer.py to have a campaign module get
loaded.... so you wouldn't necessarily need to modify
explore_universe.mission just to add a campaign... lets dig
further into the meat of the scripting.
If a mission has python tags...then it is a python mission and may
have some embedded python in it. In this case the python makes a
new python object of type privateer in the privateer.py module in
the modules/ directory.
<python>
from privateer import privateer
my_obj=privateer(20000,40000,500,3,2,.6,.25,.02,400000,2000)
</python>
You have to be careful about newlines, etc in the XML, but it
shoudl usually work just dandy. You notice that the mission may
pass in arguments to the privateer module that can make slight
changes in teh gameplay. This allows many cargo missions to use
the same module in order to change the parameters of the cargo
missions.
In this case the values I have selected appear to work relatively
well.
-------------------------------------------
Chapter 3: Python Inheritance In Missions
-------------------------------------------
Ok lets dig further into the privateer.py module:
It is a very short module written in more or less pure python... I
say more or less for a very specific reason: it inherits from a
C++ class!
Director is a C++ class exported to python. All missions must
inherit from director.... in this case the mission is very short
as it uses other (pure python) modules.
random_encounters.random_encounters, difficulty.difficulty and
,trading.trading all do NOT inherit from C++ as this class takes
care of the C++ inheritance.
The constructor __init__ takes the arguments that we passed in
from the XML file and passes them on to the various submodules.
The only really really important thing you do in the constructor
is call
Director.Mission.__init__ (self)
if you do not do this, Vegastrike will not load your module and
will silently fail (this calls the C++ constructor, whcih actually
triggers the binding of your module to the python mission).
Each mission module must have an execute function so that
something can happen every physics frame. In this case it just
calls execute on all the submodules... not very interesting.
Missions also may have 2 functions Pickle (self) which returns a
string with a XML mission file that will load the mission properly
as well as a string representing the mission in serialized form...
if the mission were reloaded that mission would be loaded and its
corresponding python would be run, then Unpickle (self, str) would
be called (with str being a string) and the expectation that the
mission woudl be reloaded. data/newmission.py has an example of this.
You may also choose to save data in a float by float format as
follows (the advantage to this format is that it is saved on a PER
PLAYER basis... so that each player may have a different value):
there are 4 functions at your disposal for this older way to save
missions:
myindex=Director.pushSaveData(int whichplayer, stringkey,floatVal);
this function adds the key for later retrieval (even after VS
quits ) and pushes the float to the end of the hashtable indexed
by stringkey
This function modifies a index in a key that has already been
pushed back at one point
Director.putSaveData (intWhichPlayer, stringkey, myIndex, floatVal);
Director.getSaveDataLength (int whichplayer, string key) gets the
number of float values for a given player
Director.getSaveData(int whichplayer, stringkey, int num) gets
save data saved at that number
You can make up stringkeys and save only 1 float per key if you
wish... each key is allowed to have an vector of possible values.
Use as you wish! For the privateer mission I save things with key
31337ness and the one value in there is the difficulty that I
write out....
If a campaign is more global rather than player specific you may
just choose to pickle it...however if something is on a per-player
basis, it may be best going in these SaveData float vectors.
With the exception of AI modules from here on out it's straight
python.
I will go over some of hte functions you can call inside Vega
Strike in a minute.
* 29) Python Inheritance with AI Scripts*
Mission Scripting Tutorial:
Chapter 1: Introduction <#i28_1>
Chapter 2: Basic XML integration <#i28_2>
Chapter 3: Python Inheritance In Missions <#i28_3>
Chapter 5: Suppery about python-Vegastrike class relationships
<#i29_1>
Chapter 6: Python - Vega Strike Bindings <#i29_2>
Chapter 7: Writing Add On Adventures <#i29_3>
Chapter 8: Conclusion <#i29_4>
Let me talk about AI scripts briefly.
you'll notice a nice AI script named printhello.py in the
data/printhello.py
It is very similar to a mission with a few notable differences.
First of all the AI class you make must inherit from the class
VS.PythonAI
secondly instead of having an __init__ function it must have an
init() function. The reasons for this have something to do with
how inheritance works from C++, but this init function takes in
self of course and the unit to which thie AI script belongs.
init may start off some AI scripts from the get go, or you may
wait until you execute each frame. in this case printhello loads
the XML script ++turntowards.xml (which is the hard coded C++
equivalent to ai/scripts/turntowards.xml).
After loading that AI script it replaces its parents order with
the last AI script, in this case the XML script.
In the Execute function this AI script calls Execute on the hgiher
level (which takes care of responding to communications) and then
prints h to the console for no apparent reason.
Lastly and most importantly, the AI sxcript makes a new class for
itself...So when the C++ code executes printhello.py it will call
the C++ constructor which will take care of binding it.
so when you make a new unit like so:
VS.launch
(fgname,type,faction,"unit","printhello.py",nr_ships,nr_waves,vec,logo)
it will have this python AI attached to it....
However if you are too lazy to write AI's you can use the most
excellent default AI
VS.launch
(fgname,type,faction,"unit","default",nr_ships,nr_waves,vec,logo)
---------------------------------------------------------------
Chapter 5: Suppery about python-Vegastrike class relationships
---------------------------------------------------------------
Summary:
Missions must inherit from Director.Mission
AI's must inherit from VS.PythonAI
Missions must have an __init__ function with any number of
arguments that calls
Director.Mission.__init__ (self);
to trigger the C++ binding
AI's must have an init(self, un) function with those exact 2
arguments... the second one is the parent Unit. I don't recommend
you save the unit currently--I'm not sure if it will garbage
collect the unit in that case... just call the self.GetParent ()
function as the Ai script.
Both AI's and Missions may have an Execute(self) function that
does somethign each frame depending on the disired result.
Missions may have a Pickle and Unpickle function in order to save
and load the state of a campaign (this can be incredibly complex!)
------------------------------------------------------------------
Chapter 6 Python Vegastrike Bindings
------------------------------------------------------------------
Vegastrike Utility Functions:
Now that you can run complex python scripts that could even play
minesweeper at the prompt, you probably want to interact with
Vegastrike directly and "do" stuff like make ships, set
objectives, and generally give the player a hard time.
First of all let me talk about the "stubs". We have had a clever
idea to make missions somewhat testable outside the framework of
vegastrike by autogenerating stub functions.
The way you make stub functions is by using the C++ processor in 2
steps...
cd src/python
gcc -E -DPYTHON_STUB=1 unit_wrapper.cpp > ~/data/modules/stub/VS.py
then edit that file and replace ~ with (newline)(space)(space)
and you have a sample python stub so you can find out every
mission that vegastrike exports.
we try to keep these stubs as up to date as possible.
Anyhow this lets you test your missions at the prompt by adding
the two directories
import sys
sys.path = sys.path + ['/home/blah/data/modules']
sys.path = sys.path + ['/home/blah/data/modules/stub']
import VS
...
and then you can run your mission and see if it at least sort of
works.
the stub file also gives you a good idea about what functions are
available for you in your missions.
I will try to give a brief description here...
Feel free to add to the descritptions or to ask me about any that
are unclear.
I give you as follows the VS functions C++ names so you get type
information as well!
Note that these comments are also included in src/universe_util.h
//this function sets the "current" system to be "name" where name may be something like
//"sol_sector/sol" or "vega_sector/vega" this function may take some time if the system
//has not been loaded before
void pushSystem (string name);
//this function restores the active system.... there must be an equal number of pushSystems
//and popSystems or else Vega Strike may behave unpredictably
void popSystem ();
//This function gets the current system's official name
string getSystemFile();
//this function gets the current system's nickname (not useful)
string getSystemName();
//this function gets an iterator into the units in the current system... do NOT keep an iterator
//across a frame--it may get deleted!
un_iter getUnitList();
//This function gets a unit given a number (how many iterations to go down in the iterator)
Unit *getUnit(int index);
//this function launches a wormhole or ajump point.
Unit *launchJumppoint(string name_string,
string faction_string,
string type_string,
string unittype_string,
string ai_string,
int nr_of_ships,
int nr_of_waves,
QVector pos,
string squadlogo,
string destinations);
//this function launches a normal fighter the name is the flightgroup name, the type is the ship type,
//the faction is who it belongs to, the unittype is usually "unit" unless you want to make asteroids or
//nebulae or jump points or planets. the aistring is either a python filename or "default" the nr of
//ships is the number of ships to be launched with this group, the number of waves is num reinforcements...
//the position is a tuple (x,y,z) where they appear and the squadlogo is a squadron image...you can leave
//this the empty string '' for the default squadron logo.
Unit* launch (string name_string,string type_string,string faction_string,string unittype,
string ai_string,int nr_of_ships,int nr_of_waves, QVector pos, string sqadlogo);
//this gets a random cargo type (useful for cargo missions) from either any category if category is ''
//or else from a specific category 'Contraband' comes to mind!
Cargo getRandCargo(int quantity, string category);
//This gets the faction name of an index
string GetFactionName(int index);
//this gets an index given a faction name
int GetFactionIndex(string name);
//this gets a relationship between two factions
float GetRelation(string myfaction,string theirfaction);
//this changes the relaationship based on the rank and how mad or happy they are (the relationship
//is between 0 and 1... so a adjustment of .01 with a rank of 1 is QUITE significant.
void AdjustRelation(string myfaction,string theirfaction, float factor, float rank);
//this gets the number of factions in game
int GetNumFactions ();
//this gets the current time in seconds
float GetGameTime ();
//this sets the time compresison value to zero
void SetTimeCompression ();
//this gets a string which has in it a space delimited list of neighmoring systems
string GetAdjacentSystem (string str, int which);
//this gets a specific property of this system as found in universe/milky_way.xml
string GetGalaxyProperty (string sys, string prop);
//this gets the number of systems adjacent to the sysname
int GetNumAdjacentSystems (string sysname);
//this adds a playlist to the music and may be triggered with an int
int musicAddList(string str);
//this plays a specific song
void musicPlaySong(string str);
//this plays msuci from a given list (where the int is what was returned by musicAddList)
void musicPlayList(int which);
//this gets the difficutly of the game... ranges between 0 and 1... many missions depend on it
//never going past .99 unless it's always at one.
float GetDifficulty ();
//this sets the difficulty
void SetDifficulty (float diff);
//this plays a sound at a location...if the sound has dual channels it will play in the center
void playSound(string soundName, QVector loc, Vector speed);
//this plays an image (explosion or warp animation) at a location
void playAnimation(string aniName, QVector loc, float size);
//this ends the mission with either success or failure
void terminateMission(bool term);
//this gets the player belonging to this mission
Unit *getPlayer();
//this gets a player number (if in splitscreen mode)
Unit *getPlayerX(int which);
//this gets the number of active players
int getNumPlayers ();
//this adds an objective for the cockpit to view ("go here and do this')
int addObjective(string objective);
//this sets the objective's completeness (the int was returned by add objective)
void setObjective(int which, string newobjective);
//this sets the completeness of a particular objective... chanigng the color onscreen
void setCompleteness(int which, float completeNess);
//this gets that completeness
float getCompleteness(int which);
//this sets the owner of a completeness
void setOwner(int which,Unit *owner);
//this gets an owner of a completeness (NULL means all players can see this objective)
Unit* getOwner(int which);
//this sends an IO message... I'm not sure if delay currently works, but from, to and message
//do :-) ... if you want to send to the bar do "bar" as the to string... if you want to make
//news for the news room specify "news"
void IOmessage(int delay,string from,string to,string message);
//this gets a unit with 1 of each cargo type in it
Unit *GetMasterPartList ();
//this gets a unit with a faction's contraband list... may be null (check with isNull)
Unit *GetContrabandList (string faction);
//this sets whether or not a player may autopilot. Normally they are both 0 and the autopiloting
//is allowed based on if enemies are near... if you pass in 1 then autopilot will be allowed no
//matter who is near... if you set -1 then autopilot is never allowed. global affects all
//players... player just affects the player who accepted the mission.
void SetAutoStatus (int global_auto, int player_auto);
Many of these functions return Unit * (for python just Unit)
However there is a very critical difference between a Python Unit
and a C++ Unit *.
If you have a Python Unit you may keep it across frames... it may
turn null (check with isNull()), but you can still keep it.... (if
it dies is when it turns null)... in C++ if you keep a Unit *
across a frame you WILL cause random segfaults (bad things, hard
to find)
but ya...Python it's safe to keep Unit's returned by
functions...just be aware that between frames they may die and
then bet tested Null with isNull().
The following comments are done with the python class as the
arguments are clearly lsited in VS.py stub function :-)
class Unit:
#don't call this one :-) it's just there in the stub ... really make units with the VS.launch above
def __init__(self):
print 'Unit constructor called with (self)'
# 1 "python_unit_wrap.h" 1
#make this unit warp to "un" and possibly ignore friendly targets. when computing if allowed
def AutoPilotTo(self,un,ignore_friendlies):
print "AutoPilotTo"
return 0
#sets the turret AI to actually fire a turret
def SetTurretAI(self):
print "SetTurretAI"
#tells teh turret AI never to fire
def DisableTurretAI(self):
print "DisableTurretAI"
#drains power of a unit
def leach(self,XshieldPercent,YrechargePercent,ZenergyPercent):
print "leach"
#figures out what rank in the flightgroup is the unit (-1 if no flightgroup or unit dead)
def getFgSubnumber(self):
print "getFgSubnumber"
return -1
#gets the ID of the flightgroup
def getFgID(self):
print "getFgID"
return string()
#sets the unit's nickname
def setFullname(self,name):
print "setFullname"
#gets the unit's nickname
def getFullname(self):
print "getFullname"
return string()
#debug
def getFullAIDescription(self):
print "getFullAIDescription"
return string()
#not sure!!
def setTargetFg(self,primary,secondary,tertiary):
print "setTargetFg"
#not sure again..perhaps targets a flihgtgroup? probably slow
def ReTargetFg(self,which_target):
print "ReTargetFg"
#if self is a starship as opposed to planet, asteroid, etc
def isStarShip(self):
print "isStarShip"
return 0
#if the self is a planet
def isPlanet(self):
print "isPlanet"
return 0
#if the self is a jump point
def isJumppoint(self):
print "isJumppoint"
return 0
#if the other is an enemey
def isEnemy(self,other):
print "isEnemy"
return 0
#if the enemy is a friend
def isFriend(self,other):
print "isFriend"
return 0
#if enemy is neutral
def isNeutral(self,other):
print "isNeutral"
return 0
#get the numerical relation btw -1 and 1 of this with other (may not be the same as other and this)
def getRelation(self,other):
print "getRelation"
return 0
#switches missile
def ToggleWeapon(self,Missile):
print "ToggleWeapon"
#turns on all missiles
def SelectAllWeapon(self,Missile):
print "SelectAllWeapon"
#splits a unit into many shrapnel... not 100% sure this works
def Split(self,level):
print "Split"
#don't call
def Init(self):
print "Init"
#turns on the jump drive (provided energy) this will cause the unit to teleport upon hitting a jump point
#this also causes the default AI to go for targetted jump points like there's no tomorrow.
#Desintation should be 0 for now
def ActivateJumpDrive(self,destination):
print "ActivateJumpDrive"
#this turns off an active jump drive
def DeactivateJumpDrive(self):
print "DeactivateJumpDrive"
#destroys this unit with explosion...preferrable to deliver damage or to just plain call Kill()
def Destroy(self):
print "Destroy"
#finds the local coordinates of another unit in this unit's space
def LocalCoordinates(self,un):
print "LocalCoordinates"
return (0,0,0)
#is another unit in range of this
def InRange(self,target,cone,cap):
print "InRange"
return 0
#is this unit visible?
def CloakVisible(self):
print "CloakVisible"
return 0
#Please cloak this unit
def Cloak(self,cloak):
print "Cloak"
#debug I think!!
def RemoveFromSystem(self):
print "RemoveFromSystem"
#find this unit's position if a unit at local_posit fired a shot at speed "speed"
def PositionITTS(self,local_posit,speed):
print "PositionITTS"
return (0,0,0)
#the actual position of this unit
def Position(self):
print "Position"
return (0,0,0)
#position of this unit based on its owning unit (i.e. if it is a turret) or else space for most units
def LocalPosition(self):
print "LocalPosition"
return (0,0,0)
#the unit that is threatening this unit
def Threat(self):
print "Threat"
return Unit()
#set the turrets to target the target passed in
def TargetTurret(self,targ):
print "TargetTurret"
#get an iterator to the subunits
def getSubUnits(self):
print "getSubUnits"
return 0
#threaten the target (placing this unit in the Threat() variable)
def Threaten(self,targ,danger):
print "Threaten"
#set the threat level to zero
def ResetThreatLevel(self):
print "ResetThreatLevel"
#fire guns or (if missile is 1) missiles
def Fire(self,Missile):
print "Fire"
#turn off beams
def UnFire(self):
print "UnFire"
#how far have our missiles locked
def computeLockingPercent(self):
print "computeLockingPercent"
return 0
#what percent is our shield
def FShieldData(self):
print "FShieldData"
return 0
def RShieldData(self):
print "RShieldData"
return 0
def LShieldData(self):
print "LShieldData"
return 0
def BShieldData(self):
print "BShieldData"
return 0
#how much fuel have we
def FuelData(self):
print "FuelData"
return 0
#how much energy
def EnergyData(self):
print "EnergyData"
return 0
#how much hull
def GetHull(self):
print "GetHull"
return 0
#how big is this unit
def rSize(self):
print "rSize"
return 0
#how far away is this unit from a point
def getMinDis(self,pnt):
print "getMinDis"
return 0
#is a beam (starting at start, ending at end) going through a bubble around this unit
def querySphere(self,start,end,my_unit_radius):
print "querySphere"
return 0
#is a beam starting at origin with direction going through this unit
def queryBoundingBox(self,origin,direction,err):
print "queryBoundingBox"
return 0
#reset all orders to "sitting duck"
def PrimeOrders(self):
print "PrimeOrders"
#load an AI script given the name
def LoadAIScript(self,aiscript):
print "LoadAIScript"
#load the last script that was constructed from VS.PythonAI
def LoadLastPythonAIScript(self):
print "LoadLastPythonAIScript"
return 0
#enqueue that script into the end of the given scripts
def EnqueueLastPythonAIScript(self):
print "EnqueueLastPythonAIScript"
return 0
#set the position to be pos
def SetPosition(self,pos):
print "SetPosition"
#set the current position (causing the unit to streak over to that position in a number of frames)
def SetCurPosition(self,pos):
print "SetCurPosition"
#sets all positions to be that position
def SetPosAndCumPos(self,pos):
print "SetPosAndCumPos"
#rotation on that axis
def Rotate(self,axis):
print "Rotate"
def ApplyForce(self,Vforce):
print "ApplyForce"
def ApplyLocalForce(self,Vforce):
print "ApplyLocalForce"
def Accelerate(self,Vforce):
print "Accelerate"
def ApplyTorque(self,Vforce,Location):
print "ApplyTorque"
def ApplyBalancedLocalTorque(self,Vforce,Location):
print "ApplyBalancedLocalTorque"
def ApplyLocalTorque(self,torque):
print "ApplyLocalTorque"
#deals damage to the hull based on a local coordinate point
def DealDamageToHull(self,pnt,Damage):
print "DealDamageToHull"
return 0
#finds a thrust vector based on the thrust passed in (given the fact that thrusters are finite powered)
def ClampThrust(self,thrust,afterburn):
print "ClampThrust"
return (0,0,0)
#thrust in a direction
def Thrust(self,amt,afterburn):
print "Thrust"
#give lateral thrust
def LateralThrust(self,amt):
print "LateralThrust"
def VerticalThrust(self,amt):
print "VerticalThrust"
def LongitudinalThrust(self,amt):
print "LongitudinalThrust"
#clamp the velocity of a unit to its max speed
def ClampVelocity(self,velocity,afterburn):
print "ClampVelocity"
return (0,0,0)
#clamp a rotation of the unit to max yaw/pitch/roll
def ClampAngVel(self,vel):
print "ClampAngVel"
return (0,0,0)
#clamp angular acceleration to a vector
def ClampTorque(self,torque):
print "ClampTorque"
return (0,0,0)
#sets the orientation given the up and fore vector (q and r respectiveoly)
def SetOrientation(self,q,r):
print "SetOrientation"
#translate from the previous space to this space (without translation)
def UpCoordinateLevel(self,v):
print "UpCoordinateLevel"
return (0,0,0)
#translate from this space down to the world space (without translation)
def DownCoordinateLevel(self,v):
print "DownCoordinateLevel"
return (0,0,0)
#goes from world space to this coordinates including translation_
def ToLocalCoordinates(self,v):
print "ToLocalCoordinates"
return (0,0,0)
#goes from this coordinates to world coordinates including translation
def ToWorldCoordinates(self,v):
print "ToWorldCoordinates"
return (0,0,0)
#gets the angular velocity
def GetAngularVelocity(self):
print "GetAngularVelocity"
return (0,0,0)
#gets velocity
def GetVelocity(self):
print "GetVelocity"
return (0,0,0)
def SetVelocity(self,v):
print "SetVelocity"
def SetAngularVelocity(self,v):
print "SetAngularVelocity"
def GetMoment(self):
print "GetMoment"
return 0
def GetMass(self):
print "GetMass"
return 0
#is a missile locked?
def LockMissile(self):
print "LockMissile"
return 0
#enject cargo with that index (-1 is ejector seat)
def EjectCargo(self,index):
print "EjectCargo"
#what would this unti pay for the cargo string passed in)
def PriceCargo(self,s):
print "PriceCargo"
return 0
#how cargos does this unit have
def numCargo(self):
print "numCargo"
return 0
#is the docking unit cleared with this one
def IsCleared(self,dockingunit):
print "IsCleared"
return 0
#get an entire category from teh master part list and add it to the hold
def ImportPartList(self,category,price,pricedev,quantity,quantdev):
print "ImportPartList"
#docking unit wants to request clearence to self
def RequestClearance(self,dockingunit):
print "RequestClearance"
return 0
#is the unit docked already?
def isDocked(self,dockingUnit):
print "isDocked"
return 0
#try to dock (if in white square) with the unittoDockWith otherwise return false
def Dock(self,unitToDockWith):
print "Dock"
return 0
#try to undock with the unitToDockWith...on success return 1
def UnDock(self,unitToDockWith):
print "UnDock"
return 0
#get number of gunso n this ship (and missiles)
def GetNumMounts(self):
print "GetNumMounts"
return 0
#teleport to that other system (as a string) loads if necessary
def JumpTo(self,systemstring):
print "JumpTo"
return 0
#gets the faction name of this unit
def getFactionName(self):
print "getFactionName"
return ''
#gets the faciton index
def getFactionIndex(self);
print "getFactionIndex"
return 0
#sets the faction name (who ownz this unit)
def setFactionName(self,strname):
print "setFactionName"
#who owns this
def setFactionIndex(self,factionindex):
print "setFactionIndex"
def getName(self):
print "getName"
return ''
def getFlightgroupName(self):
print "getFlightgroupName"
return ''
def getFgDirective(self):
print "getFgDirective"
return ''
#gets a unit who is the leader of this flightgroup...returns this if no flightgroup
def getFlightgroupLeader(self):
print "getFlightgroupLeader"
return Unit()
#gimme (this unit) money (can be negative)
def addCredits(self,floatcache):
print "addCredits"
#switch to another lfightgroup
def switchFg(self,fgname):
print "switchFg"
#how much cache do I have (money)
def getCredits(self):
print "getCredits"
return 0
#set the leader
def setFlightgroupLeader(self,leader):
print "setFlightgroupLeader"
return 0
#not sure
def setFgDirective(a=None,b=None,c=None,d=None,e=None,f=None,g=None,h=None,i=None,j=None):
print "setFgDirective"
return 0
#how leaderful am I
def getFgSubnumber(self):
print "getFgSubnumber"
return -1
#is this unit a significant object (base, jump point, planet)
def isSignificant(self):
print "isSignificant"
return 0
def isSun(self):
print "isSun"
return 0
#communicate to other unit
def communicateTo(self,other):
print "communicateTo"
return 0
#maek comm animation appear on screen of target
def commAnimation(self, stringanimation):
print "commAnimation"
return 0
#remove a crago from this unit
def removeCargo(self, stringcargo,quantity):
print "removeCargo"
return 0
#add another units stats to my own... in the upgrades/unitfile/unitfile
def upgrade(self, unitfile,force, subunitoffset, mountoffset):
print "upgrade"
return 0
#add cargo to my unit
def addCargo(self,Cargo carg):
print "addCargo"
return 0
#get distance (minus radii) between self and other
def getDistance(self, other):
print "getDistance"
return 0
#increment random cargo
def incrementCargo(a=None,b=None,c=None,d=None,e=None,f=None,g=None,h=None,i=None,j=None):
print "incrementCargo"
return 0
#decrement random cargo
def decrementCargo(a=None,b=None,c=None,d=None,e=None,f=None,g=None,h=None,i=None,j=None):
print "decrementCargo"
return 0
#get distance plus atmospheric size if large planet (to prevent players from coming too close
#to surface when leaving autopilot
def getSignificantDistance(self,other):
print "getSignificantDistance"
return 0
#is this unit a player starship...if not return -1 else return player number (starting at 0)
def isPlayerStarship(a=None,b=None,c=None,d=None,e=None,f=None,g=None,h=None,i=None,j=None):
print "isPlayerStarship"
return -1
#does this unit have some cargo
def hasCargo(self,mycarg):
print "hasCargo"
return 0
#retuns cargo if the unit has it by that name else returns cargo with 0 quantity
def GetCargo(self,cargoname):
print "GetCargo"
return Cargo("","",1,1,1,1)
# 351 "unit_wrapper.cpp" 2
#is this unti equal to another
def __eq__(self,oth):
print "__eq__"
return 0;
#is this unit notequal
def __ne__(self,oth):
print "__ne__"
return 1;
#remove unit from game the correct way
def Kill(self):
print "Kill";
#set this unit to be null (doesnt' affect unit itself, only this pointer)
def setNull(self):
print "setNull";
#is this unit not null
def __nonzero__(self):
print "__nonzero__"
return random.randrange(0,2);
#is this unit NULL (i.e. dead or killed)
def isNull(self):
print "isNull"
return random.randrange(0,2);
#set this units' target to un
def SetTarget(self,un):
print "SetTarget";
#get this unit's current target
def GetTarget(self):
print "GetTarget"
return Unit();
#get the unit that this unit is matching speed with
def GetVelocityReference(self):
print "GetVelocityReference"
return Unit()
#set the unit this unit is matching speed with
def SetVelocityReference(self,un):
print "SetVelocityReference";
#get orientation of this unit
def GetOrientation(self):
print "GetOrientation"
return ((1,0,0),(0,1,0),(0,0,1))
#is the beam inside this ship
def queryBSP(self,start,end):
print "queryBSP"
return (un,(0,0,1),0)
#how far off is this unit to another unit with guns that have speed and range) (returns a tuple
#with a cosine and a range normalized between 0 and 1)
def cosAngleToITTS(self,un,speed,range):
print "cosAngleToITTS"
return (.95,10000)
#same as above but assuming guns are instant
def cosAngleTo(self,un):
print "cosAngleTo"
return (.93,10000)
#more specific to this ship and very slow
def cosAngleFromMountTo(self,un):
print "cosAngleFromMountTo"
return (.93,10000)
#gets the gun speed of this ship
def getAverageGunSpeed(self):
print "getAverageGunSpeed"
return (200,10000)
#is another unit inside this unit
def InsideCollideTree(self,un):
print "InsideCollideTree"
return ((0,0,0),(0,0,1),(0,0,0),(0,1,0))
#get a particular turret
def getSubUnit(self,which):
print "getSubUnit"
return Unit()
#this is the unit iterator class... it is returned in a number of functions... DO NOT keep this
#across a frame (i.e. save it after Execute()
class un_iter:
#dont' call this...stub only
def __init__(self):
print 'un_iter constructor called with (self)'
#the unit this iterator is pointing to (may well be null...that's how you know to stop checking)
def current(self):
print "current"
return Unit()
#advance this iterator (check to see if null first!!)
def advance(self):
print "advance"
#remove this unit from the collection in wchih it is in
def remove(self):
print "remove"
#add a unit to this collection
def preinsert(self,un):
print "preinsert"
class Cargo:
def __init__ (self,a,b,c,d,e,f):
print 'Cargo constructor called with (self,%s,%s,%f,%d,%f,%f)' % (a,b,c,d,e,f)
def SetPrice(self,price):
print "SetPrice"
def GetPrice(self):
print "GetPrice"
return 1
def SetMass(self,mass):
print "SetMass"
def GetMass(self):
print "GetMass"
return 1
def SetVolume(self,volume):
print "SetVolume"
def GetVolume(self):
print "GetVolume"
return 1
def SetQuantity(self,quantity):
print "SetQuantity"
def GetQuantity(self):
print "GetQuantity"
return 1
def SetContent(self,content):
print "SetContent"
def GetContent(self):
print "GetContent"
return "weapons"
def SetCategory(self,category):
print "SetCategory"
def GetCategory(self):
print "GetCategory"
return "contraband"
def SetMissionFlag(self,flag):
print "SetMissionFlag"
def GetMissionFlag(self):
print "GetMissionFlag"
return 0
def GetCategory(self):
print "GetCategory"
return "contraband"
def GetDescription(self):
print "GetDescription"
return ""
class PythonAI:
def init(self,un):
print "init"
def Execute(self):
print "Execute"
def GetParent(self):
print "GetParent"
return Unit()
def __init__(self):
print 'PythonAI constructor called with (self)'
self.init(Unit())
def AddReplaceLastOrder(self,replace):
print "AddReplaceLastOrder"
def ExecuteLastScriptFor(self,time):
print "ExecuteLastScriptFor"
def FaceTarget(self,end):
print "FaceTarget"
def FaceTargetITTS(self,end):
print "FaceTargetITTS"
def MatchLinearVelocity(self,terminate,vec,afterburn,local):
print "MatchLinearVelocity"
def MatchAngularVelocity(self,terminate,vec,local):
print "MatchAngularVelocity"
def ChangeHeading(self,vec):
print "ChangeHeading"
def ChangeLocalDirection(self,vec):
print "ChangeLocalDirection"
def MoveTo(self,Targ,afterburn):
print "MoveTo"
def MatchVelocity(self,terminate,vec,angvel,afterburn,local):
print "MatchVelocity"
def Cloak(self,enable,seconds):
print "Cloak"
def FormUp(self,pos):
print "FormUp"
def FaceDirection(self,distToMatchFacing,finish):
print "FaceDirection"
def XMLScript(self,script):
print "XMLScript"
def LastPythonScript(self):
print "LastPythonScript"
--------------------------------------------------------------------
Chapter 7: Writing Add On Adventures
--------------------------------------------------------------------
Honestly you merely need a basic understanding of python in order
to craft your own add on adventures...but I decided to write a
framework for consistently and speedily adding adventures to the
general exploration of Vega Strike.
I will define adventure as follows:
A minature mission that gets triggered by a player who goes in its
system.
This mission may either be persistent or nonpersistent... a
persistent mission will reload the next time the triggering player
launched it until the player beats the mission.
THE QUEST CLASS: THE ACTUAL QUEST LOGIC GOES HERE
the quest, quest_factory and lastly the adventure modules take
care of most of the dirty work...
all an quest class has to do is the following:
class quest_my(quest.quest):
def __init__ (self):
#do anything you need here
def Execute (self):
#do anything you need here...return 1 if you wish to execute again, 0 if you wish to
#terminate yourself
That's it.... Though there are some useful functions you may wish
to call in your superclass
self.removeQuest() #this prevents your player from EVER
encountering the quest again in his life
self.makeQuestPersistent() #this causes the quest to be loaded the
next time your player jumps in after rebooting vegastrike
generally before returing 0 (temrinating self) in a mission you
may wish to make the quest either persistent (comes back next time
he starts game) or removed... though you could also leave the
quest the way it is and the next time the player goes to the
system after rebooting vegastrike he'll get the same quest again :-)
but in order for your quest to be complete you must have two more
components
THE QUEST FACTORY: A CLASS THAT RETURNS THE QUEST NEEDED
each quest must have a factory that inherits from
quest.quest_factory. and must define both an init, and a create
function.
optionally there's a conditional function called precondition....
That returns a boolean whether or not the quest is ripe for
creation (when a player encounters it in its native system that is)
class quest_my_factory (quest.quest_factory):
def __init__ (self):
quest.quest_factory.__init__ (self,"quest_my")
def create (self):
return quest_my()
def precondition(self,playernum):
return Director.getSaveData(playernum,"talked_to_sandra",0)>0
The factory must have 2 and can have all 3 of the above functions
first is the init function... y9ou must call your superclass's
init with your name. second is the create function... this must
simply return the quest class you painstakingly created above
third is the precondition...this is optional (by default it
returns 1...always true)
the precondition can look in the save variables and see if you
have done a task (set by some other quest perhaps) and only then
return 1... :-) in that case when a player encounters it for the
first time it will check the precondition before launchign the
quest.... note the precondition does NOT get checked once the
mission has been turned into a persistent mission.... this is
because the mission already made the decision to make itself
persistent I don't expect many missions to need to be
persistent.... I expect more lighthearted adventures that don't
drag out if a player quits, etc.
Anyhow... a good example is the persistent quest known as the
quest_drone (quest_drone.py)
that quest checks to see if you're near an unknown_derelect and if
so it launches the badguy drone.... it makes the drone jump and
follow you wherever you go until it is destroyed...it is
persistent and launches the drone every time you rerun the game....
Luckily if you're close to the derelect chances are you'll find
the gun that you can use to kill the drone.... which brings me
right smack into my next point: location location location!
THE LOCATION AND PERSISTENCE OF A GIVEN QUEST (i.e. HOOKING IT
INTO privateer.py)
adventure.py has the master list of all possible quests in vega
strike....
right now there are two (but one is stupid and will be removed
soon enough...that's the default one)
adventures = {"gemini_sector/delta_prime":quest_drone.quest_drone_factory(),
"sol_sector/celeste":quest.quest_factory("default_quest",0)}
persistent_adventures = [quest_drone.quest_drone_factory()]
These are the only 2 lists that will ever need to be changed in
the modules that are already there.
adventures contains a map of location to adventure. Note that
there can be only 1 adventure per location (hey players need to be
encouraged to actually EXPLORE)
the second list lists all possible persistent adventures (though
they are only loaded from if the given adventure has gotten around
to calling self.makeQuestPersistent)
Anyhow just adding more cool missions to this list will make it a
lot more fun to explore around and encounter strang epeople,
strange news, and a bunch 'o cash :-P
Note that we should eventually make the news reports line up with
the quests... :-) I have some ideas how to do that
Basically you can call
VS.IOmessage ("game","news","A drone was sighted in the delta
prime...blah blah blah")
and then epople will see it in the game when they click on GNN
likewise if you send it to
VS.IOmessage ("game","bar","A drone was sighted in the delta
prime...blah blah blah")
then you can hear it when you talk to the bartender :-)
-------------------------------------------------------------------------
Chapter 8: Conclusion
-------------------------------------------------------------------------
Well this is the best I can do so far... please read this
documentation over and let me know if you have any suggestions or
clarifications...adn best yet give it a shot and try it out-- and
at least look at modules/cargo_mission.py (whcih is called from a
number of missions I think) as well as modules/privateer.py
(called by mission/exploration/explore_universe.mission )
And certainly try to understand modules/quest_drone.py
before trying to write a quest (or while trying to write one)
* 32) Troubleshooting*
If you should encounter problems, then you should check these things:
- Always check if Setup.exe is set to the closest options for your
computer
- Check the bottom of stdout.txt and stderr.txt to see if there
are any errors. Then, send us an e-mail with those 2 files
attached, along with a description of the mission you chose and
what you did to cause it to:
vegastrike-users@lists.sourceforge.net
<mailto:vegastrike-users@lists.sourceforge.net>
* 33) License*
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.><br>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.