Request: Mod to show Hull and Shield Values in the HUD

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
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

builder680 wrote:What does Poll mean in this context?
Poll means check once (as in the term Polling - c/f voting) and will only show for 2 seconds max.

If in continuous reporting mode, it should continue to run until you change ship or toggle it off. You can then toggle it back on once you have switched. This is a necessary measure as the script needs to be running on an object.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

builder680 wrote:EDIT: It shows up now... maybe it just needed to be reloaded? I didn't change the file name. Well... I did but I changed it back before I reloaded my game.
Shows up first time for me, must be a glitch in your setup - never had the issue myself. Used the exact same code pattern for pretty much all my scripts.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Ok, a rundown.

When I hit Cycle Reports (Shift + F5), then the nature of the display from pushing Poll (Shift + F6) is changed, but Toggle Continuous (Shift + F7) is unaffected, as it doesn't seem to do anything now...

When I hit Poll (Shift + F6) it shows me the numbers... then they disappear.

When I hit Toggle Continuous (Shift + F7) it doesn't show anything. It seemed to stay persistent once, but now I can't get it to. I was in combat then, and am not now.

Hrmm...

Ok, how can I make sure this script isn't running? Is there an 'off' switch? Or is it running at all when I dont' see any info... Seems like I should be seeing info but don't see any, and I want to make sure the script isn't running if it's not showing me anything.

Would help me to be sure I'm starting "from the beginning" with any toggling as well. Need some kind of indication that a toggle has been made, whether it be "script is now active," "continuous reporting," or the nature of the reporting mode. As it stands the only way I know it's running is when I hit "Poll," and the nature of the data that comes up in that Poll.

I'll keep pushing buttons until I get it right... like I said it seemed to work fine the first time I hit it, but since then I can't get it to contnuously report...
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

If you are not sure if continuous reporting is working, then hit the cycle button again and/or select a target. When in Target mode nothing and nothing is selected then no data will be reported.

For the next release, when I get round to it (got lots on the go at the moment) I will look to change the "empty string" report to a "no target selected" message (that should give positive reporting in all circumstancec in both push and pull reports). BTW the same script is used to generate and display the report in both modes, so the behaviour should be identical given the same conditions.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Man, I hate to keep asking questions of you but I'm not sure what to do.

I can't get it to show Continuous Display. The only time it shows anything is when I hit Poll. Then, it shows data based on how many times I've hit Cycle Report Mode. Then of course it disappears after a couple of seconds.

No amount of hitting Continuous Display has made it stay on screen, in fact I can't see if it's having any effect at all. No matter what I have targeted.

I'd really like to use this, is there any chance you can point me to what I'm doing wrong? What exact key sequence should I be pressing upon game load?
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

It should just work, I aint got a scoobie what you are doing wrong.

As a thought, what other scripts are you running?
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Roger L.S. Griffiths wrote:It should just work, I aint got a scoobie what you are doing wrong.

As a thought, what other scripts are you running?
Long list incoming...
_________________________________________________________

Major mods:

CMOD4.8
CMOD4_APPC
CMOD4FACSCRIPTS

ImprovedRaces_R15_22
Improved Races addons (except I'm not using its TMissiles, I think CMOD affects that)
AP.Libraries_r2.2

SRM1.05
SRM Jobs v3.6b
Enhanced Equipment Spawner v1b
hull_high
SRM_Shipyards_Pack
SRM_Weapons_Dealers

_________________________________________________________

Other mods:

ai_ammo_cheat
ATCS
Befehlsbibliothek_X3TC_V3509 (Libraries)
BounceV1.61
CommunityPluginConfiguration-V1.41-17.01.2010
ExplorerCommandExtension-V1.2.2-11.07.2009
ExplorerCommandExtension-DeploySatelliteNetwork-V1.1.2-28.07.2009
ff.global
Grax.remove.rocks *
numeric_ranks_tc
Reinigung_Voelkerdocks_X3TC_V3101 (Purgation in Commonwealth and Terran Docks)
SalvageInsuranceContract-V1.00-28.11.2009
Stupendously Precise Entity Relocation Gizmo-V1.0-4.10.2010
TCM_Tubeless_Complex_Mod
UniversalBestBuysSells_251_FR
Wirtschaftshaendler_X3TC_V3305 (Economy and Supply Trader)
X3TC Draw Distance mods (+100km draw distance)
X3TC-argon_emperor-500km_comm_range

_________________________________________________________

* I have deleted the script for Grax.remove.rocks. It seems it runs forever... I blew up an asteroid a week or so after running it... and it deleted the little rocks with no input, other than of course the time I initially ran it a week or so prior. I have no idea how to check if my saves are still looking for it, sadly.

Not sure if that list helps much, it's pretty much a mishmash. But that's what I'm running right at the moment.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

Well I do not think that any of those are likely to cause any issues, but it may be worth checking your controller configuration and verify the controls are what you are expecting them to be. It is not unknown for X to pull some funnies with controller configurations so it may be worth trying to reload your controller configuration in-case there has been some internal engine disconnect between what appears to be loaded and what is actually configured at the engine level.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

No dice.

Is there an uninstall script available? Or do I just delete all files?

I want to try a reinstall from scratch for this and see if it works.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

There is no uninstall and the rule of thumb for deleting scripts from an existing game is don't. If you wish to do this then you need to either start a fresh game or go back to an earlier save without the script.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Alrighty. I'll keep fiddling with it I suppose.

Thanks for all your help, and for making this. I'm sure I'll get it working right eventually.
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

@ Roger:

I still haven't been able to get this to show a persistent display... but I just hit Poll a lot when I need the info.

But going back to an earlier point about display aesthetics... I'm not sure if and when you'll get a chance to revisit this...

But if you do, you might check out the Turbo Booster Mk II script (maybe Mk I as well). It has colored text (red, white, and green) in the subtitles, which may assist in allowing a somewhat better looking display. Even if you don't get a chance to apply it here for whatever reason, it may be useful to see how it was done in that script for any future work you may do.

:)
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

To get colored text in a subtitle you can read a text template in from a text file.

for example, have this template.

Your ship \033G%s\033X [\033C%s\033X / \033Y%s\033X]

Then read it into the script, fill it in and display.

$message = sprintf: pageid=9876 textid=321, $ship, $hull.current, $hull.max, null, null

display subtitle text: text=$message duration=5000 ms

will display

Your ship My badass ship [25000 / 30000]



MarCon
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

mark_a_condren wrote:To get colored text in a subtitle you can read a text template in from a text file.

for example, have this template.

Your ship \033G%s\033X [\033C%s\033X / \033Y%s\033X]

Then read it into the script, fill it in and display.

$message = sprintf: pageid=9876 textid=321, $ship, $hull.current, $hull.max, null, null

display subtitle text: text=$message duration=5000 ms

will display

Your ship My badass ship [25000 / 30000]

MarCon
Tried it, it does not work and I will be damned if I know exactly why. I suspect it is something to do with passing the formatted string via the stack at various points.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Well, I know however the Turbo Booster Mk II script does it works, because I can see it in game. I just bought one for my 30 m/s Valhalla, it makes giant engine noise for 18m credits, and I go 45 m/s for a little while! Wheee....
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

builder680 wrote:Well, I know however the Turbo Booster Mk II script does it works, because I can see it in game. I just bought one for my 30 m/s Valhalla, it makes giant engine noise for 18m credits, and I go 45 m/s for a little while! Wheee....
I know it *can* work, but it does not work in this instance.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

Roger L.S. Griffiths wrote:
builder680 wrote:Well, I know however the Turbo Booster Mk II script does it works, because I can see it in game. I just bought one for my 30 m/s Valhalla, it makes giant engine noise for 18m credits, and I go 45 m/s for a little while! Wheee....
I know it *can* work, but it does not work in this instance.
Ahhh. gotcha. Well, phooey.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

I have created an official ATCS thread to handle the release and support of my script. I do intend to try to address the concerns already raised here and this is slowly worming it's way to the upper end of my todo list.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 »

You're the best dude, any further questions/comments I'll put in that thread. :)

If a moderator sees this, maybe they can lock this thread... unless you object. Personally, I think it seems redundant now.
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

builder680 wrote:You're the best dude, any further questions/comments I'll put in that thread. :)

If a moderator sees this, maybe they can lock this thread... unless you object. Personally, I think it seems redundant now.
Makes sense, not bothered really... let's just let this thread sink and let the moderators do what they want :)
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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