Jump to content

pedeathtrian

Member
  • Content Count

    284
  • Joined

  • Last visited

  • Medals

Everything posted by pedeathtrian

  1. CfgAmmo subentries have airFriction, which descriptions looks very much like it's acceleration applied to projectile by air resistance force (so its mass already counted). Not sure about units though. It also could be just coefficient applied to projectile's speed on each simulation step.
  2. Check this out: CfgWeapons Config Reference: initSpeed. So if this value is greater than zero, you simply take it. Otherwise you take value from CfgMagazines' subentry's "initSpeed" and multiply it by initSpee's absolute value. Also, take any muzzle attachments into account, e.g. check for getNumber(configfile >> "CfgWeapons" >> "muzzle_snds_H" >> "ItemInfo" >> "MagazineCoef" >> "initSpeed") if you have such attachment and multyply your speed by this parameter.
  3. Some good points on writing localizable code: Internationalization: You’re probably doing it wrong. Though post is written about localization of PHP code of WordPress plugins, its theses are very much applyable to SQF (or any localizable) code as well. Good to follow if you plan working with localizable strings with some grade of automatization (i.e. with any kind of software). ATM neither SQF localize command nor Stringtable.xml file do support plural forms, but if at some point in the future BIS would want to upgrade localization to industry standards, they could easily modify existing facilities to support plurals (or context describing). Like with passing array to localize command and have some extended structure of Stringtable.xml. Not a major issue, of course, or not even an issue. But hey, dreaming is free, right? :)
  4. Yeah, this could be a pain even if proper scripting commands existed... You should definitely vote for their adding when feedback tracker is back (link posted by chronicsilence in the same thread from my previous post).
  5. First (actually better do this on writing to DB), you will need to get a base class of a rifle using BIS_fnc_baseWeapon. This will free you from checking whether attachments are correspondant to weapon class. Second, unfortunately Arma still does not have commands to put weapons with attachments to containers, so you will need to use workarounds, e.g. "DropWeapon" action. More details in this post.
  6. pedeathtrian

    co10 Escape

    I have drn_fnc_Escape_GetPlayerGroup this way: drn_fnc_Escape_GetPlayerGroup = { private ["_units", "_unit", "_group"]; _units = call A3E_fnc_GetPlayers; _group = objNull; if (!(isNil "_units")) then { if ((typeName _units) == "ARRAY") then { _unit = _units select 0; if (!(isNil "_unit")) then { _group = group _unit; } else { diag_log format ["%1:%2: A3E_fnc_GetPlayers returned invalid list!; _units: %3", __FILE__, __LINE__, _units]; }; } else { diag_log format ["%1:%2: A3E_fnc_GetPlayers returned invalid list!; _units: %3", __FILE__, __LINE__, _units]; }; } else { diag_log format ["%1:%2: A3E_fnc_GetPlayers returned invalid list!; _units: %3", __FILE__, __LINE__, _units]; }; _group }; and it produces 18:56:47 Game started. ... 18:57:15 "mpmissions\__cur_mp.Chernarus_Summer\Scripts\Escape\Functions.sqf:479: A3E_fnc_GetPlayers returned invalid list!; _units: []" this line 20-25 times in first minutes of the game (that was the last line). I tried checking it on client too, but it seemed to work (not that I did not moticed it; it did not produce any output in rpt).
  7. I'm not sure, but quick glance at this tool's description tells me it does not scan files for string identifiers. It helps working with existing XMLs but where do you get them from? The best workflow I can see here is to use tools and technologies which recommended themselves in translating software for long time. Like gettext and tools related to its gettext PO files format. I personally used only POEdit and Qt Linguist (uses other xml-based fomat), but there's plenty of them, including web-based. In *nix world you have a tool (or library) for almost everything, and most likely it's here for decades already. The good point of using such tools is that you can rescan your source files periodically, automagically removing old string from translation and adding new ones, at the same time keepeng those remained and reusing their translations. Most of the time process is automatic. The real work to do is to translate new strings which are collected for translation, so you don't need to search them through all source tree. I tried xgettext's stadnard C parser with only localize keyword added and managed to get string identifiers from .sqf files from directory tree. Unfortunately $STR_* literals in config files are a separate story and did not get into output. Other problem here is that most such tools are language-oriented, i.e. have one file per language. And their format differs from A3 Stringtables XML. So now I'm looking forward to write extractor of string identifiers for use in/instead of xgettext in POEdit or any other tool which uses gettext PO file format. Then the next step will be the consolidate tool which would be able to collect multiple (translated) .po files into one Stringtable.xml.
  8. pedeathtrian

    co10 Escape

    arma3server only runs as dedicated. By design. Where else I was checking this functions is on client. And it never failed. If you're new to Arma series (as you say) nobody expects you to unpack mission and fix stuff there. Posting issues on forum is already good job. Keep it up. I run this mission for about month and a half now, on my homemade Linux dedicated server and play on it with couple of my friends, the same Linuxheads as me; on Linux clients. So first I had to backport mission (only Chernarus_Summer variant) so it actually worked on 1.42. I had this and some other errors related to new commands (yeah, 1.42 was quite old for this mission). Fixed mostly by stubbing, additional error checking and falling back to old BIS_ functions. Arma Mac/Linux port updated recently, so I forthported it back to new commands >_< And I was really planning reporting some issues there, but since mission started to work properly... damn... somehow it did not happen until now, sorry, NeoArmageddon, :D This mission is very addictive. The other reason was Arma was very unstable and crashing like crazy with RHS mod, so I was not sure what is what and what is really related to mission. I only SQF'ing for that month and a half.
  9. pedeathtrian

    co10 Escape

    1. A3E_fnc_GetPlayers defined both in functions.hpp (functions/Common/fn_GetPlayers.sqf) and in Scripts/Escape/Functions.sqf, but that's not the issue 2. On dedicated, it returns empty list of players quite often (especially while not too much time passed after start). drn_fnc_Escape_GetPlayerGroup and some other functions easily fail because of that. PS. Checked on RHS Chernarus_Summer version.
  10. pedeathtrian

    action "dropWeapon" crashes the game

    Confirmed on pre-Eden (1.54 Linux port); ArmA hanged though, not crashed. Repro mission: .rpt
  11. pedeathtrian

    Weapon IR Laser Ranging

    Memory points' coordinates are in models, not in configs. More tedious and harder to automatize. I considered such possibility while writing my previous post. You will need dynamic up-vector of weapon for cases when you lean right/left while shooting around the corner. If this is not taken into account, then you laser's start point will (visually) lean in opposite direction and always keep vertical (or whatever offset it will have) relative to "Weapon" selectionPosition. So yeah. Point and two (non-collinear) vectors: this is what you need to fully define 3d coordinate system (or a matrix to transform to/from).
  12. Virtual space of 32bit process is always 4GiB, no matter how much physical memory do you have. On windows, regular 32bit applications can address not more than 2GiB of that. Those linked with /LARGEADDRESSAWARE can use addresses greater than 2GiB but never greater than 4 GiB. In fact they usually have about 3 GiB of addressable space. If video driver maps ArmA's virtual space for its own needs (and maps more for more GPUs), adding physical memory (or enlarging page file) will not help, since ArmA cannot address that space and use it anyway.
  13. pedeathtrian

    Weapon IR Laser Ranging

    You can get selectionName for unit, i.e. some part of unit's model which was hit. I highly doubt unit can be hit in "laser pos". So the problem is to 1. get memory point "laser pos" location of weapon's model space (how to do it in game?) 2. get weapon's location (probably "Weapon" selectionName will do) and weapon's directions: direction vector (weaponDirection scripting command) and up-vector (how to do it in game?). 3. when weapon position, weapon direction and weapon up vector are acquired, you can transform "laser pos" location (or any other point) from weapon model space to unit's model space (therefore to world space too). Not sure, but "laser pos" is a place on weapon where to place attachment, not the point where laser beam hits from. One should probably analyse attachment's model too :D
  14. pedeathtrian

    Weapon IR Laser Ranging

    sarogahtyp, Weapons have "laser pos" memory points and I guess topic starter was referring to getting its exact position. Perfectionism here =) Unfortunately I could not find a way of getting it for player's current weapon. Either use _this select 0 or params, not both. You can search for intersections of continuation of the line to go further than 5000m (if really needed). I'd say overall distance sqrt(2)*worldSize would be enough for everyone. Anyway, good work here.
  15. pedeathtrian

    AddAction bomb with sound

    No. playSound has local effect, try playSound3D instead. Edit: or use remoteExec
  16. pedeathtrian

    Always deleteGroup responsibly.....

    After removing all units and deleteGroup'ing some groupName, groupName becomes <null>, but corresponding entry remains intact in allGroups and even contains units (dead bodies) which cannot be removed from group if used command (units (allGroups select X)) join grpNull. Could not delete this group until called deleteVehicle on each unit. Tested only in SP in editor.
  17. pedeathtrian

    Always deleteGroup responsibly.....

    What is the locality of group when being deleted? Can removing units from group have some lag? Try this: (units _newGroup) join grpNull; [_newGroup] spawn { private _grp = _this select 0; waitUntil {(count (units _grp)) == 0}; [_grp] remoteExec ["deleteGroup", _grp]; };
  18. pedeathtrian

    SQF feature requests

    (edit) (del) nvm then. i should stop making useless posts on this forum
  19. Exactly. All other stuff is just as obvious as the things I was mumbling here, I know how offsetting work. Except for that rtd_center that did said me nothing. Just in case somebody else does not know what rtd_center is, good point to start: https://forums.bistudio.com/topic/122251-cog/ UPD. My apologies, Varanon. UPD2. I've crossed the info that not both coordinates are reversed. So that positive directions for both x and y give you back and right. Does not make too much difference for symmetric (almost all) vehicles though. Nvm, that was about tilting
  20. Rright. Keep it secret. Keep it safe.
  21. I didn't say 'world' this time. Imagine that you create a helicopter body model in 3d modelling software. You start with what? You place some generic form in software's [0,0,0] position. It becomes model's origin. Model's [0,0,0] point. It does not necessary situated in geometrical center of your vehicle's body, or more than that it's bounding box. However this point is fixed once and forever to the "static" part of your vehicle. No matter what gear relative position is or rotors'. It is not the body what rises above gear, it is gear lowers below. Static part remains static. Let's say the [0,0,0] point is on pilot's seat. That means vehicle body was placed that such that seat becomes in [0,0,0] in 3d modelling software. And you are trying to place all other vehicle parts in this coordinate system. Bounding box is by itself a dynamic system and shoud not be considered as reference for anything. It wobbles around teh static part as moving parts... well, move. If you have a tank and you rotate its main turret 90 degrees right, bounding box will expand in this direction. Returning to the helicopter. If you lower the gear, yes, it will lower land contacts relative to static part, therefore expanding bounding box downwards, but it will not move anything else in the model. Sorry for being too repetitive, but in general, model coordinate space is originated from the point where model was started in model editor. And it has nothing to do with world (and bounding box).
  22. Then in model space it should be [0,0,0] with bounding box going in negative area by z coordinate, why not? And I personally don't see any problem with model origin being not in bounding box center.
  23. pedeathtrian

    ArmA 3 Wiki needs tidying

    Is it by any chance hidden from non-logged-in users or something? Tried other browser, cleaning cache and stuff... nothing helps. For me it shows 20 links in this category.
  24. pedeathtrian

    CBA - Community Base Addons - ARMA 3

    6:40:46 Error in expression <Patches"; private _entry = selectRandom ("isArray (_x >> 'author')" configClasse> 6:40:46 Error position: <("isArray (_x >> 'author')" configClasse> 6:40:46 Error Missing ; 6:40:46 File x\cba\addons\help\fnc_setCreditsLine.sqf, line 29 Only this error appeared so far.
  25. Can it be modelToWorld [0,0,0] ?
×