Page 2 of 4
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 3:37 pm
by Wildeblood
snork wrote:Oh - would it be possible for them scripts to (optionally!) take notice of the hyperjumps, but only execute the bounty-reducing effect on docking with the main station ?
This could prevent the "bounty down to zero for free" by repeatedly jumping to-and-fro closeby systems. could it not ?
Good point. Oolite halves the player bounty during the jump. So if you start out clean and ping a Galcop ship accidentally, you get an immediate 70cr bounty and fugitive status, as soon as you jump that goes down to 35cr and offender... I suppose it sort of makes sense that you wouldn't be recognized as that fugitive from the planet next door straight away, until you'd reached station aegis... but if the bounty was recalculated (upward) at docking or reaching aegis, players might notice their status suddenly change from offender to fugitive for no apparent reason... "dude your OXP is broken"... "Blame snork, it was his idea"... It would have to be an option for the curious to discover in the script.
Eric Walch wrote:Every time you get a "thank you" message from a police for helping him, your bounty is reduced by 20%
Useful information, I didn't know. Thank you. So there is a way to get back into Galcop's good book other than the fines at docking method.
El Viejo wrote:The trouble is that after thanking you, the Viper will then attack you!
I knew that!
Disembodied wrote:What might also be a nice addition would be to have an occasional chance of clearing your record on the cheap with a donation to the Old Viper Pilots' Benevolent Fund.
Anachies OXP and Illegal Goods Tweak OXP and probably others I don' know about include that sort of thing. It's not really the direction I want to go, I want to concentrate on tweaking the game mechanics, rather than anything the player will interact with in a mission screen. Where I'd like to get to eventually, by the time 0.1 becomes 2.0 is a completely detailed record of where the player's bounties (yes, plural) originate. So you'd know which planets you had to return to if you wanted to face the music, or avoid forever, if you didn't. Something like this (which is
just a mock-up, I don't have script to make it work (yet)):-
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 3:50 pm
by Mauiby de Fug
Wildeblood wrote: Where I'd like to get to eventually, by the time 0.1 becomes 2.0 is a completely detailed record of where the player's bounties (yes, plural) originate. So you'd know which planets you had to return to if you wanted to face the music, or avoid forever, if you didn't.
That sounds awesome! Would that be completely separate bounties for each planet, or say, a bounty for a planet, with the bounties for its neighbours being a reduced amount, until you get enough jumps away from the bounty origin and they don't have a record?
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 3:57 pm
by Cody
Wildeblood wrote:a completely detailed record of where the player's bounties (yes, plural) originate. So you'd know which planets you had to return to if you wanted to face the music, or avoid forever, if you didn't.
A rogue explorers' club... commit a crime in all 2048 systems?
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 4:16 pm
by Wildeblood
Mauiby de Fug wrote:Would that be completely separate bounties for each planet, or say, a bounty for a planet, with the bounties for its neighbours being a reduced amount, until you get enough jumps away from the bounty origin and they don't have a record?
My ideal would be both. Whether that is possible depends on whether it's possible to distinguish crimes against GalCop officials from crimes against local system inhabitants or not. I'd like pinging a police ship to get a chart-wide bounty, and any amount of murder and mayhem against the locals to get a planet-specific bounty. If anyone has suggestions about how that could be done, speak up please. I think it would involve a big shipdata-overrides.plist to attach a ship script to every known type of police ship...
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 4:39 pm
by Mauiby de Fug
I don't know how you would go about handling and storing the bounties. But to differentiate the two, well...
There are the shipBeingAttacked
and shipKilledOther
world script event handlers. It's been a while since I looked at scripting, but my first thought would be to use these handlers, and if the ship doing the attacking is the player ship and the ship hit is a police ship (check with whom.isPlayer and the ship.isPolice properties?) then you know which situation you are in.
But as I say, it's been a while, and I can't quite remember which bits I can call from where...
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 5:29 pm
by Wildeblood
Mauiby de Fug wrote:There are the shipBeingAttacked
and shipKilledOther
world script event handlers. It's been a while since I looked at scripting, but my first thought would be to use these handlers, and if the ship doing the attacking is the player ship and the ship hit is a police ship (check with whom.isPlayer and the ship.isPolice properties?) then you know which situation you are in.
But as I say, it's been a while, and I can't quite remember which bits I can call from where...
shipBeingAttacked
fires if the player ship is attacked, but not (for worldscripts) every time any ship is attacked. That's why I said it might involve attaching a ship script to every police ship.
shipKilledOther
isn't much use because the crime is
attacking a police vessel, not destroying one. Whether you actually destroy it, or just hit it once, the bounty applied is 70 credits either way. But that could probably do with altering anyway, it seems silly to me.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 5:43 pm
by Capt. Murphy
Wildeblood wrote:Mauiby de Fug wrote:Would that be completely separate bounties for each planet, or say, a bounty for a planet, with the bounties for its neighbours being a reduced amount, until you get enough jumps away from the bounty origin and they don't have a record?
My ideal would be both. Whether that is possible depends on whether it's possible to distinguish crimes against GalCop officials from crimes against local system inhabitants or not. I'd like pinging a police ship to get a chart-wide bounty, and any amount of murder and mayhem against the locals to get a planet-specific bounty. If anyone has suggestions about how that could be done, speak up please. I think it would involve a big shipdata-overrides.plist to attach a ship script to every known type of police ship...
I should hopefully have some helper functions ready for this sometime the weekend...
There will be at least one frameCallback involved.
Re the options of slightly different variations of the mechanics - I think that's a good idea. But at least one should be a 'basic' option which simply records the location of the crime as a persistent bounty for that system, and allows the normal game mechanics (or Anarchies) to deal with bounty reduction unless the player returns to the 'scene' of the crime. Options can be set with OXPconfig. Perhaps only crimes that tackle you over fugitive status should be persistent? Takes the heat off those players will minor accidental misdemeanours.
Fines and attitude adjustment are dealt with on the reports screen as far as I know, and seem to include some random variation. I'm not sure if this can be overriden, but it would be easy to check if they haven't kicked in. I think the option of getting rid of the bounty for some other kind of penalty is a good one. But it doesn't have to be a monetary fine. Elite ratings could be stripped, ship equipment confiscated, it's easily scripted to prevent a player with a persistent record across many systems buying/repairing equipment or fuel (they'll still take your money, but then won't actually fit/repair the equipment), and for the most heinous offenders (persistent record in over 50% of the systems in a galaxy
) if you dare dock, Galcop could effectively disable your ship, with an energy limiter (you won't be firing those mil lasers very often), disabled torus drive, speed limiter (that'll need a frameCallback as-well
) etc. Of course this needs to be balance .
Again the bounty reduction for helping the police has to be done in their presence as far as I know. But this could also be scripted to make this a more viable alternative.
Lots and lots of possibilities with this one and a brilliant concept by Wildeblood.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 5:46 pm
by Capt. Murphy
Wildeblood wrote:
shipBeingAttacked
fires if the player ship is attacked,
shipAttackedOther
is listed as a shipScript eventhandler, but it probably works in a worldScript context for the player, most of them do. Would need to double check.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 6:36 pm
by Mauiby de Fug
Oolite JavaScript Reference: world script event handlers wrote:Generally speaking, handlers starting with "ship" can be used for both scripts and those starting with "player" are meant only for the player (= can only be used in a world script). Exceptions on this rule are mentioned with the individual handlers below.
If
shipBeingAttacked
only fires when the player is attacked, then from the above I would have assumed it would be named
playerBeingAttacked
. Shows it's been a while since I last tinkered about with scripting!
Either way, I'm looking forward to it!
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Thu Apr 12, 2012 8:22 pm
by Commander McLane
I suspect that this OXP will be incompatible with Anarchies.oxp, as it's basically a new approach to achieve the same (or a similar) thing. Maybe there should be a note to this effect somewhere.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Fri Apr 13, 2012 7:43 am
by SandJ
snork wrote:But I have read somewhere, once, that helping the police in their fights is supposed to have an effect on one's own criminal record.
But what makes me wonder if this is true is that I have never again read it mentioned here on the boards, whenever the talk is about becoming clean(er) again, or such.
Can anyone confirm or deny this ? How strong is that effect, if at all ?
Yes, it does happen, the bounty on your head goes down. I once even went from offender to clean for killing a Fugitive that was being attacked by a GalCop.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Fri Apr 13, 2012 7:50 am
by SandJ
Wildeblood wrote:Whether that is possible depends on whether it's possible to distinguish crimes against GalCop officials from crimes against local system inhabitants or not. I'd like pinging a police ship to get a chart-wide bounty, and any amount of murder and mayhem against the locals to get a planet-specific bounty.
Like this?
No peace for cop-killers
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Fri Apr 13, 2012 8:01 am
by Wildeblood
Well, I'm about ready to give up on this for the time being. I had it working the other day, but I was using a giant array to hold bounty information for all 2048 planets, and it was bloating my save-game file by 10k or more. So, I thought, I'd better do this properly with some kind of object thingamy, but it's just re-confirmed my enduring hate/hate relationship with javascript. I've been fumbling about all day and I'm still none the wiser about when to use dots and when to use brackets, or why.
Not like that. But, not wholly unlike that, either.
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Fri Apr 13, 2012 1:27 pm
by Kaks
Dots & brackets are equivalent to each other.
something.boo is equivalent to
something['boo'] (and/or
something["boo"])
In most cases it's mostly a matter of personal preference which one to use.
However brackets usage is perfect for when you have a list of (possible) properties saved away as strings, or when you have some 'interesting' letters as part of a object's property name: something.boo-bah will never work because js will interpret it as remove
bah from
something.boo and if something.boo and the variable bah actually exist it'll take a while to figure out what's happening... - to access the property boo-bah you need to use
something['boo-bah'], likewise for
something['boo bah']. And if you have a single quote as part of a property name you can access that property by using double quotes:
something["boo'bah"].
Hope that helped!
Re: [WIP] Criminal Record OXP version 0.0001, please test
Posted: Fri Apr 13, 2012 1:32 pm
by Storm
Instead of tracking bounty for every individual planetary system, you could assign them to a 'GalCop Police Precinct' each of which covers a number of systems and tracks the criminal records of felons in those areas and assigns the bounties.
Whilst you might not be actively pursued by GalCop in another 'precinct' where you have no committed offenses (ammended legal status?), your bounty should still stand and bounty hunters might attempt to track you down seeking to earn those credits on your head.
Perhaps 'precincts' could be actual stations (with a large complement of Vipers and other police vessels). Bounty hunters could obtain official licenses there allowing them to pursue targets in other precincts without incurring a mark against their own legal status as a result of taking down a 'clean' target.