[SCRIPT] Display Ranks : v 0.5 (beta) : 22Jun09

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:I just downloaded this script and it seems to be missing two plugin files? I checked the setup script and it's calling "plugin.display.ranks.HotKey".
No, it isn't.

That's the name of the global variable it stores the hotkey in.
In-game, my Options doesn't list Display ranks as a hotkey option. I've been using hotkey scripts (FCC, MTM, ImpBoarding, etc) so I know the hotkey isn't there.
It should work without the hotkey manager. If you enable DEBUG in the setup script, what message do you get in the logbook?
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

I don't mean the hotkey manager, I meant the Options->Interface options. Anyway I reinstalled the script and the hotkey now shows up.

I ran it and strangely the corp ranks are messed up... Operation Final Fury shows "0-Disciplinary Lv1" rank (shouldn't that be -1?) while Terracorp is a "13-readtext900-122" error.

My pilot page also shows a bug in my corp ranks, showing a "0" where the Strong Arms rank should be, ie "0 - 60%" instead of say "Strong Arms Warrior - 60%". Any idea what's wrong?

Race, combat and trade ranks are all ok tho.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:I don't mean the hotkey manager, I meant the Options->Interface options. Anyway I reinstalled the script and the hotkey now shows up.
Yes, I know which you meant. The hotkey manager is an optional script that Display Ranks will use if it's present - see the OP.
I ran it and strangely the corp ranks are messed up... Operation Final Fury shows "0-Disciplinary Lv1" rank (shouldn't that be -1?) while Terracorp is a "13-readtext900-122" error.
What are your actual ranks on the pilot screen?
My pilot page also shows a bug in my corp ranks, showing a "0" where the Strong Arms rank should be, ie "0 - 60%" instead of say "Strong Arms Warrior - 60%". Any idea what's wrong?
The script doesn't affect the normal pilot screen in any way - so I'd guess it's from some other mod you've installed.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:I ran it and strangely the corp ranks are messed up... Operation Final Fury shows "0-Disciplinary Lv1" rank (shouldn't that be -1?) while Terracorp is a "13-readtext900-122" error.
What are your actual ranks on the pilot screen?
Values from my pilot screen are:
Terracorp - Hired Protection
FF - Captain
My pilot page also shows a bug in my corp ranks, showing a "0" where the Strong Arms rank should be, ie "0 - 60%" instead of say "Strong Arms Warrior - 60%". Any idea what's wrong?
The script doesn't affect the normal pilot screen in any way - so I'd guess it's from some other mod you've installed.
I thot it was from Gazz's numeric rank script, so I replaced it with the contents from 08.cat/dat and still showed 0. Then I uninstalled the entire numeric rank script, and it still showed 0 for Strong Arms instead of a rank title. I also installed the unofficial player fix which included 0001-L044.pck but both files have identical values for the mission rank page id. Any advice on this would be greatly appreciated!
User avatar
Ecthelion
Posts: 612
Joined: Mon, 15. Dec 03, 20:36
x4

Post by Ecthelion »

jlehtone wrote:
hsung wrote:Now I can tell what's my rank against the Yaki, the Dukes and pirates 8)
You could have done it all the time, just export player stats from game and then Deflate the PlayerStats.pck file so you can read its (XML-formatted) contents. Reputation numbers ought to be there. But that is "work" compared to the use of a nice script. ;)
Unfortunately, neither the pirate, yaki, nor corporate ranks are in that file. It seems that using a script like this is the only way to get those numbers.
Windows Windows 7 Release Candidate (64-bit)
Intel Core 2 Duo E8400
ATI HD 4850 1024MB
8GB RAM

-----------------------------------------------------
Pirate Identification Guide
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:
Carlo the Curious wrote:
arcana75 wrote:I ran it and strangely the corp ranks are messed up... Operation Final Fury shows "0-Disciplinary Lv1" rank (shouldn't that be -1?) while Terracorp is a "13-readtext900-122" error.
What are your actual ranks on the pilot screen?
Values from my pilot screen are:
Terracorp - Hired Protection
FF - Captain
Hmm, not sure what the hell's going on there.

Disciplinary Lvl1 should indeed be -1 (the script is added one less than it should in one part, so it should actually be 0 - Recruit), but how it's getting completely erroneous values I've no idea. A saved game might be handy, if you can host it somewhere.
I thot it was from Gazz's numeric rank script, so I replaced it with the contents from 08.cat/dat and still showed 0. Then I uninstalled the entire numeric rank script, and it still showed 0 for Strong Arms instead of a rank title. I also installed the unofficial player fix which included 0001-L044.pck but both files have identical values for the mission rank page id. Any advice on this would be greatly appreciated!
You'd need to ask Gazz, I think.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Thanks for the time Carlos. I tried replacing Gazz's values with the lines from 08.dat and it still showed the same "0" for Strong Arms. I've asked the same question in gazz's thread as well as draffutt's, so hopefully something works out.

I have a save and I can upload it, but it's modded and scripted, u still want it?
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:I have a save and I can upload it, but it's modded and scripted, u still want it?
Depends which mods you have installed.
hsung
Posts: 208
Joined: Sat, 3. Jul 04, 08:09
x3tc

Post by hsung »

Is it possible to remove or suppress the display of Corporate ranks? If yes, please let me know how to do this.

Thanks.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:I have a save and I can upload it, but it's modded and scripted, u still want it?
Depends which mods you have installed.
Hi CtC, thanks, my mods are (in install order):
-- draffutt's player fix
-- halo's low poly roids
-- killerog's engine trail
-- someone else's no big aldrin rock
-- tcm's tubeless complex

If u're ok, I'll set it up tonight for u to test, plus a full export of all the scripts/mods installed exported from the Plugin Mgr.

FWIW Gazz reported no issue on his side (numeric rank script) and draffutt is checking his mod for a possible cause.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

hsung wrote:Is it possible to remove or suppress the display of Corporate ranks? If yes, please let me know how to do this.
You should be able to just delete/comment these lines (near the bottom of plugin.display.ranks.main):

Code: Select all

157   $Faction.Number = 0
158   while $Faction.Number < $MAXFACTION
159   |$M.1 = $M.Factions[$Faction.Number]
160   |if $Faction.Number == 0
161   ||$Message = sprintf: fmt='%s%s%s', $Message, $M.1, $T.LF, null, null
162   |else
163   ||$Message = sprintf: fmt='%s%s', $Message, $M.1, null, null, null
164   |end
165   |inc $Faction.Number = 
166   end
Although I may remove it in the next version anyway, unless I can figure out a way to get the internal number.
arcana75 wrote:If u're ok, I'll set it up tonight for u to test, plus a full export of all the scripts/mods installed exported from the Plugin Mgr.
None of those should cause a compatibility problem with my game, I think, so it should be fine.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:If u're ok, I'll set it up tonight for u to test, plus a full export of all the scripts/mods installed exported from the Plugin Mgr.
None of those should cause a compatibility problem with my game, I think, so it should be fine.
Cool! I will be able to upload a save in about 2 hrs' time.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:Cool! I will be able to upload a save in about 2 hrs' time.
It shows as 0 for me as well using your save (even in an unmodified install).

While I was testing some other changes I did manage to break the display in a similar way by using 'set mission rank' in the SE - it seems if you set it for a faction you don't know yet then the name comes up as a number (or that's what appeared to be happening). Whether that's the same issue as you have or how that could happen normally, I've no idea...
hsung wrote:Is it possible to remove or suppress the display of Corporate ranks? If yes, please let me know how to do this.
I've actually figured out how to get the internal values now (in fact, I was before but misinterpreted them :oops:), so it should be more useful in the next version.
hsung
Posts: 208
Joined: Sat, 3. Jul 04, 08:09
x3tc

Post by hsung »

Thanks Carlo,

Commenting the lines you suggested have suppressed the display of Corporate ranks :)

Apart from showing incorrect Corporate ranks, the suppression of these ranks will not clutter the Message Log as much with a shorter list :)

Anyway, look forward to your next version.

Cheers.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:Cool! I will be able to upload a save in about 2 hrs' time.
It shows as 0 for me as well using your save (even in an unmodified install).

While I was testing some other changes I did manage to break the display in a similar way by using 'set mission rank' in the SE - it seems if you set it for a faction you don't know yet then the name comes up as a number (or that's what appeared to be happening). Whether that's the same issue as you have or how that could happen normally, I've no idea...
Thanks Carlos! Now we're getting somewhere!

I've never touched that command and AFAIK I have no script that uses 'set mission rank'. I've only done Split Strong Arms missions twice. I am beginning to see how it might have all gone wrong tho it's pure speculation.

In this thread I detailed my 1st SSA mission. The first mission I did for SSA was to kill this Split, which spawned in an M2. Killing that M2 immediately killed my Split rank to -3. Soon, I received a message from SSA to stop my actions and that my contract was canceled. I then began to restore my Split rank, which I managed to. Shortly after I received a new SSA message telling me I have a new mission. I completed the 2nd mission and docked, creating that autosave I sent u. Only then did I bother to check my player status and discovered the 0 for SSA.

Could that contract break cause this "setting of rank before knowing it" bug? If so it sounds to be like a vanilla bug rather than anything from a mod or script, just that it was the result of a series of unfortunate events that was probably unexpected from a mission director point of view?

The next thing is, how do I fix it? Can I artificially bump it to the next rank and hopefully it'll fix itself, or reset the mission status, or something else?

And lastly, does this "0" explain why ur display ranks script breaks for the corp ranks?
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:Could that contract break cause this "setting of rank before knowing it" bug? If so it sounds to be like a vanilla bug rather than anything from a mod or script, just that it was the result of a series of unfortunate events that was probably unexpected from a mission director point of view?
I've no idea how it works exactly. Frankly, I wouldn't think it's a vanilla problem, otherwise we'd have seen a few more reports by now.
And lastly, does this "0" explain why ur display ranks script breaks for the corp ranks?
No. The script is just wrong.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:Could that contract break cause this "setting of rank before knowing it" bug? If so it sounds to be like a vanilla bug rather than anything from a mod or script, just that it was the result of a series of unfortunate events that was probably unexpected from a mission director point of view?
I've no idea how it works exactly. Frankly, I wouldn't think it's a vanilla problem, otherwise we'd have seen a few more reports by now.
Well bug reports gotta start with one! :)

Considering that the display can be broken as u said by setting a rank for a corp in a way that was not expected by the game.

Also, I would suspect most players haven't ventured that far south to locate the SSA HQ considering the vast amount of other stuff u can do.

I would have posted it in the tech support forum but my usage of mods/scripts kinda eliminated that possibility.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

arcana75 wrote:Considering that the display can be broken as u said by setting a rank for a corp in a way that was not expected by the game.
Assuming I'm using the script command correctly, and it's actually implemented, and it's acually used in the vanilla game - none of which are necessarily true.
Also, I would suspect most players haven't ventured that far south to locate the SSA HQ considering the vast amount of other stuff u can do.
I don't think so - I've seen plenty of posts about people doing the Strong Arm missions.
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

Carlo the Curious wrote:
arcana75 wrote:\Also, I would suspect most players haven't ventured that far south to locate the SSA HQ considering the vast amount of other stuff u can do.
I don't think so - I've seen plenty of posts about people doing the Strong Arm missions.
Well, have any of them complained about having to kill an M2 at the start and having their Split rank drop to negative, and as a result having their Strong Arms contract terminated?

Anyway I went and played with the get mission rank and set mission rank commands. In an earlier save without the problematic SSA rank, I forcibly went and did set mission rank to 13 to L2Corp0 to L2Corp9. Interestingly, my corp rank display went something like this:

Code: Select all

1                    21%
1                    21%
1                    21%
Terracorp - Hired Protection     5%
1                    21%
1                    21%
1                    21%
1                    21%
Operation Final Fury - Captain 5%
1                    21%
I probably didn't get the order right, but it confirms that if rank is set b4 some flag or condition it'll be like above. So the question is, what flag is it and can I set it via the SE? I'm thinking along the lines that some variable is set when the 1st mission is attempted then completed, thereby setting up the 1st entry. But it's pure speculation.

I also noticed something, the corp ranks are numbered 0 to 15 unlike the race ranks which are numbered -5 to 10.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Updated to 0.05 - faction ranks should now be shown correctly.

Race and faction percentages may not match what's displayed on the pilot screen. Either my maths is wrong, or the game values are not actually the percentage progression to the next rank.

EDIT: The game values aren't a straight percentage, which is apparently WAD.
hsung wrote:Commenting the lines you suggested have suppressed the display of Corporate ranks :)
I added some flags (doRanks, doRaces, doFactions, set in doInit:) to make it easier to customise.
Last edited by Carlo the Curious on Fri, 26. Mar 10, 08:52, edited 1 time in total.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”