Author Topic: In-Mission Techroom Script v0.4 (Updated 19/06/2013)  (Read 14366 times)

0 Members and 1 Guest are viewing this topic.

Offline FelixJim

  • 28
  • User 11092
In-Mission Techroom Script v0.4 (Updated 19/06/2013)
    Updated 19/06/2013

    Sometimes, you're playing a new mod, flying a new ship, using new weapons, facing new adversaries, and you're not sure how they all fit together. Is that a weak, cannon-fodder fighter you're flying, or a top of the range killing machine? Are those 4-volley dogfighting missiles, or heavy-duty bombs? Is that capship you're trying to take down deadly to fighters or other capships?

    Do you memorise the entire techroom before the mission? NO! Do you alt-tab out to the wiki to read up on all this new equipment every ten minutes? NO! Do you blunder about with trial and error? Unfortunately, yes. UNTIL NOW!

    With this script, you can simply tap Alt-1 at any time during the mission to read up about the ship you're flying:




Alt-2 gives info on your weapons:





And Alt-3 gives info on your target:








The game is paused whilst you're in one of these screens until you press the same key combination again, upon which the game is unpaused and you can continue playing.


Installation:

Download the attached file (bottom of this post (this has been deleted by a ninja at the moment, so go for the second option)) or extract imt-sct.tbm from data\tables in the modder pack. You can put it in any existing mod, including the mediavps, or an entirely new mod and edit the mod.ini of the mod you wish to use it with to load the mod you've just created.
Optional: Open up the file using a text editor such as Notepad++, and edit the values in the settings section near the beginning to your liking (includes options to change keybindings if they're clashing with something else).

Modder pack: This script can be tightly controlled via FRED and various auxiliary files; the modder pack contains the (same) script, documentation and example mission and auxiliary text files. Download it here: http://www.mediafire.com/?c5emoq9knnnu0p9
You do not need FRED to use the script! It will work just as-is if you dump it in \data\tables; this is just if modders want to use it for a specific purpose. The modder features are too numerous for me to test all the possibilities thoroughly - I've done what I can, but keep this in mind, especially if you're using the features in odd ways.

I'd be especially grateful for any suggestions for improving this script further.

Known Issues:
  • Text will overspill text boxes if the font size is too big, screen resolution too low and/or there is simply too much text. Should be fixed once Mantis issue 0002891 has been resolved.
  • For the ship specifications and target specifications sections, the Max Speed entry will scale with current ETS. Should be fixable once Mantis issue 0002889 has been resolved.
  • The secondary bank capacity will return the maximum number of the current secondary type loaded.
  • Turrets and subsystems are not always clearly named.
  • Background images will not work from inside VPs.
  • The SEXPs unlock-primary-weapon, unlock-secondary-weapon, unlock-afterburner and allow-warp are run whenever the "techroom" is left; this may interfere with mission logic.

Coming in version 0.5:
  • Fix for Known Issue 1. m!m has a patch in the works for this: http://scp.indiegames.us/mantis/view.php?id=2891, it's just waiting to be reviewed and things (good old m!m).
  • Fix for Known Issue 2. What I needed to do this appeared in 9986 (good old Niffiwan).
  • The way the script handles centring of strings will be much improved thanks to something I spotted in one of WMCoolmon's scripts (good old WMCoolmon).
  • Most excitingly: I've finally worked out how to access files inside VPs. The .txt files I've been trying to work with are no good, but .cfg files are great! This means the text files for settings and custom descriptions will be renamed from blah.txt to blah.cfg, and moved from data\scripts to data\config, and the auxiliary script will be completely chucked out as redundant and henceforth unsupported, which will unfortunately require anyone using these to do a little cleaning. This is thanks to a conversation with Axem which prompted me to re-look over the way the mediaVPs team did things (good old Axem, good old mediaVPs team).
  • Fix for Known Issue 5 - background images will load from inside VPs properly in version 0.5.
  • Hopefully a fix for Known Issue 6 - I haven't looked into how yet, but I am at least aware of the issue.
« Last Edit: February 04, 2014, 03:08:26 am by FelixJim »
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 
Re: In-Mission Techroom Script
this is incredibly cool!
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script
Thanks! Have you got it working or are you just going by the screenies?
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 
Re: In-Mission Techroom Script
W00t, this thing looks awesome. I'll see if I can get it to work this w-e.
*grabs code*

 

Offline niffiwan

  • 211
  • Eluder Class
Re: In-Mission Techroom Script
very cool  :yes: We should figure out how to give LUA a pause hook (or whatever it's called, I'm noobish with the whole C++/LUA integration thing)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script
very cool  :yes: We should figure out how to give LUA a pause hook (or whatever it's called, I'm noobish with the whole C++/LUA integration thing)
I was thinking about asking how hard one of these would be to add, but by then I'd got the rotating model working and I doubt I'd be able to do that if the game was entirely paused. It's not exactly necessary, but it does look good.

EDIT: Added installation instructions to first post.
« Last Edit: February 08, 2013, 07:04:39 am by FelixJim »
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 
Re: In-Mission Techroom Script
Looks great. Why did I never get the idea to do this?  :yes:

Quote
On pressing Alt-2, the game is "paused" (well, no, time compression is set to 1%, this was the best I could manage)
Code: [Select]
mn.runSEXP("set-time-compression !0.001!")does also work and give you something closer to a paused game. I don't think this would affect your rotation.
« Last Edit: February 08, 2013, 10:42:09 am by Admiral MS »
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script
Code: [Select]
mn.runSEXP("set-time-compression !0.001!")does also work and give you something closer to a paused game. I don't think this would affect your rotation.

I always assumed using sexps = must use integers , so thanks for pointing this out to me. And no, the model rotates on a frame by frame basis, so it's immune to time compression effects. Updated script in first post with reduced time compression.
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script (Updated 21/04/2013)
Bump for new version of the script with new features. First post edited accordingly.
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline Apollo

  • 28
  • Free Market Fascist
Re: In-Mission Techroom Script (Updated 21/04/2013)
What build does this require? I crashed on pressing ALT-1 and I'm not sure if it's a scripting error or an incompatibility.

EDIT: I tried to reproduce it with a debug build, but it crashes when I commit.



[attachment deleted by ninja]
« Last Edit: April 21, 2013, 01:47:15 pm by Apollo »
Current Project - Eos: The Coward's Blade. Coming Soon (hopefully.)

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script (Updated 21/04/2013)
I've just tested with 3.6.18, 3.6.7 RC1 and r9638 and it worked fine for me, so unless you're using an older build I don't think it's a build issue. Can you tell me any more? What mod and build you were using, what ship you were flying, what did the error say, things like that. Mod developers might have set their ships up in some way I wasn't expecting, so that could be causing a problem.

EDIT: Are you using an older version (I called the old version viewship-sct.tbm, which you appear to be using) or did you just rename the newer version (imt-sct.tbm)?
« Last Edit: April 21, 2013, 01:52:11 pm by FelixJim »
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline Apollo

  • 28
  • Free Market Fascist
Re: In-Mission Techroom Script (Updated 21/04/2013)
I did it with the mod I'm developing, so there's some possibility it's a problem on my end.

Give me a minute and I'll test it with 3.6.12 mediavps.
Current Project - Eos: The Coward's Blade. Coming Soon (hopefully.)

 

Offline Apollo

  • 28
  • Free Market Fascist
Re: In-Mission Techroom Script (Updated 21/04/2013)
I'm using the newer version but it has an old filename because I replaced everything in the old file with the new stuff.

That may be causing problems. I'll rename it and try again.

EDIT: That fixed it.
« Last Edit: April 21, 2013, 02:01:51 pm by Apollo »
Current Project - Eos: The Coward's Blade. Coming Soon (hopefully.)

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script (Updated 21/04/2013)
Hooray!
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline Hoot

  • 24
    • Jugger. First *real* post-apocalyptic sport.
Re: In-Mission Techroom Script (Updated 21/04/2013)
Finally! REAL Information!
First encounter: ELITE. Later: X-Wing. The eclipse: FS2O. Ah, and a fan of post-apocalyptic Jugger in real life.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: In-Mission Techroom Script (Updated 21/04/2013)
So, I like this script! Here's a couple thoughts after using it a bit.

You should lock the player's weapon keys when in a tech room screen and unlock them afterwards. You can run SEXPs in the script to do that.

You might consider adding a title line to each tech screen saying 'Player Ship Info', 'Player Weapon Info', and 'Target Info'... or something like that. Just to be clear about exactly what each screen is. You might also consider adding a line that says what keypress is needed to exit the current tech screen. 'EXIT: Alt-1' or something.

Nice work on this.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: In-Mission Techroom Script (Updated 21/04/2013)
Can this be turned on and off on a per mission basis? I'd love to make this one way to differentiate the capabilities of specific ships, or give the player an extra ability for a specific type of mission (I have some very specific TI missions in mind that this would slot very nicely into).
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: In-Mission Techroom Script (Updated 21/04/2013)
Can this be turned on and off on a per mission basis? I'd love to make this one way to differentiate the capabilities of specific ships, or give the player an extra ability for a specific type of mission (I have some very specific TI missions in mind that this would slot very nicely into).

HEY! Don't steal my ideas!  :p
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline FelixJim

  • 28
  • User 11092
Re: In-Mission Techroom Script (Updated 21/04/2013)
Finally! REAL Information!

I'm glad to have helped satisfy your thirst for knowledge!

So, I like this script! Here's a couple thoughts after using it a bit.

You should lock the player's weapon keys when in a tech room screen and unlock them afterwards. You can run SEXPs in the script to do that.

You might consider adding a title line to each tech screen saying 'Player Ship Info', 'Player Weapon Info', and 'Target Info'... or something like that. Just to be clear about exactly what each screen is. You might also consider adding a line that says what keypress is needed to exit the current tech screen. 'EXIT: Alt-1' or something.

Nice work on this.

You're right - I ought to be locking the player up as much as I can - definitely look into incorporating that.

There are already small titles to each screen in the top left - I did want to have bigger and better ones, but couldn't come up with a way to do that within the confines of scripting (N.B - if you want to screw with your players, try changing the font size directly via scripting). I'd have to include a new font or some graphics I think, which is moving more towards a mod than a simple script. I can't make up my mind if that's a good, bad, or neither thing though. "Please press [whatever] to exit" should be straightforward to add though.

Can this be turned on and off on a per mission basis? I'd love to make this one way to differentiate the capabilities of specific ships, or give the player an extra ability for a specific type of mission (I have some very specific TI missions in mind that this would slot very nicely into).

Yeah - easily done! Slightly better than a per-mission basis, I'll stick in a feature where you can turn parts on and off by sexp and then you're free to switch it off and on at will. To be honest, this is a very simple script, and if you want bits tweaked for a specific use I'm happy to do that within reason, or you can turn whatever other scripters you have to hand loose on it. I'll certainly add in an on/off feature at FREDer discretion though.

And thank you all for feedback! All these promises given, bear in mind I am in exam season at the moment, so I'm unlikely to get around to all this as quickly as I'd like. RL is a curse upon us all.
In-Mission Techroom Script v0.4 - See information from the techroom in game
Simple Animation Script v0.2 - Make your own on-screen animations for FSO
Visible Waypoints Script - Makes waypoints visible in-game
Run From File Script - Get around the pesky 31 character limit for script-eval

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: In-Mission Techroom Script (Updated 21/04/2013)
There are already small titles to each screen in the top left - I did want to have bigger and better ones, but couldn't come up with a way to do that within the confines of scripting (N.B - if you want to screw with your players, try changing the font size directly via scripting). I'd have to include a new font or some graphics I think, which is moving more towards a mod than a simple script. I can't make up my mind if that's a good, bad, or neither thing though. "Please press [whatever] to exit" should be straightforward to add though.

I'll settle for the titles being centered at the top. :) That would make them more noticeable at far less of a cost.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.