{set fc to ship.frameshiftdrive.class}
{set fg to ship.frameshiftdrive.grade}
{set fttc to ship.fueltanktotalcapacity}
{set fr to event.fuelremaining}
{set fuellevel to (fr/fttc ) * 100}
{if fc=2 && fg='E': {set mf to 0.6}
|elif fc=2 && fg='D': {set mf to 0.6}
|elif fc=2 && fg='C': {set mf to 0.6}
|elif fc=2 && fg='B': {set mf to 0.8}
|elif fc=2 && fg='A': {set mf to 0.9}
|elif fc=3 && fg='E': {set mf to 1.2}
|elif fc=3 && fg='D': {set mf to 1.2}
|elif fc=3 && fg='C': {set mf to 1.2}
|elif fc=3 && fg='B': {set mf to 1.5}
|elif fc=3 && fg='A': {set mf to 1.8}
|elif fc=4 && fg='E': {set mf to 2.0}
|elif fc=4 && fg='D': {set mf to 2.0}
|elif fc=4 && fg='C': {set mf to 2.0}
|elif fc=4 && fg='B': {set mf to 2.5}
|elif fc=4 && fg='A': {set mf to 3.0}
|elif fc=5 && fg='E': {set mf to 3.3}
|elif fc=5 && fg='D': {set mf to 3.3}
|elif fc=5 && fg='C': {set mf to 3.3}
|elif fc=5 && fg='B': {set mf to 4.1}
|elif fc=5 && fg='A': {set mf to 5.0}
|elif fc=6 && fg='E': {set mf to 5.3}
|elif fc=6 && fg='D': {set mf to 5.3}
|elif fc=6 && fg='C': {set mf to 5.3}
|elif fc=6 && fg='B': {set mf to 6.6}
|elif fc=6 && fg='A': {set mf to 8.0}
|elif fc=7 && fg='E': {set mf to 8.5}
|elif fc=7 && fg='D': {set mf to 8.5}
|elif fc=7 && fg='C': {set mf to 8.5}
|elif fc=7 && fg='B': {set mf to 10.6}
|elif fc=7 && fg='A': {set mf to 12.8}
|else: error; unknown frame shift drive. Cannot determine max fuel per jump.
}
{set mjr to fr/mf}
{if fuellevel < 25: Warning;
|elif fuellevel <50: Caution;
}
fuel level at {Humanise(fuellevel)} percent.
{if mjr <1: You do not have enough fuel for a max jump. Refuel as soon as possible.
|elif mjr <2: You have fuel for only one max jump.
|else: {floor(mjr)} max jumps remain.
}
How do you change the name of the Eddi events on Speech responder?
I have created a new Personality and started making some script changes but I want to add my initials. The script changes are registered but I can't change the name of the events.
I did manage to change it for one of them but not the rest.
Inspired by the original post, this also tells you your remaining number of max jumps with warnings.
OK guys, need some help. I'm looking for some more descriptive words for the crime types used when incurring a bounty. The crimetypes used in the journal are as follows:
Assault
Murder
Piracy
Interdiction
IllegalCargo
DisobeyPolice
FireInNoFireZone
FireInStation
DumpingDangerous
DumpingNearStation
DockingMinor_BlockingAirlock
DockingMajor_BlockingAirlock
DockingMinor_BlockingLandingPad
DockingMajor_BlockingLandingPad
DockingMinor_Trespass
DockingMajor_Trespass
CollidedAtSpeedInNoFireZone
CollidedAtSpeedInNoFireZone_HullDamage
EDDI uses those exact words when using the "crimetype" variable in the Bounty Incurred action. I would like to hear something better than "You have committed the crime of DockingMajor_Trespass against the faction Future of MS Draconis" when the bounty occurs. Some are obvious, like murder, assault, and piracy. Others, like the aformentioned "DockingMajor_Trespass" need something more descriptive. Thanks for the help guys!
You cannot change the names of all scripts (as you sad events) because these scripts are bind to an event and get triggered when the event occurs. You can disable the script and make a new that is called similar (but not same)
If you want to change you commander name then you can change the Honorific script and this one you can also delete or rename but I guess it will break other scripts so don't do itAlso you can use the delete function as hint for what is an event and what is a added function. You probably want to "hook" into the events or use voice attack to "hook" to other scripts. Without this new functions will not be read out.
@okmerflow, go to the Speech Responder tab in EDDI. In order to edit the events you need to create a new personality. Click on the "Copy personality" button at the bottom of the Speech Responder tab, and give it a name. The "Edit" buttons should now be active. Click on "Edit" in the Jumped event and paste my code, and Robert's your mothers brother, you are good to go!
@WindWpn, the variable you should be calling is event.rating, not event.rating.name. However, it looks like the rating variable isn't working under the Interdiction script. You should let jgm know on the original EDDI thread.
{set i to 0}
{for icantypeanythinghereiguess in event.modules:
{event.modules[i]}
{set i to i+1}
{if event.modules[i]: and}
}
repaired.
{if system.allegiance = "Empire":
{if cmdr.empirerating.rank <= 4:
commander
|elif cmdr.empirerating.rank = 5:
sir
|elif cmdr.empirerating.rank <= 11:
my lord
|elif cmdr.empirerating.rank = 12:
your grace
|elif cmdr.empirerating.rank = 13:
your royal highness
|elif cmdr.empirerating.rank = 14:
your majesty
}
|elif system.allegiance = "Federation":
{if cmdr.federationrating.rank = 0:
commander
|elif cmdr.federationrating.rank = 5:
chief
|elif cmdr.federationrating.rank = 6:
chief warrant
|else:
{cmdr.federationrating.name}
}
|else:
commander
}
A small modification of the default Honorific. No one sane would greet a CPO as "chief petty officer". And no one, not even Warrant Officers, know what to call Warrant Officers. But "chief warrant" is more common than "warrant officer".
This is mostly so I don't cringe every time I enter a federal system.
Code:{if system.allegiance = "Empire": {if cmdr.empirerating.rank <= 4: commander |elif cmdr.empirerating.rank = 5: sir |elif cmdr.empirerating.rank <= 11: my lord |elif cmdr.empirerating.rank = 12: your grace |elif cmdr.empirerating.rank = 13: your royal highness |elif cmdr.empirerating.rank = 14: your majesty } |elif system.allegiance = "Federation": {if cmdr.federationrating.rank = 0: commander |elif cmdr.federationrating.rank = 5: chief |elif cmdr.federationrating.rank = 6: chief warrant |else: {cmdr.federationrating.name} } |else: commander }
{_ Function to find a given commodity in market}
{set market(commodity) to:
{for marketcommodity in station.commodities:
{if marketcommodity.EDDBID = commodity.EDDBID:
{return marketcommodity}
}
}
}
{_ set this as your max to list before total is used instead}
{set maxcommoditycount to 5}
{set totalprofit to 0}
{set profitablecommodities to []}
{set stolencommodities to []}
{set missioncommodities to []}
{set nullcommodities to []}
{for cargo in ship.cargo:
{if cargo.commodity.name != 'Limpet':
{set marketcommodity to market(cargo.commodity)}
{set profit to (marketcommodity.sellprice - cargo.price) * cargo.amount}
{if cargo.stolen = true:
{set stolencommodities to cat(stolencommodities, [cargo.commodity])}
|elif cargo.missionid:
{set missioncommodities to cat(missioncommodities, [cargo.commodity])}
|elif marketcommodity = null:
{set nullcommodities to cat(nullcommodities, [cargo.commodity])}
|elif marketcommodity && profit > 0:
{set profitablecommodities to cat(profitablecommodities, [cargo.commodity])}
{set totalprofit to totalprofit + profit}
}
}
}
{if len(profitablecommodities) > 0 && len(profitablecommodities) = len(ship.cargo) - len(stolencommodities) - len(missioncommodities):
You can sell all of your
{if len(stolencommodities) > 0: {OneOf("legal","legitimate")} }
{if len(missioncommodities) > 0: non-mission}
cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits.
|elif len(profitablecommodities) > maxcommoditycount:
You can sell {len(profitablecommodities)} commodit{if len(profitablecommodities) > 1:ies |else:y}
here for a total profit of {totalprofit} credits.
|elif len(profitablecommodities) > 0:
{set cur to 0}
You can sell your
{while cur < len(profitablecommodities):
{profitablecommodities[cur].name}
{set cur to cur + 1}
{if cur < len(profitablecommodities)-1:
,
|elif cur = len(profitablecommodities)-1:
and
}
}
for a profit of {totalprofit} credits.
}
{if len(nullcommodities) > 0:
{Pause(200)}
{set cur to 0}
Your cargo of
{while cur < len(nullcommodities):
{nullcommodities[cur].name}
{set cur to cur + 1}
{if cur < len(nullcommodities)-1:
,
|elif cur = len(nullcommodities)-1:
and
}
}
are not
{OneOf("listed at {OneOf('this station','the local market')}",
"on the {OneOf('local markets','stations')} normal {OneOf('list of commodities','commodity list')}")},
{if state.nullcommoditiestoday != 1:
You may be able to sell these here, but
{SetState("nullcommoditiestoday",1)}
}
{OneOf("profit is not guaranteed","profits are uncertain","these may be unprofitable")}.
}
{if len(stolencommodities) > 0 || len(missioncommodities) > 0:
{Pause(200)}
{if station.hasblackmarket:
{OneOf("This station has a Black Market,","There is a Black Market at this station,")},
{if len(ship.cargo) = len(stolencommodities) + len(missioncommodities):
You can sell all of your
{OneOf("illegal","stolen")}
{if len(missioncommodities) > 0: and mission}
cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits.
|elif len(stolencommodities) + len(missioncommodities) > maxcommoditycount:
You can sell {len(stolencommodities)} {OneOf("illegal","stolen")}
commodit{if len(stolencommodities) > 1:ies |else:y}
{if len(missioncommodities) > 0:, and {len(missioncommodities)} mission
commodit{if len(missioncommodities) > 1:ies |else:y}
}
here for a total profit of {totalprofit} credits.
|elif len(stolencommodities) + len(missioncommodities) > 0:
{if len(stolencommodities) > 0:
{set cur to 0}
You can sell your
{OneOf("illegal","stolen")}
{while cur < len(stolencommodities):
{stolencommodities[cur].name}
{set cur to cur + 1}
{if cur < len(stolencommodities)-1:
,
|elif cur = len(stolencommodities)-1:
and
}
}
}
{if len(missioncommodities) > 0:
{Pause(200)}
{set cur to 0}
You {if len(stolencommodities) > 0: may also |else: can}
sell your
{while cur < len(missioncommodities):
{missioncommodities[cur].name}
{set cur to cur + 1}
{if cur < len(missioncommodities)-1:
,
|elif cur = len(missioncommodities)-1:
and
}
}
for a profit of {totalprofit} credits.
}
}
}
}
I've just discovered this thread after writing (and refining) over 45 of the default scripts myself since I first discovered EDDI back in November. It's nice to see that many of you have had thoughts along the same lines as myself. I had thought about packaging up my scripts in text form and include the personality file too. However, what I'll do first is see what people think of my version of the 'Commodity Sale Check' script. This came about after a question on the EDDI GitHub ticket system, and those that have tried it, love it. Some of my initial modifications and bug fixes have since been incorporated into EDDI's default script by the author. Here's what it does, in addition to it's default functionality:-
- Overhauled script to provide functionality to consider mission cargo and commodities not normally listed in the stations market (ones that are returning as 'null'). The default script ignores these.
- Added report of stolen and/or mission goods that can be sold at black markets when station has one available.
- Added functionality to limit the number of commodities that will be listed before only a total number of profitable commodities is used instead. Currently set at 5. Change this variable to suit your needs. Useful for mining runs where you have many different commodities to sell.
- Updated black market section to use 'maxcommoditycount', and to use 'X cargo for Y profit' if not carrying any legal cargo. This now matches the legal cargo section functionality.
I've overhauled many of the default scripts to provide greater variety in the spoken responses (the same things over and over were getting tedious) and to add a lot of extra functionality that I felt was lacking in the default versions. I've also fixed a couple where they had small errors or problems (System Report and Commodity Collected mainly). Additionally, I've fixed and re-instated the 'System State' when jumping (this was removed by the author as it wasn't working, but I've fixed it now). I keep all my scripts updated to take advantage of the latest fixes and additions in EDDI, so the below code is built on the v2.2.0 default.
Let me know what you think, and maybe I'll see about packing up the whole 45+ scripts for you to pick and choose from, or use the personality as a starting point for your own.
Code:{_ Function to find a given commodity in market} {set market(commodity) to: {for marketcommodity in station.commodities: {if marketcommodity.EDDBID = commodity.EDDBID: {return marketcommodity} } } } {_ set this as your max to list before total is used instead} {set maxcommoditycount to 5} {set totalprofit to 0} {set profitablecommodities to []} {set stolencommodities to []} {set missioncommodities to []} {set nullcommodities to []} {for cargo in ship.cargo: {if cargo.commodity.name != 'Limpet': {set marketcommodity to market(cargo.commodity)} {set profit to (marketcommodity.sellprice - cargo.price) * cargo.amount} {if cargo.stolen = true: {set stolencommodities to cat(stolencommodities, [cargo.commodity])} |elif cargo.missionid: {set missioncommodities to cat(missioncommodities, [cargo.commodity])} |elif marketcommodity = null: {set nullcommodities to cat(nullcommodities, [cargo.commodity])} |elif marketcommodity && profit > 0: {set profitablecommodities to cat(profitablecommodities, [cargo.commodity])} {set totalprofit to totalprofit + profit} } } } {if len(profitablecommodities) > 0 && len(profitablecommodities) = len(ship.cargo) - len(stolencommodities) - len(missioncommodities): You can sell all of your {if len(stolencommodities) > 0: {OneOf("legal","legitimate")} } {if len(missioncommodities) > 0: non-mission} cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits. |elif len(profitablecommodities) > maxcommoditycount: You can sell {len(profitablecommodities)} commodit{if len(profitablecommodities) > 1:ies |else:y} here for a total profit of {totalprofit} credits. |elif len(profitablecommodities) > 0: {set cur to 0} You can sell your {while cur < len(profitablecommodities): {profitablecommodities[cur].name} {set cur to cur + 1} {if cur < len(profitablecommodities)-1: , |elif cur = len(profitablecommodities)-1: and } } for a profit of {totalprofit} credits. } {if len(nullcommodities) > 0: {Pause(200)} {set cur to 0} Your cargo of {while cur < len(nullcommodities): {nullcommodities[cur].name} {set cur to cur + 1} {if cur < len(nullcommodities)-1: , |elif cur = len(nullcommodities)-1: and } } are not {OneOf("listed at {OneOf('this station','the local market')}", "on the {OneOf('local markets','stations')} normal {OneOf('list of commodities','commodity list')}")}, {if state.nullcommoditiestoday != 1: You may be able to sell these here, but {SetState("nullcommoditiestoday",1)} } {OneOf("profit is not guaranteed","profits are uncertain","these may be unprofitable")}. } {if len(stolencommodities) > 0 || len(missioncommodities) > 0: {Pause(200)} {if station.hasblackmarket: {OneOf("This station has a Black Market,","There is a Black Market at this station,")}, {if len(ship.cargo) = len(stolencommodities) + len(missioncommodities): You can sell all of your {OneOf("illegal","stolen")} {if len(missioncommodities) > 0: and mission} cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits. |elif len(stolencommodities) + len(missioncommodities) > maxcommoditycount: You can sell {len(stolencommodities)} {OneOf("illegal","stolen")} commodit{if len(stolencommodities) > 1:ies |else:y} {if len(missioncommodities) > 0:, and {len(missioncommodities)} mission commodit{if len(missioncommodities) > 1:ies |else:y} } here for a total profit of {totalprofit} credits. |elif len(stolencommodities) + len(missioncommodities) > 0: {if len(stolencommodities) > 0: {set cur to 0} You can sell your {OneOf("illegal","stolen")} {while cur < len(stolencommodities): {stolencommodities[cur].name} {set cur to cur + 1} {if cur < len(stolencommodities)-1: , |elif cur = len(stolencommodities)-1: and } } } {if len(missioncommodities) > 0: {Pause(200)} {set cur to 0} You {if len(stolencommodities) > 0: may also |else: can} sell your {while cur < len(missioncommodities): {missioncommodities[cur].name} {set cur to cur + 1} {if cur < len(missioncommodities)-1: , |elif cur = len(missioncommodities)-1: and } } for a profit of {totalprofit} credits. } } } }
(I should probably get around to updating my sig too, but ED and script writing are more fun!)
{set station to StationDetails(event.station)}
{SetState("stationtype", station.model)}
{if station.model = "Coriolis Starport" || station.model = "Orbis Starport" || station.model = "Ocellus Starport" || station.model = "Unknown Starport":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad close to the entrance, in the center.
{SetState("padinfo", "Landing pad 1 is a small pad close to the entrance, in the center.")}
|elif event.landingpad = 2:
a large pad in the mid section of the station, in the center.
{SetState("padinfo", "Landing pad 2 is a large pad in the mid section of the station, in the center.")}
|elif event.landingpad = 3:
a medium pad in the far section of the station, in the center.
{SetState("padinfo", "Landing pad 3 is a medium pad in the far section of the station, in the center.")}
|elif event.landingpad = 4:
a small pad in the far section of the station, in the center.
{SetState("padinfo", "Landing pad 4 is a small pad in the far section of the station, in the center.")}
|elif event.landingpad = 5:
a medium pad close to the entrance, on the left.
{SetState("padinfo", "Landing pad 5 is a medium pad close to the entrance, on the left.")}
|elif event.landingpad = 6:
a small pad in the mid section of the station, on the left.
{SetState("padinfo", "Landing pad 6 is a small pad in the mid section of the station, on the left.")}
|elif event.landingpad = 7:
a medium pad in the mid section of the station, on the left.
{SetState("padinfo", "Landing pad 7 is a medium pad in the mid section of the station, on the left.")}
|elif event.landingpad = 8:
a medium pad in the far section of the station, on the left.
{SetState("padinfo", "Landing pad 8 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 9:
a large pad close to the entrance, on the left.
{SetState("padinfo", "Landing pad 9 is a large pad close to the entrance, on the left.")}
|elif event.landingpad = 10:
a large pad in the far section of the station, on the left.
{SetState("padinfo", "Landing pad 10 is a large pad in the far section of the station, on the left.")}
|elif event.landingpad = 11:
a medium pad close to the entrance, on the far left.
{SetState("padinfo", "Landing pad 11 is a medium pad close to the entrance, on the far left.")}
|elif event.landingpad = 12:
a small pad in the mid section of the station, on the far left.
{SetState("padinfo", "Landing pad 12 is a small pad in the mid section of the station, on the far left.")}
|elif event.landingpad = 13:
a small pad in the mid section of the station, on the far left.
{SetState("padinfo", "Landing pad 13 is a small pad in the mid section of the station, on the far left.")}
|elif event.landingpad = 14:
a small pad in the far section of the station, on the far left.
{SetState("padinfo", "Landing pad 14 is a small pad in the far section of the station, on the far left.")}
|elif event.landingpad = 15:
a medium pad in the far section of the station, on the far left.
{SetState("padinfo", "Landing pad 15 is a medium pad in the far section of the station, on the far left.")}
|elif event.landingpad = 16:
a small pad close to the entrance, on the left.
{SetState("padinfo", "Landing pad 16 is a small pad close to the entrance, on the left.")}
|elif event.landingpad = 17:
a large pad in the mid section of the station, on the left.
{SetState("padinfo", "Landing pad 17 is a large pad in the mid section of the station, on the left.")}
|elif event.landingpad = 18:
a medium pad in the far section of the station, on the left.
{SetState("padinfo", "Landing pad 18 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 19:
a small pad in the far section of the station, on the left.
{SetState("padinfo", "Landing pad 19 is a small pad in the far section of the station, on the left.")}
|elif event.landingpad = 20:
a medium pad close to the entrance, on the left.
{SetState("padinfo", "Landing pad 20 is a medium pad close to the entrance, on the left.")}
|elif event.landingpad = 21:
a small pad in the mid section of the station, on the left.
{SetState("padinfo", "Landing pad 21 is a small pad in the mid section of the station, on the left.")}
|elif event.landingpad = 22:
a medium pad in the mid section of the station, on the left.
{SetState("padinfo", "Landing pad 22 is a medium pad in the mid section of the station, on the left.")}
|elif event.landingpad = 23:
a medium pad in the far section of the station, on the left.
{SetState("padinfo", "Landing pad 23 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 24:
a large pad close to the entrance, in the center.
{SetState("padinfo", "Landing pad 24 is a large pad close to the entrance, in the center.")}
|elif event.landingpad = 25:
a large pad in the far section of the station, in the center.
{SetState("padinfo", "Landing pad 25 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 26:
a medium pad close to the entrance, on the right.
{SetState("padinfo", "Landing pad 26 is a medium pad close to the entrance, on the right.")}
|elif event.landingpad = 27:
a small pad close to the entrance, on the right.
{SetState("padinfo", "Landing pad 27 is a small pad close to the entrance, on the right.")}
|elif event.landingpad = 28:
a small pad in the mid section of the station, on the right.
{SetState("padinfo", "Landing pad 28 is a small pad in the mid section of the station, on the right.")}
|elif event.landingpad = 29:
a small pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 29 is a small pad in the far section of the station, on the right.")}
|elif event.landingpad = 30:
a medium pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 30 is a medium pad in the far section of the station, on the right.")}
|elif event.landingpad = 31:
a small pad close to the entrance, on the right.
{SetState("padinfo", "Landing pad 31 is a small pad close to the entrance, on the right.")}
|elif event.landingpad = 32:
a large pad in the mid section of the station, on the right.
{SetState("padinfo", "Landing pad 32 is a large pad in the mid section of the station, on the right.")}
|elif event.landingpad = 33:
a medium pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 33 is a medium pad in the far section of the station, on the right.")}
|elif event.landingpad = 34:
a small pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 34 is a small pad in the far section of the station, on the right.")}
|elif event.landingpad = 35:
a medium pad close to the entrance, on the far right.
{SetState("padinfo", "Landing pad 25 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 36:
a small pad in the mid section of the station, on the far right.
{SetState("padinfo", "Landing pad 25 is a medium pad in the far section of the station, on the left.")}
|elif event.landingpad = 37:
a medium pad in the mid section of the station, on the far right.
{SetState("padinfo", "Landing pad 37 is a medium pad close to the entrance, on the far right.")}
|elif event.landingpad = 38:
a medium pad in the far section of the station, on the far right.
{SetState("padinfo", "Landing pad 38 is a medium pad in the far section of the station, on the far right.")}
|elif event.landingpad = 39:
a large pad close to the entrance, on the right.
{SetState("padinfo", "Landing pad 39 is a large pad close to the entrance, on the right.")}
|elif event.landingpad = 40:
a large pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 40 is a large pad in the far section of the station, on the right.")}
|elif event.landingpad = 41:
a medium pad close to the entrance, on the right.
{SetState("padinfo", "Landing pad 41 is a medium pad close to the entrance, on the right.")}
|elif event.landingpad = 42:
a small pad in the mid section of the station, on the right.
{SetState("padinfo", "Landing pad 42 is a small pad in the mid section of the station, on the right.")}
|elif event.landingpad = 43:
a small pad in the mid section of the station, on the right.
{SetState("padinfo", "Landing pad 43 is a small pad in the mid section of the station, on the right.")}
|elif event.landingpad = 44:
a small pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 44 is a small pad in the far section of the station, on the right.")}
|elif event.landingpad = 45:
a medium pad in the far section of the station, on the right.
{SetState("padinfo", "Landing pad 45 is a medium pad in the far section of the station, on the right.")}
}
, as you enter with the green lights on the right of this {station.model}.
}
{if station.model = "Civilian Outpost":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad; depending on the station it is on the bottom opposite the antenna, or next to the antenna
{SetState("padinfo", "Landing pad 1 is a small pad; depending on the station it is on the bottom opposite the antenna, or next to the antenna")}
|elif event.landingpad = 2:
a small pad; depending on the station it is on the bottom opposite the antenna, or next to the antenna
{SetState("padinfo", "Landing pad 2 is a small pad; depending on the station it is on the bottom opposite the antenna, or next to the antenna")}
|elif event.landingpad = 3:
a small or medium pad; depending on the station. If medium pad it is next to the tanks opposite the antenna, if small pad it is in the middle next to the tank solar panels
{SetState("padinfo", "Landing pad 3 is a small or medium pad; depending on the station. If medium pad it is next to the tanks opposite the antenna, if small pad it is in the middle next to the tank solar panels")}
|elif event.landingpad = 4:
a small pad in the middle on the opposite side as the antenna
{SetState("padinfo", "Landing pad 4 is a small pad in the middle on the opposite side as the antenna")}
|elif event.landingpad = 5:
a medium pad on the side opposite the antenna
{SetState("padinfo", "Landing pad 5 is a medium pad on the side opposite the antenna")}
}
, on this {station.model}.
}
{if station.model = "Commercial Outpost":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad on the top
|elif event.landingpad = 2:
a small pad on the top
|elif event.landingpad = 3:
a small pad on the top
|elif event.landingpad = 4:
a medium pad on the bottom of the large section
}
, on this {station.model}.
}
{if station.model = "Industrial Outpost":
{Pause(8000)}
Proceede to Landing pad {event.landingpad} on this {station.model}.
}
{if station.model = "Planetary Outpost" || station.model = "Planetary Port":
{Pause(8000)}
Proceede to Landing pad {event.landingpad} on this {station.model}.
}
{if station.model = "Military Outpost":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad
|elif event.landingpad = 2:
a small pad
|elif event.landingpad = 3:
a medium pad on the far right of the rotating wheels
}
, on this {station.model}.
}
{if station.model = "Mining Outpost":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad on the small extension on the same side as the antenna mast
|elif event.landingpad = 2:
a small pad on the small extension on the opposite side of the antenna mast
|elif event.landingpad = 3:
a medium pad on the large extension opposite the antenna mast
}
, on this {station.model}.
}
{if station.model = "Scientific Outpost":
{Pause(8000)}
Landing pad {event.landingpad} is
{if event.landingpad = 1:
a small pad on the right of the antenna
|elif event.landingpad = 2:
a small pad on the right of the antenna next to pad 1
|elif event.landingpad = 3:
a medium pad opposite the antenna on the same side as the dome
}
, on this {station.model}.
}
Pause 10 seconds
Begin Small Integer Compare : [dockingmessage] Equals 1
End Condition - Exit when condition met
Set small int (condition) [autodock] value to 0
Begin Text Compare : [EDDI state stationtype] Contains 'Starport'
Set small int (condition) [station] value to 1
End Condition
Begin Text Compare : [EDDI state stationtype] Contains 'Outpost'
Set small int (condition) [station] value to 2
End Condition
Begin Text Compare : [EDDI state stationtype] Equals 'Planetary Outpost'
Set small int (condition) [station] value to 3
End Condition
Begin Text Compare : [EDDI state stationtype] Equals 'Planetary Port'
Set small int (condition) [station] value to 3
End Condition
Begin Text Compare : [{TXT:Ship compartment 1 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 2 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 3 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 4 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 5 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 6 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 7 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 8 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 9 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 10 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
Else If Text Compare : [{TXT:Ship compartment 11 module}] Contains 'Docking Computer'
Set small int (condition) [autodock] value to 1
End Condition
Begin Small Integer Compare : [sr] Equals 1
Begin Small Integer Compare : [station] Equals 1
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, entering {TXT:EDDI docking granted station} fast on silent running. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, entering {TXT:EDDI docking granted station} fast on silent running. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
Begin Small Integer Compare : [station] Equals 2
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, approaching {TXT:EDDI docking granted station} fast on silent running. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, approaching {TXT:EDDI docking granted station} fast on silent runnning. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
Begin Small Integer Compare : [station] Equals 3
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, decending to pad {INT:EDDI docking granted landingpad} at {TXT:EDDI docking granted station} fast on silent running.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, decending to pad {INT:EDDI docking granted landingpad} at {TXT:EDDI docking granted station} fast on silent running.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
Else
Begin Small Integer Compare : [station] Equals 1
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, entering {TXT:EDDI docking granted station}. Landing at pad {INT:EDDI docking granted landingpad}, on automated approach.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship callsign}; {TXT:Ship model}, the {TXT:Ship name}, entering {TXT:EDDI docking granted station}. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
Begin Small Integer Compare : [station] Equals 2
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, approaching {TXT:EDDI docking granted station}. Landing at pad {INT:EDDI docking granted landingpad}, on automated approach.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship callsign}; {TXT:Ship model}, the {TXT:Ship name}, approaching {TXT:EDDI docking granted station}. Landing at pad {INT:EDDI docking granted landingpad}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
Begin Small Integer Compare : [station] Equals 3
Begin Small Integer Compare : [autodock] Equals 1
Set Windows clipboard to '{TXT:Ship model}, the {TXT:Ship name}, decending to pad {INT:EDDI docking granted landingpad} at {TXT:EDDI docking granted station}, on automated approach.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Else
Set Windows clipboard to '{TXT:Ship callsign}; {TXT:Ship model}, the {TXT:Ship name}, decending to pad {INT:EDDI docking granted landingpad} at {TXT:EDDI docking granted station}.'
Pause 0.1 seconds
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
Press / ? key and hold for 0.1 seconds and release
Press L key and hold for 0.1 seconds and release
Press Space key and hold for 0.1 seconds and release
Press down Left Ctrl key
Press V key and hold for 0.1 seconds and release
Release Left Ctrl key
Press Enter key and hold for 0.1 seconds and release
Pause 0.1 seconds
End Condition
End Condition
End Condition
I've just discovered this thread after writing (and refining) over 45 of the default scripts myself since I first discovered EDDI back in November. It's nice to see that many of you have had thoughts along the same lines as myself. I had thought about packaging up my scripts in text form and include the personality file too. However, what I'll do first is see what people think of my version of the 'Commodity Sale Check' script. This came about after a question on the EDDI GitHub ticket system, and those that have tried it, love it. Some of my initial modifications and bug fixes have since been incorporated into EDDI's default script by the author. Here's what it does, in addition to it's default functionality:-
- Overhauled script to provide functionality to consider mission cargo and commodities not normally listed in the stations market (ones that are returning as 'null'). The default script ignores these.
- Added report of stolen and/or mission goods that can be sold at black markets when station has one available.
- Added functionality to limit the number of commodities that will be listed before only a total number of profitable commodities is used instead. Currently set at 5. Change this variable to suit your needs. Useful for mining runs where you have many different commodities to sell.
- Updated black market section to use 'maxcommoditycount', and to use 'X cargo for Y profit' if not carrying any legal cargo. This now matches the legal cargo section functionality.
I've overhauled many of the default scripts to provide greater variety in the spoken responses (the same things over and over were getting tedious) and to add a lot of extra functionality that I felt was lacking in the default versions. I've also fixed a couple where they had small errors or problems (System Report and Commodity Collected mainly). Additionally, I've fixed and re-instated the 'System State' when jumping (this was removed by the author as it wasn't working, but I've fixed it now). I keep all my scripts updated to take advantage of the latest fixes and additions in EDDI, so the below code is built on the v2.2.0 default.
Let me know what you think, and maybe I'll see about packing up the whole 45+ scripts for you to pick and choose from, or use the personality as a starting point for your own.
Code:{_ Function to find a given commodity in market} {set market(commodity) to: {for marketcommodity in station.commodities: {if marketcommodity.EDDBID = commodity.EDDBID: {return marketcommodity} } } } {_ set this as your max to list before total is used instead} {set maxcommoditycount to 5} {set totalprofit to 0} {set profitablecommodities to []} {set stolencommodities to []} {set missioncommodities to []} {set nullcommodities to []} {for cargo in ship.cargo: {if cargo.commodity.name != 'Limpet': {set marketcommodity to market(cargo.commodity)} {set profit to (marketcommodity.sellprice - cargo.price) * cargo.amount} {if cargo.stolen = true: {set stolencommodities to cat(stolencommodities, [cargo.commodity])} |elif cargo.missionid: {set missioncommodities to cat(missioncommodities, [cargo.commodity])} |elif marketcommodity = null: {set nullcommodities to cat(nullcommodities, [cargo.commodity])} |elif marketcommodity && profit > 0: {set profitablecommodities to cat(profitablecommodities, [cargo.commodity])} {set totalprofit to totalprofit + profit} } } } {if len(profitablecommodities) > 0 && len(profitablecommodities) = len(ship.cargo) - len(stolencommodities) - len(missioncommodities): You can sell all of your {if len(stolencommodities) > 0: {OneOf("legal","legitimate")} } {if len(missioncommodities) > 0: non-mission} cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits. |elif len(profitablecommodities) > maxcommoditycount: You can sell {len(profitablecommodities)} commodit{if len(profitablecommodities) > 1:ies |else:y} here for a total profit of {totalprofit} credits. |elif len(profitablecommodities) > 0: {set cur to 0} You can sell your {while cur < len(profitablecommodities): {profitablecommodities[cur].name} {set cur to cur + 1} {if cur < len(profitablecommodities)-1: , |elif cur = len(profitablecommodities)-1: and } } for a profit of {totalprofit} credits. } {if len(nullcommodities) > 0: {Pause(200)} {set cur to 0} Your cargo of {while cur < len(nullcommodities): {nullcommodities[cur].name} {set cur to cur + 1} {if cur < len(nullcommodities)-1: , |elif cur = len(nullcommodities)-1: and } } are not {OneOf("listed at {OneOf('this station','the local market')}", "on the {OneOf('local markets','stations')} normal {OneOf('list of commodities','commodity list')}")}, {if state.nullcommoditiestoday != 1: You may be able to sell these here, but {SetState("nullcommoditiestoday",1)} } {OneOf("profit is not guaranteed","profits are uncertain","these may be unprofitable")}. } {if len(stolencommodities) > 0 || len(missioncommodities) > 0: {Pause(200)} {if station.hasblackmarket: {OneOf("This station has a Black Market,","There is a Black Market at this station,")}, {if len(ship.cargo) = len(stolencommodities) + len(missioncommodities): You can sell all of your {OneOf("illegal","stolen")} {if len(missioncommodities) > 0: and mission} cargo {Occasionally(2,"commodities")} here for a total profit of {totalprofit} credits. |elif len(stolencommodities) + len(missioncommodities) > maxcommoditycount: You can sell {len(stolencommodities)} {OneOf("illegal","stolen")} commodit{if len(stolencommodities) > 1:ies |else:y} {if len(missioncommodities) > 0:, and {len(missioncommodities)} mission commodit{if len(missioncommodities) > 1:ies |else:y} } here for a total profit of {totalprofit} credits. |elif len(stolencommodities) + len(missioncommodities) > 0: {if len(stolencommodities) > 0: {set cur to 0} You can sell your {OneOf("illegal","stolen")} {while cur < len(stolencommodities): {stolencommodities[cur].name} {set cur to cur + 1} {if cur < len(stolencommodities)-1: , |elif cur = len(stolencommodities)-1: and } } } {if len(missioncommodities) > 0: {Pause(200)} {set cur to 0} You {if len(stolencommodities) > 0: may also |else: can} sell your {while cur < len(missioncommodities): {missioncommodities[cur].name} {set cur to cur + 1} {if cur < len(missioncommodities)-1: , |elif cur = len(missioncommodities)-1: and } } for a profit of {totalprofit} credits. } } } }
EDIT: I had written a 'Change Log' for my whole package a couple of days ago. It's not particularly detailed, just giving a general description of what I've done to each script. In case anyone's interested to know what the rest contains, here it is as a whole...
Darkcyde's Defaults for EDDI
============================
This is the list of changes in my 'Darkcyde's Defaults' EDDI personality. The changes range from minor tweaks, to script fixes, to major script changes.
I am partially sighted in real life, and have a damaged visual field of view. EDDI has been an amazing help to me as I can often miss text, particularly in the middle of combat. That's why I've made so many changes to the default personality. Plus, I wanted more information and variation on the way things were said. I'm going to keep these updated to take advantage of any new features from new versions of EDDI.
For EDDI v2.2.0 Release
=======================
Updated Function Scripts
------------------------
- Body Report - Updated variable names to 'cur' to match default script.
- Commodity Sale Check - Updated black market section to use 'maxcommoditycount', and to use 'X cargo for Y profit' if not carrying any legal cargo.
- System State Report - Updated to report state if a sytem is populated, otherwise report 'no state', because this is also called from the 'Jumped' event now.
Updated Event Scripts
---------------------
- Docking Granted - Made code for station type check smaller.
- Commodity Collected - Added check to see if event.cargo is not null. I discovered 'Structural Regulators' salvage was triggering this event, but leaving event.cargo as null. Also added variety to spoken sentence.
- Docked - Returned to the default event as this has been fixed now for getting the correct information in the 'Commodity Sale Check' script.
- Jumped - Set to call 'System State Report' rather than use it's own version. (This was just duplicating the code, so it made sense to call the default report instead).
Removed Event Scripts
---------------------
- Market Information Updated - No longer needed as 'Docked' has been fixed.
- Station No Fire Zone Exited/Entered - I may put them back if I can think of something better to use.
For EDDI v2.1.1-beta5
=====================
New Function Scripts
--------------------
- MisFacState - Function to report Faction State for Mission Scripts, and provide variations in spoken sentence.
- MissionType - Function to get the type of mission accepted/completed/abandoned for mission events, and provide variations in spoken sentence.
Updated Function Scripts
------------------------
- Body Report - Tidied up 'goodmaterials' & 'greatmaterials' sections. Added 'allmaterials' section for bodies that are too low for the 'good' & 'great' reports.
- Commodity Sale Check - Overhauled script to provide functionality to consider mission cargo and commodities not normally listed in the stations market (ones that are returning as 'null'). Reworked cargo check, as 'demand' is currently broken. It's always set at 1 for commodities in supply. Added report of stolen and/or mission goods that can be sold at black markets when station has one available. Added functionality to limit the number of commodities that will be listed before only a total number of profitable commodities is used instead. Currently set at 5. Change variable to suit your needs. Useful for mining runs. Changed when the script is called. Moved from 'Docked' event into 'Market Information Updated' event. This means it's triggered later after docking, but the information is more accurate.
- Honourific - Updated to occasionally say commander name after 'Commander'.
- Landing Pad Report - Updated to add greater variation to the spoken sentence.
- System Report - Updated to add greater variation to the spoken sentence for a few of the system states. Corrected duplicate 'Civil War' entry to read 'Civil Unrest'. Re-ordered system states into alphabetical order. (I'm picky! Lol!)
New Event Scripts
-----------------
Added new scripts for the following events that do not have one as default:-
- Mission Failed - Tells you when you fail a mission.
- Station No Fire Zone Exited/Entered - Not sure if I want to keep these.
- Market Information Updated - Added calls to 'Commodity Sale Check', 'Commodity Purchase Check', 'Swapout Check' and 'Limpet Check'. Added 'Station/Market data update complete'. See 'Docked' event below, and 'Commodity Sale Check' above.
- Ship Interdiction - Report who you have interdicted and their allegiance, plus thier combat rank if they are a Cmdr.
- Ship Interdicted - Reports who you were interdicted by and their allegiance, plus thier combat rank if they are a Cmdr.
- Died - Add a bit of lightheartedness to your death.
- Ship Rebooted - Gives a list of repaired systems.
- Docking Requested - Tells you docking has been requested.
- Shields Down/Up - Verbal confirmation of shield failure and regeneration.
Updated Event Scripts
---------------------
- NPC Interdiction Commenced - Slight update to variation on spoken sentence.
- Bond Awarded - Added more information and greater variation in spoken sentence.
- Fine Paid - Added 'Legacy' optional to spoken sentence.
- Engineer Progressed - Added greater variation in spoken sentence.
- Mission Abandoned/Completed/Accepted/Failed - Added more information and greater variation in spoken sentence.
- Ship Repaired - Added more information and greater variation in spoken sentence. Added missing 'Cargo Bay Door' module.
- Ship Refuelled - Added more information and greater variation in spoken sentence depending on source of fuel.
- Ship Restocked - Added slight variations to spoken sentence.
- Material Discovered - Added information on the type and rarity of material discovered. Added variations on spoken sentence.
- Material Collected - Added information on the type and rarity of 'Data' material only. I was missing the text report at top right of the screen due to my eyesight.
- Commander Started - Added Cmdr name.
- Crew Assigned/Fired/Hired - Added variations to spoken sentence.
- Cleared Save - Added variations to spoken sentence.
- Ship Sold - Cosmetic change to script to tidy up to my preference. No extra functionality.
- SRV Launched/Docked - Slight change to improve speech of 'SRV', and to add variation in spoken sentence.
- Commodity Sold - Added optional of 'pure profit' if commodity sold cost zero to obtain (Mining/piracy/salvage).
- Bounty incurred - Added 'crimetype' information, and greater variation in spoken sentence.
- Docking Granted - Slight script change to try to improve efficiency.
- Body Scanned - Added occasional 'and analysis' to spoken sentence.
- Cockpit Breached - Replaced script with one more fitting the ship's computer personality. Added variation in spoken sentence.
- Combat/Exploration/Trade Promotions - Added more information and variations on spoken sentnce.
- Fine Incurred - Added 'crimetype' information, and variation in spoken sentence.
- Entered Normal Space - Updated to include 'Planetary Ring' as a bodytype to be near. Tidied up script syntax.
- Bounty Awarded - Overhauled script to provide more information and variation in spoken sentence.
- Liftoff - Added variations to spoken sentence.
- Touchdown - Corrected coordinates to match those in game, and added variations to spoken sentence.
- Undocked - Changed script to only speak when launching from an Outpost. Speech conflicts with stations comms tower chatter, and doesn't sound right if delyed until after this completes.
- Docked - Removed calls to 'Commodity Sale Check', 'Commodity Purchase Check' and 'Limpet Check'. Added 'Checking Market Data. Please wait'. See 'Market Information Updated' and 'Commodity Sale Check' events above.
- Jumped - Added 'system.state'. This was broken in the original 'Jumping' event due to timing of data availability, and was removed by the author. Should be ok here, but only triggered when jump has completed.
Previous Versions
=================
Starting from when I discovered EDDI, around v2.0.11, I've been making alterations to the defaults. None of these ever went public, and it wasn't until a few of people liked what I had done and suggested I let a wider audience have access to them, that I decided to post them on the Eforums.
(I should probably get around to updating my sig too, but ED and script writing are more fun!)
Very cool. I love seeing everyone else's take on personalizing the scripts. I've changed my Commodity Sale Check script to yours to see how I like it.
Here's my Docking Granted script. I edited it to proved better directions to the pads. I also added it to tell me what type of station I am landing on. Before the latest version that added repeating of scripts, I changed it to pass the pad info to VA so that I could repeat it. I also use the passed info in Voice Attack to paste as landing message in the local chat that changes depending on station type and how I'm entering the station.
{Pause(2000)}
{OneOf("{OneOf('Establishing uplink with','Initiating link to',
'Connecting to','Accessing')}
{OneOf('local','station','{event.station}\\'s')}
{OneOf('data net','network','networks','computers','services')}.
{Pause(2000)}
{OneOf('Uplink','Link','Access','Connection')}
",
"{OneOf('Communications with','Access to','Link to','Access to')}
{OneOf('local','station','{event.station}\\'s')}
{OneOf('data net','network','networks','computers','services')}
")}
{OneOf("established","confirmed","authorised","obtained")}.
{OneOf("Station","Market")} {OneOf("data","information")} {OneOf("update complete","updated")}.
{F("Commodity sale check")}
{if ship.role = "Multi-purpose" || ship.role = "Trading":
{F("Commodity purchase check")}
}
{F("Swapout check")}
{F("Limpet check")}
Thank you v much for this post, have been messing with how to do this all day, you sir need raising shoulder high.
Nice! I've not used VA much, it's not practical in my house as there are too many people around normally. I've really wanted to, but it's not worth the hassle.
I just thought I'd mention, that as of v2.2.0 of EDDI, the check functions in the 'Docked' event (purchase check, commodity sale check, etc) don't always work properly when called from the Docked event when you land.
The Docked event fires before the market data is updated, and so when landing for the first time, market data is either wrong or just not there at all. This means that the purchase and sale checks come back either wrong or don't say anything at all. After the market data has been obtained, which happens after the docked event finishes, running the Docked script again works fine (either by clicking the Test button in EDDI, or by taking off and landing again).
This is something the author is looking into to be fixed at a later date, which is great. Right now though, when I land, I get told I can sell 4 or 5 commodities out of the 7 I'm carrying. To fix this for the moment, I've moved the calls to all those checks into the Market information updated event. Here it may take a fraction longer to fire the scripts, but it's always accurate.
Once new market data has been obtained after landing, this information persists for a while. I've tested this by quickly jumping between 3 stations in-system. Each were wrong on initial landing, but correct after market data was updated. If you jump out of system and back again though, the data is wrong again.
EDIT: I've just tried adding a 30 second pause at the start of the Docking event, but it was still broken. It seems that when an event is triggered (on touchdown for 'Docked'), it is run in it's entirety to fully prepare the spoken text, and only then does it start to say something. Consequently, adding pauses anywhere within the script to try delaying the execution of functions, will not work, as everything is executed at the point the event is triggered. Pauses only affect the resulting speech, not the processing of the event script.
So, unless there is a way of updating the market information when you drop out of supercruise near a station, calling 'Commodity sale check' etc, from the 'Docked' event will almost always produced incorrect results until after the 'Market information updated' event has triggered.
To make life easier for people, here are my updated versions of 'Docked' and 'Market Information Updated' event scripts. These should let things work as originally intended. 'Docked' is based on v2.2.0, but with all the function stuff stripped out.
Docked:
Code:{Pause(2000)} {OneOf("{OneOf('Establishing uplink with','Initiating link to', 'Connecting to','Accessing')} {OneOf('local','station','{event.station}\\'s')} {OneOf('data net','network','networks','computers','services')}. {Pause(2000)} {OneOf('Uplink','Link','Access','Connection')} ", "{OneOf('Communications with','Access to','Link to','Access to')} {OneOf('local','station','{event.station}\\'s')} {OneOf('data net','network','networks','computers','services')} ")} {OneOf("established","confirmed","authorised","obtained")}.
Market Information Updated:
Code:{OneOf("Station","Market")} {OneOf("data","information")} {OneOf("update complete","updated")}. {F("Commodity sale check")} {if ship.role = "Multi-purpose" || ship.role = "Trading": {F("Commodity purchase check")} } {F("Swapout check")} {F("Limpet check")}