Page 4 of 7

Posted: Thu Feb 22, 2007 11:39 am
by Commander McLane
Thanks, Killer Wolf, for both suggestions!

The idea of linking the reduction of legal status to an increase of credits IN_FLIGHT is very clever. I like it! :D And easily scriptable. So there is only one question: How much reward for each kill? Of course it would be only logical to bind it to the bounty itself: Lots of bounty -> dangerous felon -> big reward. Small bounty -> small fish -> small reward. Now the range of bounties AFAIK is from 1 (little offender) to 2000 (thargoid carrier). So perhaps you get a reduction of your legal status of let's say 1/100 of the bounty. That way you could also add the rewards if you blow up several targets at the same time (e.g. with an energy bomb). Even better would it be logarithmical, because the thargoid carrier bounty is really a bit out of scale. Only problem is: In scripts you can't do divisions (or multiplications, for that matter), only "add: mission_variable <value>". Have to give it some more thoughts, but in principle: Yes. EDIT: I would work fine with also having some levels only.

As for the price of the Multipass, also YES, it can be more flexible, by putting only a base price to the equipment screen and then calculating "running costs" when it is fitted. By having a base price of zero it could fully depend on the player's legal status. Two drawbacks: I wouldn't like a price of zero displayed on the equipment screen, so it would have to have a base price not too low. And again, easy calculation of the final price is limited by having no multiplication. Basically it would require a lot of conditions in the script: If legalStatus_number = 255 then addMoney: -25500, reset: legalStatus_number. If legalStatus_number = 254 then addMoney: -25400, reset: legalStatus_number. If legalStatus_number = 253 then addMoney: -25300, reset: legalStatus_number... You get the idea. It would be much easier with a loop-structure: If legalStatus_number > 0 then addMoney: -100, add: legalStatus_number -1. Do it again. Very few lines of code. But loops are not implemented in the scripting language we use for Oolite (not to my knowledge, that is). And as long as these lots of conditions are needed it is better to limit their number by having a few levels only.

Posted: Thu Feb 22, 2007 12:32 pm
by Arexack_Heretic
I like multipass.

Describe it in the blurb as a false ID.

---

I propose a random legalstatus change.

You buy a new ID, could be the previous owner was even thuggier than thou.

If you are a fugitive...chances are good you will end up with a better rap-sheet. If just an offender, changes are (slim) that you end up with the Multipass of a mass-murderer.
for example: everytime you buy a MP, chance of
1/20 Fugitive
3/20 Offender
16/20 Clean

---

I thought at first: a chance for it to fail, first time encountering a cop following purchase. This is however too much hassle. imo.

Posted: Thu Feb 22, 2007 1:01 pm
by Killer Wolf
hmm, that's kinda defeating the whole hacker purpose tho. how that random thing would work is if you bought a ship's "black box" from a dubious salvage operation. since (originally) the rating was linked to the ship - hence the clearing when you eject - you could buy an under-the-counter, no-questions-asked-guvnor new black box to fit. but...it might be from Psycho McLoony's old copkiller ship...

Posted: Thu Feb 22, 2007 1:09 pm
by Arexack_Heretic
hmm...yeah... I like it though.

Maybe offer it at a big discount from a salvager (not hacker) hermit.

Player thinks he buys a multipass on the cheap, but instead ends up with the transponder from... whom wazzit? "Mac Ducky the Copslayer" ?
:lol:

the givaway would be the low-price AND the HUGE sign outside claiming
"Best used parts within 10 kayklicks!"
(a tiny distance in astronomical terms)

Posted: Thu Feb 22, 2007 2:45 pm
by Killer Wolf
yeah, if it looked for the presence of other OXPs too you could end up w/ a hhuge debt at Black Monks and the first thing you'd know was when the gunships turned up! =8-(

Posted: Thu Feb 22, 2007 11:09 pm
by DaddyHoggy
@KW - hmm nice tie in - would be easy to check if you had the BM oxp installed too... hmmm....

Posted: Fri Feb 23, 2007 1:27 am
by LittleBear
The Monks have their own way of tracking cursed Defauters. A tracker is instaled when you take the loan. Won't matter what you do with your legal status or changing ships. The Holy Homing Beacon will always draw the Monks to you and the scared nano-bots crawling over the Detors form will replace the Device if the Debtor changes ships. (OXPS won't conflict!)

"Was every a way with the Black Monks! Screemed he did as they scewered his aft for want of a credit"! :wink:

Posted: Fri Feb 23, 2007 8:06 am
by Commander McLane
@ Arexack & Killer Wolf:

I agree that Arexack's idea is kind of defeating the hacker purpose, however I kinda like it. So why not incorporate both?

Also I have to say that I already have finished scripting the Multipass, including both suggestions of Killer Wolf, and I wouldn't like to sacrifice it again.

- The Multipass as it is now has a fixed base price (1000cr) and running costs according to the legal status of the player, in four steps of 500, 2000, 3500 and 5000cr. So the whole thing will cost you 1500, 3000, 4500 or 6000cr. Now what happens if you have enough money to buy the Mulitpass but not enough to finance it's operation? The connection to GalCop's central database will be termined early, leaving you with an unfinished clean-up (so still not clean) and 0cr. Like that? I enjoy it! :lol: In both cases (successfull or unsuccessfull clean-up) you will be informed of the result on a mission screen.

- And as of now killing ships with a bounty will reduce your legal status a bit (but not much, so if you're a fugitive and help out the police against some pirates, chances are that they still will come after you, when the job is done :twisted: ). (And I have to admit that this part of the code is not foolproof and IMO cannot be made foolproof. As the changes in player's credits can only be queried once every ten-or-so seconds there is a chance that you have vaporized a couple of asteroids in-between and have been awarded 3 or 4 credits that could also have been the bounty for a minor offender, so you get your reduction reward as if you had vaporized a small pirate. But as in that case it's only a reward of 1 on your legal status I think it's negligible.)

So, Killer Wolf, again thanks for the suggestions! :P

- And one more thing I was contemplating earlier in this thread: The barrier between FUGITIVE and OFFENDER is breakable by hyperjumping, but barely so. If you're just above that barrier there is a 7%-chance on each hyperjump that you make it, and a 93%-chance that you won't. However you can break it without restrictions by killing pirates.

Having said that, now back to the original issue: Why not incorporate both? Hacker Outposts only exist in higher TL Anarchies. So why not populate the lower TL Anarchies with Salvaging Gangs (modified Hermits) that sell False IDs under the premises made by Arexack? The blurb could be similar enough to that of a Multipass to fool a rookie commander, and he ends up being FUGITIVE instead of OFFENDER. :twisted:

@ LittleBear: Hello and welcome to this thread! It's nice having you stepping by! (Or are you back for good? In that case I'd have some questions about why my AIs don't seem to work as I would like them to.)

Posted: Fri Feb 23, 2007 12:38 pm
by Arexack_Heretic
Bounty = legalstatus up problem

why not tie it into the "thanks for the assist" in the interceptAI/patrollAI?

It would require replacing those AI's, but I feel it could benefit the stndard game.
Only a small legalstatus raise per police assist though.
Anyhow, it is rare enough for the police to notice your efforts. ;)

---
Multipass

Don't change it. It is great as is.
rippoff pass would be just an alternative to (maybe) get a similar result.
Isn't it a bit cheap though?

Posted: Fri Feb 23, 2007 12:41 pm
by Killer Wolf
Damn, i'm chuffed that people think enough of my ideas to wanna code them! thanks! :-)

"so if you're a fugitive and help out the police against some pirates, chances are that they still will come after you, when the job is done "
was having a laugh about that on another thread. had another one last night too, which woulda been funny if it wasn't so annoying-
hyped into a system, was heading towards the planet (anarchy) when i saw the big familiar shape of my new ship, and the razor-thin dotted lines of a battle. WFI'd up and saw to my joy my tanker had appeared *w/* her escort Asps! \o/ anyways, they were getting hassled by a couple of Ringhals/mambas, so i jumped in (pretect my baby, y'know) "thanks for the help!" etc. as we were dealing w/ the last pirate, a couple more appear. i get righteously strafed and am in the middle of a barney w/ a FdL, wepons cutting out etc when....i notice my fricking tanker and escorts have FO'd!!! >:-( like, thanks a fricking bunch!! obviously the AI must say "defend anything that attacks you directly but if more appear leave the poor bugger who helped you to fend for himself and see if we can scarper w/out getting involved".

what a gyp.

Posted: Sat Feb 24, 2007 11:10 am
by Commander McLane
@ Killer Wolf: Not only "wanna code them". It's already done! And you can try it out. I'm going to release a pre-version soon for testing.

@ Arexack: I'm a bit hesitant mingling with AIs, as I haven't yet fully understood how they work. Example: I gave the Hacker Outpost a modified rockHermitAI, where I erased the "CHECK_FOR_ROCKS"-state, because I don't think the hackers would do asteroid mining and also erased the only "setStateTo: CHECK_FOR_ROCKS"-method in the "CHECK_FOR_DEBRIS"-state. So I thought it should behave like a rock hermit, just without sending out it's mining ship. Then in the shipdata I gave it 4 defense ships with the role "pirate", because I think the hackers would defend themselves. Result: There is no miner coming out of the asteroid (good!), and when I attack it...nothing happens. I vaporize it without it showing the slightest effort to defend itself. So something must be wrong here, but I don't know what.

Another example: In Equilibrium.oxp I need a ship in a system sending a specific commsMessage to the player. I took the exitingTraderAI and just entered a "scanForNearestShipWithRole: player" and a "TARGET_FOUND" = (setTargetToFoundTarget, "sendTargetCommsMessage:") into the "HEAD_AWAY_FROM_PLANET"-state. Well, the ship IS added to the system and it DOES send the message to the player (so far so good!), but each and every time I meet it it's heading TOWARDS the planet, not AWAY from it! :?: :?: :?: I have not the slightest clue what I did wrong.

The bottom line is: I would prefer doing it without modifying AIs. On the other hand side of course it would be a very nice way. Although it would mean you almost never would be rewarded for blowing up the Thargoid Carriers at the witchpoint. But it would definitely make sense to bind the reward to the police actually noticing that you're helping them out. Okay, I'll have a look into these AIs and see what I can do.

The Multipass will be the Multipass. No name changes are any longer intended. How expensive should it be in your opinion? I'm absolutely open to suggestions.

The alternative is now a Multi-Passed ID, being named so because nobody can know how many times it has been salvaged and passed on to another ship. :wink: It is available at modified hermits called Salvage Gangs, with a 50%-chance appearing in TL 4-6 Anarchies. Buying it will bring up one of the following messages
<key>Multipassed_ID_highFUG</key>
<string>---NOTIFICATION OF PROGRESS\n\nCongratulations, Commander! Your "new" transponder has been installed. As a result of that you've got a brand new legal status of...\n\nOh no, what the heck...! What is happening here?...\n\nObviously you have picked the transponder that was salvaged from the ship of Mac Ducky the Copslayer! He deceased a couple of weeks ago in the asteroid field outside. Now it seems you have inherited his legal record.\n\nSorry, Commander, probably half of GalCop's police force will be after you now.\n\nSo long, and take care!\n\n---END OF MESSAGE</string>
<key>Multipassed_ID_lowFUG</key>
<string>---NOTIFICATION OF PROGRESS\n\nCongratulations, Commander! Your "new" transponder has been installed. So enjoy your brand new legal status of...\n\nOh, wait a minute...\n\nThat seems like the old transponder of "Psycho" McLoony! Heard of him? He was a real old school brigand, except perhaps for his somewhat wacky state of mind. He really expected he could make it to retirement... Didn't know that this was still rusting on the shelf.\n\nAnyway, his legal affairs weren't quite settled when he finally bit the stardust. GalCop still list him as FUGITIVE, but, for fairness' sake, just barely so. Do you want to go with it?\n\nJust give it a try. And you have to admit, the transponder itself was only very few times hit by direct laser fire, so it still looks almost like new.\n\n---END OF MESSAGE</string>
<key>Multipassed_ID_OFFEND</key>
<string>---NOTIFICATION OF PROGRESS\n\nCongratulations, Commander! Your "new" transponder has been installed and you've got yourself a brand new legal status. Let's see...\n\nAh, nothing exciting. Seems the poor guy who left this to future generations was just an ordinary trader who somehow stranded on the wrong trading route. Nothing special, just the usual parking violations. So, technically the signal is still OFFENDER, but that should be cleaned out after three or four jumps.\n\nJust keep going, Commander, and good luck to you!\n\n---END OF MESSAGE</string>
<key>Multipassed_ID_CLEAN</key>
<string>---NOTIFICATION OF PROGRESS\n\nCongratulations, Commander! Your "new" transponder has been installed. So what about your brand new legal status...?\n\nAh, there it comes. Obviously the former owner of your transponder--may he rest in peace--was a very dull character. Nothing at all in GalCop's central database. So you're as clean now as any newbie Lave academy graduate.\n\nEnjoy your time, Commander!\n\n---END OF MESSAGE</string>
(I hope you enjoy the messages), giving you a legal status of 205 (10%-chance), 58 (10%-chance), 15 (20%-chance) or 0 (60%-chance). I took the freedom to use the names the two of you came up with (permission presupposed :D ). Comments on this are also welcome.

Posted: Sat Feb 24, 2007 11:20 am
by Arexack_Heretic
For the trader, possibly it first wants to go to waypoint 1 (planet)

or alternatively , I suspect certain roles such as trader to have hardcoded AI switches, depending on the location of spawning.
(spawn near WP: incoming trader, spawn from station: outgoing traderAI.)

Posted: Sat Feb 24, 2007 11:35 am
by Commander McLane
Good that you're out there, Arexack.

I had a quick look into the relevant AIs and got stuck. In descriptions.plist there is the entry

Code: Select all

	<key>police-thanks-for-assist</key>
	<array>
		<string>Thank you for the assistance.</string>
		<string>%H Police thank you for your assistance.</string>
	</array>
which is what you were referring to. BUT this isn't used in the police AIs. So it seems the thanks you receive occasionally for helping the police are NOT sent by their AI. So what shall I do now?

---

Also: I guess you may be right with the waypoint, but I haven't yet understood this whole waypoint-business. If the alternative is true I could try to spawn it closer to the station. For now it's addSystemShips: ... 0.3. So perhaps 0.7 would be better? But if he's heading to the planet first from THAT location chances are the player will never meet him. Or should I add more than one ship, just to be sure?

Posted: Sat Feb 24, 2007 12:35 pm
by Commander McLane
As for the Hacker Outpost not responding to an attack: This is what I get in the log-file when I fire at it:
2007-02-24 14:59:27.389 Oolite[5768] *** -[NSCFNumber length]: selector not recognized [self = 0x1307ec0]
2007-02-24 14:59:27.389 Oolite[5768]

***** Encountered localException during initialisation in [Universe update:] : NSInvalidArgumentException : *** -[NSCFNumber length]: selector not recognized [self = 0x1307ec0] *****

2007-02-24 14:59:27.400 Oolite[5768] *** NSTimer discarding exception '*** -[NSCFNumber length]: selector not recognized [self = 0x1307ec0]' that raised during firing of timer with target 135b290 and selector 'doStuff:'
The hackerOutpost.AI looks like this:

Code: Select all

{
    "DEFENSE_MODE" = {
        ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel); 
        ENTER = (); 
        EXIT = (); 
        "RED_ALERT" = (launchDefenseShip); 
        "YELLOW_ALERT" = ("setStateTo: IDLE"); 
        "CONDITION_YELLOW" = ("setStateTo: IDLE"); 
        "CONDITION_GREEN" = ("setStateTo: CHECK_FOR_DEBRIS"); 
        "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
        "ENERGY_FULL" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
        "TARGET_DESTROYED" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
        "TARGET_LOST" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
        "NO_TARGET" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
        UPDATE = (); 
    }; 
    "CHECK_FOR_DEBRIS" = {
        ENTER = (); 
        UPDATE = (scanForLoot, "pauseAI: 20.0"); 
        "TARGET_FOUND" = (launchScavenger, "setStateTo: IDLE"); 
        "NOTHING_FOUND" = ("pauseAI: 10.0"); 
        EXIT = (); 
        ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
        "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
    }; 
    GLOBAL = {ENTER = ("setStateTo: IDLE"); EXIT = (); UPDATE = (); }; 
    IDLE = {
        ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
        ENTER = (); 
        EXIT = (); 
        "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
        UPDATE = (decreaseAlertLevel, "setStateTo: CHECK_FOR_DEBRIS"); 
    }; 
}
Any ideas what's wrong? Help appreciated.

Posted: Sat Feb 24, 2007 1:35 pm
by LittleBear
Pretty sure Heretic is right about the defaulting to hardwired roles if the ship is called with a native role. Had this problem with the renegades, so called them by the role Hardpirate. When generated by the role pirate, Oolite ingored all the stuff in shipdata I'd put in to make them very nasty opponents. So I just whent for a C&P of all the native pirateships in shipdata. Renamed them HardBoa, HardCobra3 etc, beefed up there stats and added their multi-coloured front guns, big guns and turrets. All have the role Hardpirate and HardpirateAI (basiclly a C&P of ThargoidAI with some pirate-type hails thrown in - randomised by calling them from descriptions). Then the OXP script adds them randomlly by calling HardPirates. So if you C&Ped the native pirates (perhaps beefing them up a bit and maybe give'em a modded interceptorAI with a few hails instults) called them "gagdef" or whatever and set that as the base's defence ship, that should do it.


For the station (if you copy the AI for the Black Monk Station to your AIs and rename it to gagstatAI). Assine that as the base AI. Change the greeting to one of your own. It won't launch miners, but will defend itself. It also will send an advert for the Gangs services every 2 minutes whilst the player is in range. (I interm C&P'ed this from Roberto's modded AI he used for his HQ). General feeling with OXP writers is don't re-invent the wheel. If someone else has got somthing working that does somthing similar to what you want, steal it and tweak it! Just always rename it, so it doesn't replace the orginal. :wink:

PS:- Add the role station (0.00001) to the bases role. Oolite needs to be stold the thing is a station otherwise it will ingore AI commands (like increase altert level) which are only valid for stations rather than ships.
If you have a look at the Debtors in Black Monks, you'll see how I've done it. Clones of Traders, bt only appear when called as debtors by the script and they send debtor type-hails instead of standard distress calls.