quick hack to display reputation oxp not working

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 269
Joined: Sun Feb 24, 2013 11:52 am

quick hack to display reputation oxp not working

Post 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)
User avatar
HAL
Competent
Competent
Posts: 49
Joined: Wed Aug 29, 2012 2:05 pm

Re: quick hack to display reputation oxp not working

Post 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.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: quick hack to display reputation oxp not working

Post 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.
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 269
Joined: Sun Feb 24, 2013 11:52 am

Re: quick hack to display reputation oxp not working

Post 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)!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: quick hack to display reputation oxp not working

Post 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.
Post Reply