Jump to content

Rydygier

Member
  • Content Count

    4805
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Rydygier


  1. Well, you can use something like this:

    _pos = position Center;
    _pX = _pos select 0;
    _pY = _pos Select 1;
    
    while {not (isNull Center)} do
    {
    for "_i" from 1 to 5 do
    	{
    	sleep 120;
    	_dX = (random 250) - 125;
    	_dY = (random 250) - 125;
    
    	_pX = _pX + _dX;
    	_py = _pY + _dY;
    	_bum = "ARTY_Sh_81_HE" createVehicle [_pX,_pY,-5]
    	}
    }

    Where "Center" is the name of any placed in editor object.

    I do not know, if there is any available 60mm shell, above is used vanilla ARTY 81mm. Notice "-5" value - shell will be spawned 5 meters below ground level. This will noticeable reduce explosion damage range to be more like 60mm (you can experiment with this value to adjust strenght of explosion, 0 will be maximum here).

    I think, that this PMC arty is more sophisticated, and spawns shells randomly, but never to close to player's group. And looks, like center in that mission is player position. Not sure though. Anyway such thing is possible as well if needed.


  2. Does the High Command AI of Hetman still recognize enemy forces despite no enemy commander being present?

    Yes. Recognition is based only on knowsAbout parameter and getFriend parameter (all groups on map are every cycle divided as friendly and enemy by getFriend filter, then code checks, which enemy is known to Leader (means also known to any Leader's subordinate group)), so opposite Leader is not needed for that. Described issue (ignoring enemy) is strange. Are you using vanilla units, OA or custom/DLC? If OA or custom/DLC - is proper RHQ array set up for them? Any other AI addons involved (eg messing with knowsAbout factor)? I can check, what is going on, if you give me this mission (unless this mission needs some addons, that I haven't, but even then I can check init config and some other things).

    is it also possible to make your commander issue move orders with any other speed than "low"?

    Story is as follows: Initially all groups was moved with normal speed, but there was numerous requests, so if target waypoint is far away, groups should move slower. So currently HAC will decide, if waypoint is far enough (and some other things are true) to switch speed as slow. If waypoint is close, or some other circumstances occur, then speed will be normal.

    I have optional turn off limited speed (all groups always running) in my "TO DO" list however, so this will be done someday.


  3. @Anthropoid

    If you want to study AI, then I can only congratulate you a good choice. This is very fascinating topic. I'm not so knowledgeable, first scripts created about a half year ago, and still learning. Also not know nearly anything about programming except Arma scripts. I can confirm, that first steps are the hardest, but definetelly worthy to take.

    And yes, 3 hour limit in Freedom Fighters mission I personally considered as sabotage. :) (as any time limit in any mission) Even without this "FF" is probably too hard.


  4. Added some new sounds, not know, if all are acceptable. You can check this out. But fail to found any new battle "insults", pity, there is only four of them. Added "surprise attack" - when attacked "knowsAbout" attacker parameter is less than 3.9 (rare), then attacker has doubled chance for hit.

    In "Sounds" folder is located "lic.txt" file. Inside you can find info about used sounds: www origin, author, kind of license, original file name, name used in "Melee". All sounds not mentioned there are fully free and taken from:

    soundfxnow.com

    Limitation for player: player can attack enemy, that: is the closest one AND is in front of player. So if you attack enemy, that is in range, but behind you there is any closer enemy, then yours attacks will be futile. This matters in big battles.

    Melee G

    Well. This will be all, as for my plans (but maybe I'll figure out something more). Give me a word, if you have any other wishes, or if you discover any bugs to fix. I'm very glad, that I can help and have a humble participation in this project, this is really great fun. :) I look forward to see and use the complete addon.


  5. Hetman is not designed to work with already done missions. This is a tool for mission maker that want to have eg intelligent, dynamic opponent commanding all/part of enemy groups or want to prepare mission with player as such general commander's subordinate, or to prepare only some dynamic war background for mission's plot, or just for a lazy player (as me), who wants only to set up some groups, and voila, get dynamic and unpredictable, but conducted in reasonable and sofisticated manner "instant battle". All info you can find in manual. Shortly - if you set up in editor groups, as many, as you wish, name one of the TL properly and add for them some objective triggers in places, that should be attacked by them (all described in manual), best also some opfor on map (eg defending these objectives' area, or some spots en route), maybe even with own objectives and own Leader, then all these groups get a higher level commanding "brain", that will issue them a waypionts in the manner, that should in certain limit mimic human commander orders (no random, no straight forward, but with flanking, logistic support and so on) with main target - to capture all its objectives and secondary - to defeat any spotted enemy. Artificial commander is, technically, some kind of decision-making automaton with "blurry intelligence". Check also included demos to see with own eyes, what HAC do.

    As for "Lost" problems - not sure frankly. Played this some time and will play more, also played with ASR, but for me all works rather good. Regroup works, like should (only ASR feature of rearming sometimes is a little annoying, when you unload cargo, and all, one after one, are going to pick up some shitty smoke grenade stored in teh cargo, pistol without ammo or something like that. Hard to customize their armament, if without weapon they try to arm theirself immediatelly. Sometimes I'm forced to hide cargo from my own men to avoid this "wild rearming"), HC orders are also usually fulfilled. Still, for example I never switch to another unit, not needed. Generally I mess with all this commanding stuff as little as possible. Only sometimes some units incorporate into my group (eg for retrieving BRDM for me as vehicle), and with some creating separate group - nice tool. 90% stuff doing myself. One thing - if group knows about enemy will try to deal with them before return to movement toward waypoint. It is normal, AI behaviour, not so easy to avoid, and for this separate scripting is needed. All also depends, what changes in AI or HC mission maker did. Only he knows full answer, I think. It is possible, of course, that used custom HC scripts contain some problems and issues, I'm not too good familirized with them yet. One for sure - need to accustomed, that in Arma units by default have some degree of independence, and aren't like puppets, that do always exactly, what was ordered and absolutelly nothing more. Especially when in fight. If I found time for more playing will try to do, what you do and if notice something helpful, will describe this in "Lost" thread.

    ---------- Post added at 09:21 ---------- Previous post was at 09:11 ----------

    I use 3, sometimes 4, but you should probably create a poll for that question so people don't have to post.

    So created a poll. :)


  6. Blood particles slightly reworked for less "KillBill effect" and more diversity, diversed anim speed dependent on skill "endurance" and current fatigue. Package includes yours pbo in folders prepared for addon (now required):

    version F

    Next step - more sounds for miss and flesh/bone hit. I think, that tommorow will try to find something at soundBible.com - from there are almost all Rincewinder sounds. Licenses are mostly friendly, mostly only info about contribution is required. Considering also hit bonus for attacks from behind, but AI sometimes still refuses to turn towards enemy, so instead of direction knowledge factor may be used for calculating bonus of surprise attack, still, for such minimal distance knowledge almost always will be high, I think. Well, these are knights, no ninjas. :)


  7. There is (or rather probably will be) one important reason for eight Leaders - big boss. One Leader per flank, one in center, one as reserve, opposite side - same. For such army set up four per side is better, than three per side (still possible - one per flank, no center, one in the reserve). Shortly - greater number of Leader gives more army set up possibilities for big boss.

    Still time cost of maintaining HAC's code may prove more important factor, and then, if neccessary, number of Leaders may be reduced...

    So a question for any HAC users: what was maximal number of Leaders used by you simultanously so far?


  8. Intriguing issue. At the moment no idea, what is causing this. Perhaps first thing to find out is if this issue will occur on the same map after same time, but without HAC (maybe some manual set of looped waypoint routes to mimic mission dynamics somehow). I can re-think code flow through all loops, but doubt, if find anything this way. Empirical way may prove better - lots of diagnostic diag_logs in each file to know, where code is (stuck?) after theses houres. But this is too time-costly. Running computer all night for some reasons is not an option for me.

    As for me - stuck currently at stage, when trying to make, so all Leaders will use same set of files. It is possible (lots of work though), but realized, that if I do this as previously planned (most of global variables, and there is lots of them, must be replaced with setVariabled values), then amount of code will be reduced, but used files will be noticeable larger and less efficient, so HAC after this may paradoxically work worse. Must do this change before start think about any new features or improvements. So, until some new idea will appear in my brain, I'm doing some secondary stuff, lately for example melee combat scripts.


  9. Added fencing ability for player (for some important reason has slightly lesser range, than AI) - attack by LMB click. For player apply usual limitations: chances for hit and block, delay between attacks, fatigue impact. To deal damage player must stand 3 or less meters from target facing towards it (+/- 25 degrees). Otherwise only stroke animation will be played and fatigue raised.

    I'm quite satisfied with the results of better synchronization of attack anim and all hit effects. In this demos there really is some nice feel of connection between stroke and hit. Last (?) things on my list will be diversification of anim speed dependent on skill and fatigue, more sounds and perhaps some efficiency improvements (still not tested with really big battle, afraid, that may occur sqf exec delays because of CPU cycle limitation, if so, then all this can be translated as fsm, I hope). Two files here: one for AI fencing, another for player fencing demonstration.

    version E

    EDIT: did some stress test with this version, results aren't too exact, but seems, that for my weak CPU limit is located somewhere between 60 and 120 simultanously fighting units. For 127 all still works, but can be noticed ugly delays in unit's response on situation and particle blood sources aren't removed on time, so looks weird hanged in the air. Some lagging also occured. For about 60 units there was not a sign of such delays.

    Noticed, that biggest delay impact is on this blood particles, even when "thin". With blood reasonable limit for my CPU is 60-70, without - a hundred units or more.


  10. Quite similar problem here.

    Decided to try displayAddEvenHandler command, so for easy start, just pasted into my init.sqf example code:

    moduleName_keyDownEHId = (findDisplay 46) displayAddEventHandler ["KeyDown", "hint str _this;"]; 

    provided here:

    displayAddEventHandler

    Then in preview mode tried to press some keys - nothing happened. Obviously I know yet absolutelly nothing about all this display/control stuff, so for sure problem is invalid usage. So - how to use this in proper way?

    My goal is to make, that certain code will be executed everytime player will press mouse button or keybord key.

    Same effect - none, for displaySetEventHandler.

    Tried also same way, as author of this thread:

    _display = findDisplay 46;
    
    moduleName_keyDownEHId = _display displayAddEventHandler ["KeyDown", "hint str _this;"]; 

    With such error message:

    "Variable "_display" does not support serialization. (...)"

    Why this is happening?


  11. The creation of the new animations is rather easy, we could copy and paste the animations and name them like e.g. this and pack them into a pbo using the config I posted earlier:

    class AmelPercMstpSnonWnonDnon_amaterUder3_high: AmelPercMstpSnonWnonDnon_amaterUder1

    {

    ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.02};

    InterpolateTo[] = {"AdthPercMstpSnonWnonDnon_2",0.01,"AdthPercMst pSn onWnonDnon_3",0.01};

    file = "\Ca\Anims\Characters\data\Anim\sdr\mel\erc\st p\no n\non\AmelPercMstpSnonWnonDnon_amaterUder3";

    speed = 0.35;

    //speed = 0.223881;

    };

    Have only a little experience with configs. This goes into description.ext like sounds and can be used only from pbo, unlike CfgSounds class or can be used same way in demo without pbo? And, for this exampe, I should put into my animations list array "AmelPercMstpSnonWnonDnon_amaterUder3_high", and then to use like:

    _unit playMove "AmelPercMstpSnonWnonDnon_amaterUder3_high";

    right? Only speed value should be touched, or these other values (whatever they mean) too?

    EDIT: Now will make attempts to add melee ability for player, however I'm not sure, if this will work. Changed one little thing in last demo, so currently rate of strokes is higher, like was intended (problem was, that after each hit attacker was waiting for end of "I'm hit!" animation and pause, this issue is removed now, and difference is noticeable, fight is more dynamic and "realistic"):

    version D

    Added also some experimental code to prevent starting new "hit" animation, if enemy was again hit before end of previous hit animation, for better fluency.


  12. Yes, M&B is quite unique. Had this game some years ago.

    For now, next version (this time battle is bigger):

    FencingAIverB - still wip

    What's new:

    - added sounds (by say3D, for better "surround" effect, also in description.ext added for each file new parameter for fading at reasonable distance (set to 200 meters). Wandering, if is possible to randomize somehow pitch of each shout sound for more audio diversity);

    - better balanced;

    - chance for hit/block dependent also on unit's damage;

    - experimental: after each hit chance for additional particle blood. Bigger chance and more blood for more damaged units and stronger hits (sometimes KillBill-like gore effect :) );

    - experimental: fleeing and/or surrendering. When unit is wounded, there is a chance, that will panic and flee or will drop weapons and raise hands as captive. Captives will flee, if no non-captive enemy is nearby. Also implemented simple "crowd effect" - the more units in flee/captive, the more chance for other of this side to do same. Captives do not fight, but also usually aren't attacked (ransom was important profit source in Middle Ages, if I'm not mistaken);

    - not tested feature - if given units has assigned waypoint(s) and spot enemy en route, then waypoint will be not deleted, as before, but "suspended" for time of fight (or rather should be);

    - when distance is bigger than 100 meters or lesser than a few, then unit will move with limited speed, otherwise will run. Of course only, if know about any enemy (even with "spotDistance" skill equal to 1 distance, for which enemy may be spotted is not so big);

    - code fixes.

    Still AI-only...

    EDIT: trying to balance this such a way, so fencing skills will have real impact (swordmaster should be really dangerous for even several mediocre warriors). Should be great, if animations speed can be maded dependent on these skills (delay between attacks is), but not know, how to achieve such effect. Perhaps needed are several sets of animations, each set for given skill level.

    Give me a word, Icewidno, if you have any specific demands, what should be changed/improved/added.

    EDIT2: so there is rebalanced version. In this demo you can see one swordmaster and seven losers. Results are various, but sometimes master defeats all losers:

    FencingAIverC (corrected version uploaded - in previous there was screams of wounded instead of blades sounds :) )

    This is maximal skill gradient. Master has all three important skills equal 1, losers = 0. Skills:

    - "aimingAccuracy" for hit chance;

    - "aimingSpeed" for block chance;

    - "endurance" - strength and speed - relevant for fatigue gain and resting rate, for intervals between strokes and for average hit value; the more fatigued, the less chance for hit and block, lesser average damage, and longer intervals...

    Now can be useful some "woosh" sounds and also "flesh hits/skull crunching" etc...


  13. :)

    Yeah, true, probably this is vanilla group fleeing behaviour (each unit is a separate group).

    EDIT: It is. Disabled fleeing, and running away is no more. All are very, very brave now. :)

    BTW. Someone knows, what is difference between parameter set by allowFleeing and skill "courage"?


  14. As we all know, some "weeks" are shorter, than other (especially weeks of vacation). Anyway, already I have some result, I just could not resist to make some scripting about this today. It is very, very wip, but somehow works, so you can see, what is direction of my efforts here:

    AIFencing-very-wip

    (nothing to do, just watch)

    Implemented hit accuracy, block chance, various hit damage and attack frequency based on various skills. Also added fatigue factor, so with every stroke fatigue should to grow, and delay before next stroke should be rather longer, than same or shorter. If not in fight, resting procedure is active. All this of course not balanced yet. All randomized in limited range. SQF based only.

    Main problems at this stage:

    - often weird movement directions (they should always run towards nearest enemy then fight, but sometimes they don't, but rather running away, still should return sooner or later);

    - "stroke" directions for some reason often bad;

    - always running, but they should rather to walk, when enemy is close or very far.


  15. OK. Not sure at the moment when, may even pass some weeks, but will try at first to prepare some sqf from a scratch to explore and deeply understand the specifics of these fencing matters, and then will consider, if better is make this fsm, or stay with sqf. This rather will be not so complex, like these really impressive lightsaber scripts. And will try rather be based as far, as possible on default movement, not disabling everything, like some puppet master... :) Interesting challenge and new things to learn and practice. Exciting! Will return here with some results, so if I'm not return, this would mean simply no results to show. :)


  16. Lately I have great fun with this mission too. I love this kind of open missions, where no one force me to act in certain way, in fact even started some works with somehow similar dynamic SP some time ago (so now I'm not sure, if there is a point in releasing it, if will be ready someday, when great "Lost" already is here :) ).

    Running from hause to hause for loot and for "turning off" spy-eyes bring me to some conclusions:

    1. Espiecially on Chernarus map my be good idea not to change markers from white to black, but deleting (same info effect with saving CPU some unnecessary work, unless these black markers are somehow important).

    2. Such running across every town may prove quite tiring sooner or later, so what about my group members - is possible to make them do this for me? I can imagine, how nice effect will be, when you and yours men are entering the village, then you gives them simple search order, and they spread out and check every hause in some radius, one by one, and returning when ready... I admit, that for me in any mission team is usually more a burden, than help (preffering "lone wolf" style with SVD and RPG as optimal armament for any situation), cause must to watch their back all the time, what distracts me from my tasks, they also rather in not so effective manner consume valuable ammo (sometimes several mags, where one or two bullets should be sufficient) and so on... Anyway, with such functionality there will be one reason more to have and appreciate team help.


  17. After first look:

    - I see, that fsms are very similar to sqf, code syntax looks same plus some nice "block" algorithm organization, that is good;

    - found thing, that especially interesed me - attack animations. Curious, how their names was retrieved, if these aren't listed here:

    http://community.bistudio.com/wiki/ArmA2:_Moves

    Is there some other source of possible animations? or perhaps these are custom maded somehow?

    - still not sure, if will be able to help, but a question: any special wishes, what aspect should be improved? If I think about sword fencing, such aspects looks important to me: chance to block or dodge and perhaps at least three possibly targeted parts of enemy body: legs, torso, head (so attacker will somehow (by mouse targeting?) choose attacked part, defender will choose, which part is currently protected). Problem is, how to determine, who is atacker, and who defender, but I think, that for simplyfying may be considered, that both are attackers, when uses sword attack, and always some part of his body is simultanously protected by mail/shield/helmet or blade itself. As for AI fighting (or maybe player's too) - protected part is randomly selected, so no all attacks mean wounds/death, so fights may become more unpredictable, longer and immersive. Or simply, chance for blocking any attack may be bounded with unit's skills and/or kind (if has armor or shield) somehow also dependent of other circumstancies, as if enemy is armed or if is attacked frontally, or from behind (makes battles more tactical-friendly because of flanking possibility). Best, if missed strike will have own animation, but this is probably unreal, so sufficient should be no damage dealt in such cases plus another hit sound to signal, that attack was ineffective. Maybe also chance for loosing (dropping) sword during fencing, which obviously makes attack impossible, but also reduces chance for block strike... What do you think? Unless such features are currently present? :)

    EDIT: after second look:

    I saw demo and now can see, what do you mean, that FSM is lagging here. Hmm. Must learn more about FSM to know, why this is happening, if mission is so CPU-not-heavy. To much code as for FSM? Guessing, and there is no as much code here. Or maybe this is because, as I can see, there is disabled AI "ANIM" (I guess, totally replaced with chosen anims and emulated movement with not so smooth way? Full "manual" control over unit causing this?).


  18. I believe, that sqf-based zombies (why, oh why so many people are so facinating with walking corpses? :) ) is not lagging, because has limited by engine number of available for them CPU cycles or something like that, but this means, that where many sqf scripts at the same time are running, there may be big delays in their execution and sqf is then not reliable anymore (I saw this, when tried to use Nice_Boat's Tank Damage System in Harvest Red campaign; optional possibility of turning off this limitation for sqf will be great engine improvement for me). Fsm aren't limited in such way if I'm not mistaken, so there is no delays, but may occurs lags, when CPU is overloaded). As for today I know only sqf, fsms not a bit, however I'm determined to knom fsms too, so will look at this. Thanks. :)

×