Jump to content

TheHarvesteR

Member
  • Content Count

    163
  • Joined

  • Last visited

  • Medals

Everything posted by TheHarvesteR

  1. Hello, Just wanted to share with everyone the solution I came up with for mapping the entire range of the throttle slider to the analogue throttle control in ArmA. So this was the problem: ArmA does not read the full range of a joystick axis. It will only read either the bottom half or the top half of any axis (as in Joystick slider + or Joystick slider -). This isn't a problem for the usual stick movements, like pitch up/down and roll left/right, because these are axes that always return to center, and each half of the range is assigned to it's respective direction. This is a problem with throttles though, because ArmA is assuming that the bottom half of the throttle range should be the airbrakes, and that's not realistic. The brakes should be activated by another button or a separate axis if one is available, and the Thrust (analogue) action should be controlled by the entire travel of the joystick's throttle axis. So, how to get around this limitation? This is what I did: Instead of mapping my throttle axis directly into the Thrust (analogue) command in ArmA, I'm using GlovePIE and PPJoy to correct the input before it reaches the ArmA command mapping. So, this is how it works: GlovePIE is a programmable input emulator. It can read input from devices like keyboard, mice and joysticks, then 'write' input to other devices, as keyboards, mice and virtual joysticks. So that's where PPJoy comes in. It is a virtual joystick driver that lets you set up a virtual game controller as if you had it plugged into an USB port... except it's not.. it only exists in windows. (PPjoy is to your joystick what Daemon tools is for you DVD-RW unit) So, how does all that help with ArmA? well the concept is as follows: Basically since ArmA will only read half an axis, we will give it half an axis to read, but this half axis will be controlled by a full axis from the physical joystick. like this: . . 1 | --------------- | ---------------- | 1 . | | | Thrust (analogue) . | | | . 0 | ________ | ---------------- | 0 . | / | | . | / | | Dead range . -1 | ____/ | | -1 . . joystick PPjoy ArmA . throttle Axis Throttle So how does this happen? that's where GlovePIE does it's magic. We create a (really simple) script in it that tells it to write to the top half of a PPjoy device axis the value it is reading from the full range of your physical joystick throttle axis. Don't worry about the axis not being the same... It won't matter if your throttle axis (z) is remapping to PPjoy axis Rx, since it's all the same to ArmA... So let's get to that: First we should install and configure PPjoy to create a virtual device. If you have it installed you should see a 'Configure Virtual Joysticks' item in your Start Menu. From there, you can create new devices. (PPjoy won't create new devices automatically on install, you have to do it yourself) So create a new device, and give it the next available device number. This depends on how many joysticks you have plugged in (If you got 2 joysticks, you should create a PPjoy device with device number 3, since it's the next number available). All other settings are fine to leave as default. You can play with them later if you're feeling good about all this. You can check if PPjoy is installed correctly by going into Control Panel -> Game Controllers and checking if there is a device called PPjoy Virtual Device # there. (the # is the number you gave it). We'll come back here later, so just check that your device is listed there and let's move on. Now we go into GlovePIE. The first thing you see when you open GlovePIE is a blank screen with a few lines that say 'write your script here'... yes, there is some scripting in GlovePIE (actually PIE stands for programmable-input-emulator, so it pretty much a given that you will be doing some scripting), but don't worry it's quite easy. This is the command that does all the magic: PPJoy#.analog2 = (MapRange(-Joystick.slider, -1, 1, 0, 1)) Where # is the device number you gave your PPjoy device when you created it, and Joystick.slider is a reference to the slider axis of your joystick. Now, most joysticks define their throttle as 'slider', but that varies from stick to stick... On the X52 Pro the throttle is the 'Z' axis, so you may need to do some searching to find your throttle axis (or whatever axis you're trying to get) For that, the simplest way is to write this just before the command you just wrote: debug = Joystick.someAxis where someAxis is the joystick axis you want to try... on GlovePIE, everytime you press the . [period] key after Joystick, it gives you a list of all possible options... so you can try them until you find your throttle axis... Good candidates are .Z, .Rx, .slider, .roll, .pitch... try those as well as others to find your axis. This debug line will enable a small text field next to the 'Run' button on GlovePIE... there you will see a number (which probably will read zero)... run the script and move your axis around to see if this number changes... if it does, you've found your axis. So what's going on there exactly? Well, what this script is doing is basically saying that the PPjoy axis called analog2 will be equal to Joystick.slider with some corrections... the four numbers that follow Joystick.slider define that correction. Let's look at that line again... this is what each element means: AxisToSet = (MapRange(AxisToRead, minInput, maxInput, minOutput, maxOutput)) So the first 2 numbers after Joystick.slider represent the range of input, while the last two represent the output after the correction... so what this means is that a value ranging from -1 to 1 will be scaled into a value that ranges from 0 to 1. Now, here is why ArmA only reads half axes... normal joystick axes center at zero. Imagine the stick's X axis, the left/right movement is defined as -1 at full left, zero when centered, and 1 when deflected fully to the right... So all joystick axes are centered at zero... but this is a problem when handling the throttle axis, since that is an axis without a center... it ranges freely from none to full, but is read as ranging from -1 to 1 anyway... so ArmA only reads either the positive or the negative range of it... Hence our contraption here to counter that. So what this script is doing is feeding the full travel of your throttle (-1 to 1) into only the positive range of the PPjoy axis (0 to 1). so when your throttle is pulled all the way back, PPjoy will be at 50% (0), and when you push your throttle to full power, PPjoy will be at 100% (1), which is the full range inside ArmA, so now you can control your throttle using the entire range of your throttle slider/lever/handle. So, now let's test if it worked. Open up Game Controllers on control panel again, and choose the PPjoy device, hit Properties, and go into the 'Test' tab. You should see the joystick axes there, along with some buttons... Now, ensure GlovePIE is running the script (and that it doesn't show a red line on the script screen, as that means a syntax error), and that the Test screen of your PPjoy device has focus (it won't update if another window is in front of it). Now move your throttle a bit... you should see the PPjoy device move one of it's axes. If it doesn't, you'll have to tweak your GlovePIE script to ensure you're actually reading the throttle axis, and double check everything until you see movement there... You can also write debug = joystick#.z to check that this device really is receiving what you are giving it. Here '#' is the number of your PPjoy device, and 'z' is the same as ppjoy's 'analog' 2 Ok. so let's assume everything worked fine and move on. The next step is to map this PPjoy axis into ArmA as your throttle axis. This should be very straighforward... just go into the control settings in the game and for 'Thrust (Analogue)', move your throttle axis... you should see that both your physical joystick's throttle as well as the PPjoy axis were detected... that's both normal and good. Just delete the physical joystick mapping from there and let the thrust mapping be controlled by only the PPjoy device. This is all... now you should have a full range of throttle input. But that leaves a question... what about braking? that's not an issue on helicopters, but fixed-wing craft need help slowing down... and we just killed the part of the throttle range that was doing that... Well, that's in part a good thing, because no aircraft in the world has it's airbrakes on the same lever as the throttle... but we do need to have brakes... so you can either map another another axis to be your brakes (if you have axes to spare) or just map a button for it. If you choose to map an axis, you can use GlovePIE to do just what we did there to the throttle axis again for the airbrakes axis... if you're going for a button, ArmA will let you map a key or joy button as 'Brakes' Here are links to download both apps: PPjoy 0.8.4.6 - http://drop.io/ppjoy0846testrelease (Win XP/Vista/7 x86 and x64) Here's an alternative link to PPJoy in case the one above doesn't work. GlovePIE 0.43 - http://glovepie.org/poiuytrewq.php (get the one without Emotiv Support) Well, I think this pretty much covers it... I hope I made it clear enough... if you have any questions, thoughts or free money, just drop a line here ;) Best of luck to all :) Cheers HarvesteR
  2. I've been wondering much the same thing. I'll try the same install process on the Heli content in A3... Although I reckon this will only apply for the existing helis across TOH and A3 (Littlebird, Merlin and the Huey-like one, possibly) Cheers
  3. TheHarvesteR

    SSD (Solid State Drive) performance???

    Ah yeah, another word of advice, there are good SSDs and there are not-so-good ones. The difference between them can be very dramatic, much more so than with mechanical drives. Make sure to read through all the specs for the SSDs, and compare them to a higher priced one of the same capacity to see how it stacks up, so you can find the best one for your buck. Personally, I suggest the Samsung 840 or 840 Pro ones. They're very good value for their capacity/specs. Cheers
  4. TheHarvesteR

    SSD (Solid State Drive) performance???

    I've done a full upgrade here this week, and had an interesting experience. My SSD didn't arrive until a few days after the computer, so I did get to try out TOH on the same system, on a HD and on an SSD. I can say from first hand experience, it makes a huge difference, especially as you're looking around and moving about. The engine is streaming assets from disk, so the faster you can do it, the smoother performance you'll get. My system specs, for reference: Core i7 3820 32 GB RAM Geforce GTX 690 Seagate Barracuda 7200 rpm 2TB HD Samsung 840 Pro 512GB SSD Long story short, get an SSD. ;) Cheers
  5. I think if the Event logic is added to each human unit as a small script, that just posts the event to the event-posting-thing when the unit takes damage, then it just happens naturally. It's a piece of logic that can be attached to anything, so in theory, it could be attached to actual MP player units too. Mind though, that multiplayer isn't planned for some time yet. Cheers
  6. TheHarvesteR

    Welcome back Ivan & Martin!

    Welcome back guys!! There really is no place like 127.0.0.1! Cheers
  7. Aye, there is some complication when you are developing a mission with several mods installed... The game assumes you'll be needing them, and adds them as dependencies. IDK if there's any rearmed content that makes this necessary... I'd expect none, because this is a very TOH-oriented project anyway. It's most likely just a loose dependency that needs to be removed. Moach did all the mission setting up though, he can answer that better than I can. Cheers
  8. The project is very much still alive, definitely. I haven't had much time to work on it myself, but I know Moach has been at it almost every day. We haven't pushed the latest changes to the master branch because they're still somewhat unstable, and we didn't want to break things for everyone. About the slingloads, you can release the cargo using the Rope Interaction key (2xR by default). However, that key sometimes doesn't respond immediately, so you'll probably have to spam the R key a little, until you hear the 'click'. Then, a hint will let you know if the cargo landed nicely or crashed. Cheers
  9. There's a lot of room for failure on that mission, but it's certainly playable. Here's what I did: And that's it. :) Cheers
  10. I don't know if career saving is properly implemented yet... In any case, there is very little to save as of now, since missions don't reward you yet, and the Office funds aren't persistent. We're taking it a few steps at a time. We'll get to that eventually. Cheers
  11. You don't get any actions to call in, you get radio actions. Use the comms menu (0-0-1) to call in available. As an alternative, use the clickable radio on the map. Cheers
  12. Just to add an update on the current status of the Office system for the mission: On my last update, I finished up the item arrival and usage system. Basically, the main issue was with finding a way to require players to be at the Office to be able to properly 'receive' an item. That is, if you're out flying, you'll get a hint notifying you that an order has arrived, say, that GPS unit you ordered. Now, the GPS is a player gear item, so we can't just have it add itself automatically with a "player addWeapon" when it arrives, because you could be anywhere when that happens. So the solution was a simple one, and it looks like it's going to work nicely for all sorts of items. When orders arrive, they're listed on your inventory screen, but they're not spawned physically anywhere (some orders aren't physical items at all actually). They're just items in a list, until you go into the office, and unpack the item. Unpacking items them to your gear (in case of equipment), or makes service items available to the service crew, and so on and so forth. It's also possible to return items you purchase (provided there was a refund policy on it), by re-packing the item, which removes gear from your inventory and enables the "sell" button. Remember though, that when you open a package, the item's condition is immediately changed from "new" to "used", so don't expect a return for full retail value. If you drop an item somewhere, but then try to repack it to sell, you won't be allowed, because then all you have is an empty box for your item. If you really want to sell it you'll have to find it again. So, ordering items, cancelling orders, unpacking, repacking and reselling is all in, and I've removed the test items from the list and added a few more meaningful ones. Currently the store offers maps, GPS units, Binoculars and watches. Later on, helicopter bits and whole helicopters will also be available. Cheers
  13. I've been poking around this just now, and I've noticed something interesting. If you remove the GPS from a unit on foot, his position isn't shown on the map, because you need a GPS for that. However, it seems when you're in a helicopter, you are automatically given a GPS again, and unless you completely forbid GPSes by setting showGPS = 0 in the description.ext, you still get to use the GPS (and still see your own position) while in a helicopter. What I'm trying to find now is if there is a way to remove this 'free' GPS from the vehicle. I think there's a good chance the 'free gps' and the map crosshair are actually a single issue. Does anyone know if there's a way to disable the in-vehicle GPS, without setting the showGPS to 0 in the description.ext (and removing all GPSes completely)? Thanks in advance. Cheers
  14. Another progress update on the UI side: I've got the inventory panel implemented now, and set up an update system that keeps track of items you order. When they arrive, they are sent to your inventory list, where you'll then be able to do stuff with them. The store system is mostly complete then, for a first implementation. Next up is having the items actually do something. The plan for that is as follows: Items will have a few more bits of data on them to define a few things. First of all is what type of item this is. Can it be sold if you don't want it? (Parts and such should be sellable, Fuel, on the other hand, shouldn't). Or is this some small bit of equipment, or a part that can be installed on a helicopter? One thing we did with the inventory was to make sure each item was its own independent object. You buy things one at a time, and you can buy as many of the same item as you want. Since parts on your helicopter will wear off and eventually need replacing, it would make sense to let you keep a stock of replacement bits, so if something breaks, you'll have a replacement ready to go without having to wait for it to arrive. That means consumables like fuel will need to be handled differently. When you order fuel, you're ordering a delivery of some quantity, And unlike parts, fuel would be immediately sent to the tanks at your heliport. If those tanks are full, the "guys with the tanker truck" won't wait around all day, and any amount your tanks can't hold will be wasted. Other items like small bits of gear, like GPS or NV goggles wouldn't need to be installed. They'd just add themselves to your equipment. Also, having more than one of those would be pointless, so those should be sellable if, say, you get that same GPS you just bought again on your birthday or something. :P To be able to handle all those different behaviours, the plan is to set up bits of code on the items themselves, which will get called when things happen to the item. For instance, there would be a code block for when the item arrives, another for when it gets sold, another for when it gets installed, and so on. It's a simple event system, which allows each item to do its own thing, instead of having to add cases for each separate type. That's about it for now... Just when I'll be able to work on the mission again is a bit uncertain now, since the holiday break is now ended, but when I get a chance, I'll continue working on this. Cheers
  15. I've got the X52 pro here, with the main POV mapped to cyclic trim, the throttle hat for rudder trim, and the second hat doing misc functions. You're right, it's not very straightforward to map those. There are specific setting that work, and others that don't. For the throttle and top hats, I couldn't get the game to read them as buttons, so I mapped them on the SST profile to emulate the keypresses. For the POV hat, it did read them. Just make sure that hat is set to 'fallback' in the primary mode in the SST, otherwise it'll do its own thing and probably won't work. As for the other inputs not working. Check that those too are 'falling back' in the SST (and not 'unprogrammed' or something). Buttons mapped to actions on the Saitek profile won't register as buttons anymore for games. Cheers
  16. Being a huge Simcopter fan myself, I very much approve of this idea. :) So much so, in fact, that I'm helping out develop the mission whenever I get a chance (Moach is my brother, so that makes things easier). I started working on the "Office" UIs for the management part of the mission. The Office is a screen you can access from inside the heliport's office area, and lets you access several tabs. In the Online Store tab, you're presented with a selection of items from Heli-bay, your trusty online store for helicopter parts and stuff. You can order items there, like service components, new gear to customize your chopper, and anything we can think of really. Items you order don't arrive immediately though. They take time to arrive, depending on the size of the thing. You can track your incoming orders on the Orders screen. You can also cancel an order that hasn't arrived yet for an 80% refund. After orders arrive, they're displayed in your Inventory panel in the Overview tab. There, you can see the items that are available at your heliport. You'll need to buy new replacement parts to keep your heli service going. Servicing your chopper on the pad can fix minor damage, but those quick fixes will eventually break again, and replacing a part is sometimes your only option. You'll also need to buy fuel, since those tanks at the pad won't magically refill themselves. The current status of this system is this: We have the Store and Orders pages up, with a little FSM that handles the page switching for the whole dialog, and a growing collection of functions that handle selecting items on lists, displaying their details on another panel, placing orders and cancelling them. Items are defined as bundles of data, so we can add a large amount in not a lot of time, once we get the whole system working. Next on the to-do list is the Overview panel with the inventory screen (orders don't arrive yet), and after that, making it so items are actually used for servicing and customization, and finally, adding mission rewards (which, depending on the degree of your failure, might be a bill instead of a paycheck). This is just the first 'iteration' for the Office mechanics on the mission. We have plans for later to add several other features, like being able to put items up for sale, buy items and pick them up yourself (would generate a slingload mission), buy/sell/lease helicopters, and also manage pilot certifications, which you'll need to be able to take on missions like medevacs or winch ops, or transition to a larger chopper. Well, unless you don't mind a visit from a man in a suit. Of course, KSP is my main focus, so I'll only be able to devote a few hours a week at best to this. But it's a really cool weekend project, definitely. :) Cheers
  17. Hey cool! KSP! /me is dev :D Cheers!
  18. TheHarvesteR

    Screenshot Key?

    Doesn't it work through a script called by addAction? One could toggle it by going: showHUD = !showHUD I think... Cheers
  19. TheHarvesteR

    A fix for Full Axis throttle mapping

    I'm running Win 7 x64 here, and I must agree PPJoy can be a pain to install... Last week I spent a whole day at work trying to get a computer to run PPJoy... must have restarted that thing like 15 times :P What happens exactly when you install? does the installer run at all? or does it complain about test mode and quit? I've found that this supposed auto-test-mode-enabling-installer doesn't really enable test mode... to enable manually, do the following: open up the command prompt (Start Menu -> Run -> type: cmd) then in there, type: BCDEDIT -SET TESTSIGNING ON that should put your OS in test mode... (you may have to reboot here) then try to run the PPJoy installer again. hopefully it'll work. If the installer did run, but the drivers failed to install, that's another issue I had that day at work... try just adding more PPJoy controllers... for some reason, PPJoy sometimes fails to install the device, and removing and adding it again doesn't seem to work... what did it for me was to create 3 virtual devices... the 3rd one for some reason installed successfully... PPJoy is a great little program, but it's far from a bug-free experience... I only wish it were updated more frequently... the same goes for GlovePIE... Hope this helps Cheers
  20. TheHarvesteR

    A fix for Full Axis throttle mapping

    @11F: PPjoy created a device called virtual joystick 3? That means you have some other device that isn't your X52 plugged in as well... Open up your joystick properties (Start->Run->type joy.cpl), go into your ppjoy device's properties, and see if any axes are moving when you move your throttle... If not, you are either assigning to a ppjoy device that doesn't exist, or you're reading from a device that isn't the one you're looking for... As I said before, the trickiest part of this whole thing is that the device numbers are different for each user, so you have to find which device is which in your computer... You have a debug line there already set for your throttle axis... run the script in glovePIE and see if the number changes (in the debug bar just above the script)... If not, you've found your problem. Try reading off joystick1.Z or joystick2.z instead of just Joystick.z... see if that changes anything... Also, try writing to PPjoy1 or 2, see if that makes a difference... Well, that's pretty much all I can tell you... let me know if you got any questions :) Hope this helps Cheers
  21. TheHarvesteR

    New Video Settings With Latest Patch

    Oh, This is a very good addition!! Sometimes the HDR becomes a little jumpy (especially when using NV), and it gets a little difficult to see... so much so that ACE had an option to override it. Great to see they've made it into an option!! Cheers
  22. So this is what Steam was so conspicuously downloading when I went to play today... Nice!! Good fixes on the list! Thanks BIS! :) Cheers
  23. Are you starting your mission from the editor or from a local game? If you start a local game, you should be able to pick a slot before you enter the mission... That is, if the mission allows you to... (which it should, I've never seen an MP mission that didn't have the slot screen) Cheers
  24. TheHarvesteR

    A fix for Full Axis throttle mapping

    Here's a snippet of how you can grab the joystick speed, by reading it's actual position and it's previous frame position: Note that we don't have explitic values for the previous frame positions anywhere... The last frame position is simply the current frame position, but what makes the difference is that we are storing it AFTER we calculate the deltas, why? because the variables will retain it's value, and when the script reaches the delta line again, the lastX/lastY variables will have the values from the previous cycle. Then we multiply the deltas by a constant, which is your sensitivity adjustment.. It doesn't need to be 10.0... actually, chances are that you will need to tune this until you find good values that work for you... too much and your heli becomes uncontrollable... too little and you won't have enough input... Well, you can try it... and see how it goes :) Hope this helps Cheers
  25. TheHarvesteR

    What is your sound and microphone setup?

    Yeah, I also have trouble with the cooler noise from my case... 7 coolers inside and around the case, all whirring away, add up to a symphony of airflow that can get louder than the game... I'm thinking about modding my case to optimize the airflow while reducing the number (or at least the speed) of coolers inside... If there are fans on the front that move air in, while the ones on the back move air out... it might be a little more silent... Or maybe with the new 5.1 set, the game will be so loud I won't have to worry about cooler noise :D Cheers Cheers
×