localhero oxp ALPHA

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

Moderators: another_commander, winston

User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

Quote:
I don't get this. I use several "real" characters as pilots. Once scooped the always execute their script on docking of the player.
As you already have a custom ship, you could try a scripted escapepod.

set escapepod_role in the shipdata.

create an escapepod with script_actions :
"commsMessage: Thanks for the resque [commander_name]!
and roles to match the character-piloted ships-pod.

the scripted-character performs its script once you dock.
Last edited by Arexack_Heretic on Thu Oct 25, 2007 2:10 pm, edited 2 times in total.
Riding the Rocket!

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Eric Walch wrote:
Yes, but it needs one addition you probably thought of yourself. On adding your ship "shuttleone" to the universe, you must also set a variable:
Already done. On launching states are set:
status RUNNING
special NO, YES, ESCORT1 or ESCORT2
goal 2-8 (for normal or raid missions) or >40 (for escort missions)

death_actions/script_actions in shipdata.plist will change these states.

Code: Select all

		{
			// CHECK FOR MISSION GOALS DONE
			conditions = ("status_string equal STATUS_IN_FLIGHT");
			do = (
				"checkForShips: harkov_shuttle1",
				{
					conditions = ("shipsFound_number equal 0", "mission_localhero_special equal ESCORT1");
					do = (
						"commsMessage: SHUTTLE HAS REACHED THE STATION.",
						"set: mission_localhero_special RESCUED",
						"subtract: mission_localhero_goal 40",
						"add: mission_localhero_bonus xxx"
					);
				},
				"checkForShips: harkov_shuttle2",
				{
					conditions = ("shipsFound_number equal 0", "mission_localhero_special equal ESCORT2");
					do = (
						"commsMessage: SHUTTLE HAS REACHED THE STATION",
						"set: mission_localhero_special RESCUED",
						"subtract: mission_localhero_goal 40",
						"add: mission_localhero_bonus xxx"
					);
				},
				{
					conditions = ("mission_localhero_special equal FAILED");
					do = ("commsMessage: YOU'VE FAILED TO ESCORT THE SHUTTLE.");
				},
				{
					conditions = ("mission_localhero_status equal CAPTURED", "mission_localhero_goal lessthan 1");
					do = ("commsMessage: MISSION ACCOMPLISHED.", "set: mission_localhero_status MESSAGE");
				}
			);
		}

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Commander McLane wrote:
But then, why should only all Confederacy planets get into the same sort of trouble, just all of them, but nobody else?
Good question. I don't know. Maybe someone wants to write a small story about this.
Something like: Former General Harkov was a drummer in a Rock'n'Roll Band but his manager... 8)

But... I was looking for some conditions that are met throughout the galaxy
AND they should differ from mostly used conditions in other OXPs (except: Anarchies and Commies for example).

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Commander McLaine wrote:But then, why should only all Confederacy planets get into the same sort of trouble, just all of them, but nobody else?
It was a little difficult for me to start the fist mission. As it happened I was in the fourth galaxy the last weeks. That is a galaxy without confederacy planets. And it was just this system where I wanted to start the dictators.oxp. Nothing happened for a long time. So I looked better and noticed that this system has also no dictatorships. So, on to galaxy 5 today and up to local_hero and dictatorship.

Is there also a story why those planets are not represented in this fourth galaxy?
Svengalii wrote: 2. Is it possible to change the planet_description temporarly?
- GET planet description (local_variable)
- ADD Currently there is no CONFED MISSION available
- SET new planet description
It is not possible to read in a planet description nor reset it with a command to it's original state. I was missing this myself for my missions. Without possibility to restore things I didn't want to change it. On this point there are scripting commands missing. When on lave, one can set al possible system characteristics of systems that are even in an other galaxy, but reading in is only possible for the system you are in.

But if your main goal is to just add no missions available, it is possible. Look at Oolites own "constictor_hunt" mission. It is done in stage 1 with a addMissionText command.

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Svengali wrote:Commander McLane wrote:
But then, why should only all Confederacy planets get into the same sort of trouble, just all of them, but nobody else?
Good question. I don't know. Maybe someone wants to write a small story about this.
Something like: Former General Harkov was a drummer in a Rock'n'Roll Band but his manager... 8)

But... I was looking for some conditions that are met throughout the galaxy
AND they should differ from mostly used conditions in other OXPs (except: Anarchies and Commies for example).
Why should a Rock'n'Roll Band be tied to Confederacy-type planets only?

But if it's your choice to do it this way anyway, then you are the one who is supposed to figure out a background story that makes sense.

If you, however, just want a random diversion throughout any galaxy, why not take planet_number lessthan 16 or any of the kind? That would make the missions available on exactly 16 planets, spread over the galaxy randomly, independent of their economy, politics, GNP and whatever.

User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Svengali wrote:1. There is a special mission to escort a police shuttle safely to the station. When the shuttle has docked some mission_variables should be set to a new state. I first tried to change the variables by script_actions in shipdata.plist. But nothing happened.
A note on this: script_actions are checked in two contexts:
  • When the player docks with the ship.
  • When the ship is scooped (by anyone), if its cargo_type is "CARGO_SCRIPTED_ITEM".
(In 1.70, these are the ship script events playerDidDock() and wasScooped() respectively.)

It is assumed that there won’t be ships that can be docked with and scooped.

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Ahruman wrote:A note on this: script_actions are checked in two contexts:
  • When the player docks with the ship.
  • When the ship is scooped (by anyone), if its cargo_type is "CARGO_SCRIPTED_ITEM".
Thanks, Ahruman, that's some very useful information. I'm sure I can do something with it in one of my OXPs. :D

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Svengali, today I looked more closely at your script structure and this is the most structured OXP script I have seen so far. And good nesting of conditions so unnecessary condition checking is avoided. Compliments, it shows experience.

AI scripting is however more difficult, mainly because the documentation of how commands work is still far from complete. Next thing on my todo list is to write down how the "setDesiredRangeTo" works exactly under the different circumstances. I'll work on it this weekend. In your case I see problems with the two "raid" AI's.

Code: Select all

	"TRAVEL_HARKOV3" = {
		ENTER = (setTargetToSystemStation, setDestinationToTarget, "setDesiredRangeTo: 12000.0", "setSpeedFactorTo: 5.0", performFlyToRangeFromDestination, checkDistanceTravelled);
		"DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: SCAN1");
		"GONE_BEYOND_RANGE" = (performIdle, "setStateTo: TRAVEL_HARKOV3");
		ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
		"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
		UPDATE = (setTargetToSystemStation, setDestinationToTarget, "setDesiredRangeTo: 8000.0", "setSpeedFactorTo: 5.0", performFlyToRangeFromDestination, checkDistanceTravelled);
		EXIT = ();
	};
I think the "raid" AI's will not work as planned. In UPDATE you always are resetting the range so I think, "DESIRED_RANGE_ACHIEVED" will never be triggered. And check for "distance traveled" is needless in this situation. And be aware that speedfactors higher than 1.0 need a lot of fuel to work. So you should give your ship the maximum amount of 70 instead of 30. (70 fuel = 7 lightyears fuel)
My alternation of your state-routine would be:

Code: Select all

	"TRAVEL_HARKOV3" = {
		ENTER = (setTargetToSystemStation, setDestinationToTarget, "setDesiredRangeTo: 3000.0", "setSpeedFactorTo: 5.0", performFlyToRangeFromDestination);
		"DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: SCAN1");
		ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
		"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
		UPDATE = ();
		EXIT = ();
	};
But to make it complete you could also check for a free travel path with checkCourseToDestination. If "COURSE_OK" you fly ahead, if not the system generates a new waypoint ("WAYPOINT_SET") and you just follow the gotoWaypointAI.plist. This is a subroutine that makes the evasive moves and returns to the original state when it has a free flight path or when it is attacked. Normaly the UPDATE it used to reset ranges and destinations but in your case you must reset the state by "setStateTo: TRAVEL_HARKOV3" so the enterpart is used to set things.

Code: Select all

	"TRAVEL_HARKOV3" = {
		ENTER = (setTargetToSystemStation, setDestinationToTarget, "setDesiredRangeTo: 3000.0",  checkCourseToDestination);
		"COURSE_OK" = ("setSpeedFactorTo: 5.0", performFlyToRangeFromDestination);
		"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist", "setStateTo: TRAVEL_HARKOV3");
		"DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: SCAN1");
		ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
		"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
		UPDATE = ();
		EXIT = ();
	};
The scanning you do is very original and will work fine. In version 1.70 there will be new, improved ways to scan.

User avatar
Svengali
---- E L I T E ----
---- E L I T E ----
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

First of all I have to say sorry to Commander McLane!

My answer was a stupid one. :oops:
His legitimate remark on colliding between background story and the mission story is worth to think about. When scripting is done I'll take a look in the backgrounds.

Eric Walch wrote:
In your case I see problems with the two "raid" AI's.
Thanks a lot Eric,

I've added (c&p) your code-snippet to my todos. I'm not so familiar with the AI-Machine, but that will be the next step...
And yes, I'm not absolutely unexperienced. Two years ago I've scripted some missions for another free-game. And for my job it absolutely necessary to have a clear structure. So it's not a long way to do it here too.

User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6402
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

It's not unreasonable to suppose that worlds with similar political organisations, e.g. the various Confederacies, might find it useful to band themselves together into a voting bloc within the Galaction Co-Operation (which, in reality, is probably about as co-operative as the United Nations is united). Communists, for example, try to make a more-or-less common cause together: "Unlike other systems, communist planets communicate freely with each other, exchanging technology and resources" (from the Wiki), although no doubt they too have their differences (e.g. Maoist China and Stalinist USSR).

Perhaps Harkov's pirate gang is attempting to sabotage a fraternal association of Confederacies, on behalf of, say, a group of Dictatorship worlds (where does Harkov's rank of General come from?): maybe the Confederacies bloc is threatening sanctions over issues of sentient rights at an upcoming vote of the Galactic Co-Operative. Maybe GalCo-op (as opposed to GalCop) representatives could be in the shuttlecraft you have to protect? The Dictatorships might be trying to argue that the Confederacies should get their own house in order, before interfering in the affairs of other sovereign worlds -- and simultaneously threatening their own form of economic sanctions against the Confederacies...

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

@Svengali: Never mind. I'm not feeling offended. (PM'd you as well.)
Disembodied wrote:It's not unreasonable to suppose that worlds with similar political organisations, e.g. the various Confederacies, might find it useful to band themselves together into a voting bloc within the Galaction Co-Operation (which, in reality, is probably about as co-operative as the United Nations is united). Communists, for example, try to make a more-or-less common cause together: "Unlike other systems, communist planets communicate freely with each other, exchanging technology and resources" (from the Wiki), although no doubt they too have their differences (e.g. Maoist China and Stalinist USSR).

Perhaps Harkov's pirate gang is attempting to sabotage a fraternal association of Confederacies, on behalf of, say, a group of Dictatorship worlds (where does Harkov's rank of General come from?): maybe the Confederacies bloc is threatening sanctions over issues of sentient rights at an upcoming vote of the Galactic Co-Operative. Maybe GalCo-op (as opposed to GalCop) representatives could be in the shuttlecraft you have to protect? The Dictatorships might be trying to argue that the Confederacies should get their own house in order, before interfering in the affairs of other sovereign worlds -- and simultaneously threatening their own form of economic sanctions against the Confederacies...
Now that's the beginning of a background story, that also fits into the other, existing stories (like of Communist systems). My whole point is really about keeping the Ooniverse reasonably consistant, which is something I feel we all are responsible for.

Just a small point in your line of thought:
Maybe GalCo-op (as opposed to GalCop)
I don't get you here. In all the literature and references we have these two terms are used interchangebly for the Galactic Co-Operative of Worlds (full title). I guess it's just an abbreviational confusion that some sources use GalCop as short form, others use GalCoop, GalCoOp, GalCo-Op or GalCo-op. But it's always been the same thing.

Question to everybody: What would you consider the authoritative abbreviation for "Galactic Co-Operative of Worlds"? Can we get a consensus here?

User avatar
TGHC
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

This has been the subject for discussion on other forums before, but I can't recall where. I know Selezen's site has a a lot of detailed explanation's, timeline, Elite/frontier politics etc etc. and is a very worthy read.

My own take on it is Galcop's refers to belonging to the Galactic Co-operative of worlds, and Galcops refers to the Galactic police.:)
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"

User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6402
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

Commander McLane wrote:Just a small point in your line of thought:
Maybe GalCo-op (as opposed to GalCop)
I don't get you here. In all the literature and references we have these two terms are used interchangebly for the Galactic Co-Operative of Worlds (full title). I guess it's just an abbreviational confusion that some sources use GalCop as short form, others use GalCoop, GalCoOp, GalCo-Op or GalCo-op. But it's always been the same thing.

Question to everybody: What would you consider the authoritative abbreviation for "Galactic Co-Operative of Worlds"? Can we get a consensus here?
Like TGHC, I was trying to differentiate the "Galactic Co-Operative of Worlds" from the police -- presumably the law-enforcement arm of the Co-Operative who keep order above the atmosphere. But then it's unlikely that "GalCop" would be an official designation: it's probably just a joke phrase. There's obviously some crossover between the police and the Navy (Behemoths appear on the scanners as system ships): do we assume that the police and the navy are one and the same, and under the general command of the Co-Operative? The Vipers as system patrol ships, mostly dealing with pirates and smugglers, and the Behemoths more commonly fighting against the Thargoid threat?

I think that makes more sense to me, anyway: GalCop is just a trader's slang term for the Galactic Co-Operative of Worlds, since most of our interaction with them is usually police-based. So I withdraw my differentiation. :D

What the official designation is, I don't know: we have a sprawling galaxy, with many different cultures and languages... maybe there isn't one.

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I was wrong that my alteration of your raid part would work better. performFlyToRangeFromDestination is a difficult command. On entering it compares the actual distance witch the desired distance. When it is greater, it flies away from the target When it is smaller it flies in the direction of the target. In your case the station. It will respond with DESIRED_RANGE_ACHIEVED when the distance to the target is desired range. In your case the scanning will start to late. Better to enter the command: scanForNonThargoid. This will scan for almost everything except thargoids and rocks. Then in your own scans you could redo your more selective scan.

Code: Select all

"TRAVEL_HARKOV3" = { 
      ENTER = (setTargetToSystemStation, setDestinationToTarget, "setDesiredRangeTo: 12000.0",  checkCourseToDestination); 
      "COURSE_OK" = ("setSpeedFactorTo: 5.0", performFlyToRangeFromDestination); 
      "WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist", "setStateTo: TRAVEL_HARKOV3"); 
      "DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: SCAN1"); 
      "TARGET_FOUND" = ("setStateTo: SCAN1"); 
      ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP"); 
      "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); 
      UPDATE = (scanForNonThargoid); 
      EXIT = (); 
   };
Last edited by Eric Walch on Sun Oct 28, 2007 3:51 pm, edited 1 time in total.

User avatar
Commander McLane
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Disembodied wrote:Like TGHC, I was trying to differentiate the "Galactic Co-Operative of Worlds" from the police -- presumably the law-enforcement arm of the Co-Operative who keep order above the atmosphere. But then it's unlikely that "GalCop" would be an official designation: it's probably just a joke phrase. There's obviously some crossover between the police and the Navy (Behemoths appear on the scanners as system ships): do we assume that the police and the navy are one and the same, and under the general command of the Co-Operative? The Vipers as system patrol ships, mostly dealing with pirates and smugglers, and the Behemoths more commonly fighting against the Thargoid threat?

I think that makes more sense to me, anyway: GalCop is just a trader's slang term for the Galactic Co-Operative of Worlds, since most of our interaction with them is usually police-based. So I withdraw my differentiation. :D

What the official designation is, I don't know: we have a sprawling galaxy, with many different cultures and languages... maybe there isn't one.
That's indeed how it should be understood: "Galactic Co-Operative of Worlds" means that all the 8*256 worlds we know are members of this organization, whose sole task it is to enable the communication, travel and trade between them. GalCop does not interfere with the internal affairs of its members. Therefore there are planets with very different political systems. GalCop just puts up stations in orbit that serve as trading posts (there is evidence in the literature that it may even be prohibited for traders to travel to the surface of the planets; so far-reaching is the rule of not interfering!), maintains these stations and takes care of the security of space-lines. This is done by police (in-system) and military forces that have become necessary after the Thargoids appeared and posed a serious threat to travel and trade.

So GalCop (or Cal-CoOp or however you like to put it) indeed works in three (or four) branches: (1) Running the main stations, (2) securing their surroundings with police and (3) securing the witchspace with military (leading also to more unpleasant episodes like the ones connected with INRA). We could add (4) securing further travel and trade by training pilots on Lave and issuing pilote licenses. That's all about it.

And when the wormholes that connected the galaxies collapsed, GalCop vanished from existence, precisely because there was nothing more to it. Whereas the Federation and the Empire, both being strong, centralized bodies, could continue to exist.

EDIT: bruised out some typos.
Last edited by Commander McLane on Mon Oct 29, 2007 7:11 am, edited 1 time in total.

Post Reply