Goonstation Forums
How do I send a command to APCs Via mechcomp - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: General Discussion (https://forum.ss13.co/forumdisplay.php?fid=7)
+--- Thread: How do I send a command to APCs Via mechcomp (/showthread.php?tid=23683)



How do I send a command to APCs Via mechcomp - Mikeistaken - 03-07-2025

Post transfered directly from the discord question segment cause I didn't get an answer

how to I send a message via mechcomp to apcs, I've been having a lot of issues because...

1) when I use aa button component to send data to the pnet component, the pnet changes all the ; into &, which is normally fine, but using the apc connections they need to be separate
2) the packet sniffer changes them all back to ; which was just confusing
3) to add to confusion while the button panels change all & to & (pnet don't like that combination) regular buttons change & back to just &

sorry, this might have been a little bit of a rant and a little bit asking for help


RE: How do I send a command to APCs Via mechcomp - Dgames_Crew - 03-07-2025

(03-07-2025, 11:50 AM)Mikeistaken Wrote: 1) when I use aa button component to send data to the pnet component, the pnet changes all the ; into &, which is normally fine, but using the apc connections they need to be separate
If I remember correctly, the way to get around the ampersand being converted was to use a URL encoded pattern for the &, which is: %26

So in the APC example on the wiki:

Code:
sender=02003c12;address_1=02006754;command=term_message;data=command=setmode&light=0&environ=0;

...becomes (by replacing all & with %26)

Code:
sender=02003c12;address_1=02006754;command=term_message;data=command=setmode%26light=0%26environ=0;



RE: How do I send a command to APCs Via mechcomp - Mikeistaken - 03-07-2025

Hmm, that seems logical, so I'll give it a shot when I get the chance, thanks for trying help

EDIT: I do also have a mild complaint that the networks and components are not standardized with each other and I'd like to perhaps see one day a fix for it


RE: How do I send a command to APCs Via mechcomp - Chasu - 03-08-2025

Actually, I think the %26 method is obsolete, as characters can now be escaped with a backslash; so you can replace %26 with \&