Scripting requests
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Visibility to the player's reputation has been added with the player.contractReputation and player.passengerReputation properties. Also added are the JS methods player.increaseContractReputation(), player.decreaseContractReputation(), player.increasePassengerReputation() and player.decreasePassengerReputation().
This should give enough control to scripters to manipulate the player's reputation for both cargo and passenger contracts as they see fit.
This should give enough control to scripters to manipulate the player's reputation for both cargo and passenger contracts as they see fit.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Note that this has no influence at all on the fees you get for the F8-F8-screen passenger contracts.
It just means that a scripter can make missions available depending on the current reputation of the player. Or he can increase of decrease the player's reputation, depending on the outcome of a mission.
But it doesn't make the built-in passenger-carrier career profitable, so it is not the solution Neo_Jesus requested. As I said before, this solution cannot be reached by scripting.
It just means that a scripter can make missions available depending on the current reputation of the player. Or he can increase of decrease the player's reputation, depending on the outcome of a mission.
But it doesn't make the built-in passenger-carrier career profitable, so it is not the solution Neo_Jesus requested. As I said before, this solution cannot be reached by scripting.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
@Cmdr M - surely now, somebody could knock out a oxp that could "enhance"/surplant the in-built alternative career path? i.e. offering alt. passenger jobs that do offer additional rewards - you'd still get the ingame one but they could be ignored in favour of the oxp ones?
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
e.g the oxp deposed.oxp is mainly a passenger transport. When one would write a similar new one, you don't look at the initial hitpoints but at the players reputation. That is a much better criteria to offer a passenger transport mission. You just have to warn people in the readme that the oxp only starts with a good reputation.DaddyHoggy wrote:@Cmdr M - surely now, somebody could knock out a oxp that could "enhance"/surplant the in-built alternative career path? i.e. offering alt. passenger jobs that do offer additional rewards -
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Well, it all starts as what seems to be a passenger transport. To be fair, the plot of Deposed does take some development from there.Eric Walch wrote:e.g the oxp deposed.oxp is mainly a passenger transport. When one would write a similar new one, you don't look at the initial hitpoints but at the players reputation. That is a much better criteria to offer a passenger transport mission. You just have to warn people in the readme that the oxp only starts with a good reputation.
But of course it would make perfect sense to make it depend on a certain reputation.
And of course I can easily imagine a similar OXP (and you could use the cargo-reputation as well). But not by me (at least not until I get at least one of my currently 4-6 WIPs finished ).
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
After working hard to get an salvage.oxp working with script generated derelicts, I encountered a major problem with real derelicts. I missed that also the maxSpeed is set back to zero. To resurrect the derelict ships I need a possibility to set maxSpeed back to its original value in shipdata.plist. (I don't want it read/write)
I see two possibilities to do this.
1) Add a new function resetMaxSpeed().
2) Build on the stuff that Giles already put in the code for salvaging purpose. I think special at the function: that is already in ShipEntity.m Declare this an official AI command and add the line
to the function declarations.
This would restore the ship completely to a completely working one. A JS script than can give the derelict a new AI file that at some place contains the command: pilotArrived to resurrect the ship.
I think this function original was mend to work this way. Now it is just unused code.
I see two possibilities to do this.
1) Add a new function resetMaxSpeed().
2) Build on the stuff that Giles already put in the code for salvaging purpose. I think special at the function:
Code: Select all
- (void) pilotArrived
{
[self setHulk:false];
[self reactToAIMessage:@"PILOT_ARRIVED"];
}
Code: Select all
maxFlightSpeed = [shipDict floatForKey:@"max_flight_speed"];
[self setScanClass: CLASS_NEUTRAL];
This would restore the ship completely to a completely working one. A JS script than can give the derelict a new AI file that at some place contains the command: pilotArrived to resurrect the ship.
I think this function original was mend to work this way. Now it is just unused code.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Done – Ahruman
Not a request for a new functionality, but for a change in the existing one. I would like the shipLaunchedEscapePod-event handler to fire a little earlier. To be precise: before player.bounty is reset to 0.
Anarchies bypasses the getting-clean-via-using-the-escape-pod by keeping track of the player.bounty all the time and restoring it when the player has arrived on the station after using the escape pod. It would be much easier to just store the bounty in a variable the moment the escape pod is launched. Unfortunately at the time when the script attached to the shipLaunchedEscapePod-event hanlder is run, player.bounty is already 0, so currently I can't store its value then.
If you don't want to change the existing event handler, I would alternatively request a new event handler which is fired before the player.bounty is reset. Something like shipWillLaunchEscapePod.
Anarchies bypasses the getting-clean-via-using-the-escape-pod by keeping track of the player.bounty all the time and restoring it when the player has arrived on the station after using the escape pod. It would be much easier to just store the bounty in a variable the moment the escape pod is launched. Unfortunately at the time when the script attached to the shipLaunchedEscapePod-event hanlder is run, player.bounty is already 0, so currently I can't store its value then.
If you don't want to change the existing event handler, I would alternatively request a new event handler which is fired before the player.bounty is reset. Something like shipWillLaunchEscapePod.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Looking in the code I think there is no problem to reset bounty after the handler. (can't do it myself).Commander McLane wrote:Not a request for a new functionality, but for a change in the existing one. I would like the shipLaunchedEscapePod-event handler to fire a little earlier. To be precise: before player.bounty is reset to 0.
To the pseudoFixedD256_numbers. Yes, I also would like to have a fixed random value based on system. For the location of grs station I now use the plain system number as sort of random number. (the numbers look randomly distributed over the system).
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Done.Commander McLane wrote:Not a request for a new functionality, but for a change in the existing one. I would like the shipLaunchedEscapePod-event handler to fire a little earlier. To be precise: before player.bounty is reset to 0.
E-mail: [email protected]
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
Done – Ahruman
Javascript
loadSound("sound.ogg")
playSound.("sound.ogg")
whereby sounds can overlap... playMusic will stop any current music playing...
And it seems everyone has a hyperradio these days ...
not sure how much effort there would be in making this possible...
loadSound("sound.ogg")
playSound.("sound.ogg")
whereby sounds can overlap... playMusic will stop any current music playing...
And it seems everyone has a hyperradio these days ...
not sure how much effort there would be in making this possible...
Bounty Scanner
Number 935
Number 935