Scripting for dummies Eng-Ru

Precompiled string. Message help table 331 chars. I don't thing that you can change text field size for it but you can try to find something in hud lua files
View attachment 18835
Yeah,thats cool i made a test string file already but idk how to call it in the lua file to be displayed on screen.:(Is your text scaled?I t looks a little smaller then 1.0?
 

Attachments

upload_2018-4-29_20-10-41.png

"MSG_INFOPANEL" - it's your ID for the string chunk
Simple call this ID instead of raw text
upload_2018-4-29_20-12-36.png

20180429201948_1.jpg
 
Last edited:
Thanks a lot.I used <> instead of "" now it'll be work.:)
Hm,not working.Just the filename i think is be shown Msg Infopanel without _
Do i have to upload the stringfile in any case to be recognized by the game?
 
Hm,not working.Just the filename i think is be shown Msg Infopanel without _
Do i have to upload the stringfile in any case to be recognized by the game?
You doing something wrong
gameplay_my_msg_test.lua
Code:
My_Message_Thread = INVALID_THREAD_HANDLE

function my_mod_message(msg)
mission_help_table(msg,LOCAL_PLAYER)
end

function my_msg_start()
  my_mod_message("MSG_INFOPANEL")
end

function gameplay_my_msg_test_init()
  My_Message_Thread = thread_new("my_thread_manager")
end

function my_thread_manager()
 while true do
my_msg_start()
delay(10)
end
end
msg_test_us.xml
XML:
<?xml version="1.0" encoding="utf-8"?>
<Strings Language="English" Game="SaintsRowIV">
 <String Name="MSG_INFOPANEL">[format][scale:0.5]STRINGTEXT[/format]</String>
</Strings>
Every 10 seconds it shows message
 

Attachments

You doing something wrong
gameplay_my_msg_test.lua
Code:
My_Message_Thread = INVALID_THREAD_HANDLE

function my_mod_message(msg)
mission_help_table(msg,LOCAL_PLAYER)
end

function my_msg_start()
  my_mod_message("MSG_INFOPANEL")
end

function gameplay_my_msg_test_init()
  My_Message_Thread = thread_new("my_thread_manager")
end

function my_thread_manager()
 while true do
my_msg_start()
delay(10)
end
end
msg_test_us.xml
XML:
<?xml version="1.0" encoding="utf-8"?>
<Strings Language="English" Game="SaintsRowIV">
 <String Name="MSG_INFOPANEL">[format][scale:0.5]STRINGTEXT[/format]</String>
</Strings>
Every 10 seconds it shows message
Ok.Thanks.Thats again very cool.But i'm confused about that.So the code you wrote is the string chunk and has to be coded the way you did in any case?As far as i understand is that the stringcall is splitted in two functions.The first to set the (msg) and the second to display the string?Is the prefix my_ a predefined one used by the game?
 
Last edited:
Ok.Thanks.Thats again very cool.But i'm confused about that.So the code you wrote is the string chunk and has to be coded the way you did in any case?As far as i understand is that the stringcall is splitted in to functions.The first to set the (msg) and the second to display the string?Is the prefix my_ a predefined one used by the game?
It's code from another mod, if you call mission_help_table function few times, it's easier to create new function with one argument (msg) and place inside mission_help_table function that use same variable as argument, you can delete it and use mission_help_table with your string ID
 
It's code from another mod, if you call mission_help_table function few times, it's easier to create new function with one argument (msg) and place inside mission_help_table function that use same variable as argument, you can delete it and use mission_help_table with your string ID
Ok.I,see.Thank you very much again.Now i'll play around with this a bit.Think its time to take some lua lessons.:)
 
Ok.I,see.Thank you very much again.Now i'll play around with this a bit.Think its time to take some lua lessons.:)
Hm,same with your code just !!Msg Infopanel will be displayed.
 
Back
Top