PGG Missions BBS with new available missions to accept...

Discuss the Wing Commander Series and find the latest information on the Wing Commander Universe privateer mod as well as the standalone mod Wasteland Incident project.
Post Reply
mr C
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sat Nov 22, 2014 4:37 am

PGG Missions BBS with new available missions to accept...

Post by mr C »

Hi,
I cant figur out how to enable classic "Mission BBS" with new availble missions in Gemini Gold.

By default there is normal classic menu in Gemini Gold only at hangar (behind ship seller) on the right end of screen under the name "Old Upgrade/Repair Computer".
In this old classic menu are under "Missions" button in "Missions BBS" only "Active Missions". Player can not recieve any new mission here. New missions are available in Gemini Gold only via mission computer or guild which are handled by nicely done rooms/screens but its not very comfortable to use them.

I would like to access new missions normaly in VS menu as it is used in PPU. Where is content of "Missions BBS" (mission button in menu) handled? I cant find it anywhere ...Does GG use somekind of custom VS build? Can I change Mission BBS to show new available missions or is it somehow hardcoded in VS build?

Any idea how to do it?

EDIT:
According to this http://spacetechs.free.fr/VEGASTRIKEDEV ... tml#l03092 it looks like the functionality Im looking for is hardcoded part of VS engine... question is if this functionality was/is aslo part of Gemini Gold VS engine... if so, how can I call it or how can I check if its part of GG?
mr C
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sat Nov 22, 2014 4:37 am

Re: PGG Missions BBS with new available missions to accept..

Post by mr C »

Answer to my subquestion "Does GG use somekind of custom VS build?" is probably Yes...
its here: https://svn.code.sf.net/p/privateer/cod ... nk/engine/

but it looks like the functionality for "Mission BBS" is still present (or am I mistaken? Im not programmer so Im not capable just to look and tell from what I see if the code works or no :oops: but this sure looks to me like it should do what I looking for)
https://svn.code.sf.net/p/privateer/cod ... mputer.cpp

Code: Select all

// Change display mode to MISSIONS.
bool BaseComputer::changeToMissionsMode(const EventCommandId& command, Control* control) {
    if(m_currentDisplay != MISSIONS) {
        switchToControls(MISSIONS);
    }
    loadMissionsControls();
    updateTransactionControlsForSelection(NULL);
    return true;
}


// Load a master list with missions.
void BaseComputer::loadMissionsMasterList(TransactionList& tlist) {
    // Make sure the list is clear.
    tlist.masterList.clear();

    Unit* unit = _Universe->AccessCockpit()->GetParent();
    int playerNum = UnitUtil::isPlayerStarship(unit);
    if(playerNum < 0) {
        VSFileSystem::vs_fprintf(stderr,"Docked ship not a player.");
        return;
    }

    // Number of strings to look at.  And make sure they match!
    const int stringCount = getSaveStringLength(playerNum, MISSION_NAMES_LABEL);
	if (Network==NULL) {
		// these aren't sent over the network.
		assert(stringCount == getSaveStringLength(playerNum, MISSION_SCRIPTS_LABEL));
	}
    assert(stringCount == getSaveStringLength(playerNum, MISSION_DESC_LABEL));

    // Make sure we have different names for all the missions.
    // This changes the savegame -- it removes ambiguity for good.
    for(int current=0; current<stringCount; current++) {
        const string currentName = getSaveString(playerNum, MISSION_NAMES_LABEL, current);
        int count = 1;
        // Check whether any after the current one have the same name.
        for(unsigned int check=current+1; check<stringCount; ++check) {
            const string checkName = getSaveString(playerNum, MISSION_NAMES_LABEL, check);
            if(check == current) {
                // Found identical names.  Add a "count" at the end. 
                putSaveString(playerNum, MISSION_NAMES_LABEL, current, checkName+"_"+tostring(count++));
            }
        }
    }

    // Create an entry for for each mission.
    for(int i=0; i<stringCount; i++) {
        CargoColor c;

        // Take any categories out of the name and put them in the cargo.category.
	    if (Network == NULL) {
	      const string finalScript = getSaveString(playerNum, MISSION_SCRIPTS_LABEL, i);
	      if (finalScript[0]=='#') {
	        continue; // Ignore any missions with comments. (those are fixer missions.)
	      }
        }
		
        const string originalName = getSaveString(playerNum, MISSION_NAMES_LABEL, i);
        const string::size_type lastCategorySep = originalName.rfind(CATEGORY_SEP);
        if(lastCategorySep != string::npos) {
            // We have a category.
            c.cargo.content = originalName.substr(lastCategorySep + 1);
            c.cargo.category = originalName.substr(0, lastCategorySep);
        } else {
            // No category in name.
            c.cargo.content = originalName;
            c.cargo.category = "";
        }
        c.cargo.content=c.cargo.content;
        // Description gets name at the top.
        c.cargo.description = "#b#" + beautify(c.cargo.content) + ":#-b#n1.75#" + 
            getSaveString(playerNum, MISSION_DESC_LABEL, i);

        tlist.masterList.push_back(c);
    }

    // Sort the list.  Better for display, easier to compile into categories, etc.
    std::sort(tlist.masterList.begin(), tlist.masterList.end(), CargoColorSort());
    if (active_missions.size()) {
      for (unsigned int i=1;i<active_missions.size();++i){
        CargoColor amission;
        amission.cargo.content=XMLSupport::tostring(i)+" "+active_missions[i]->mission_name;
        amission.cargo.price=0;
        amission.cargo.quantity=1;
        amission.cargo.category="Active_Missions";
        amission.cargo.description="Objectives\\";
        for (unsigned int j=0;j<active_missions[i]->objectives.size();++j) {
          amission.cargo.description = amission.cargo.GetDescription()+active_missions[i]->objectives[j].objective+": "+XMLSupport::tostring((int)(100*active_missions[i]->objectives[j].completeness))+"%\\";          
        }
        amission.color=DEFAULT_UPGRADE_COLOR();
        tlist.masterList.push_back(amission);
      }
    }
}

// Load the controls for the MISSIONS display.
void BaseComputer::loadMissionsControls(void) {
    // Make sure there's nothing in the transaction lists.
    resetTransactionLists();

    // Load up the list of missions.
    loadMissionsMasterList(m_transList1);
    SimplePicker* picker = static_cast<SimplePicker*>( window()->findControlById("Missions") );
    assert(picker != NULL);
    loadListPicker(m_transList1, *picker, ACCEPT_MISSION);

    // Make the title right.
    recalcTitle();
}

// Accept a mission.
bool BaseComputer::acceptMission(const EventCommandId& command, Control* control) {
    Unit* playerUnit = m_player.GetUnit();
    Unit* baseUnit = m_base.GetUnit();
    if(!(playerUnit && baseUnit)) return true;

    Cargo* item = selectedItem();

    if(!item || !isTransactionOK(*item, ACCEPT_MISSION)) {
        // Better reload the UI -- we shouldn't have gotten here.
        loadMissionsControls();
        updateTransactionControlsForSelection(NULL);
        return true;
    }
    if (item->GetCategory().find("Active_Missions")!=string::npos) {
      unsigned int whichmission=atoi(item->GetContent().c_str());
      if (whichmission>0&&whichmission<active_missions.size()) {
        Mission * miss=active_missions[whichmission];
        if (Network==NULL) {
          miss->terminateMission();
          if (miss==mission)
            mission=active_missions[0];
          //Cargo itemCopy = *item;
          //loadMissionsControls();
          refresh();
        } else if (m_player.GetUnit()) {
          int cp=_Universe->whichPlayerStarship(m_player.GetUnit());
          if (cp<0) cp=0;
		  int num = miss->getPlayerMissionNumber();
		  
          Network[cp].missionRequest(Subcmd::TerminateMission, string(), num);
        }
        //updateTransactionControls(itemCopy);
        return true;
      }      
      return false;
    }
    const int playernum = UnitUtil::isPlayerStarship(playerUnit);
    const int stringCount = getSaveStringLength(playernum, MISSION_NAMES_LABEL);
    if (Network==NULL) {
      assert(stringCount == getSaveStringLength(playernum, MISSION_SCRIPTS_LABEL));
    }
    string qualifiedName;
    if(item->GetCategory().empty()) {
        qualifiedName = item->content;
    } else {
        qualifiedName = item->GetCategory() + CATEGORY_SEP + item->GetContent();
    }
    string finalScript;
    for (unsigned int i=0; i<stringCount; i++) {
	if (getSaveString(playernum, MISSION_NAMES_LABEL, i) == qualifiedName) {
	    if (Network==NULL) {
	    finalScript = getSaveString(playernum, MISSION_SCRIPTS_LABEL, i);
		eraseSaveString(playernum, MISSION_SCRIPTS_LABEL, i);
		eraseSaveString(playernum, MISSION_NAMES_LABEL, i);
		eraseSaveString(playernum, MISSION_DESC_LABEL, i);
	    } else {
	      finalScript="#";
	    }
	    break;
	}
    }
    if(finalScript.empty()) {
      return false;
    } else {
		if (Network==NULL) {
			LoadMission(("#"+item->category).c_str(),
				finalScript, false);
			/*
			if(active_missions.size() > 0) {
				// Give the mission a name.
				active_missions.back()->mission_name = item->category;
			}
			*/
			// Reload the UI.
			//Cargo itemCopy = *item;
			//loadMissionsControls();
			refresh();
			//updateTransactionControls(itemCopy);
		} else if (m_player.GetUnit()) {
			int cp=_Universe->whichPlayerStarship(m_player.GetUnit());
			if (cp<0) cp=0;
			Network[cp].missionRequest(Subcmd::AcceptMission, qualifiedName, active_missions.size());
		}
    }

    // We handled the command, whether we successfully accepted the mission or not.
    return true;
}
So my question is still same "how to enable classic "Mission BBS" with new availble missions in Gemini Gold?"
It seems to me that the functionality is in Gemini Gold VS engine still present, so how is possible that it doesnt reflect in game world in Mission BBS? Does anybody know where is it blocked?
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: PGG Missions BBS with new available missions to accept..

Post by loki1950 »

Gemini Gold forked from VS a long time ago before our 4.3 release so our current svn is not compatible at all new library versions as well as a Python update so you would have to through all of the GG code not the VS code and I do not know if it still available as there has been some massive flame wars between the two projects there are a few of our members that may be familiar though so hopefully one will chime in.

Enjoy the Choice :)
Edit: You might check the Python scripts for missions in the data/modules folder not the C++ code.
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: PGG Missions BBS with new available missions to accept..

Post by pheonixstorm »

You could also try to find a current copy of Privateer Parallel Universe as it uses more of a VS look n feel and has far more purchasable ships.

Side note, neither of the privateer mods are really active. There are some who do what they can to patch up bugs and whatnot but there has been (since last time I was really active here myself) little work being done on them.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Post Reply