bn880 5 Posted May 4, 2003 Version 1.1 of the Network Services in Addon or Script format is available here: Archive Also check out the CoC Unified Documentation system: UDS We at The Chain of Command are pleased to inform you that the first version of our Network Services has been released to the public. The CoC Network Services originally devised for "in house" use allow Operation Flashpoint scripters to transfer any data necessary to any specific network node in a networked OFP session. The scripter can send data by simply calling one function and designating a target pre-processed function on the destination node/machine. The system is designed to allow for fastest transfer of small to large data between the specific network nodes. Supported network send data is: [*]Boolean [*]Group [*]Number [*]Object [*]String (passed in as Character Arrays, see ReadmeCoCNS.txt) [*]Array (filled with nothing or any of the above in any combination) [*]Multi-Dimensional Array (filled with nothing or any of the above in any combination) The handshaking process occurs mostly behind the scene during the briefing, once completed each machine has an array with information on every other machine in the session/mission. The server is always in the first entry of this array. http://www.thechainofcommand.com/graphic....mg] A Successful Connection What is it For? Foreseen use may be in the CE3 for command control and strategic communications, Capture The Island (CTI), Real Time Strategy (RTS) mods and many others. Examples Download includes two pre-assembled mission templates: [*]one including only the Network Services 1.0 Layer with connection checks [*]the other with an additional CoC Digital Communications demonstration top layer. Both templates also contain the CoC Number System Function Library which is capable of converting between Hex, Binary, Octal, Decimal, and Alphanumeric numbers. Digital Communications Sequence http://www.thechainofcommand.com/graphic....mg] Stage 1 Digital Communications Chat send from Client TCOC(2) http://www.thechainofcommand.com/graphic....mg] Stage 2 NS in action Packets visible via tool external to OFP(150KB) http://www.thechainofcommand.com/graphic....mg] Stage 3 Digital Communications Chat received at Second Client bn880 Vector Bosson's Console http://www.thechainofcommand.com/graphic....mg] Used in the test package of NS DOWNLOAD CoC Webpage Please note: Digital Communications was released as an example top layer which makes use of the Network Services. It is however Beta and may be improved in the future. Kind Regards BN880 CoC Network Developer Share this post Link to post Share on other sites
SpeedyDonkey 0 Posted May 4, 2003 Great work, although i have no idea what that is, it looks very advanced. Share this post Link to post Share on other sites
bn880 5 Posted May 4, 2003 Thanks Yes, it is designed to remove some of OFP's limits in Network scripting, these limits are noticed usually by quite advanced scripters of some MODs etc. That's probably why many people will be wondering what it does. Share this post Link to post Share on other sites
Donnervogel 0 Posted May 4, 2003 Wow. I'm so excited! And multi dimensonal arrays... yeah! Is there a possibility to make multi dimensional arrays work in Single Player? However. Incredible work CoC Team! Share this post Link to post Share on other sites
bn880 5 Posted May 4, 2003 Why of course multidimensional arrays work in SP, ex: mdarray = [1,2,[3,5,[6,7]],[8],[3,5,[6,7]]] The Network Services also retain their functionality in SP, recognizing two nodes: position 0 server, position 1 client Share this post Link to post Share on other sites
RED 0 Posted May 4, 2003 Good work CoC team, I hope some interesting MP missions will spawn from this. RED Share this post Link to post Share on other sites
Jinef 2 Posted May 4, 2003 Uhh? Yes that's nice, we still are stuck with R-A-D-I-O-S in the RAF. But i will inform of them a much more shiny system that seems very complicated etc. So what can we do it with it again? Make missions that require advanced comms or something? Share this post Link to post Share on other sites
bn880 5 Posted May 4, 2003 The Network Services are extremely easy to implement, the scripter simply adds the template and makes use of one function: from readme </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">fNSend Function The fNSend function takes 3 to 5 parameters and is used to send virtually any data across the network to any specific OFP network node. A network node is simply any OFP session connected in a network OFP session (game). 1st parameter INTEGER detination ID, this integer number specifies which network node to send data to and call a function with. It is simply the rNCleintIndex index or channel of the destination node, the index in the rNClientList [] or rNPeerList []. 2nd parameter ARRAY data to send, this array of data will be sent across the network to the destination network node and specific pre-processed function. To send a String make sure to format it as a Character Array first. 3rd parameter Character Array destination function name, this character array name will be translated into a String on the destination network node and used as the pre-processed function name to call using the data sent. The 2nd parameter data will be passed to this pre-processed function on the destination network node. (optional 4th & 5th) 4th parameter ARRAY data to pass to failed funciton, this array of data will be passed to the failed function in case a network communication error occurs. Strings can be passed normally as this is strictly local to the calling node. 5th parameter STRING failed function name, this string specifies the name of the pre-processed function which will be called in case a network communication error occurs during the send. The 4th parameter data array will be passed to this pre-processed function. CALL EXAMPLE: [2,[player,["H","i"]],["f","N","t","e","s","t"],[daytime,"failed"],"fNFailtest"] call fNSend; RESULT: Network node of index 2 (rNClientList index 2) will be contacted and sent the data [player,"Hi"], this destination node will then call the pre-processed function 'fNtest' using this data. In case of network error the pre-processed function 'fNFailTest' will be called using the data [730,"failed"] on the source network node. OTHER CALL EXAMPLES: [0,[player,["H","i"]],["f","N","s","e","r","v"]] call fNSend; [buddyIndex,[player,getPos Player],["f","N","p","o","s"]] call fNSend; <span id='postcolor'> If you are talking about the Digital Communications layer, it is like ICQ for OFP. It is simply an example of what can be done, but provides PRIVATE chat to players in MP session. (somewhat difficult to type in because of OFP limits but works) With the Network Services you can for instance send arrays. Create a debug console that executes commands on remote machines, query remote machines for their database contents etc. etc. EDIT: Jinef, if you do not appreciate the utility this service provides then it is up to you, no one told the RAF to use Laptops in OFP to try out Network Services. Share this post Link to post Share on other sites
SpeedyDonkey 0 Posted May 4, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">it is like ICQ for OFP<span id='postcolor'>Ok interesting! Is there any other concrete example of what Mod makes could do with this? Share this post Link to post Share on other sites
KeyCat 131 Posted May 4, 2003 Great! Thanks for sharing and kudos to everyone involved.... /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites
bn880 5 Posted May 4, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (SpeedyDonkey @ 04 May 2003,12:11)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">it is like ICQ for OFP<span id='postcolor'>Ok interesting! Is there any other concrete example of what Mod makes could do with this?<span id='postcolor'> Yes, in CoC Command Engine 3, a remote human general may designate a waypoint for his human subordinate leader, this waypoint information can be passed to all machines on the network or just the specific one using the fNSend function and a custom waypoint change function. (fNSend being the main attraction in this release) Or, in CTI, the money transfer feature can be easily scripted by making use of FNsend in combination with some custom functions. These are just examples. Share this post Link to post Share on other sites
Donnervogel 0 Posted May 4, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Why of course multidimensional arrays work in SP, ex: mdarray = [1,2,[3,5,[6,7]],[8],[3,5,[6,7]]]<span id='postcolor'> ah damn is I just learnt something new about OFP didn't know that you can call directly to to every value. although I tried it once and it didn't work. well maybe it was a stupid mistake I mean I didn't know that you can do that: mdarray = [[1,2],1] player groupChat FORMAT ["Value: %1", (_mdarray select 0) select 1] and then the players says Value: 2. I tested it some months ago but somehow it didn't work... looks like I made a mistake at the time Share this post Link to post Share on other sites
walker 0 Posted May 4, 2003 Hi SpeedyDonkey CoC NS is an enabling technology a sort of widget. Like Maruks example of dialogues enabled us to create user interfaces and the onMapSingleClick command allowed us to create a better CE, lots of artilery scripts and the excelent SnYpir's Single and Multiplayer support addon. When someone makes an MP system like SnYpir's Single and Multiplayer support addon or CTI or RTS they hack together a network layer to do the communications between clients and the server. COC NS is a readybuilt open system to alow people to do that without having to re invent the wheel every time. If you have ever programed think of it like one of the controls you add to a project to allow you do something without having to program the whole thing. If you have not programmed think of as being like a modem that you attach to your computer that allows you to speak to other computers. This is the program that allows your scripts to speak to each other on different machines. Kind Regards Walker Share this post Link to post Share on other sites
bn880 5 Posted May 4, 2003 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Donnervogel @ 04 May 2003,13:52)</td></tr><tr><td id="QUOTE">mdarray = [[1,2],1] player groupChat FORMAT ["Value: %1", (_mdarray select 0) select 1] and then the players says Value: 2. I tested it some months ago but somehow it didn't work... looks like I made a mistake at the time<span id='postcolor'> Yep a small mistake, do not put the '_' in the groupChat or add it to the assignment. Once you make mdarray global you have to stick to that and vice versa. Too bad a tiny mistake sometimes gives much trouble. (if that was it) Share this post Link to post Share on other sites
dinger 1 Posted May 4, 2003 Well, here's an example of something I did with it, using only parts of the services. Problem: You can't publicvariable arrays Solution: Using a handful of scripts, functions, and bn880's CoCNS I wrote a system to fix this. In the init.sqs, run a script server-side and one client-side, and voila! now, all you need to do is put in your code array call fPublicArray and bang! your array is transmitted just as if it were publicvariable'd. (a version of the code is currently over at OFPEC in the MP forum under uiox's "Some Tips..." thread, about page three.) Share this post Link to post Share on other sites
bn880 5 Posted May 6, 2003 One bug has been located buy the CoC, the boolean flag rNisServerClient will always be false. Use instead rNisServer and rNisClient together to check for the above. This does not affect any functionality only mission designer implementation. Share this post Link to post Share on other sites
bn880 5 Posted May 6, 2003 Something fun you can try with the included Number System Library: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">player sidechat format ["%1",3098 call fDecToAlphaA call fAlphaAToDec call fDecToHexA call fHexaToDec call fDecToBinaryA call fBinaryAToDec call fDecToOctA call fOctAToDec call fDecToASCIIA call fASCIIAToDec call fDecToAlpha];<span id='postcolor'> Share this post Link to post Share on other sites
bn880 5 Posted May 7, 2003 VERSION 1.0a of NS released, download at CoC Website. (same location) </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">REVISION HISTORY 1.0a 07/05/2003 Fixed: rNisServerClient now functions as expected Fixed: EULA Revised to remove network usage clause and permit free use of the product on any computer or network. Added: Radio Charlie added to template missions to show useful resources. 1.0 03/05/2003 INITIAL RELEASE<span id='postcolor'> Share this post Link to post Share on other sites
BAD ASS JACK 0 Posted May 12, 2003 ere, could these network scripts be used for internet??? Cause us 56K'ers is avin some teething problems with lag... Share this post Link to post Share on other sites
bn880 5 Posted May 12, 2003 Yes we tested the Network Services mainly on very bad connections. They should work well(as well as possible) on laggy connections, however if a connection gives no response for about one minute a particular send will fail. Although all the timeouts are configurable. You can also watch for a user that fails to register with the network services, if he/she does not get a connection message, they must have lagged out completely during the briefing/initial mission time. Share this post Link to post Share on other sites
Skul 0 Posted May 12, 2003 One must remember, BAJ, that only women have as their avatar... [Gareth Gates must die] Share this post Link to post Share on other sites
bn880 5 Posted May 12, 2003 Okay, you take that to PM or to your own signature, I don't want this thread filled with fights. Share this post Link to post Share on other sites
Skul 0 Posted May 12, 2003 Soz! Anyhoo, BAJ knows me, and we do this kinda crap all the time... Won't happen again, though! Closing [Gareth Gates must die] Share this post Link to post Share on other sites