DBR_ONIX 0 Posted July 4, 2006 I was clearing out my Favourites menu today, and stumbled across my old My old "Triggering external programs from inside OFP" thread, which somewhat directly lead to Kegetys having a better idea on how to do such a thing, and thus making FWATCH.. But first, a little story on how it came to be.. To those not willing to read though 12 pages of forum, basicly the idea was to run a script, which would in-turn update the "file last accessed" thing in Windows, when the file was accessed, it could be used to trigger an external program.. Why did I come up with this random idea? Well, previous to that, I was asking around to see if around to see if a "Real-intelligence" breifing could be done.. Basicly at the start of the mission, a very short (hardly visible) cutscene is played, just after it loads, a program is triggered, that takes a screenshot, and stores it in a PBO (Later on it ended up using a folder in the OFP-dir).. Theeen, using SetObjectTexture, the acctual screenshots taken a few seconds ago could be applied to a breifing board (I did make a slide-show addon, which you could skip though several pages of sides, you could theoretically add the real-intelligence screenshots onto one of the slides), or a base's monitor.. Anything... ..unfortunatly, this was very-difficult/impossible to do, due to OFP not liking setobjecttexture-ing files created before the mission was started, it gave same strange results.. Testing on a flag, basicly what happened was when you were far away, the texture showed up as the sea texture, then closer the sand texture, then closer my customface.jpg file.. Odd Although, I did find out a few things, like you could use the FORMAT command to set the texture path for SetObjectTexture, you can use scripts and files from the root of the OFP folder by using varying numbers of ../ when referencing to them (Which later got used for me and Cherry's FlashStat project, which I'll get to in a second) Where FWATCH came into all this was simple.. There was a small script, that basicly waits till the player presses the H button (can be changed to any key), when this happens <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">call loadFile format[":file write takePhoto.db %1 %2", "take", 1] Basicly it creates a file takePhoto.db (it's content is just to make sure the file is created, it's not important).. The program checks for this file in a loop, if it exists, it takes a photo, and removes the file, it creates another file, with the number of the current screenshot, and then starts waiting for the file again.. The idea was to read the file the program created, grab the number, and do <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">object123 SetObjectTexture [0,FORMAT["../../../OFPCamera/screenshot%1",_curr_screen_no]] Simple, isn't it.. But as I've said, it didn't work due to a limitation in flashpoint, but I still belive it's possible.. Buut, the taking screenshots triggered by OFP was working perfectly, so, you could use a custom weapon, modeled like a camera, with an event handler, when fired, it takes a screenshot.. Combat photographer addon! I never got around to modeling it, and it was around the time I finished up with this little project.. Anyway, I've got the program (upto version 0.4), the source code and a bit of documenation uploaded on OFP.info here :: http://ofp.gamepark.cz/index.php?showthis=8570 :: Which has a short documentation, describing basicly how to use it About ~6months later, me and a friend Cherry/Khalid were thinking up a coding project, and came to the idea of, basicly, XFire for Flashpoint (XFire being a program that you run, and it tells you how long your playing a certain game, what your currently playing, what server your one, and lets you talk in game to the client, or any another supported game) The idea was : Servers sign up on the website, they'd give server info, the server IP (or hostname), and a username/password They'd get a flashstat_login_info.sqs file, which would go in the root of the Flashpoint folder (So it's not transfered to all the clients when the mission is sent to them) Then, when a player gets a kill (Detected by eventhandlers), using the CoC_Network stuff, the server would call an FWATCH wget command, which would grab a URL like.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] loadFile FORMAT[":file wget http://flashstat.com/talk.php?UserName=%1&PassWord=%2&killed=%3&killer=%4&kAi=%5&kCiv=%6&krAi=%7&krCiv=%8",FS_username, FS_password, name vehicle _killed, name vehicle _killer, _ai, _civ,_krAi,_krCiv] The talk.php script would them simply check the username/password against the server IP (Though the IP checking is optional, bigger servers with static IP's might want to do this to stop people cheating their stats), if it checks out, shove the stuff in a database, and print("true"), or if there was an error, return false.. You could then use this in an ?(flashstat_return_code):hint "Success" type check.. Then these stats would be used to create dynamic signatures (much like my "The Next Person to.." signature I'm using just now) that players could use to show off, or servers could use to display overall stats for all players And, with a bit of work, be used as the foundation for a ranking/scoring system.. ..buut, theres a bug in Flashpoint that causes a crash-to-desktop if the callfile is over 128 characters, which mean the data had to be split up, which then involved getting an temp-ID from the site, then sending that, along with around 50 characters of data at a time.. Which was a pain to code, and due to that, and a general lack of interest, the project was put on semi-permanant hold (Might try again with Armed Assault, depending on what scripting improvements are introduced) Thats my story regarding the creation and use of FWATCH, in my opinion the most powerfull, opertunity creating, but unknowen addition to flashpoint's scripting engine -------------------------------------- This point in that (far longer than expected) story? Simple : The posibilties FWATCH creates are huge.. And to my knowledge, I'm only aware of 3 projects/addons/ideas that use it 1, Kegetys demo mission, which uses the key-grabbing thing to turn OFP into an old top-down racing game, it also had a top-score chart that was far to easy to cheat, so it was turned into a "Last 10 people to play" screen.. T'was a fun little mission, it even had recording/playback of races 2, The Tiberian Dawn mod was using the same key-binding thing to create an amazing looking build-mode, where you could select where buildings were build by using the keyboard, and (not sure if this was planned), you could move the view around by using the mouse, much like RTS games do.. Buut, I've heard nothing from this mod for ages, no idea wether it's still going ahead 3, The Combat Photographer addon, which was to create a combat-photographer (obviously), which could (or would) use FWATCH and OFPCamera (or atleast an improved version) to make the camera take screenshots (Although it was mainly planned to be used in recon missions and the likes, both are possible) But, much like the RTS-mode thing, I've heard nothing from the guy who was modeling all the stuff in ~a year Anyway, this post is around 1000 words now, so better finish up.. Why have more people not used FWATCH? Have most people even heard of it? As I've said, I fell it was an extremely important step with OFP-scripting, but for some reason, it was totally ignored.. For something coded by the same person who made DXDLL (Kegetys), which is running on a huge percetage of OFP player's systems, it seems odd FWATCH hasn't been nearly as wide-spread, despite revealing many many opertunities for inovative mods and addons (Compared to DXDLL which just make s OFP look a bit shinier, which goes some way in proving games are largley just about graphics now But thats beyond my point) My aim with this post? To show people what can be done with a bit of creativity, and FWATCH, increase awareness of FWATCH, and hopefully get people to start using it.. This is somewhat my soulution to the "10 million M4 addons"-rants.. Look at everything that can be done in/around the OFP engine, and all the things left un-done.. The M4's been done, do something original (Yeh that was pretty random, ah well) ..okay, this is 1300 words now *stops* - Ben Share this post Link to post Share on other sites
sanctuary 19 Posted July 4, 2006 This point in that (far longer than expected) story? Simple :The posibilties FWATCH creates are huge.. And to my knowledge, I'm only aware of 3 projects/addons/ideas that use it 1, Kegetys demo mission, which uses the key-grabbing thing to turn OFP into an old top-down racing game, it also had a top-score chart that was far to easy to cheat, so it was turned into a "Last 10 people to play" screen.. T'was a fun little mission, it even had recording/playback of races 2, The Tiberian Dawn mod was using the same key-binding thing to create an amazing looking build-mode, where you could select where buildings were build by using the keyboard, and (not sure if this was planned), you could move the view around by using the mouse, much like RTS games do.. Buut, I've heard nothing from this mod for ages, no idea wether it's still going ahead 3, The Combat Photographer addon, which was to create a combat-photographer (obviously), which could (or would) use FWATCH and OFPCamera (or atleast an improved version) to make the camera take screenshots (Although it was mainly planned to be used in recon missions and the likes, both are possible) But, much like the RTS-mode thing, I've heard nothing from the guy who was modeling all the stuff in ~a year You may want to check TOP1/OPERA1 for OFP that has been released recently. Share this post Link to post Share on other sites
.kju 3244 Posted July 4, 2006 silola makes heavy use of it for his next project Share this post Link to post Share on other sites
h - 169 Posted July 4, 2006 I would use it if I just any need for it in all of my eternity projects.. Share this post Link to post Share on other sites
lecholas 2 Posted July 4, 2006 General Barron's Hand Signals make a good use of fwatch. But AFAIK this great feature was overlooked by the most of the community. For me the best thing in fwatch is simply the ability to bind keys to commands. Flashpoint has always had the problem of user input for managing addons and scripts. For a long time you could only use a radio mesages or action menu. Thanks to fwatch you can finaly use all of your keyboard. Share this post Link to post Share on other sites
Homefry 0 Posted July 6, 2006 Well, I've been thinking about starting up a project for a while. Basically, it would be a command system independent of OFP. A player (designated as commander) would be in charge of all allied forces in a mission. However, he would control these units in a seperate program, and assign waypoints and whatnot using a map (probably a .jpg or something). The only intelligence he would recieve would be that which was sent to him from players in-game. I guess it would add a new dimension to CTI games or whatnot. However, I'm not completely sure of how FWATCH signals events and I've been low on time recently. Maybe one of these days. Share this post Link to post Share on other sites
Guest [B.B.S.] T_D Posted July 6, 2006 2, The Tiberian Dawn mod was using the same key-binding thing to create an amazing looking build-mode, where you could select where buildings were build by using the keyboard, and (not sure if this was planned), you could move the view around by using the mouse, much like RTS games do..Buut, I've heard nothing from this mod for ages, no idea wether it's still going ahead We are still alive but we are making the mod (by the way it's called Tiberian Genesis ) for Armed Assault, so the modelers just make the models. Textures, scripts and other stuff can be implemented when we learned to use the new abilities of Armed Assault. Since there will be a bunch of new script commands I have decided to code a complete new one. If there arent commands for getting the pressed keys and other important things fWatch was able to handle, I will use it further. (hope Keg will make a version for Arma) Share this post Link to post Share on other sites
DBR_ONIX 0 Posted July 6, 2006 T_D @ July 06 2006,21:00)]We are still alive but we are making the mod (by the way it's called Tiberian Genesis )for Armed Assault, so the modelers just make the models. Textures, scripts and other stuff can be implemented when we learned to use the new abilities of Armed Assault. Since there will be a bunch of new script commands I have decided to code a complete new one. If there arent commands for getting the pressed keys and other important things fWatch was able to handle, I will use it further. (hope Keg will make a version for Arma) Opps, did wonder if I got the name wrong Would you consider releasing what you done sofar with the build-menu-system? It seems very impressive, and if people can see what FWATCH can do, maaybe one or two people might be "inspired" to try it Well, I've been thinking about starting up a project for a while. Basically, it would be a command system independent of OFP. A player (designated as commander) would be in charge of all allied forces in a mission. However, he would control these units in a seperate program, and assign waypoints and whatnot using a map (probably a .jpg or something). The only intelligence he would recieve would be that which was sent to him from players in-game. I guess it would add a new dimension to CTI games or whatnot.However, I'm not completely sure of how FWATCH signals events and I've been low on time recently. Maybe one of these days. Hmm, sounds intersting.. I've though of doing a vaugly similar thing (more along the lines of the Tiberian Genesis mod though, where you build/move people around).. One thing I did do aggees ago (Before FWATCH was created) was to create a little Visual BASIC program that allowed someone to talk from an external program to inside Flaashpoint.. Basicly the VB program wrote a dynamic script, which was executed every second by a looping script.. When the VBtoOFP program got a new message, it wrote a script that was like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">externalChat globalchat "[Message went here" It had a bit more stuff to make sure the same message wasn't looped, and there was no easy way to talk out of Flashpoint (which is why I gave up on that, I rewrote it when FWATCH was released, but it wasn't terribly usefull, espically when it'd be very difficult to capture all dialouge, which would be confusing for the person using the app..) But, with FWATCH, it should be simple to make the external command program transfer data back and forth (Group positions, and where to move, at a most basic level).. But, the biggest problem I can think of is : How does the client communicate to OFP/FWATCH? It'd either have to be running alt-tab'd, which seems a bit pointless (why not do the command interface in game), or a remote machine, via some form of sockety connection, which then gives the problem of sending the data from OFP, to the server-program, to the client, and dealing with lag and other fun networky stuff If it's done right, how-ever, it could be cool.. Hmm, slightly different idea.. A web-interface (Either image-map, or ideally Flash with shiney zooming maps and waypoints etc) could be cool, you could order groups A/B/C to move to points A/B/C, and the other player (or "commander") orders groups D/E and F to points D/E/F, and instead of having made up semi-random values like a normal 2D game might have, you have real, virtual soldiers running, and attacking the enemy.. Hmm, I might have a go at that one day (The web-commanding-real-virutal-soldiers thing).. - Ben Share this post Link to post Share on other sites
Guest [B.B.S.] T_D Posted July 6, 2006 Since the build menu is deeply embedded in the crCti code I think it is not possible to release just the build menu. I could release the whole buggy C&C CTI code but you will need the addons I think. But you can have the CTI and try to get it working without C&C addons. Since I havent worked on it for several month I dont really know what status the CTI have. But if you are interested in the code let me know Share this post Link to post Share on other sites
Homefry 0 Posted July 7, 2006 I know there are get mouse positions included with fwatch, however, is there a good way to implement some sort of selection function within the current limits of OFP. To explain, if I were to click once, then move my mouse down and to the left, and click again, would there be a possible way to select all units within that created box? I'm thinking not.. but if it were possible, it'd add a whole new dimension to RTS type modding. Share this post Link to post Share on other sites
lecholas 2 Posted July 7, 2006 You may want to see one hot new version of completed project of one-man-mod utilising fwatch: General Barron's Handsignals Share this post Link to post Share on other sites
raedor 8 Posted July 26, 2006 Check Mapfact's Weaponpack, we're extensively using fWatch there. Share this post Link to post Share on other sites