changing Text via GUS.ini in a widget

hey there,

i am working on my first mod. yes it is another Server UI :smiley:
most of the work is done. it is stackable (key event via singleton/buff) and works fine on our server.

anyway, i want that the text in the UI is editable via GUS.ini
that is what ive done so far:

http://fs5.directupload.net/images/user/170513/temp/5mjvzgfu.png
(its a widget)

this will work “fine” (
syntax for a new row wont work, !is important!) in the editor, but not on my server.

would be nice if ypu could help me :slight_smile:

greetings

Don Camillo

Game mode only exists on the server while UI’s only exist on the client therefore trying to get the game mode from the UI itself will never work. Your best bet would be to get that info from the buff then pass it along to the Ui on creation

Okay, nice to know :slight_smile:
Button iam rly New to the ue4 /devkit, could you give me a little hint?

i cant find a way to “set text” to the textblocks in the widgets in the buffgraph

This is exactly what I’ve done for my widgets. Its works. I used a custom event that runs on the server that loads the information from the .ini and then passes this information into a client only custom event. If you have custom variables in your widget, you can Create Widget > Set Variable > Add To Viewport.

As for a new line, google it. It’s weird. You have to copy and paste the code into your graph. That’s what I do:


Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_159985"
   Begin Object Class=EdGraphPin Name="EdGraphPin_200542"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_200541"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_200540"
   End Object
   Begin Object Name="EdGraphPin_200542"
      PinName="ReturnValue"
      PinToolTip="Return Value
String

The literal string"
      Direction=EGPD_Output
      PinType=(PinCategory="string")
   End Object
   Begin Object Name="EdGraphPin_200541"
      PinName="Value"
      PinToolTip="Value
String

value to set the string to"
      PinType=(PinCategory="string")
      DefaultValue="
"
   End Object
   Begin Object Name="EdGraphPin_200540"
      PinName="self"
      PinFriendlyName="Target"
      PinToolTip="Target
Kismet System Library Reference"
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.KismetSystemLibrary')
      DefaultObject=Default__KismetSystemLibrary
      bHidden=True
   End Object
   bIsPureFunc=True
   FunctionReference=(MemberParentClass=Class'/Script/Engine.KismetSystemLibrary',MemberName="MakeLiteralString")
   Pins(0)=EdGraphPin'EdGraphPin_200540'
   Pins(1)=EdGraphPin'EdGraphPin_200541'
   Pins(2)=EdGraphPin'EdGraphPin_200542'
   NodePosX=512
   NodePosY=368
   NodeGuid=EEA0BFED4414853FDEB518B04A77618C
End Object


I have it saved to my desktop.

holy moly, this confuses me much more :smiley:

Sorry, I simply don’t have the time to open up my dev kit anymore and take pictures :frowning: Go to the buff that handles creating the widget. Create two custom events. Set one to server only, and one to client only. Make the client only one have an input variable (or more, depends what you’re loading). Call the server’s custom event. In this event, load the .ini information. After this, call the client only event and connect the .ini information to the input for this event. In the client only event, create the widget. Right after creating the widget, drag out the returned object and “set (your variable name here)”. Then add this to the viewport. In the widget, click on the text box that will use the loaded information. In its settings, bind the text to a function. In the function just set text to the variable. You can copy the code I pasted and just hit ctrl+v in the graph to have a new line. You just use the append feature to combine strings of multiple lines.

I’ve found this route to be extremely effective because I was able to make it possible for people to reopen the message of the day at any point (message of the day uses TutorialUI and you can play whatever that sound is on that client). I know it’s a lot of information and there are no pictures, so just take it step by step.

okay, got it. but there is 1 fatal thing…once opened the UI via key, i have buttons to open another widgets. from there i cant load the ini files.

and once loaded another widget and go back to the first, it wont work anymore

Unless you’re opening each widget from the buff, you’ll have to pass all of the information into the first widget that opens and keep passing it through onto the next one.

yeah. iam going to put everything into 1 widget an set the visibility to visible/collapse via onclick button. think that is the only possibility

You can use multiple widgets. But when Widget 1 opens Widget 2, you have to pass through all of the information. I have this on my server. F1 brings up a general page, and then there’s a button for the message of the day. Two widgets, all information loaded from the .ini in the initial widget and passed through to the second.

:smiley: could you give me an example, cant find smth how it would work

so, that is what ive done now…-.-

http://fs5.directupload.net/images/user/170514/temp/fuuy4jk9.png

http://fs5.directupload.net/images/user/170514/temp/yq7gtfu9.png

http://fs5.directupload.net/images/user/170514/temp/tckdve48.png

http://fs5.directupload.net/images/user/170514/temp/apa7gm6e.png

works “fine” in editor. some scollbars only scroll after some “tabbing” thru the ui. but i cant connect on my server …

trying now with widgetswitcher.

edit: looks like it works with widgetswitcher, cooking now.
edit: nope, server crash/cant connect.

i think the widget part is fine, but i have rly no clue how to handle the var things…

In Begin Play of your buff, you see how you’re grabbing all of the information? In the F1 where you have “set vars to widget” - this shouldn’t be a function. You have to individually set every string in the widget with the string that you populated in the buff.

So i have to take the nodes from The Last pic and put them between The “create widget” and “add to viewport” node?
Gonna try this. Iam actually at work.


[2017.05.15-16.15.33:089][253]LogNet: Join succeeded: DonCamilloPC-924...
[2017.05.15-16.15.33:095][253]LogWorldSerializedObject:Warning: WorldSerializedObject::FindObject: OuterMost can't be resolved: PrimalLocalProfile_6
[2017.05.15-16.15.33:101][253]LogVoiceEncode:Error: StopLocalVoiceProcessing: Ignoring stop request for non-owning user
[2017.05.15-16.15.33:102][253]LogOnline:Display: ABasePlayerController::OnQueryAchievementsComplete(bWasSuccessful = TRUE)
[2017.05.15-16.15.33:125][254]LogOnline:Warning: NULL: No game present to leave for session (Game)
[2017.05.15-16.15.33:125][254]LogOnline:Warning: NULL: No game present to join for session (Game)
[2017.05.15-16.15.33:157][255]LogRenderer:Warning: Reallocating scene render targets to support 128x128.
[2017.05.15-16.15.33:207][256]LogRenderer:Warning: Reallocating scene render targets to support 1056x904.
[2017.05.15-16.15.33:304][260]LogOnline: Starting session Game on client
[2017.05.15-16.15.33:304][260]LogOnline:Warning: NULL: Can't start an online game for session (Game) that hasn't been created
[2017.05.15-16.15.45:206][791]Cmd: cheat suicide
[2017.05.15-16.15.50:277] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:278] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:278] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:279] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:279] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:279] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:281] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:281] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:281] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:282] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:282] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:287] 83]LogShooter:Warning: USpawnMapWidget::DrawWidget: x:-2.812500 , y:-32.812500
[2017.05.15-16.15.50:287] 83]LogShooter:Warning: USpawnMapWidget::DrawWidget: x:216.828125 , y:224.538666
[2017.05.15-16.15.50:288] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:289] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:290] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:290] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:291] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:291] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:292] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:293] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:293] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:294] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:295] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:296] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:296] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:297] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:298] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:298] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:299] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:300] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:300] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:301] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:301] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:302] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:303] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:303] 83]LogSlateStyle:Warning: Unable to find Slate Widget Style 'CustomButtonWidgetExtended'. Using FButtonStyle defaults instead.
[2017.05.15-16.15.50:317] 83]LogSlate:Warning: GetFontFace failed to load or process '../../../Engine/Content/Open Sans Regular'
[2017.05.15-16.15.50:318] 83]LogSlate:Warning: GetFontFace failed to load or process '../../../Engine/Content/Open Sans Regular'
[2017.05.15-16.15.50:328] 83]LogSlate:Warning: GetFontFace failed to load or process '../../../Engine/Content/Open Sans Regular'
[2017.05.15-16.15.50:329] 83]LogSlate:Warning: GetFontFace failed to load or process '../../../Engine/Content/Open Sans Regular'
[2017.05.15-16.16.04:630][740]LogNetSerialization:Error: String is too large
[2017.05.15-16.16.04:630][740]LogNet:Error: ReceivedBunch: Error reading bunch 2: Buff_Base_WBUI_C /Game/Maps/UEDPIE_2_TestMapArea.TestMapArea:PersistentLevel.Buff_Base_WBUI_C_1
[2017.05.15-16.16.04:630][740]LogNet:Error: ReceivedBunch: Replicator.ReceivedBunch failed.  Closing connection.
[2017.05.15-16.16.04:630][740]LogNet: UNetConnection::Close: Name: IpConnection_0, Driver: GameNetDriver IpNetDriver_1, PC: PlayerControllerBlueprint_C_1, Owner: PlayerControllerBlueprint_C_1, Channels: 15, RemoteAddr: 127.0.0.1:7777, Time: 2017.05.15-16.16.04
[2017.05.15-16.16.04:630][740]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_0
[2017.05.15-16.16.04:631][740]LogNet:Warning: Network Failure: GameNetDriver[ConnectionLost]: Your connection to the host has been lost.
[2017.05.15-16.16.04:631][740]LogNet: NetworkFailure: ConnectionLost, Error: 'Your connection to the host has been lost.'
[2017.05.15-16.16.04:631][740]LogOnline:Warning: NULL: Can't destroy a null online session (Game)
[2017.05.15-16.16.04:631][740]LogNet: DestroyNamedNetDriver IpNetDriver_1 [GameNetDriver]
[2017.05.15-16.16.04:631][740]LogExit: GameNetDriver IpNetDriver_1 shut down
[2017.05.15-16.16.04:651][741]LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
[2017.05.15-16.16.04:651][741]LogNet: UChannel::CleanUp: [GameNetDriver] [PlayerControllerBlueprint_C_0] [PlayerControllerBlueprint_C_0]. ChIndex == 0. Closing connection.
[2017.05.15-16.16.04:652][741]LogNet: UNetConnection::Close: Name: IpConnection_1, Driver: GameNetDriver IpNetDriver_0, PC: PlayerControllerBlueprint_C_0, Owner: PlayerControllerBlueprint_C_0, Channels: 15, RemoteAddr: 127.0.0.1:51483, Time: 2017.05.15-16.16.04
[2017.05.15-16.16.04:652][741]LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: ControlChannel_1
[2017.05.15-16.16.04:653][741]LogOnline:Warning: NULL: No game present to leave for session (Game)
[2017.05.15-16.16.04:655][741]LogNet: Browse: /Game/Maps/MainMenu?closed
[2017.05.15-16.16.04:656][741]LogNet: Failed; returning to Entry
[2017.05.15-16.16.04:656][741]LogLoad: UEngine::LoadMap: /Game/Maps/MainMenu?closed
[2017.05.15-16.16.04:657][741]LogLoad: LoadMap: /Game/Maps/MainMenu?closed
[2017.05.15-16.16.04:657][741]LogNet: World NetDriver shutdown IpNetDriver_1 [GameNetDriver]
[2017.05.15-16.16.05:051][741]LogParticles: Destroying 0 GPU particle simulations for FXSystem 0x0000021A30461860

No. Inside of your widget, make sure you have the variable String ServerName. When you Create Widget, drag out the blue dot and search “set ServerName”. That’s how you do it. This would be a lot easier if the dev kit didn’t take 20 minutes to load.

okay, i still didnt gave up. but there is 1 big problem. i need to get very long strings from GUS.ini, and that is going to fail.
thats my actual buff graph:

http://fs5.directupload.net/images/user/170518/temp/zxcft8fc.png

http://fs5.directupload.net/images/user/170518/temp/hbvh9h5z.png

http://fs5.directupload.net/images/user/170518/temp/qvt5pwdw.png

so in the first pic, the right sequence node: if i break the “then 5” sting, everything is fine and the UI pop up (tab1) with text from GUS.ini

http://fs5.directupload.net/images/user/170518/temp/3bjji225.png

if i connect it again and disconnect after “getting” part for tab3 its crashing the server

http://fs5.directupload.net/images/user/170518/temp/4ypwwqv8.png

solved the problem with settings vars for second tab:

http://fs5.directupload.net/images/user/170518/temp/w7qhvfza.png

Hopefully all is working well. You can setup a feature for multiple lines as well, if you want. I had a lot of information in my one widget as well, and even had a mod list which required a new line every mod. I used the Split feature and just type like this in the .ini:

Hello!::::Welcome to this server. Please read the rules by pressing the rules button.

It would split “::” and I would simply append a new line in place of that split, so it’d come out like this:

Hello!

Welcome to this server. Please read the rules by pressing the rules button.

i already use the code from your first post for a new line.
tab1 and tab2 working fine, but for the other tabs (string too long) i have no solution