[SCRIPT] NPC Bailing Addon v1.7.8 [2010-09-21]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

djrygar wrote:aside from above problems, I'd like to know how those new options work :D

bail rate - I assume it is frequency/probability of checking, but hull factor?.. should be lower or higher for big ships? How exactly it affects bailing? (maybe putting this on forst page would be helpful - probably others will be asking too)
Yeah, rate factor controls probability of bailing at all, hull factor control hull damage before bailing.

If you set all settings to '6', that would be the same as the default in the previous version (60%). The formula is exactly the same, I just used different configurable factors, rather than reusing the same one.


From the OP:
... The chance of bailing is based on the bravado and the bail rate factor. The amount of hull damage they must suffer before bailing is based on the bravado and the bail hull factor. The bail rate and hull factors are configurable through the menu
I've emboldened the text for bail rate/hull factor, so hopefully it is easier to spot for future peeps.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
djrygar
Posts: 1842
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar »

well, then maybe 'threshold' would be better ;)
'factor' suggests something like taking multiplied hulls (modified tships) into account ;)

(at least for me; non native-english speaker)
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

djrygar wrote:well, then maybe 'threshold' would be better ;)
'factor' suggests something like taking multiplied hulls (modified tships) into account ;)

(at least for me; non native-english speaker)
Hmm, yeah not sure what the best wording is.

Its not really a threshold, since its just a parameter used in an equation. The value of the factor is squared, then used in a response-threshold formula. So a factor of 9 is actually 81, factor of 4 is 16, etc. Meaning large factors make a big difference (big gap between them) compared to smaller factors. But then the response-threshold equation is an S-shaped function, so its all a bit blurry.

I'm still open to suggestions for a better name than 'factor', though.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

Does the current version change the turrets of bailed ships to offline? I once watched a bailed Split M7 defend itself against a Boron OWP's missile attacks, which seemed rather strange.

Also; could shields be disabled? By which I mean, any shields that survive be removed from shield slots, but left in the cargo hold?
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

vkerinav wrote:Does the current version change the turrets of bailed ships to offline? I once watched a bailed Split M7 defend itself against a Boron OWP's missile attacks, which seemed rather strange.

Also; could shields be disabled? By which I mean, any shields that survive be removed from shield slots, but left in the cargo hold?
Hmm, turrets should be offline - all tasks are stopped when a pilot bails. If you are using Salvage Commands and NPCs, could it be possible that the M7 you saw was claimed. Its happened to me a couple of times when an abandoned ship suddenly starts moving and I've thought there was a bug, when actually it had been claimed right in front of me by an NPC salvager. Also, are you perhaps using any 3rd party scripts that could affect NPC turrets?

Can anyone confirm this turret (mis)behaviour?

Moving the shields into the cargo hold is possible I suppose. I'll keep it in mind to add an option for it.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
vkerinav
Posts: 632
Joined: Sun, 11. Apr 10, 21:38
x3ap

Post by vkerinav »

ThisIsHarsh wrote:Hmm, turrets should be offline - all tasks are stopped when a pilot bails. If you are using Salvage Commands and NPCs, could it be possible that the M7 you saw was claimed. Its happened to me a couple of times when an abandoned ship suddenly starts moving and I've thought there was a bug, when actually it had been claimed right in front of me by an NPC salvager. Also, are you perhaps using any 3rd party scripts that could affect NPC turrets?

Can anyone confirm this turret (mis)behaviour?

Moving the shields into the cargo hold is possible I suppose. I'll keep it in mind to add an option for it.
Sorry, I think I was a bit misleading. I haven't noticed any problems in the current version. I saw this in an earlier version, and wondered if it had been fixed.
Troubleshooter11
Posts: 728
Joined: Sat, 8. Nov 08, 02:51
x4

Post by Troubleshooter11 »

Although this script (and the added NPC salvagers) adds a degree of realism to the game, to me it feels a bit "cheaty" to enter a sector and see half a dozen fighters etc floating around for me to claim.

Maybe i just need to tweak the settings or make NPC salvagers arrive faster. dunno.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Troubleshooter11 wrote:Although this script (and the added NPC salvagers) adds a degree of realism to the game, to me it feels a bit "cheaty" to enter a sector and see half a dozen fighters etc floating around for me to claim.

Maybe i just need to tweak the settings or make NPC salvagers arrive faster. dunno.
Yeah, I didn't do much play testing with the new default settings, so any opinions on the most balanced defaults for both the rate and hull factors would be most appreciated.

Would be useful for people to specify if you use NPC salvagers and what setting you use for them, since this effectively does the same job as reducing the bail rate.

In the past in this thread people have posted wildly different values, but if enough people post their preferred settings, then I can estimate a reasonable average and set that as the new default.

I would also like to know for my own game, since IMO a general consensus is the best way in a modded game of having an 'official' balanced setting that isn't considered a cheat.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
djrygar
Posts: 1842
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar »

mine is hull "2" for all, bail rate 3/2/1

salvagers usually set to 30 minutes

but it's fresh game, I have yet to see bailed big/huge ships. For fighters works well (using x4 hulls)


I've reports that IR's guardians attack baled (or worse just claimed) ships

I see you changed bail procedure

seems like disabling race logic might be not so good idea..
and you removed 'set owner to neutral".. why?
Wintersdark
Posts: 238
Joined: Thu, 15. Jan 09, 17:12
x4

Post by Wintersdark »

Settings for hull remaining will depend heavily on whether or not you use hull extending mods, too. When running with increased hulls (I use the maximum hull increasing mod with SRM) I turn the hull percentage down low, but if you're playing an otherwise stock game you'd want it much higher or you'll never see ships survive the "last few shots".

My settings, though? Pointless, really, as I'm in the Apricotslice school of thought in regards to that. I deeply resent any forced "balancing" measures, and don't believe in the whole notion of cheating in a single player game :)

I tend to have my percentages set higher than most probably would, though I work carefully with NPC salvagers to ensure I don't enter sectors with swarms of derelicts (unless, perhaps, I meandered in right after a huge conflict).

Realism(in my eye, at any rate; realism is a dirty word with video games) is more important than "balance" to me.
Sunrayn
Posts: 85
Joined: Tue, 14. Oct 08, 00:59

Post by Sunrayn »

My findings after 2 days. NPC salvagers turned off IR with hot wars enabled.

Small ships: bail 8, hull 5 --- ships bailed is average.
Big Ships bail 9, hull 6 --- found 1 M6
Huge Ships bail 9, hull 6 --- 0 after 2 days.


This is with IR and there are lots of battles going on throughout the universe. It isnt just a matter of me missing them because I have the destruct set to 360 mins, Adv Sats in almost half the sectors and 6 or 7 patrols going.

Maybe I am just not understanding the bail factor and hull factor? Higher bail factor equals higher probability of bailing and higher hull factor equals less damage to hull before bailing decision is made?
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Thanks for your reports so far peeps.

Sunrayn wrote:My findings after 2 days. NPC salvagers turned off IR with hot wars enabled.

Small ships: bail 8, hull 5 --- ships bailed is average.
Big Ships bail 9, hull 6 --- found 1 M6
Huge Ships bail 9, hull 6 --- 0 after 2 days.


This is with IR and there are lots of battles going on throughout the universe. It isnt just a matter of me missing them because I have the destruct set to 360 mins, Adv Sats in almost half the sectors and 6 or 7 patrols going.

Maybe I am just not understanding the bail factor and hull factor? Higher bail factor equals higher probability of bailing and higher hull factor equals less damage to hull before bailing decision is made?
Hmm, that is interesting. Indeed you are correct in your definition of the bail rate and bail hull factors. I would have expected more ships to have bailed with those settings. One thing to bear in mind is that big and huge ships almost always have a very high bravado (morale + fight skill + aggression), so they will naturally tend to bail less often than small ships, even at the same settings.

A couple of things you can try:

- Use Cycrow's SEWN script, which has a feature whereby your satellites will alert you if they detect an abandoned ship.

- You could install my Salvage Commands and NPCs plugin, then use the 'Universe salvager' command. Once properly configured, this makes the ship automatically jump around the universe wherever an abandoned ship is visible to your property and claim it for you.

Either of these plugins will increase the amount of bailed ships you find dramatically.

Despite this, I am still puzzled by the lack of bailing at those settings. I keep meaning to do some play testing with IR installed, maybe now is the time.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Sunrayn
Posts: 85
Joined: Tue, 14. Oct 08, 00:59

Post by Sunrayn »

Already do use your Salvage Commands and NPC's. These numbers are with the NPC salvagers disabled.

I could never get the universe salvager to work, he would just go to the nearest shipyard and dock even with Adv Sats spread around. I use the sector salvager almost exclusively.

Which leads me to a question. People have been reporting in IR that IR Guardian ships are going red when claiming a ship. It happens to me when the salvaging ship is close to a Guardian when it claims. I use the Special Command MK1 and not the SoS.

Now last night I saved a game just before turning the sector salvager loose. He claimed a ship close to the Guardians, they went red, destroyed the claimed ship and then chased down the claiming ship and destroyed it too.

I reloaded and did it again, same results. I then personally went to the sector, had the sector salvager claim again, same result. I went personally to the ship so I would be in the same position as the sector salvager and used Apricot's Claim Software. No problems.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Ah. Now that is interesting. I'll have to check out how Apricot's script works. Cheers for this info. I do really wanna get this bug squashed! It's just so hard to reproduce.

As for universe salvager, make sure it is equipped right and its friend/foe settings are configured (it won't jump into sectors where enemies are detected). It will go to station to hide while it scans the universe for abandoned ships, though it shouldn't sit idle for long.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
djrygar
Posts: 1842
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar »

just FYI - guardians make circles aroud shipyards, and very often update relation using

'[THIS]->set relations from notoriety: include player as target and race > teladi as owner=[FALSE]


or

$temp = get notoriety from race [OWNER] to race {Player}
if $temp >= 0
[THIS]->set relation against {Player} to {Neutral}
else
[THIS]->set relation against {Player} to {Foe}
end


depending of other settings in options (race wars etc)

since all reporting people said they had good notoriety, problem lies in what first command returns
Sunrayn
Posts: 85
Joined: Tue, 14. Oct 08, 00:59

Post by Sunrayn »

@ Djrygar.

I believe something is forcing a notoriety change at the moment the ship is claimed. In my case with remote claiming, the Guardians do go back to blue after the ship is destroyed unless there is another within 10km or so.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Sunrayn wrote:@ Djrygar.

I believe something is forcing a notoriety change at the moment the ship is claimed. In my case with remote claiming, the Guardians do go back to blue after the ship is destroyed unless there is another within 10km or so.
Its not really a notoriety change, AFAIK, its just that for some reason their relation is set to Foe for that ship before the pilot bails, then set to Neutral while it's abandoned, then, for some strange reason, resets back to Foe again when the player claims it.

At least that's my understanding from the many many reports that have been posted here of this behaviour. I personally have never experienced this problem. Hence why it is hard to debug.

I had a look through Apricot's script, nothing special there, so I'm stumped once more.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
djrygar
Posts: 1842
Joined: Mon, 10. Aug 09, 02:09
x3ap

Post by djrygar »

strange thing is that guardians have race logic disabled

and race logic enabled ships (jobs spawned military etc) do not react to bailing, just those with disabled logic
Sunrayn
Posts: 85
Joined: Tue, 14. Oct 08, 00:59

Post by Sunrayn »

would it have something to do with remote claiming? as in it isnt the Playership doing the claiming? or are all your property ships considered Playerships even if you arent in them?

*edit to add*

it doesnt seem to be just the claimed ship, the ships are attacking any player property in the immediate area. That is my experience with it anyway, I run my games as a salvage company and I personally only go after bailed ships that are special (difficult to get to, in enemy sectors, capital ships, etc) the rest of the time I use salvagers and those are the ones I see having problems with.
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

Ah OK, wasn't aware of either of those factors. Cheers for that Sunrayn and djrygar. Should help me investigate.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”