Jump to content
IL-2 Series Forum

New scripting functionality


Recommended Posts

AEthelraedUnraed
Posted

As the Devs recently said, IL2 now supports advanced programmable triggers that can be used to define custom behaviour in missions. There are two packed scripts available: luascripts\worldobjects\customtriggers\test.txt and luascripts\worldobjects\customtriggers\playvoice.txt.

Since there is no working unGTP-IL2.exe yet, there is no way however to read the contents of these files and use the added functionality. Is there any chance @LukeFF that you could provide these files so that we can have a look at them? It would certainly enable some very cool missions 🙂

  • Like 1
  • Upvote 2
Posted (edited)

@AEthelraedUnraed / @Juri_JS

The Playvoice scripted trigger allows you to play a voice message which will be be generated in game. Text you type into the Text ; Value field will be played in game with the localized voice you specify in the numerical Voice field. When you activate the Scripted trigger, it will play the message. Then you should deactivate it with OnAction00: Completed, targeting a Trigger:Deactivate object linked back to the scripted trigger. If you do not deactivate it, it will keep running and cause other commands to be ignored, similar to leaving the media player running and not ending it. 

If this is not clear enough, send me a PM

 

Edited by Jaegermeister
  • Like 3

Ryzen 7 7800X3D l 32GB DDR5-6000 l RX 7900 XTX 24GB l HP Reverb G2

Posted
4 hours ago, Jaegermeister said:

@AEthelraedUnraed / @Juri_JS

The Playvoice scripted trigger allows you to play a voice message which will be be generated in game. Text you type into the Text ; Value field will be played in game with the localized voice you specify in the numerical Voice field. When you activate the Scripted trigger, it will play the message. Then you should deactivate it with OnAction00: Completed, targeting a Trigger:Deactivate object linked back to the scripted trigger. If you do not deactivate it, it will keep running and cause other commands to be ignored, similar to leaving the media player running and not ending it. 

If this is not clear enough, send me a PM

 

Thank you I will test it. Would be nice to have Korean voice messages for my Guards Taejon campaign, but I wonder how well it will work for none European languages.

AEthelraedUnraed
Posted
7 hours ago, Jaegermeister said:

@AEthelraedUnraed / @Juri_JS

The Playvoice scripted trigger allows you to play a voice message which will be be generated in game. Text you type into the Text ; Value field will be played in game with the localized voice you specify in the numerical Voice field. When you activate the Scripted trigger, it will play the message. Then you should deactivate it with OnAction00: Completed, targeting a Trigger:Deactivate object linked back to the scripted trigger. If you do not deactivate it, it will keep running and cause other commands to be ignored, similar to leaving the media player running and not ending it. 

If this is not clear enough, send me a PM

 

Yes, I've tried it and it works. 🙂 Though the Deactivate command may be the reason I couldn't get the "test" script to work.

What I rather meant, is have a look at the contents of those files so that we can write our own.

Posted
10 hours ago, Juri_JS said:

Thank you I will test it. Would be nice to have Korean voice messages for my Guards Taejon campaign, but I wonder how well it will work for none European languages.

I think the English, Russian, Korean and Chinese voices are currently active.

Ryzen 7 7800X3D l 32GB DDR5-6000 l RX 7900 XTX 24GB l HP Reverb G2

Posted
8 minutes ago, Jaegermeister said:

I think the English, Russian, Korean and Chinese voices are currently active.

I guess the bigger problem will be, that I first have to translate the English messages into Korean. No idea how well English to Korean works in Google Translate. I am sure some of the results will be extremely funny for our Korean community members.

  • Like 1
Posted (edited)
53 minutes ago, Juri_JS said:

I guess the bigger problem will be, that I first have to translate the English messages into Korean. No idea how well English to Korean works in Google Translate. I am sure some of the results will be extremely funny for our Korean community members.

It should be localized automatically. English voices are numbers 31 through 38. Try selecting a voice number lower than 31, type your text in the language you IL2 program is localized for, and see what you get in game.

 

Edited by Jaegermeister

Ryzen 7 7800X3D l 32GB DDR5-6000 l RX 7900 XTX 24GB l HP Reverb G2

Posted
2 hours ago, Jaegermeister said:

It should be localized automatically. English voices are numbers 31 through 38. Try selecting a voice number lower than 31, type your text in the language you IL2 program is localized for, and see what you get in game.

 

I've tested it, but only the English voices worked for me. Maybe other languages aren't ready yet?

Posted

Hey guys! How are you activating the TTS? I placed it on the map but I can't link a timer to fire it.

 

Thanks in advance!

Edit: Duh! I read with activate / deactivate!

Edit2: image.png.a0bf6682a20d3e95fe25aea5791c09b9.png

Am I missing something? 

Kinde regards guys!

Okay it works now after linking it to the plane as object 🙂

 

Rig: RTX 5090 ASUS TUF / Ryzen 9850 X3D /Gigabyte X870E Pro X3D Motherboard / 48 GB DDR5 Teamgroup 8000 MT/s / MSI 321 URX QD-OLED 32" 4K

Posted (edited)
3 hours ago, Juri_JS said:

I've tested it, but only the English voices worked for me. Maybe other languages aren't ready yet?

1-8 = Russian

11-18 = Chinese

21-28 = Korean

31-38 = US English

Russian, Korean and US English are currently working, you have to input the text into the scripted trigger in Cyrillic and Korean for them to play in game. Simplified Chinese text displays but no voice, Korean text does not display but voice works as of now. PM sent

 

2 hours ago, LuftManu said:

Okay it works now after linking it to the plane as object 🙂

You should not have to link the scripted trigger to a plane.

I am not sure how long your timer is in the image above, but it might not play if it is not at least 3 seconds, It takes the game a couple of seconds to start, pause and then go to a stable state. If you play the message before that, it will get stopped before you hear it.

Timer or other trigger -> Activate -> Scripted Trigger -> Deactivate on OO action 

Edited by Jaegermeister
  • Like 1
  • Thanks 2

Ryzen 7 7800X3D l 32GB DDR5-6000 l RX 7900 XTX 24GB l HP Reverb G2

Posted (edited)
14 hours ago, AEthelraedUnraed said:

Yes, I've tried it and it works. 🙂 Though the Deactivate command may be the reason I couldn't get the "test" script to work.

What I rather meant, is have a look at the contents of those files so that we can write our own.

Right now I think it is only being used for the voices, but I will let you know if I hear anything different. I'm sure there will be more functionality added later by editing or writing .json files and saving them in a folder similar to the texture files we have saved with scripted campaigns.

 

Edited by Jaegermeister

Ryzen 7 7800X3D l 32GB DDR5-6000 l RX 7900 XTX 24GB l HP Reverb G2

AEthelraedUnraed
Posted
1 hour ago, Jaegermeister said:

1-8 = Russian

11-18 = Chinese

21-28 = Korean

31-38 = US English

Russian, Korean and US English are currently working, you have to input the text into the scripted trigger in Cyrillic and Korean for them to play in game. Simplified Chinese text displays but no voice, Korean text does not display but voice works as of now. PM sent

Thanks! I haven't been able to get the text to display visually however. How did you accomplish that?

28 minutes ago, Jaegermeister said:

Right now I think it is only being used for the voices, but I will let you know if I hear anything different. I'm sure there will be more functionality added later by editing or writing .json files and saving them in a folder similar to the texture files we have saved with scripted campaigns.

The test.txt one at least has some triggers in it, although I haven't been able to quite figure it out yet.

I don't think the scripts are in json (which is a data serialisation format rather than a scripting language). Who knows, perhaps we'll finally get some lua scripts in the luascripts directory. :classic_tongue: Anyhow, theoretically it should be possible to put one's own scripts there. If only we get some documentation or the contents of the two examples, so we know what to put in them.

Posted
1 hour ago, Jaegermeister said:

1-8 = Russian

11-18 = Chinese

21-28 = Korean

31-38 = US English

Russian, Korean and US English are currently working, you have to input the text into the scripted trigger in Cyrillic and Korean for them to play in game. Simplified Chinese text displays but no voice, Korean text does not display but voice works as of now. PM sent

 

You should not have to link the scripted trigger to a plane.

Timer or other trigger -> Activate -> Scripted Trigger -> Deactivate on OO action 

Thanks!! It's working now 🙂

Rig: RTX 5090 ASUS TUF / Ryzen 9850 X3D /Gigabyte X870E Pro X3D Motherboard / 48 GB DDR5 Teamgroup 8000 MT/s / MSI 321 URX QD-OLED 32" 4K

Posted

Is this TTS unique to each side (for multiplayer missions) or is it only for single player? (aka: does it trigger the voice for all sides on multiplayer?) It would be nice to be able to do TTS for callouts from ground forces to the players flying on the server.

  • Upvote 1
Posted

For Korean it's still hit and miss for me, if voices work or not. No idea why, but some Korean texts just won't work. Maybe an issue with certain Korean letters or text length?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...