Page 1 of 1

quick hack to display reputation oxp not working

Posted: Sun Feb 24, 2013 12:13 pm
by Bogatyr
Hi everyone,
I was hoping to make a quick adjustment to the display reputation oxp to add a parcel reputation status string along with the cargo and passenger reputations (I'm running 1.77).

I hoped not to dive deeply into OXP-foo. What I did:

copied/renamed display-reputation-passenger.js to display-reputation-parcel.js
global search replaced "passenger" to "parcel" in display-reputation-parcel.js
(verified that the name of the property is player.parcelReputation)
added display-reputation-parcel.js to world-scripts.plist
in missiontext.plist copied the passenger key/strings and changed "passenger" to "parcel"

restarted oolist, did a hyperspace jump, and....I still only see the passenger and cargo statuses on the F5F5 screen.

In theory, should this change be sufficient to add the parcel reputation correctly?

(By the way, I did dig in, and I see 5 parcels fulfilled and 2 unknown....what does that end up as a reputation?)

Thanks,
CmdrLuke (Bogatyr)

Re: quick hack to display reputation oxp not working

Posted: Sun Feb 24, 2013 12:19 pm
by HAL
Hi Bogatyr, and welcome to the friendliest board this side of Riedquat!

I don't know much about the code you've used, but I do know that you have to flush the cache each time you load up oolite to see any changes. To do this, start oolite while holding down shift, and it should reload all of the OXPs.

Re: quick hack to display reputation oxp not working

Posted: Sun Feb 24, 2013 12:40 pm
by Eric Walch
All seems correct, so it will probably be the cache that needs renewing. The cache is rebuild automatic on adding a new oxp to the list. But an internal change is not noticed and you must do it manually than.

Reputation has 7 points, distributed over "good, bad, unknown". And unknown will take a random value when in a system. That is the reason the reputation sometimes varies between systems. Every 30 days a good or bad reputation is lowered 1 point and turns into unknown. So to keep it at 7 (=max), you must score at least one point every 30 days. :)
Or was it 90 days? The time does have a random factor in it.

Re: quick hack to display reputation oxp not working

Posted: Sun Feb 24, 2013 6:54 pm
by Bogatyr
Eric Walch wrote:
All seems correct, so it will probably be the cache that needs renewing. The cache is rebuild automatic on adding a new oxp to the list. But an internal change is not noticed and you must do it manually than.

Reputation has 7 points, distributed over "good, bad, unknown". And unknown will take a random value when in a system. That is the reason the reputation sometimes varies between systems. Every 30 days a good or bad reputation is lowered 1 point and turns into unknown. So to keep it at 7 (=max), you must score at least one point every 30 days. :)
Or was it 90 days? The time does have a random factor in it.
Thanks, I'll try the cache renewal.


p.s. Is that 30 days game time for reputation adjustment or RL time?

edit: that was it! I had renamed the oxp to .oxp.disable, and renaming back to .oxp shows the parcel status, thanks for the info. Woohoo now I'm an Oolite oxp author (well tweaker perhaps)!

Re: quick hack to display reputation oxp not working

Posted: Sun Feb 24, 2013 7:00 pm
by cim
Bogatyr wrote:
p.s. Is that 30 days game time for reputation adjustment or RL time?
Game time. It's calculated based on your witchspace jumps, so if you're doing lots of quick jumps it may be fewer than 30 days, and if you're doing mostly long 6+ LY jumps it will generally take quite a bit longer than 30 days. But once every 30 days is probably a reasonable average for typical routes.