The Feudal States

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

DGill
---- E L I T E ----
---- E L I T E ----
Posts: 302
Joined: Thu Jan 01, 2009 9:45 am

Re: The Feudal States

Post by DGill »

Balisongdalo wrote: Fri Dec 27, 2024 9:27 pm
I'd also like to try it out, as feudal states is one of my most played oxp's, the estate management is a welcome addition!
Ok, I've sent you a PM with the links. Any problems give me a shout.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 5207
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: The Feudal States

Post by phkb »

DGill wrote: Fri Dec 27, 2024 11:20 pm
Ok, I've sent you a PM with the links. Any problems give me a shout.
There's a small problem with the shipdata.plist file from the Feudal_States_Extended.oxp. Some of the ship keys are duplicates from Dictators and then create problems with spawning.

Here's and adjusted shipdata.plist which should clear up the issue.
FeudalStates_shipdata.zip
(21.89 KiB) Downloaded 5 times
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 302
Joined: Thu Jan 01, 2009 9:45 am

Re: The Feudal States

Post by DGill »

phkb wrote: Tue Jul 01, 2025 9:52 pm
There's a small problem with the shipdata.plist file
Thank you, I was not aware of the issue.

The version of Feudal_States_Extended you have has lots of scripting errors. I have updated and corrected most of the ones I'm aware of but still two to sort out.

Regarding planetfall 2 compatibility I have the script in feudal-mission.js

Code: Select all

this.startUp = function () {
	
    var pf = worldScripts.PlanetFall2;
	
	if(missionVariables.feudal_mission_home == "Digebiti" && missionVariables.feudal_Enfeoff_estate) {
    pf._locationOverrides["0 96"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "capitalCity", "capitalCity",  "planetFall2_mainSurface_FSEstate"],
                names: ["Sir Ffoliot Cary Port, Lesser Walsingham (Royal Court)", "Lesser Walsingham (Capital City)","Lancaster (City)", "Greater Walsingham (Cathedral)", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };
	}
	else
	{
    pf._locationOverrides["0 96"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "capitalCity", "capitalCity"],
                names: ["Sir Ffoliot Cary Port, Lesser Walsingham (Royal Court)", "Lesser Walsingham (Capital City)","Lancaster (City)", "Greater Walsingham (Cathedral)"],
            }
        ],
    };		
	};	
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>

	if(missionVariables.feudal_mission_home == "Aronar" && missionVariables.feudal_Enfeoff_estate) {
    pf._locationOverrides["0 73"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSCasino", "planetFall2_mainSurface_FSEstate"],
                names: ["van de Spiegel Port (Royal Court)", "van Duijvenbode Port (Capital City)", "Giles's Grotto (Shrine)", "Casino Straits (City)", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };
	}
	else
	{
    pf._locationOverrides["0 73"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSCasino"],
                names: ["van de Spiegel Port (Royal Court)", "van Duijvenbode Port (Capital City)", "Giles's Grotto (Shrine)", "Casino Straits (City)"],
            }
        ],
    };		
	};
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
	
	if(missionVariables.feudal_mission_home == "Edzaon" && missionVariables.feudal_Enfeoff_estate) {
    pf._locationOverrides["0 159"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSEstate"],
                names: ["Bamburgh (Royal Court)", "Newcastle (Capital City)", "Durham (Cathedral)", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };
	}
	else
	{
    pf._locationOverrides["0 159"] = {
        main: [
            {
               roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral"],
                names: ["Bamburgh (Royal Court)", "Newcastle (Capital City)", "Durham (Cathedral)"],
            }
        ],
    };		
	};
// >>>>>>>>>>>>>>>>>>>>>>>>
	
	if(missionVariables.feudal_mission_home == "Tibecea" && missionVariables.feudal_Enfeoff_estate) {	
    pf._locationOverrides["0 170"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSShipyard", "planetFall2_mainSurface_FSEstate"],
                names: ["La Serenissima Port (Royal Court)", "Phibo Nacci Port (Cathedral City)", "Arsenale (Shipyards)", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };
	}
	else
	{
    pf._locationOverrides["0 170"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSShipyard"],
                names: ["La Serenissima Port (Royal Court)", "Phibo Nacci Port (Cathedral City)", "Arsenale (Shipyards)"],
            }
        ],
    };		
	};
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>	

	if(missionVariables.feudal_mission_home == "Onarmala" && missionVariables.feudal_Enfeoff_estate) {
    pf._locationOverrides["6 185"] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral", "planetFall2_mainSurface_FSEstate"],
                names: ["Jaftra Port (Royal Court)", "Winter Palace (City)", "Avignon (University)", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };
	}
	else
	{
    pf._locationOverrides["6 185"] = {
        main: [
            {
               roles: ["planetFall2_mainSurface_FSRoyalCourt", "capitalCity", "planetFall2_mainSurface_FSCathedral"],
                names: ["Jaftra Port (Royal Court)", "Winter Palace (City)", "Avignon (University)"],
            }
        ],
    };		
	};
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>

	var fg = missionVariables.feudal_mission_home_galaxy;
	var fp = missionVariables.feudal_mission_homeID;
	var fn = missionVariables.feudal_mission_home;
	
if(fn == "Digebiti" || fn == "Aronar" || fn == "Tibecea" || fn == "Edzaon") {}
else
{
	if(missionVariables.feudal_Enfeoff_estate) {
    pf._locationOverrides[fg + " " + fp] = {
        main: [
            {
                roles: ["planetFall2_mainSurface_FSRoyalCourt", "planetFall2_mainSurface_FSEstate"],
                names: ["Capital City", missionVariables.feudal_Enfeoff_estate],
            }
        ],
    };		
	}
};
(missionVariables.feudal_Enfeoff_estate is true if the player has been awarded an estate to manage.)

The code seems to works fine probably because the feudal_states_extended loads after Feudal_PlanetFall2.


Is that method OK or is there a correct way of doing it?
Post Reply