Author Topic: Zoom script  (Read 16033 times)

0 Members and 1 Guest are viewing this topic.

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Errr...I don't seem to be able to disable the script for ships I don't want using it.
what exactly is the correct syntax if I say, only want 2 ships to have zoom (and only when their weapon bank with the sniper-weapon is selected)?
« Last Edit: September 18, 2010, 06:50:48 pm by Droid803 »
(´・ω・`)
=============================================================

 

Offline m!m

  • 211
Specify the two ships ass "Allowed Ship Class" (each ship gets it's own entry) and specify the "Restricted Ship Class" as "**all**". Then add the sniper weapon as "Allowed Weapon Class" and again use "**all**" as "Restricted Weapon Cass".
Due to a bug, I'm still trying to solve, the ship class restriction feature isn't working :(.
I'm trying hard to solve this and there should be some progress this week...

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
i usually cheat with this sort of thing and use a weapon name affix like "railgun#sniper" to tell the script to use the zoom mode while such a weapon is in use. you could also use a weapon named "railgun" with other ships, which would essentially be a copy of "railgun#sniper". that way script usage is dependent of loadout compatibility rules, instead of a config file. of course thats just the way i do things (i also kinda betted we would get weapon templates at some point, which i dont think we have yet).
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline m!m

  • 211
But that would again need the FREDer to take care of what ship the player is using and then set the weapon.
I'll implement that system if there is someone who would use it :nod:.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Hm, that would do, actually. It'd do nicely.
(´・ω・`)
=============================================================

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
So I got this script working (with the help of The E), its pretty neat!

Error in the wiki
Code: [Select]
#Conditional Hooks

$Application: FS2_Open
$On Game Init:[[zoom_init.lua]]
$On Key Pressed: [[zoom_KeyDn.lua]]
$On Key Released: [[zoom_KeyUp.lua]]

$Application: FS2_Open
$On Mission Start:
[
if not runZoomScript then
runZoomScript = true
end
The second $Application: FS2_Open apparantly needs to be deleted.

And there's this

if you quit the mission while you are zoomed in and then load an other mission the hud gauge will appear in the command and normal briefing.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline m!m

  • 211
Should be fixed in the wiki. Now the progress is only drawn when in State GS_STATE_GAME_PLAY.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito
My interviews: [ 1 ] - [ 2 ] - [ 3 ]

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Nice :)

So where's the updated version?  :p
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline torc

  • 210
  • Diaspora SFX engineer
currenly is there somewhere a video that shows the zoom script?
please could you post it?
EDIT: i've implemented the code in my laptop....simply amazing guys!!!! GREAT JOB PILOTS!!!!!!  :yes:
« Last Edit: January 06, 2011, 04:42:48 am by torc »
indossare una divisa può avere un prezzo alto...ma a volte...è troppo alto!!! Bill Adama

 

Offline m!m

  • 211
Nice :)

So where's the updated version?  :p
FreeSpace Wiki FTW!!   :p

currenly is there somewhere a video that shows the zoom script?
please could you post it?
EDIT: i've implemented the code in my laptop....simply amazing guys!!!! GREAT JOB PILOTS!!!!!!  :yes:
Thank you! :)

 

Offline torc

  • 210
  • Diaspora SFX engineer
ioy're welcome!  :) the script is simply perfect....just one thing... i found (for my tastes) the zoom out a little bit slow...i think it must be more faster for better performance in gaming... however just my opinion... what do you think about this? thanks
indossare una divisa può avere un prezzo alto...ma a volte...è troppo alto!!! Bill Adama

 

Offline torc

  • 210
  • Diaspora SFX engineer
yeah...you're right...  :) mine was just a stupid question
indossare una divisa può avere un prezzo alto...ma a volte...è troppo alto!!! Bill Adama

 

Offline m!m

  • 211
You can specify the the zoom time using the configuration file. Just alter Transition Time: 2 to a time that is better for you.

 

Offline torc

  • 210
  • Diaspora SFX engineer
thank you man!
EDIT: Higher number means faster?
indossare una divisa può avere un prezzo alto...ma a volte...è troppo alto!!! Bill Adama

 

Offline m!m

  • 211
That's the time in seconds it takes to do a full zoom-in/-out. So small numbers mean faster zoom.

 

Offline torc

  • 210
  • Diaspora SFX engineer
do it....thanks again man... ;)
EDIT: after testing the real use in-game of the zoom...i think is more useful set zoom factor at 0.25 and Transition Time: 1... the zoom is faster and you can use it in short distance too... :)
« Last Edit: January 06, 2011, 10:36:33 am by torc »
indossare una divisa può avere un prezzo alto...ma a volte...è troppo alto!!! Bill Adama

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
zoom_config.cfg [19] : Unknown keyword: 'allowed weapon class'

getting this on debug

Also, whats the correct syntax to use when adding ships&weapons to the list of allowed class?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline m!m

  • 211
I can't reproduce that but the warning indicates that something is corrupt in your script. Could you try to paste the script from the wiki into the file and try again?
I also updated the wiki page with a new version that is now able to enable zooming based on the weapon end (just set the "Weapon End" option to the post-fix you want).

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
I'm reviving this topic because it is of great interest to me, and to discuss the creation of a general purpose adjustable FOV script, rather than a specialized weapon-dependant scope script.

The way things currently are, you can set up your field of view with a command line flag, but this is a static setting. This works well enough for situations where the cockpit is not drawn, but it seems that more and more community-built models are getting high quality interiors for the cockpits and head tracking equipment is increasing in numbers as well, it would be a shame not to make these features more approachable. Not to mention the full detail of high quality skyboxes...

The thing is, head tracking with cockpits increases the immersion factor about hundredfold. The problem is, without adjustable field of view, this is not as useful as it should be. For gaining true sense of being in the cockpit, field of view should usually be set to wider setting than is useful for using the weapons systems and observing targets outside the cockpit.

An excellent example of how to do this right is in IL-2 Sturmovik, which as three presets for the field of view (I think they're set to 30, 60 and 90 degrees), and the field of view can also be adjusted in notches between the presets.

This would take three buttons - let's say U, I and O.

U - wide FOV
I - middle FOV
O - narrow FOV
Shift+U - increase FOV
Shift+O - decrease FOV

(Of these buttons, only U is used by default - for Target Uninspected Cargo, which is most of the time fairly useless function).

Presets could well be 90,60 and 30 degrees, but it would be beneficial if it was possible to adjust the FOV in full range of let's say 120-20 degrees. Notched adjustment could be set to 5 or 10 degrees per notch.

This kind of setup in FS2_Open I think would be most sensible and beneficial for improving the gameplay with the new features of cockpits with head tracking.

Now, a specialized targeting scope for specific weapons could be useful as well, but I would seriously want to see a freely adjustable field of view script, independent of all bindings to ship and weapon classes.


What I'm asking is: How much work would be involved with modifying the current zoom script for this purpose?
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.