Anarchies.oxp (v 0.1)

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

Moderators: another_commander, winston

User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Post by Cmdr. Maegil »

Commander McLane wrote:For smuggling weapons in and valuables out it would definitely be the same ship. But there could also be more "official" weapons transports sent by allies of one or the other faction.
That would likely be just an escorted Python or the sorts.
Commander McLane wrote:If you're interested in working on anything on this list, just let me know.
Sorry, mate. Can't draw a straight line with a ruler, and I'm not a coder either... But if you want a plot for some mission OXP, I'll be happy to oblige.
Commander McLane wrote:This was realized by giving the player a (small) bonus on his legal status every time he kills a criminal.
IMO, it should be half of the bounty, it's a valuable public service you're talking about.
Commander McLane wrote:Wouldn't drug-dealers, illegal bookmakers, money-launderers, illegal gambling-operations be found in anarchies where the police either isn't there or is bribed?
They would, but what's the point if you can't merge a 1st person POV engine to get off the ship and go talk to them? On the other hand, it'd be a good place to buy illicit stuff without worsening your criminal status - the cops would just turn a blind eye for a small fee. Can it be done?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.

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 »

Cmdr. Maegil wrote:
Commander McLane wrote:Wouldn't drug-dealers, illegal bookmakers, money-launderers, illegal gambling-operations be found in anarchies where the police either isn't there or is bribed?
They would, but what's the point if you can't merge a 1st person POV engine to get off the ship and go talk to them?
Oolite is not a player-centered game. Even if you are not there the non-player ships interact with each other.

The point of having a variety of ships is not to be able to talk to them (while of course that would be nice), but to give a variation of how systems look. You also can't talk to the workers in their commuter in communist systems or to junta ships in dictatorships (provided you have the OXPs installed). But it's nice to see them out there, in order to bring some more "flavour" to the game. That's why these kind of OXPs are usually referred to as "flavour"-OXPs. If you don't like that, don't install them. But please don't use your energy to convince me that this kind of flavour is not necessary for straight gameplay. I know that and everybody knows that. But that's not what "flavour" is about.

User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Post by Cmdr. Maegil »

Commander McLane wrote:
Cmdr. Maegil wrote:
Commander McLane wrote:Wouldn't drug-dealers, illegal bookmakers, money-launderers, illegal gambling-operations be found in anarchies where the police either isn't there or is bribed?
They would, but what's the point if you can't merge a 1st person POV engine to get off the ship and go talk to them?
Oolite is not a player-centered game. Even if you are not there the non-player ships interact with each other.
:? Let me rephrase: what I meant was that drug-dealers, illegal bookmakers, money-launderers and illegal gambling-operations are to be found on the dark alleys, back rooms of bars, shady establishments, etc., not flying around in ships. I actually like the flavor OXPs, and if I didn't I wouldn't be making suggestions on the first place. :wink:
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.

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 »

@ Arexack_Heretic:

That's a hell of a make-over you're proposing. Anyway, it seems to be a nice idea :), even if for me it means to waste half of what I put into Anarchies.oxp so far :(. But perhaps we should have some more opinions before inventing a completely new legal rating system?

I would however like to know whether you will go on with the development of this or I shall do it?

And there are some limitations, because we can't do everything with a script while the engine still works like it used to work. Anyway, a lot of things are doable by a script. I have to admit though that I'm a bit afraid of that becoming a monster-script (looking at the code you have posted above (which won't work as it is, see below)).

Anyway I like to share all my knowledge, so here are answers to some of your questions (in the order you posted them, without exactly quoting):

- Bribing the police: Scriptable by using a mission screen that pops up randomly when you dock with a main station (let's say d100 < 4): "A shady police officer approaches you, offering to clean your legal status if you pay him ..." You agree, and be clean. You refuse, and he increases your legal status to the max (see below) and launches you immediatly.

- Hacking your legal status in a 7LY radius: Possible, but would need a complete list of all planets in all galaxies that provides the information which planets are in 7LY radius: 2048 * condition (); do () within the buy-Multipass-script. Not impossible, but monstrous.

- Bounties only get upped when the police catch you scooping with your laser red-glowing: Not sure whether this is doable with the policeAIs. Remember: The "thanks for your help"-screen messages are not even sent by their AI, but seem to be hard-coded.

- Bountyhunters hunting the player: That shouldn't be too hard. I think it's basically the same as the BlackMonks hunting you, which is already scripted by LittleBear.

- Global and local reputation: Why should the local reputation in your current system be set to your global reputation anyway? If you in this way make them the same, what's the point in distinguishing them in the first place? No, your local reputation should influence your global reputation, but not the other way round. Next question: What's a "global reputation" good for at all?

- Rating the karma of a kill: Yes, that's the way: comparing the changes in kill_counter and credits_counter. (I somehow missed out on the kill_counter when scripting. That would have been a nice way to getting around the problem that also shooting a lot of asteroids increases your credits. Will implement that.)

- X_numbers: No, they don't work identical to mission_variables. That's why you have a special set of methods to set and influence them. They can not be set with the set:-method or influenced by add: or subtract:. But you can store the intended change in a mission_variable and then set the X_number to the value of that variable. (see next point and script example below)

- Using variables as values: Yes, possible, I'm doing it all the time (also in the timer I posted in the BlackMonks-thread) and it's a very powerful tool. You have to put them in square brackets though. (see script example below)

- legalStatus_number (explained that already in the A Pirates Joice-thread): Internally it is a counter that takes values from 0..255. 0=clean, 1..50=offender, 51..255=fugitive. Perhaps you can set it to values out of that range. I'm not sure how the engine handles that. So decrementing it by 1 won't do the job. In Anarchies it's decremented for each jump by 20 if you're above 120, by 10 if you're above 60, again by 10 if you're above 50 (with a small chance only, because that's the barrier between fugitive and offender) and handled the normal way by the engine (divided by 2) if you're below 51. That means that it'll take you an average of 25-or-so jumps to become clean if you start with full 255, compared to 8 jumps if the engine just divides by 2 without the OXP installed.

- Tagging by the police: That's done in their AIs, usually they increment the legalStatus_number by 7 or 15 or 64 or something like that. BTW fining is still something else. And what the engine does here is: If you are fined by the police and then dock and pay the fine you're made clear again. And you cannot choose not to pay the fine.

And now for some code: These are the relevant parts of Anarchies.oxp.

The first one transfers legalStatus_number into the mission_legal_status variable before each jump, computes it after the jump and returns it to legalStatus_number:

Code: Select all

		{
			conditions = (
				"status_string equal STATUS_ENTERING_WITCHSPACE",
				"planet_number greaterthan -1"
			);
			do = (
				"set: mission_legal_status [legalStatus_number]"
			);
		},
		{
			conditions = (
				"status_string equal STATUS_EXITING_WITCHSPACE",
				"planet_number greaterthan -1",
				"mission_legal_status lessthan 51"
			);
			do = (
				"set: mission_legal_status [legalStatus_number]"
			);
		},
		{
			conditions = (
				"status_string equal STATUS_EXITING_WITCHSPACE",
				"planet_number greaterthan -1",
				"mission_legal_status greaterthan 50",
				"mission_legal_status lessthan 61"
			);
			do = (
				{
					conditions = (
						"d100_number greaterthan 92"
					);
					do = (
						"subtract: mission_legal_status 10",
					);
				},
				"setLegalStatus: [mission_legal_status]"
			);
		},
		{
			conditions = (
				"status_string equal STATUS_EXITING_WITCHSPACE",
				"planet_number greaterthan -1",
				"mission_legal_status greaterthan 60",
				"mission_legal_status lessthan 121"
			);
			do = (
				"subtract: mission_legal_status 10",
				"setLegalStatus: [mission_legal_status]"
			);
		},
		{
			conditions = (
				"status_string equal STATUS_EXITING_WITCHSPACE",
				"planet_number greaterthan -1",
				"mission_legal_status greaterthan 120"
			);
			do = (
				"subtract: mission_legal_status 20",
				"setLegalStatus: [mission_legal_status]"
			);
		},
This one rewards you for killing ships with bounties on them (cross-check with kill_count not yet implemented). Initially credits_number is stored in mission_legal_reward. If in the course of flight these two differ--indicating the player has been rewarded a bounty--his mission_legal_status is decreased. (local_legal_reward is used to get a positive difference instead of a negative one.) Depending on how big the bounty was mission_legal_status is decremented by 1, 2, 4, 7 or 20 and its value is returned to legalStatus_number. In the end mission_legal_reward is adjusted to the current credits_number:

Code: Select all

		{
			conditions = ("status_string equal STATUS_LAUNCHING");
			do = ("set: mission_legal_reward [credits_number]");
		},
		{
			conditions = ("status_string equal STATUS_IN_FLIGHT");
			do = (
				{
					conditions = ("mission_legal_reward equal [credits_number]");
					do = ();
					else = (
						"set: local_legal_reward [credits_number]",
						"subtract: local_legal_reward [mission_legal_reward]",
						{
							conditions = ("local_legal_reward greaterthan 1999");
							do = (
								"subtract: mission_legal_status 20",
								{
									conditions = ("mission_legal_status lessthan 1");
									do = ("set: mission_legal_status 0");
								},
								"setLegalStatus: [mission_legal_status]",
								"reset: local_legal_reward"
							);
						},
						{
							conditions = ("local_legal_reward greaterthan 199");
							do = (
								"subtract: mission_legal_status 7",
								{
									conditions = ("mission_legal_status lessthan 1");
									do = ("set: mission_legal_status 0");
								},
								"setLegalStatus: [mission_legal_status]",
								"reset: local_legal_reward"
							);
						},
						{
							conditions = ("local_legal_reward greaterthan 51");
							do = (
								"subtract: mission_legal_status 4",
								{
									conditions = ("mission_legal_status lessthan 1");
									do = ("set: mission_legal_status 0");
								},
								"setLegalStatus: [mission_legal_status]",
								"reset: local_legal_reward"
							);
						},
						{
							conditions = ("local_legal_reward greaterthan 25");
							do = (
								"subtract: mission_legal_status 2",
								{
									conditions = ("mission_legal_status lessthan 1");
									do = ("set: mission_legal_status 0");
								},
								"setLegalStatus: [mission_legal_status]",
								"reset: local_legal_reward"
							);
						},
						{
							conditions = ("local_legal_reward greaterthan 2");
							do = (
								"subtract: mission_legal_status 1",
								{
									conditions = ("mission_legal_status lessthan 1");
									do = ("set: mission_legal_status 0");
								},
								"setLegalStatus: [mission_legal_status]",
								"reset: local_legal_reward"
							);
						},
					);
				},
				"set: mission_legal_reward [credits_number]"
			);
		},
And this final piece of script checks whether the player has used his escape pod. If so, he gets back his legalStatus_number as it was before, stored in mission_legal_status.
The first part also sets mission_legal_status after launching and keeps it up to date while you are flying and doing criminal things (why have another condition-clause if you can do two things at the same time (keep your scripts lean)):

Code: Select all

		{
			conditions = ("status_string oneof STATUS_IN_FLIGHT, STATUS_LAUNCHING");
			do = (
				"set: mission_legal_status [legalStatus_number]",
				"testForEquipment: EQ_ESCAPE_POD",
				{
					conditions = ("foundEquipment_bool equal YES");
					do = ("set: mission_escape_pod_yes YES");
				},
			);
		},
		{
			conditions = (
				"status_string equal STATUS_DOCKED",
				"mission_escape_pod_yes equal YES"
			);
			do = (
				"testForEquipment: EQ_ESCAPE_POD",
				{
					conditions = ("foundEquipment_bool equal NO");
					do = (
						"setLegalStatus: [mission_legal_status]",
						"reset: mission_escape_pod_yes"
					);
				},				
			);
		},
So, the biggest unanswered question is: where do we go from here and who shall take the lead?

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 »

Cmdr. Maegil wrote:Sorry, mate. Can't draw a straight line with a ruler, and I'm not a coder either... But if you want a plot for some mission OXP, I'll be happy to oblige.
Have a look here, if you like. :wink:

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 »

Whoa! yay feedback. :D
I hadn't seen your script yet, but you appear to do many similar things.
I'll update my script so it will function (i hope.) and post here in a same manner to you, with the various parts seperated.
-Bounties only get upped when the police catch you scooping with your laser red-glowing: Not sure whether this is doable with the policeAIs. Remember: The "thanks for your help"-screen messages are not even sent by their AI, but seem to be hard-coded.
Just a florid way of saying: "why bother too much, the ploiceAI already does it. IIRC the legalStatus_number IS the bounty on your head.
- Bountyhunters hunting the player: That shouldn't be too hard. I think it's basically the same as the BlackMonks hunting you, which is already scripted by LittleBear.
I agree. But I have grown hesitant of trying to do too much in one go.
- Global and local reputation: Why should the local reputation in your current system be set to your global reputation anyway? If you in this way make them the same, what's the point in distinguishing them in the first place? No, your local reputation should influence your global reputation, but not the other way round. Next question: What's a "global reputation" good for at all?
You want total anonimity? your rep seperate for each system?
Let me return that with a question of my own: What is Galcop good for?
Globalrep is good for keeping track of your wanted status. as more systems put you on their fugitive list, your rep begins to preceed you.
you can run from the law only that many times. Eventually the word gets round and even the loacl police in Alioth will try to grab you.
note that local rep is only upped if the globalrep is higher. global rep only rises slowly, with each fugitive status obtained, it will also (todo) decrease over time. So the instances when local rep is upped by globalrep are few.
The globalrep reset only happens in systems you visit, localrep decreases only when entering the system. dunno if this wouldwork well, but it is a start.
I didn't finish the global-rep bookkeeping system.
maybe it will just turn out as an add to localrep in stead of replace if higher.

---
As you were first taking this up, maybe it is better for you to keep it going and regulate the development.


But perhaps we should have some more opinions before inventing a completely new legal rating system?
It isn't that different is it?
what it does is remember your legalstatus for each system in a galaxy.
To return to globalrep once more, this will keep a memory of excessive criminality and applied lethal barter by the player between systems. This is really needed IMO, maybe not in it's current form, but at least some comunication should occur.
Riding the Rocket!

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 »

Commander McLane wrote:- Hacking your legal status in a 7LY radius: Possible, but would need a complete list of all planets in all galaxies that provides the information which planets are in 7LY radius: 2048 * condition (); do () within the buy-Multipass-script. Not impossible, but monstrous.
Doing this elegantly would require the ability to iterate over a list, which the current scripting system can’t do. The JavaScript branch would probably have no problem with this, given a suitable accessor.
Of course, you could use a real scripting language to generate the 2048 conditions. :-)

User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2043
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

bounty hunters hunting the player : isn't this kinda determined by the "bounty" value? in shipdata it says on wiki that this will determine if an NPC ship gets hassle - would it not work for a player too?
"Bribing the police: Scriptable by using a mission screen that pops up randomly when you dock with a main station (let's say d100 < 4): "A shady police officer approaches you, offering to clean your legal status if you pay him ..." You agree, and be clean. You refuse, and he increases your legal status to the max (see below) and launches you immediatly. "
i had another thought/idea : what if, when you docked you got a message. "welcome commander, we see you are an 'undesirable'. we don't like your types in this system but fortunately for you we have an opportunity for you to clear your name." you would then be given a real badass ship to take out (out by the sun, say) - the idea being, he's a specced-up psycho causing probs and far too dangerous to risk Vipers on whilst there's a chance some naughty Fugitive could take him out/soften him up first :-)
do the job, you get cleared or downgraded, bugger off and the mission parameter left on your job list means everytime you return (or perhaps if you go anywhere??) the GalCop will know you're untrustworthy and skipped out on them, and will come after you w/ extreme prejudice.

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 »

okay, Arexack, let's throw our work together.

For the sake of keeping this in any way managable first let's make an alteration to the subject of this thread. Let's drop the Anarchies-flavour-stuff (at least for the moment) and concentrate on the legal system. I think I will rename the thread accordingly (can I do that without being a moderator? I try).

Next thing I'd like to ask you for is explaining (again) the general idea of the local and global reputation and how they shall interfere with and influence each other. I think you did some serious thinking on that between your first and second post on that issue, but you didn't explain too much of it in that second post. For now I have two impressions: 1) I haven't yet fully understood what exactly you are imagining and 2) I somehow have the feeling that what you coded in your script does not exactly reflect your plan. Just a feeling for now, but that's why I would like you to explain it again, if you don't mind. And then let's see where we go from there.

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 »

yes.
sure.
umm..

I'm glueing up a hybrid McLane/A_H script, it will mostly be your scripting, with memories for local systems. and a galactic reputation.

entry:
-penalty for galactic reputation. (varies for gov't type) <done>
-local decay of legalStatus. (your script, modified) <done>
these combined change the local_rep, which then setLegalStatus. <done>

inflight:
karma-script updates legalStatus. Value is saved in localrep each time a change occurs.

POD: (Resets LegalStatus)
setLegalStatus: [localrep] <done>

docked:
setLegalStatus: localrep
(save the value? possible flavour scripts may need it to modify legalRating_number while docked.)

exit:
set: localrep [legalStatus_number], <done>
update galrep:
As it stands now, each time you jump when fugitive, your galrep increases. <done>
maybe I should replace the variable for a counter, keeping track exactly in how many systems the player is fugitive?
entry : NOTSET, exit: NOTSET = nothing.
entry : NOTSET, exit: SET = increment.
entry : SET, exit: NOTSET = decrement.

galacticJump:
resets script. <done>
Last edited by Arexack_Heretic on Thu Mar 08, 2007 12:52 am, edited 3 times in total.
Riding the Rocket!

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 »

<deleted for clarity>

hmm....
STATUS_ENTERING_WITCHSPACE: leaving system or meeting the Thargoids?
Last edited by Arexack_Heretic on Wed Mar 07, 2007 10:34 pm, edited 2 times in total.
Riding the Rocket!

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 »

I have always assumed that players are not simply arrested and killed while on a station was because an exploding hyperdrive can do alot of damage to something in vacuum. :lol:

A criminal would take precautions when venturing out, if leaving the sanctity of his ship at all. Precautions like setting the drive on a triggered destruct timer.

Docking inside the battleproof hangar of a Behemoth would be unwise...if they let a criminal dock that is. ;)


---
Back to topic:

escapepod.
There have to be some benefits to getting podded, besides getting back alive.
It is not as in EVE, that getting kiled always costs you experience (and a ship) unless you buy a supergrade-clone.
In Oolite a player can reload and only miss out on a few kills, big deal.
Legal reputation can be modified much more efficiently (in future) by hackers and (by us?) by bribing the police.

So what are the benefits to a pod?

-If I wanted realism, I'd code it so that all optional equipment was lost.
(non-standard mission-equipment should!) as well as a score penalty.
However, that wouldn't work. :?
Players would just go: "bah, stoopid pod!", "I'll just jack into this here
network-node and reload my saved commanderfile. "
:roll:

Let's have some community feedback on this.

maybe getting podded could become a story-trigger only. resetting a hitman-oxp or being required to do at a certain point of a mission story.
...but the former would't be consistent with your persistent legal rep.
...how about decrementing galactic rep by 100 or so? no?

(sidetrack mini oxp-idea: pester a podded player with boyracers and such lauching at him for getting podded. lasting a few jumps after a new vessel has been provided.)
Last edited by Arexack_Heretic on Thu Mar 08, 2007 12:04 am, edited 5 times in total.
Riding the Rocket!

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 »

This post is now used to compile the legalstatus script code.
SETUP SCRIPT:

Code: Select all

{ 
"Pirate_reputations" = (
	{ 
	conditions = (
		"mission_piraterep_active UNDEFINED");
	do = (
		"set: mission_variable_current_galaxy [galaxy_number]",
		"set: mission_variable_localrep_0	0",
            ...
"set: mission_variable_localrep_255	0",
		"set: mission_variable_galrep	0",
		"set: mission_piraterep_active	Yes",
		"commsMessage: Your reputation is spotless commander");
	},
	{
	conditions = ("mission_piraterep_active Yes");
	do = ( 
		{
			conditions = ("mission_variable_current_galaxy equal [galaxy_number]");
			do = ();
			else = ("reset: mission_variable_active");
		},
	);
},
GALACTIC REP TRACKER DECAY:

Code: Select all

{
	conditions = ("status_string equal STATUS_EXITING_WITCHSPACE", "mission_piraterep_active Yes");
	do = ("set: memory_variable_D100 [d100_number]", "commsMessage: DEBUG: memory_variable_D100 = [memory_D100]"
		{
			conditions = ("memory_variable_D100 greaterthan 94");
			do = ("subtract: mission_variable_galrep 10");
			else = (
				{
					conditions = ("memory_variable_D100 greaterthan 89");
					do = ("subtract: mission_variable_galrep 8");
					else = (
						{
							conditions = ("memory_variable_D100 greaterthan 84");
							do = ("subtract: mission_variable_galrep 6");
							else = (
								{
									conditions = ("memory_variable_D100 greaterthan 79");
									do = ("subtract: mission_variable_galrep 4");
									else = (
										{
											conditions = ("memory_variable_D100 greaterthan 74");
											do = ("subtract: mission_variable_galrep 2");
										},
									);
								},
							);
						},
					);
				},
			);
		},
		{
			conditions = ("mission_variable_galrep lessthan 0");
			do = ("set: mission_variable_galrep 0");
		},
		{
			conditions = ("memory_variable_D100 equal UNDEFINED");
			do = ();
			else = (commsMessage: your reputation is now [mission_variable_galrep]", "reset: memory_variable_D100");
		},
	);
},
GALACTIC REP TRACKER UP: (complexify?)

Code: Select all

{
	conditions = ("mission_piraterep_active Yes", "status_string equal ENTERING_WITCHSPACE", "planet_number greaterthan -1", "legalStatus greaterthan 50");
	do = ("add: mission_variable_galrep 5", "commsMessage: your actions in this system have increased your infamy");
},
Localized legalratings, management and the effect of reputation:
this flows as such:
enter system>>
1 check govt>
determine penalty, store.
2 check planet_number >
apply reputation penalty to localrep,
decrement localrep according to halftimescript,
setLegalStatus to [localrep]
legalStatus witchspace = galactic reputation

Code: Select all

{
	conditions = ("mission_piraterep_active Yes", "status_string equal STATUS_EXITING_WITCHSPACE", "planet_number greaterthan -1");
	do = ("set: mission_variable_legalchange 0",
		{
			conditions = ("systemGovernment_number equal 0");
			do = ("subtract: mission_variable_legalchange -50");
		},
		{
			conditions = ("systemGovernment_number oneof 1,2,3,4,5,6");
			do = ("set: memory_d100 [D100_number]",
				{
					conditions = ("memory_d100 lesthan 33");
					do = ("subtract: mission_variable_legalchange -25");
				},
				{
					conditions = ("memory_d100 morethan 67");
					do = ("add: mission_variable_legalchange [mission_variable_galrep]");
				},
				{
					conditions = ("memory_d100 morethan 33", "memory_d100 lessthan 67");
					do = ("add: mission_variable_legalchange [mission_variable_galrep]", "add: mission_variable_legalchange [mission_variable_galrep]");
				},
			);
		{
			conditions = ("systemGovernment_number equal 7");
			do = ("add: mission_variable_legalchange [mission_variable_galrep]","add: mission_variable_legalchange [mission_variable_galrep]","add: mission_variable_legalchange [mission_variable_galrep]","add: mission_variable_legalchange [mission_variable_galrep]");
		},
		{
			conditions = ("mission_variable_legalchange morethan 250");
			do = (set: mission_variable_legalchange 250);
		},
		{
			conditions = (mission_variable_legalchange lessthan -250);
			do = (set: mission_variable_legalchange -250);
		},
		{
			conditions = (planet_number equal 0);
			do = (
				{
					conditions = ("mission_variable_legalchange morethan 0");
					do = ("add: mission_variable_localrep_0 [mission_variable_legalchange]");
				},
				{
					conditions = ("mission_variable_legalchange lessthan 0");
					do = ("subtract: mission_variable_localrep_0 [mission_variable_legalchange]");
				},
				{
					conditions = ("mission_variable_localrep_0 lessthan 51");
					do = ("setLegalStatus: [mission_variabel_localrep_0]", "commsMessage: DEBUG Legal = [mission_variabel_localrep_0]");
				},
				{
					conditions = ("mission_variable_localrep_0 greaterthan 50", "mission_variable_localrep_0 lessthan 61");
					do = (
						{
							conditions = ("d100_number greaterthan 92");
							do = ("subtract: mission_variable_localrep_0 10");
						},
						, "setLegalStatus: [mission_variable_localrep_0]" 
					);
				},
				{
					conditions = ("mission_variable_localrep_0 greaterthan 60", "mission_variable_localrep_0 lessthan 121");
					do = ("subtract: mission_variable_localrep_0 10", "setLegalStatus: [mission_variable_localrep_0]"
				},
				{
					conditions = ("mission_variable_localrep_0 greaterthan 120");
					do = ("subtract: mission_variable_localrep_0 20", "setLegalStatus: [mission_variable_localrep_0]");
				},
			);
		},
		...
		{
			conditions = (planet_number equal 255);
			do = (
				{
					conditions = ("mission_variable_legalchange morethan 0");
					do = ("add: mission_variable_localrep_255 [mission_variable_legalchange]");
				},
				{
					conditions = ("mission_variable_legalchange lessthan 0");
					do = ("subtract: mission_variable_localrep_255 [mission_variable_legalchange]");
				},
				{
					conditions = ("mission_variable_localrep_255 lessthan 51");
					do = ("setLegalStatus: [mission_variabel_localrep_255]", "commsMessage: DEBUG Legal = [mission_variabel_localrep_255]");
				},
				{
					conditions = ("mission_variable_localrep_255 greaterthan 50", "mission_variable_localrep_255 lessthan 61");
					do = (
						{
							conditions = ("d100_number greaterthan 92");
							do = ("subtract: mission_variable_localrep_255 10");
						},
						, "setLegalStatus: [mission_variable_localrep_255]" 
					);
				},
				{
					conditions = ("mission_variable_localrep_255 greaterthan 60", "mission_variable_localrep_255 lessthan 121");
					do = ("subtract: mission_variable_localrep_255 10", "setLegalStatus: [mission_variable_localrep_255]"
				},
				{
					conditions = ("mission_variable_localrep_255 greaterthan 120");
					do = ("subtract: mission_variable_localrep_255 20", "setLegalStatus: [mission_variable_localrep_255]");
				},
			);
		},
	else = ("setLegalStatus: [mission_variable_galrep]");
	);
},
POD SCRIPT:

Code: Select all

{
         conditions = ("mission_piraterep_active Yes", "status_string oneof STATUS_IN_FLIGHT, STATUS_LAUNCHING");
         do = (
            "set: mission_legal_status [legalStatus_number]",
            "testForEquipment: EQ_ESCAPE_POD",
            {
               conditions = ("foundEquipment_bool equal YES");
               do = ("set: mission_escape_pod_yes YES");
            },
         );
      },
      {
         conditions = (
            "status_string equal STATUS_DOCKED",
            "mission_escape_pod_yes equal YES"
         );
         do = (
            "testForEquipment: EQ_ESCAPE_POD",
            {
               conditions = ("foundEquipment_bool equal NO");
               do = (
                  "detract: mission_variable_localrep 50",
                  "reset: mission_escape_pod_yes"
               );
            },           
         );
      }, 

TODO:
revise and merge versions of
STATUS_IN_FLIGHT karma kills script.
Last edited by Arexack_Heretic on Thu Mar 08, 2007 12:48 am, edited 15 times in total.
Riding the Rocket!

User avatar
davcefai
---- E L I T E ----
---- E L I T E ----
Posts: 400
Joined: Sun Dec 03, 2006 9:07 pm

Docking as a fugitive.

Post by davcefai »

As far as I can tell, you are only refused docking at the station in the system where you have shot at a Galcop.

In the next system you visit, as long as you don't shoot at the cops (or only do so while cloaked ) :lol: you can dock OK.

This OXP sounds like fun. I like the plot lines.

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 »

WIP:

-INFLIGHT adapt legalreward for bounty script:
legalStatus_number dynamic update.

can almost copy-paste this literally from your script as I will probably dispense with using localrep as a dynamic counter. I will instead use your legal_counter and rename it mission_variable_legal.
(or something more spiffy, should something come to mind.)




-docked at mainstation (game load or otherwise)?

-revise interaction with pod-script.?
Last edited by Arexack_Heretic on Thu Mar 08, 2007 12:55 am, edited 6 times in total.
Riding the Rocket!

Post Reply