MantisBT - Zandronum
View Issue Details
0002836Zandronum[All Projects] Suggestionpublic2016-09-16 19:112023-08-06 04:12
Fused 
Kaminsky 
normalminorhave not tried
resolvedfixed 
3.0-beta 
3.1 
0002836: A way to transfer strings from server to client and reverse in ACS
So due to the nature of ACS, strings cannot be passed as arguments in scripts. The problem is that there will be no proper way to retreive any strings from the server for the client, and in reverse.

You could use alot of inventory items, or use GetChar() to send a letter each, but this will both be very hard to manage and very hacky. And I'm pretty sure people wont like activating a script a thousand times in one go just for a string.

Having a way to just do this in a normal way somehow would open up for so much more.
No tags attached.
related to 0002678closed  The log command does not print a message for a players unless clientsided. 
Issue History
2016-09-16 19:11FusedNew Issue
2016-10-23 19:45DuskNote Added: 0016088
2016-10-23 19:45DuskAssigned To => Dusk
2016-10-23 19:45DuskStatusnew => feedback
2016-10-23 19:45DuskRelationship addedrelated to 0002678
2016-10-23 19:46DuskNote Edited: 0016088bug_revision_view_page.php?bugnote_id=16088#r9813
2016-10-24 18:39FusedNote Added: 0016091
2016-10-24 18:39FusedStatusfeedback => assigned
2016-10-27 22:14DuskNote Added: 0016095
2016-10-27 22:14DuskStatusassigned => feedback
2016-10-27 22:15DuskNote Edited: 0016095bug_revision_view_page.php?bugnote_id=16095#r9815
2016-10-28 16:26CatastropheNote Added: 0016105
2016-10-28 16:27CatastropheNote Edited: 0016105bug_revision_view_page.php?bugnote_id=16105#r9821
2016-10-28 19:24FusedNote Added: 0016107
2016-10-28 19:24FusedStatusfeedback => assigned
2016-10-28 19:25FusedNote Edited: 0016107bug_revision_view_page.php?bugnote_id=16107#r9823
2016-10-28 19:26FusedNote Edited: 0016107bug_revision_view_page.php?bugnote_id=16107#r9824
2017-01-13 10:06FusedNote Added: 0016632
2017-07-14 13:59TheMisterCatNote Added: 0018025
2017-07-14 14:04KorshunNote Added: 0018026
2017-07-14 14:05KorshunNote Edited: 0018026bug_revision_view_page.php?bugnote_id=18026#r10767
2019-06-04 21:54DuskStatusassigned => new
2020-12-27 21:04Torr SamahoNote Added: 0021583
2020-12-27 21:04Torr SamahoAssigned ToDusk =>
2020-12-27 21:04Torr SamahoStatusnew => needs testing
2023-08-05 20:33FusedNote Added: 0022905
2023-08-06 04:12KaminskyNote Added: 0022906
2023-08-06 04:12KaminskyStatusneeds testing => resolved
2023-08-06 04:12KaminskyFixed in Version => 3.1
2023-08-06 04:12KaminskyResolutionopen => fixed
2023-08-06 04:12KaminskyAssigned To => Kaminsky

Notes
(0016088)
Dusk   
2016-10-23 19:45   
(edited on: 2016-10-23 19:46)
I'd otherwise be up for adding this, but I need a concrete example of where this would be useful. Only from server to client, though. It doesn't make much sense the other way around.

(0016091)
Fused   
2016-10-24 18:39   
The client to server one has less value, but would still be nice to have.
The server to client one would be useful for simulating LogBold for example, since it isn't a thing but has been requested some time ago here'http://zandronum.com/tracker/view.php?id=2678 [^]'
In the meantime Korshun has added an very hacky alternative with the help of me in adding a way to do this, and can be found in ACSutils
'http://acsutils.strangled.net/doku.php?id=functions:sendstring [^]'
'https://github.com/Korshun/acsutils/commit/43cc7c3ab179773bf7cbae1c85489085f3b3fc31 [^]'
But this is really buggy and fails sometimes.

But apart from that general string conversion to send a message would be nicer than to having to predefine strings for every client in advance.
(0016095)
Dusk   
2016-10-27 22:14   
(edited on: 2016-10-27 22:15)
That is not a concrete usage example. If you cannot specify exactly for what you need this for, it's not going to be added.

(0016105)
Catastrophe   
2016-10-28 16:26   
(edited on: 2016-10-28 16:27)
Only use I see for this is logging reasons. Other than that I really don't see why you'd need this other than for convenience things like passing in strparam strings. But even then, you're better off creating string constants instead of sending the strings themselves from client to server as it would save more bandwidth this way. But if logbold and targetted logging is going to be added anyways, then this doesn't seem like that much of a high priority tbh.

(0016107)
Fused   
2016-10-28 19:24   
(edited on: 2016-10-28 19:26)
I myself would like this for supporting strings in decorate next to the logging thing. This is more client to server though, and it would allow me to activate a script with the item name to give rather than having to create a whole list of itemnames corresponding the ID. And considering I have a ton of items that have to stay organised, it really saves time.

And considering there's quite some support, I think many other people would like something like this.

Edit: Also next to that I'm sure I will need similar cases to this in the future. I can only think of client->server things though, since logging is the only thing that will ever need to be clientsided to work properly.

(0016632)
Fused   
2017-01-13 10:06   
I suppose this is not a biggie anymore since I found a way to sync using acs'https://zandronum.com/forum/viewtopic.php?f=94&t=7988&p=103068#p103068 [^]'

And since GetUserCvar works now it should be possible to do it in reverse too.
(0018025)
TheMisterCat   
2017-07-14 13:59   
Here's a strange example I was considering - I have an RTS mod with a clientsided user interface. I would like to be able to bulk send unique orders to the server, included such things as clientside-determined waypoint/pathing, groups, etc.

So I would puke this from that client to the server, and the server would then break down the string and execute the orders - say, "move group 1 to coords X/Y" would produce a string like "mG1x150y250x175y275x300y400" et al (a series of pathing coordinates).

I feel like this would be helpful because the client end would be doing all the heavy processing (pathing mostly) and sending minimal instructions, while maintaining sync as those instructions are parsed by the server.
(0018026)
Korshun   
2017-07-14 14:04   
(edited on: 2017-07-14 14:05)
What you essentially want is to use SendString as a custom packet sending system.

An actual custom packet feature would make it easier, as packets would be binary, as opposed to sending ASCII strings. Implementing a custom packet system would also make implementing SendString unnecessary, as mods would be able to simply send a custom packet with the string.

Size limitations on custom packets are acceptable.

(0021583)
Torr Samaho   
2020-12-27 21:04   
I added Kaminski's patch for this.
(0022905)
Fused   
2023-08-05 20:33   
This can get closed now that `SendNetworkString` exists.
(0022906)
Kaminsky   
2023-08-06 04:12   
I'll go ahead and mark this ticket as resolved now. It's been more than one and a half years since 3.1 was released and nobody has reported any issues with (Named)SendNetworkString. I'll assume that these functions are working properly.