[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: Moderators for English X Forum, Scripting / Modding Moderators

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

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

Post by Carlo the Curious » Wed, 6. May 09, 06:47

Display Ranks
Version: 0.5 (beta)

Sends you a message showing the actual rank values for combat and trade, and your notoriety with the various races/factions.

Download
  • ZIP file is available from here - extract everything into the TC directory.
  • You also need ChemODun's strings library, available here.
  • Optional: Cycrow's Hotkey Manager, available here.
  • SPK from seePyou
.

Description
Sends a message with your internal rank value for each of the main races, along with the numeric title, and the title text & percentage.

Image

Pirates & co. don't have rank title texts, so they're not shown (obviously).


Usage
After installing the script you can define a hotkey to run it. 'Display Ranks' should be present in Options-Controls-Interface in the Extensions section.

If you want to run the script directly from the editor the main script is plugin.display.ranks.main.


Known issues
1. Formatting is a bit dodgy.
2. Percentages don't match pilot screen.


Version history
0.05 - 22/06/2009
- fixed/added faction values.
0.03 - 13/05/2009
- Modified to work with Gazz's numeric ranks mod.
0.02 - 08/05/2009
- Added support for hotkey manager.
- Fixed display of negative notoriety.
0.01 - 06/05/2009
- Initial release.


Other
Bugs, etc. - PM me or post in this thread.


Tech bits
Text files
- 8412, page 8412
Global variables
- plugin.display.ranks.TextID
- plugin.display.ranks.HotKey
Script files
- setup.plugin.display.ranks
- plugin.display.ranks.main
- lib.crm.format.rank
- lib.crm.decode.rep


Legal bits
Feel free to reuse any of it (although I can't imagine you'd want to!).
Last edited by Carlo the Curious on Wed, 10. Aug 11, 14:04, edited 8 times in total.

User avatar
Locksley
Posts: 366
Joined: Fri, 18. Mar 05, 17:26
x3tc

Re: [SCRIPT] Display Ranks : v 0.1 (beta) : 06May09

Post by Locksley » Wed, 6. May 09, 10:21

Thankyou! I always want to know where I stand :p

This made me come up with a few more mission ideas; characters will offer to tell you your rank in pirate and yaki for a small fee. Now I'll just have to find the time and inclination to learn the MD properly.

Cheers!
Projects:
Onhold..... time time....

User avatar
bertiroteo
Posts: 162
Joined: Thu, 10. Jul 08, 10:04

Post by bertiroteo » Wed, 6. May 09, 13:57

yeah, capullo!!!
A todos los genios nos llaman locos

hsung
Posts: 208
Joined: Sat, 3. Jul 04, 08:09
x3tc

Post by hsung » Thu, 7. May 09, 04:54

Great script Carlos :!:

Now I can tell what's my rank against the Yaki, the Dukes and pirates 8)

Cheers.

jlehtone
Posts: 17260
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Thu, 7. May 09, 08:01

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. ;)

draffutt
Posts: 4286
Joined: Wed, 21. Feb 07, 18:46
x4

Post by draffutt » Thu, 7. May 09, 20:59

cosemtic bug:

this script is counting the - as a number. for instance instead of displaying my yaki rank as -403 it displays it as -,403. as you can see since the - is in the forth position it assigns a , thinking there are 4 number(s). does the same for example -,100,403.
None of us is as smart as all of us. ~Ken Blanchard

TC player bug fixes
Reunion player bug fixes

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Thu, 7. May 09, 21:11

jlehtone wrote: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. ;)
In the Script Editor, could also have turned on "Script Debugging: Additional Information".

Then every Yaki/Pirate station or ship info shows their notoriety points.
But yeah - that's not nearly as pretty. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20600
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Fri, 8. May 09, 03:39

draffutt wrote:cosemtic bug:

this script is counting the - as a number. for instance instead of displaying my yaki rank as -403 it displays it as -,403. as you can see since the - is in the forth position it assigns a , thinking there are 4 number(s). does the same for example -,100,403.
this could easily be fixed, there is a script command available that already does this, so im not sure y a script was created to do it instead.

Code: Select all

$text = convert number <number> to string
will convert it properly for what ever language is being used

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

Post by Carlo the Curious » Fri, 8. May 09, 17:12

The numbers are formatted using Chem's library, since I was using that for alignment anyway (as [text cols=n] doesn't seem to work properly anymore).

Should be easy to fix though.

EDIT: Should work now.

MutantDwarf
Posts: 682
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Tue, 12. May 09, 07:11

I haven't the faintest idea why, but this plugin isn't working for me. I assigned the hotkey for it, but when I push it I get a completely blank message (both in the log and popping up).

Any ideas as to why it's blank? I'm running a rather heavily modded game, but I wouldn't think that would cause any trouble in a script like this.

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

Post by Carlo the Curious » Tue, 12. May 09, 07:16

Did you install Chem's library?

MutantDwarf
Posts: 682
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Tue, 12. May 09, 07:18

Yep - that shouldn't be the problem. I'm using other mods that require Chem's library with no problem.

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

Post by Carlo the Curious » Tue, 12. May 09, 07:26

Hrm, dunno then.

Most of the data just comes from script functions, but it does read a few entries on page 35 and page 900 for some things (like faction names). Do any of your scripts/mods modify the text files?

MutantDwarf
Posts: 682
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf » Tue, 12. May 09, 07:35

Quite a few of them - as far as I know they don't alter page 35 or 900. The only one that modifies 0001-L044.xml is the unofficial patch. I don't think it modifies Page ID 35 at all, and the only one that I know of that modifies Page ID 900 is the numeric race ranks mod (which does modify one line of Page ID 35, though).

EDIT: Just checked - turns out Gazz's Numeric Race Ranks mod is the culprit. Too bad - this script would be a great complement to his mod.

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

Post by Carlo the Curious » Tue, 12. May 09, 07:54

Interesting. Not sure why - I was under the impression it just replaced the rank text with numbers.

I'll take a look when I have a minute.

Post Reply

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