[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: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

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

Post by Carlo the Curious »

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.

[ external 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: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

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

Post by Locksley »

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 »

yeah, capullo!!!
A todos los genios nos llaman locos
hsung
Posts: 208
Joined: Sat, 3. Jul 04, 08:09
x3tc

Post by hsung »

Great script Carlos :!:

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

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

Post by jlehtone »

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: 4293
Joined: Wed, 21. Feb 07, 17:46
x4

Post by draffutt »

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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

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: 22422
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

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: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

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: 716
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf »

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: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Did you install Chem's library?
MutantDwarf
Posts: 716
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf »

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: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

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: 716
Joined: Tue, 20. Jun 06, 02:29
x4

Post by MutantDwarf »

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: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

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.
Bubbinska
Posts: 189
Joined: Mon, 8. Dec 08, 05:25
x3tc

Post by Bubbinska »

I'm also using Gazz's Numeric Race Ranks mod, and was having this problem. A solution that lets me use both scripts would be very much appreciated.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

I managed to modify it to strip out the coloured text, so it should now work with Gazz's mod.

Side note: Gazz's numbers for race ranks aren't quite the same as the SE internal ones (that this script uses), which is why you might notice a discrepancy.
ephemeron
Posts: 446
Joined: Thu, 17. Jan 08, 05:18
x4

Post by ephemeron »

I'm having trouble connecting to that server -- any chance of a new download site?

EDIT: Never mind -- going directly to http://members.lycos.co.uk/moscacr/X3TC ... s_0_03.zip instead of trying to browse the /X3TC/ directory worked.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Hmm - they may have changed something. Before, going directly to the file would fail but the directory was fine.

I'm not sure (and I can't see from my current location), but I think I uploaded it to my other site as well - http://moscacr.ucoz.com
User avatar
arcana75
Posts: 2165
Joined: Tue, 2. Dec 03, 09:28
x3tc

Post by arcana75 »

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".

The OP also states that there are two globals but I initially thot they were global variables?

- plugin.display.ranks.TextID
- plugin.display.ranks.HotKey

The zip contains only:
- setup.plugin.display.ranks
- plugin.display.ranks.main
- lib.crm.format.rank

Are the two plugin.display.ranks.* files or variables? If they are files then they are missing from the zip. 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.

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