Jump to content

Rydygier

Member
  • Content Count

    4805
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Rydygier


  1. HoI in Arma? Wow. Do this, man! :)

    Hetman indeed not tolerate unit caching. In maded decisions in many aspects HAC takes into account, what really is on map at the moment, and counts as loses all, what is no longer. Most probably such cashing from HAC's point of view is considered as massive casaulties, what have very fundamental impact on HAC's decisions, morale etc. I can somehow imagine a code, that will compensate this, but this will be tricky, written from scratch for every mission (because there isn't one standard for storing info about cached units), and so probably not worthy of needed work.


  2. There are some sqf substitutes for that, I think. Problem is to know where, in what moment and in what cases such code should be used, how to deal with local/global effects of given script commands (and to know, which of them works fine over net, and which are malfuncioning), and also important, how usage of given code will affect net traffic. Currently I'm even not sure, what is dedicated server, what differs it from normal server, if this is improtant, and haven't any knowledge about architecture and specificity of such MP prepared computers network or prepared for MP mission. There is also some concept of anti-cheat signing addons for MP, which also is beyond my skills. Easier is to mention all, that I know about MP, than all, that I do not know. Fact, that I never was playing any MP gameplay over the net with another people not makes all this not a bit easier.

    All this MP stuff is for me simply another world, terra incognita, sirens and sea monsters devouring ships drawn on map's blank areas... :)


  3. Well... MP scripting isn't my speciality, and I doubt if will be, cause MP is rather beyond my interests (never was too good in doing things, that not interest me). FSMs... FSMs are something, that lies somewhere ahead of me and tempting, so who knows? But I don't know any good tutorial for FSM's, haven't any "foothold" to begin learning, especially for level just above absolute beginner. As for functions for HAC - currently I'm doing exactly that. Cutting off some redundancy, and there is real hope for only one set of files for any number of Leaders, still this is a bit of work, and not everyday have a time to play with this.


  4. So it looks like some IF's incompatibility with HAC (or even vice versa :) ) if Arma don't share this problem (my tests with Arma confirm that also - got some hard time trying to fly after leader at waypoint one of these damn machines for testing purposes :) ). If I had to guess (and only this can do without IF) it is something about differiences in the manner of waypoint behaviour. Perhaps in IF same waypoint makes, that group doing something else, than in Arma. Only blind guess though. Thanks for testing stubs, great job.


  5. Yeah, last one is rather as "curiosity".

    ---------- Post added at 17:57 ---------- Previous post was at 17:28 ----------

    I was curios about that, so did some tests, where each code has to generate 10000 positions. Two series: first, when looped is only minimum (neccessary only) amount of code (eg object or location is generated and deleted only once):

    "time: 1.896" - my "math" method;

    "time: 0.717" - "object" method (used small can);

    "time: 2.267" - "location" method;

    Second, where looped is everything:

    "time: 2.823" - my "math" method;

    "time: 2.847" - "object" method (used small can);

    "time: 4.564" - "location" method.

    As you can see object method is best, when may be launched once for all positions. Otherwise "weight" of creating objects makes math and object methods equally efficient.


  6. True, easier, Tajin, but I'm wondering if also more efficient? After all behind modelToWorld, and behind creating an object are hidden calculations too.

    As for more "exotic" methods:

    _pos = position (_this select 0);
    _angle = _this select 1;
    _rg1 = _this select 2;
    _rg2 = _this select 3;
    
    _Loc = createLocation ["Name", _pos, _rg1, _rg2];
    _Loc setDirection _angle;
    _Loc setRectangular true;
    
    _range = 2 * (sqrt ((_rg1 * _rg1) + (_rg2 * _rg2)));
    
    _px = _pos select 0;
    _py = _pos select 1;
    
    
    _MpX = _pX + (random _range) - (_range/2);
    _MpY = _pY + (random _range) - (_range/2);
    
    
    while {not ([_Mpx,_Mpy] in _Loc)} do
    {
    _MpX = _pX + (random _range) - (_range/2);
    _MpY = _pY + (random _range) - (_range/2);
    };
    
    _result = [_MpX,_MpY];
    
    deleteLocation _Loc;


  7. I use such code with good result:

    _pos = position (_this select 0);//_pos is center point
    _angle = _this select 1;
    _rg1 = _this select 2;//x-axis
    _rg2 = _this select 3;//y-axis
    
    _px = _pos select 0;
    _py = _pos select 1;
    
    _MpX = _pX - _rg1 + (2*(random _rg1));
    _MpY = _pY - _rg2 + (2*(random _rg2));
    _trans = _pos distance [_MpX,_MpY,0];
    _angleI = (_MpX - _pX) atan2 (_MpY - _pY);
    
    _dX =_trans * (sin (_angleI + _angle));
    _dY = _trans * (cos (_angleI + _angle));
    _MpX = _pX + _dX;
    _MpY = _pY + _dY;
    _Mpos2D = [_MpX,_MpY];//result

    EDIT: this is in turn for "twisted" "real" rectangle, not parallelogram. In this way I understood yours question.


  8. Not a trouble, but big help, and thanks for this. So we know more now: there is IF:44 used, aicraft is at least with two seats, and this seems to be independent of "idle" orders - if one time (commented line) falling not occurs, and another - all idle turn off, falling occurs. We also know, that this happen, when aircraft arrives at its destination. More questions: this was "SAD" or "Destroy" waypoint? Machine is set for HAC as fighter (only Air RHQ) or bomber (also BAir)? But most important, that this is IF (another game, unles you mean I44 mod). So we will see, if this will occur also for Arma 2.

    Thanks for info about airstrip. Indeed - I'm really not a pilot. When flying it always end with big explosion, when I hit the ground - not able to maneuver and keep aircraft in the air same time, not mention of fighting simultanously. No skills. :)


  9. Thanks, stubs. Can you provide more details about this? Planes was flying, but not shooting or not flying at all (I suppose that, if engines was turned off)? What exactly aircraft this was? What kind of order was issued to them (marker description, if turned on)? In HAC code there is only one place, when engines are turned off - it is when vehicle reaches its target when in "idle" mode, but air units are (should be) excluded from idle orders...

    Unless problem is with engines turned of in the air - such thing was once reported to me earlier, but still see no way, how HAC could do that.

    EDIT: tested: placed one A-10 on the ground, and I'm sure, that HAC not issuing idle orders to this plane, as should be, so only theory, that links HAC with turning engine off fails here. BTW, have very small experience with planes in Arma (practically never use them, no need), so was surprised, when plane without any waypoint, on its own (without HAC) started to move across airstrip, but not quite straight, so eventually veered onto the grass and went into the bushes. Same with group of two F35B - jet ride to the park. It is normal behaviour?

    Anyway, to do something about I need repro mission, where this issue is exactly pointed and is present every time or often at least. Without this can't do anything, only blindly guessing.


  10. Indeed, seems, that something is wrong with used in function code, that should ensure positive values. Maybe became obsolete? I don't know, anyway remedy is simple. Add this code:

    if (_heading < 0) then {_heading = _heading + 360};

    or even not use function at all and do this simple calculation yourself:

    _align1 = (_aligns select 0);
    
    _target setPosASL _align1;
    
    _p1 = getPos _plane;
    _p2 = getPos _target;
    
    _dx = (_p2 select 0) - (_p1 select 0);
    _dy = (_p2 select 1) - (_p1 select 1);
    
    _heading = _dx atan2 _dy;
    if (_heading < 0) then {_heading = _heading + 360};
    _dist = _plane distance _target;
    
    [side _pilot,"base"] sidechat format["%1 first landing position follow heading %2 degs, distance %3 meters", _plane, _heading, _dist];  


  11. OK, people, decided to re-arrange my priority list. My another project:

    For now called "WarMonger", Kind of dynamic SP mission(s) plus framework for another, where whole map is covered by strongpoints (own code, but idea partially inspired by Igneous1's exciting RUFS project), patrols, garrisons, minefields (again, code is whole mine, but some ideas (idea of marked minefields) from Wolffy.au AP Mine Field) and so on, where all this is script-generated from null, means a scripts, that gives without any manual settings such effect for any empty map. All this semi-random and semi-unpredictable, means every time looks another way, but every time (well... mostly) should look reasonable. Init of such mission takes several minutes because of really massive caluclations of dozens of positions (based on locations surrounding mostly, searching for flat places etc), dimensions and optimal directions (many FOV scans). Important: there will be not a single damn spawn from thin air during gameplay, no caching, none. Player will get a map with all "pieces" from the beginning really existing on it. Exception may be maded for missions with Rincewinder, that will not kill immersion, because magick is irrational by assumption. It is for guys (and ladies, if any? Hmm... BTW any lady actually is on board?), for whom, like for me, such spawning "dirty trics" are simply huge immersion killers, that makes any action pointless and meaningless. This means two things: ready mission will be quite heavy because of many units on map (in such degree, that 100 groups per side becomes serious limitation here for Chernaruss map), and also lighter, beacause loops for spawn-checks are unnecessary here. For now beta-functional is "bare" framework, so main part is ready. At least one mission should be powered by FAW, Rincewinder, and HETMAN, all together (if CPU will handle all this of course, will see), so this is not so off-topic here - HAC's and any scripting main goal is playing, so decided, that I must to try pack all my "half products" into something "final", means really playable. :) Will see, if I could achieve this.

    is currently at the stage, when works may be paused for some time, so now will try to re-write big parts of HAC's code. After that HAC should work similar (same) way, but this is very needed for any kind of further improvements. I'm really tired of changing each eight sets of scripts for each new thing, when should be possible, that each leader will use same set (to reduce number of files nearly to 1/8). Currently to many unnecessary work, that also generates big chance for mistakes during change process. There are also many redundant parts, that now I'm ready to replace for functions (think, that now know enough about them). Next step should be inventing and implementing both mayor features, that awaits their turn long time - Big Boss (he should use "map sectorization" idea for gathering info useable in decision process), and guerilla mode for each leader (as third mode after offensive and defensive). By the way should be implemented also minor features, as flare usage and so on, and maybe some code improvements for existing features. All this are my plans. Still haven't ready concept for BB and guerilla. Now will see, if I'm ready now and knowledgeable enough, so if I'll be able to materialize all this and how long this will take.

    About last error:

    Did some quick test - tried to reveal non-existing unit for a group, or existing unit for non-existing group, but this not produce reported by meltedping error, so for now have not any idea about origin of this error.

    Thanks stubs, I think, that there will be many tests needed after above described changes. :) For now just enjoy HAC and report here any spotted duirng battles bugs or RPT errors.


  12. OK. Thanks for info. I know exactly where this error occurs (Rev.sqf - file unchanged since 1.1, so this is rather not about anything introduced in wips), but haven't idea, why. Syntax is good I think, otherwise this should repeat every 20 seconds.

    It is simply routine for revealing all allies and know enemies for player controlled team leaders and Leader's group. I can only guess, that this is because unexpected _x (Leader's or human TL's group) became null for some reason (was destroyed?) after defining this array (very unlikely, but possible). Not enough info. This was occured once, or repeated cyclical/often? Something noticeable occured same time or you did something? There was used any other addons? Can I see mission, where this error occured? This will be probably most helpful. For now I'm busy with something else, so for now can't do extensive tests trying to get repro on my own.


  13. Currently this is quite like this. As long, as there is someone alive in Leader's group, after his death next group leader will become a Leader, but with worsened parameters (reasons mentioned before). Only thing currently not implemented is morale drop after destroying all staff group. This is rather pointless, because morale is tested and used only in main HAC loop, which is ended, when there is no more Leader's group - after that morale parameter is useless in fact. However, is possible very simple external code, that may do with given army anything desired after such event, eg make'em all cowards, that very easily will run away (in fact currently same way morale drop affects groups). Something like:

    waituntil {sleep 5; (not (isNil "RydHQ"))};
    
    sleep 60;
    
    waituntil {sleep 30;(isNull RydHQ)};
    
    {_x allowFleeing 1} foreach RydHQ_Friends


  14. Currently new Leader has permanetly lowered competencies of his predecessor just because of that reasons - I think, that new Leader will haven't enough time during the battle to get such degree of control, as had previous leader. It is interesting idea to add additional pause before new cycle because of familiarizing with situation.


  15. I see. I was thinking about that some time ago - what will do an army, when it's general is no more. My answer was - first, will do its last orders with normal activity, because soldiers at the start do not even know, that Leader is dead. Only after some time, after many futile attempts to establish communication wit HQ begins to grow anarchy, and morale starts to drop. At least I think so. In my opinion may take long houres before that. So IMHO at first the only effect of lack of the HQ "brain" should be only lack of new orders. Decay of the forces will progress slowly, after some time. So now, is there need to implement such a long-term behaviour changes in HAC? Who will play long enough after Leader's death to see these changes?


  16. I did not suspect that there is so intense demand for such a niche ideas :) , if so, then I'm glad, that I may to try to do it not only for my own scripting practice and satisfaction, but also for someone, what always makes me more happy. Thanks for ideas and solutions, Zodd, this project is on my "to do" list, however, there are also some other ideas higher on that list, so this will not be maded "immediatelly".

×