MantisBT - Zandronum
View Issue Details
0002836Zandronum[All Projects] Suggestionpublic2016-09-16 19:112020-12-27 21:04
normalminorhave not tried
needs testingopen 
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 0002678new  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

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.

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 [^]
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 [^] [^]
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.
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.

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.

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.

2017-01-13 10:06   
I suppose this is not a biggie anymore since I found a way to sync using acs [^]

And since GetUserCvar works now it should be possible to do it in reverse too.
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.
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.

Torr Samaho   
2020-12-27 21:04   
I added Kaminski's patch for this.