Unified Mission Resource

Development directions, tasks, and features being actively implemented or pursued by the development team.
Post Reply
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Unified Mission Resource

Post by pheonixstorm »

Not sure how closely Privateer PU, Privateer GG, Vegastrike, et al. has setup mission loading and/or organization so figured I would find out. PGG i'm not too concerned about since its by the book and should have no need of adding new missions.. VS and PPU though I deal with the most so this will mostly concern them.

As far as mission scripts go VS has a lot of its fixers in the campaigns.py (as does PPU) though PPU also has other fixers in seperate files referenced by name. Does or will VS use the same system? In working on my mission editor/wizard its important so I can get it working for VS as well as mods that use the engine. So far the concept will only create individual fixer missions and not do any work on whole campaigns though eventually it probably could (thats one huge string we are talking about though...)

Since the actual file is not important and the campaigns.py can be split would it be possible to have two seperate folders for breaking up the campaign/add-in scripts such as

Code: Select all

modules/campaigns.py
modules/campaign/mission1.py
modules/campaign/mission2.py etc..
modules/addins/mission1.py
modules/addins/mission2.py
This would also make it easier to create a dev tool that can create missions on either side w/o having to rewrite the entire campaigns.py

Heres PPU

Code: Select all

import campaign_bonus
import camptroy
import dillohfb
import sligorsc
import zoolcamp
import galagoss
import hospital
import irene
import scottval
import avalon
import ebenezer
campaignsloaders=[lambda:LoadMainCampaign(),lambda:LoadRFCampaign(),lambda:LoadRFMurphyCampaign(),lambda:LoadRFGoodinCampaign(),lambda:LoadRFTaylaCampaign(),lambda:LoadRFLynchCampaign(),lambda:campaign_bonus.LoadBonusCampaign(),lambda:camptroy.LoadTroyCampaign(),lambda:dillohfb.LoadDillohCampaign(),lambda:sligorsc.LoadSligorCampaign(),lambda:zoolcamp.LoadZoolCampaign(),lambda:galagoss.LoadGosshawkCampaign(),lambda:hospital.LoadNateCampaign(),lambda:irene.LoadIreneCampaign(),lambda:scottval.LoadScottCampaign(),lambda:avalon.LoadAvalonCampaign(),lambda:ebenezer.LoadEbenezerCampaign()]
campaigns=[]

def loadAll(cockpit):
	for x in campaignsloaders:
		ret=x()
		if ret:
			campaigns.append(ret)

def getCampaigns():
	return campaigns

import campaign_lib
from campaign_lib import *


sandovalspeech={"intro":[("Sandoval","Welcome to New Detroit. You look like a man who's hungry for work.", "barspeech/campaign/sandoval1intro.wav"),
							("Burrows","Among other things. You hiring?"),
							("Sandoval","Indeed I am. A simple delivery of iron, strictly legit."),
							("Burrows","I've heard that song before, Mr?"),
							("Sandoval","Sandoval, Ernesto Sandoval."),
							("Burrows","Then I'll be your pilot."),
							("Sandoval","You'll be running the load of iron to the Liverpool refinery in Newcastle, which is just a short jump from here. No contraband, no hassles. Just dock at the station. My people will pick up the cargo. Afterwards, return here for your payment, 15000 credits. Interested?")],
And heres VS

Code: Select all

import universe
campaignsloaders=[lambda:LoadMainCampaign()]
campaigns=[]

_loaded=False

def loadAll(cockpit):
	global _loaded
	_loaded=True
	for x in campaignsloaders:
		ret=x()
		if ret:
			campaigns.append(ret)

def getCampaigns():
	if not _loaded:
		# Loading happens in generate_dyn_universe.py
		# But sometimes, e.g. multiplayer, this is not loaded.
		loadAll(VS.getCurrentPlayer())
	return campaigns

import campaign_lib
from campaign_lib import *

# TODO
#
# Get phrase for "Good Luck!"


haulerdeal1={"intro":[("Hauler", "That was lucky, I thought I might have missed you!"),
                    ("Deucalion", "I think you've mistaken me for someone else."),
                    ("Hauler", "No, I'm certain - you're running the Llama that just got recertified."),
                    "Deucalion stares ambiguously at this vexacious interruption.",
                    ("Deucalion", "I'm not buying."),
                    ("Hauler", "No, no, no.  You misunderstand, I'm a freight merchant, my hauler has broken down and I need help delivering the rest of my shipment."),
For the editor it would handle creating the mission file by fixer name and handle editing the campaigns.py to include the new mission. Basics for the editor is just to create the main py and thats it while the editor is what we might use to finish the campaign and add in side missions.

My question and suggestion to make things easier on all of us.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Unified Mission Resource

Post by klauss »

Yep, great idea. Anything that makes things more automation-friendly are great ides, since creating content is as hard as it is since there's no tool to help content authors, which aren't python gurus most of the time.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Unified Mission Resource

Post by pheonixstorm »

That sounds good. Does anyone know what is REQUIRED to stay in campaigns.py or can it be blank with just the imports? Guess I should also figure out what some of the other files in that folder are for.

While i'm thinking of it, what are the .mission files for? I haven't looked at em yet but do they hold data pertaining to missions or some other data that I don't need to worry about.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Post Reply