Page 1 of 1

Bounties

Posted: Fri May 28, 2010 3:21 pm
by Smivs
Hi,
I just need a bit more scripting advice.
Does anyone know how bounties are awarded when you kill an offender/fugitive? There is a bounty specified in the shipdata.plist, but this doesn't seem to relate to the bounty actually paid. Is it a maximum?
Is it possible to set a fixed bounty for an OXP ship, and if so, how?

Re: Bounties

Posted: Fri May 28, 2010 4:47 pm
by Eric Walch
Smivs wrote:
Hi,
I just need a bit more scripting advice.
Does anyone know how bounties are awarded when you kill an offender/fugitive? There is a bounty specified in the shipdata.plist, but this doesn't seem to relate to the bounty actually paid. Is it a maximum?
Is it possible to set a fixed bounty for an OXP ship, and if so, how?
I noticed the wiki was quite short in this so I added two lines. The bounty entry is always used as the ships bounty except when the ships are added as pirate or trader. Than a new bounty is set. Since 1.73 this is linked to the "auto_ai" key. When set to yes, those ships get their default role and default bounty, when set to no, the ships keep their defined AI and bounty.

Re: Bounties

Posted: Fri May 28, 2010 5:11 pm
by Smivs
Eric Walch wrote:
When set to yes, those ships get their default role and default bounty, when set to no, the ships keep their defined AI and bounty.
Sorry, I'm being dim...so if I set my Pirate to 'auto ai = no' it will stay a pirate and the bounty specified in the shipdata.plist will be paid, is that right?

Re: Bounties

Posted: Fri May 28, 2010 6:02 pm
by Eric Walch
Smivs wrote:
Eric Walch wrote:
When set to yes, those ships get their default role and default bounty, when set to no, the ships keep their defined AI and bounty.
Sorry, I'm being dim...so if I set my Pirate to 'auto ai = no' it will stay a pirate and the bounty specified in the shipdata.plist will be paid, is that right?
Forget what I said. It is only true when a script adds a pirate. The default added pirates always get a default bounty. The only way to overrule that is by adding a ship-script that sets the bounty for that ship.

When using your own custom role to add ships, the bounty in shipdata is always used, but seeing your question I assume we are talking about ships that are going be added as pirate.

Posted: Fri May 28, 2010 6:04 pm
by Killer Wolf
auto AI is used (AFAIK) when you have several roles in a ship's Role attribute : you can have you ship as a trader or pirate for eg, and when the ship is selected as one of those roles it will be assigned the correct AI. if you have a Bounty attribute, it is assigned if the ship is given the Pirate role but isn't used for other ships, i believe. not sure how it refers to the amount the game awards for a kill tho, i'd assumed that WAS the amount you got :-/

Re: Bounties

Posted: Fri May 28, 2010 6:25 pm
by Smivs
Eric Walch wrote:

When using your own custom role to add ships, the bounty in shipdata is always used, but seeing your question I assume we are talking about ships that are going be added as pirate.
That's right. Without giving too much away, I'm introducing a ship which can be bought, but if encountered in-game is always a pirate or bounty hunter spoiling for a fight. I've specified the pirate AI as that seemed the most appropriate, and want to have a specific bounty awarded if you kill one. Also, is there any way of making them more aggressive?
I'm pretty ignorant about AIs, but I could probably do something like import the pirate AI into my OXP and manage a few tweaks here and there if I knew what I was doing. Any simple suggestions?

Re: Bounties

Posted: Fri May 28, 2010 9:14 pm
by Eric Walch
Smivs wrote:
and want to have a specific bounty awarded if you kill one. Also, is there any way of making them more aggressive?
I'm pretty ignorant about AIs, but I could probably do something like import the pirate AI into my OXP and manage a few tweaks here and there if I knew what I was doing. Any simple suggestions?
The best way to attach a specific bounty is by giving your ship a custom js-script. There must be plenty examples of ship scripts around. The script must than include:

Code: Select all

this.shipSpawned = function()
{
    this.ship.bounty = 1234;
    delete this.shipSpawned;
}
This code is executed just after ship creation. It allows to overrule current settings. You can even introduce math here to give ships a calculated bounty.
About aggressiveness: No script or AI has influence this. Attack strategies are hard coded in the engine. Ships can have two lines of strategies, randomly set on ship creation but unchangeable by any script or code.

Re: Bounties

Posted: Fri May 28, 2010 11:39 pm
by JazHaz
Smivs wrote:
That's right. Without giving too much away, I'm introducing a ship which can be bought, but if encountered in-game is always a pirate or bounty hunter spoiling for a fight.

Surely the easiest way to do this is to have two ships. A player version and a pirate version.

Posted: Sat May 29, 2010 12:51 am
by JazHaz
I like Bounties too. It's the chocolate and coconut combination I love! :lol: