Jump to content

ArmAIIholic

Member
  • Content Count

    543
  • Joined

  • Last visited

  • Medals

Everything posted by ArmAIIholic

  1. The new WICT v5.0 is officially released!!! Please visit WICT homepage for download and instructions. I am working on manual, demo and snippets. I hope you will like it. Thank you all for being patient.
  2. Big part of writing new script is done. Hopefully I will have time to test it today and correct any bug that might appear. The new version should be out by the end of this week - WICT 2011 (I am not sure whether it will be v4.5 as announced on website or brand new v5.0, it is really different coding, but still the same old concept). Therefore, the manual won't follow the release immediately, but I hope it won't take me long to make a new one and that you fellows will help me. See you soon... P.S. and Katipo66 I still want to see your tutorial about calling random script :) ----- ‎"When you find your path, you need to have sufficient courage to make mistakes " Paulo Coelho, Brida
  3. Thanx, I miss you too, and comments and ideas :D I will try with all my might to finally release the new version.
  4. I really don't know. I am giving a lecture on Wednesday, so I am preparing it. Maybe I will find time to take a look at unfinished coding on next weekend, but probably I will have a plenty of time around New Year, especially first week of January.... But I really can't make any promise. Still, I miss the thrill of coding.............
  5. That topic was already discussed -- base capturing is not purely random - your position as the player determines the "flow" of the battle. Engine will be completely different, but "philosophy" stays the same. New engine will be more stable, easier to understand and setup, but it will retain all "advanced" features. The main improvement is pool of units and vehicles, so it will be peace of cake to make new variants, squads / groups etc.
  6. Isla Duala sandbox is waiting for new WICT. It is illusory to make anything while engine is not finished... Besides, making missions was never my primary objective. Therefore, first I will properly finish and release the engine, then I will consider making that sandbox. I am really sorry for that kind of situation, but I have to make priorities --> engine > website (manual) > mission.
  7. As a pro-swimmer for 19 years --- I never give up :D I am not used to giving up, more exactly :)
  8. Victim ZSU you are not the first one reporting that problem with BIS_fnc_findSafePos function... I haven't read this thread for a long time, but maybe it has a solution: An annoying AI swimming problem
  9. Maybe around New Year... :( I am too busy at the University. What I have to do is to make one global function that controls spawning process. There are no more templates, everything is pool-based and all units and vehicles can be custom. But I don't have time for making a final code because it is not enough to write it down, I have to test it myself and to make a demo mission...
  10. Wolffy.au, your version doesn't have a and b I implemented since I had problem with number of elements provided and their format....
  11. Here you are, this is the final version I had, and I just added Wolffy.au 's check that BIS Functions has been initialized at the beginning of the script. /* ======================================================================================================================= Script: BIN_taskPatrol.sqf v1.3 Author(s): Binesi Partly based on original code by BIS Description: Creates a continually randomized patrol path which circles and intersects a given position. Parameter(s): _this select 0: the group to which to assign the waypoints (Group) _this select 1: the position on which to base the patrol (Array) _this select 2: the maximum distance between waypoints (Number) _this select 3: (optional) debug markers on or off (Number) _this select 4: (optional) blacklist of areas (Array) Returns: Boolean - success flag Example(s): null = [group this,(getPos this),250] execVM "BIN_taskPatrol.sqf" null = [group this,(getPos this),250,1] execVM "BIN_taskPatrol.sqf" // Same with debug markers ----------------------------------------------------------------------------------------------------------------------- Notes: Wolffy.au If anyone is interested, I've made some additions to Binesi's BIN_taskPatrol script. Random initial patrol direction - I noticed every patrol started off in the same direction, so I've randomised it. Fixed the 2D position / findSafePos errors Added building positions as possible patrol locations using Random Building Position Script v1.0 by Tophe of Östgöta Ops Added check that BIS Functions has been initialized ArmaIIholic -- added JTD direction normalization function -- changed numbers for waypoints to match previous waypoints -- randomized initial direction - Wolffy.au added only the offset -- fixed error with building position format -- randomized initial direction -- Wolffy.au added only the offset which had to be reduced to 180 - however this script is making full circle from wherever it starts ======================================================================================================================= */ if (isServer) then { waitUntil {!isNil "bis_fnc_init"}; _grp = _this select 0; _pos = _this select 1; _max_dist = _this select 2; _debug = if ((count _this) > 3) then {_this select 3} else {0}; _blacklist = if ((count _this) > 4) then {_blacklist = _this select 4} else {[]}; _mode = ["YELLOW", "RED"] call BIS_fnc_selectRandom; _formation = ["STAG COLUMN", "WEDGE", "ECH LEFT", "ECH RIGHT", "VEE", "DIAMOND"] call BIS_fnc_selectRandom; _grp setBehaviour "AWARE"; _grp setSpeedMode "LIMITED"; _grp setCombatMode _mode; _grp setFormation _formation; _center_x = (_pos) select 0; _center_y = (_pos) select 1; _center_z = (_pos) select 2; if(isNil "_center_z")then{_center_z = 0;}; _wp_count = 4 + (floor random 3) + (floor (_max_dist / 100 )); _angle = (360 / (_wp_count -1)); _newangle = 0; _wp_array = []; _slack = _max_dist / 5.5; if ( _slack < 20 ) then { _slack = 20 }; _setdir = round (random 1); _angle_offset = random 180; while {count _wp_array < _wp_count} do { private ["_x1","_y1","_wp_pos", "_prepos","_bldgpos","_bldgs","_a","_b"]; _newangle = (count _wp_array * _angle) + _angle_offset; if ((_newangle > 360) || (_newangle < 0)) then { _newangle = abs (abs (_newangle) - 360); }; if (_setdir == 1) then { _newangle = -_newangle; if ((_newangle > 360) || (_newangle < 0)) then { _newangle = abs (abs (_newangle) - 360); }; }; _x1 = _center_x - (sin _newangle * _max_dist); _y1 = _center_y - (cos _newangle * _max_dist); _prepos = [_x1, _y1, _center_z]; if ( isNil "_center_z" ) then { _prepos = [_x1, _y1]; }; _wp_pos = [_prepos, 0, _slack, 6, 0, 50 * (pi / 180), 0, _blacklist,[_prepos]] call BIS_fnc_findSafePos; _a = 0 + (_wp_pos select 0); _b = 0 + (_wp_pos select 1); ////////////////////////////////////////////////////////////////// // The following code is an extract from Random Building Position Script v1.0 by Tophe of Östgöta Ops ////////////////////////////////////////////////////////////////// _bldgpos = []; _bldgs = nearestObjects [[_a,_b,0], ["Building"], 50]; { private["_i","_y"]; _i = 0; _y = _x buildingPos _i; while {format["%1", _y] != "[0,0,0]"} do { _bldgpos = _bldgpos + [_y]; _i = _i + 1; _y = _x buildingPos _i; }; } forEach _bldgs; if(count _bldgpos != 0) then {_wp_pos = _bldgpos call BIS_fnc_selectRandom;}; _wp_array = _wp_array + [_wp_pos]; sleep 0.5; }; sleep 1; _j = count (waypoints _grp); for "_i" from 1 to (_wp_count - 1) do { private ["_wp","_cur_pos","_marker","_marker_name"]; _cur_pos = (_wp_array select _i); // Create waypoints based on array of positions /* The index i is changed so it matches previous waypoints - j+i */ _wp = _grp addWaypoint [_cur_pos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointCompletionRadius (5 + _slack); [_grp,_j+i] setWaypointTimeout [0, 2, 16]; // When completing waypoint have 33% chance to choose a random next wp [_grp,_j+i] setWaypointStatements ["true", "if ((random 3) > 2) then { group this setCurrentWaypoint [(group this), (floor (random (count (waypoints (group this)))))];};"]; if (_debug > 0) then { _marker_name = str(_wp_array select _i); _marker = createMarker[_marker_name,[_cur_pos select 0,_cur_pos select 1]]; _marker setMarkerShape "ICON"; _marker_name setMarkerType "DOT"; }; sleep 0.5; }; // End back near start point and then pick a new random point _wp1 = _grp addWaypoint [_pos, 0]; _wp1 setWaypointType "SAD"; _wp1 setWaypointCompletionRadius (random (_max_dist)); [_grp,(count waypoints _grp)] setWaypointStatements ["true", "group this setCurrentWaypoint [(group this), (round (random 2) + 1)];"]; // Cycle in case we reach the end _wp2 = _grp addWaypoint [_pos, 0]; _wp2 setWaypointType "CYCLE"; _wp2 setWaypointCompletionRadius 100; true };
  12. I don't know what could be the problem just reading your description above. Some people tried putting other factions, no one ever reported a problem.
  13. new release of WICT (v4.5) won't be an addon
  14. xa xa xa Unleashing the beast of spawning, right? Great work and idea Katipo66, could you do an article for WICT homepage? :cool: We are rising sandboxing to another level? Do you even know this gave me goosebumps and chills through my spine -- a whole new chapter man :) What I have in mind right now is "Mass Effect 2" ;) I really can't wait for that article, make a nice tutorial please, this will be fantastic for Marshal of Savana. You nailed it once again with your idea, pure beauty and ellegance... I am speechless...
  15. I will check this, but since you measued time, I concluded it the matter of clearing script which operates on every 5 sec. Actually it is not designed for what you tried to do, but I also ran similar tests, and I will run then again when I get home. Now let me explain -- the main assumtion is that once there is too many units on the field script for clearing memory kicks in it usually has much to do when clearing dead units and groups usually it exits - because that is enough that's why it has two limits -- like a buffer / tampoon zone But what you did is to force it to work right from the beginning, so I guess that could be source of the problem --- you forced it to work repeatedly so that's why you observed 5-sec-behavior of the units. What you can do is to zip the mission and send me, so I will check it out once I have time. Sincerely, A2H I hope gaming will be even better with new one :D Cheers
  16. I will check problems you reported, but I still cannot understand that AI units that were beside you didn't rush to engage in fights if the fight is near. However, I will check it before releasing a new version, and I will test with the same parameters. I personally think that you are still missing the point of WICT, although idea of allying faction and increasing number of units is good, and I already discussed it with zapat few posts before, there are some problems and limitations that would require completely different approach, believe me, you will see the FSM when it comes out. Everything you wrote here: is based on wrong assumption --- the fact is that the role of the player is to determine the position of the battlefield, so: -- if you increase the spawning distance player can "knock out" enemy base from the distance and THAT is the reason why it is more easy to capture -- when player moves battlefront moves with him every turn!!! So, basically this is dynamic environment where player needs to adapt and watch what AI does and use situations, small victories, vehicle wrecks etc. to move. The goal is to keep moving, to come closer to enemy base, be patient and wait for reinforcements to clear the area. That's why I make COOPs, it is not a massive shooter "shoot as many as you can", but "cover me while I assault the position", and AI can help you a lot. Cheers
  17. Bases' setups are loaded every time the base is active. Actually the formulation you've made is possible, but it could be done on limited number of bases and limited number of units. Reason: the calculation have to be extremely precise, since it is easy to go over a 100% with spawning probability, which is bad. In your example above 10 bases will give 100% of spawning and nothing else from that base can be spawned... So either you would have to adjust number of bases or, better solution, to adjust your coefficient :) For example (scenario), you want particular base to spawn max 50% of infantry, and other 50% are light vehicles. Now you want to make number of light vehicles depending on number of bases. "They" can have maximum(!) 10 bases captured, so you will make: E_lightveh = count WICT_ebl * 5 therefore you can make one side holding 5 bases and the other holding other 5 bases. In that case your configuration will produce 25% light vehicles with a chance to dynamically go to 50% or to 0% depending on battles. Problem: this can work ONLY on bases with ONE CLASS PER BASE!!! Don't forget that probabilities are cumulative, in order to make die with uniform distribution between 0-100. So you would mess the whole system by dynamically changing probabilities. Conclusion: it is possible, but in limited number of cases
  18. ArmAIIholic

    Civilian kill Counter

    thanx shk :) that's what I meant with idea. I don't even have time to sit in front my PC and finish the addon, too many other obligations. I learned from your example that one can call the variable. I was using it coupled with compile /+ format syntax. Thanx so psvialli there you have it. hope you will use it well.
  19. ArmAIIholic

    Civilian kill Counter

    In my opinion script should go like this: 1) search through all units to find civilians http://community.bistudio.com/wiki/allUnits http://community.bistudio.com/wiki/side 2) add eventHandler killed to all of them http://community.bistudio.com/wiki/addEventHandler 3) execute one simple script that would update a number of killed civilians... 4) on every update check a critical level for ending mission This is just a draft. I hope it would help. Sorry don't have time now to write that script down and test it, but I truly hope someone will get the idea and make it. Cheers
  20. You clearly missed essential stuff... Editor units won't "join" by themselves, but only when the limit is reached, and I clearly wrote that this is due to a fact that WICT is using all units (not named units) when global assault begins. So only when WICT_jam is reached spawning will stop!!! However, the global assault will begin when WICT_numAIg is reached!!! And I suppose from your description that those placed units WERE NOT involved in the battle :) because if they were near you and WICT is spawning enemies they would fight! So my deduction goes like this :D : 1) you placed editor units far away 2) WICT was kicking around you in God mode 3) editor placed units were deleted ...because there is option removeMan and removeVehilce. So, yes, WICT is actively removing men and vehicles if they are far away. Now, I don't know why editor placed units are not moving and I will check that out, but I didn't change anything there from the last time, so it should work (but I will check -- I have never a priori dismissed a bug report). Number of bases is not important. WICT is not calculating probabilities taking into account number of bases. Yes, both sides get the "same number of units" but depending on base configuration, one base can get tanks and the other can get the infantry. So the accent/stress is not on the number of bases, but on the bases' types, so when designing or playing a mission you have to think about capturing/unlocking bases that will give you more power. Therefore, when you design a mission with WICT there is a strategical moment when it comes to base design. You have to think: "what should player do to gain tactical advantage over the enemy and start shifting the battlefront". If I had designed the script your way, then it would have been completely unimportant what player does since enemy would have 99 bases against friendly's 1 base, so that base would be crushed in no time. This system gives player possibility to attack weak bases and to progress on the battlefield. I hope you now understood the philosophy of WICT :cool:
  21. Yes, something like that. I found some good scripts for Dedi task update and I am planning to put Double trigger method to the best use. I just need to come out with some "protocol" for designing mission, so they can be connected like LEGO bricks :D
  22. Your ideas are excellent and I should really dig into scripting to make them even better. Independents, as I said, cannot be spawned as a separate SIDE, but if you want to join them with Russian forces it is a piece of cake via UserSettings. http://wicta2.wikia.com/wiki/Scripting#Making_scripted_missions Try starting with that and ask questions here. It is powerful script!!! You place units, put some lines in leaders init field and make a trigger, just basic stuff you have to know already if you are making such mission. So don't be afraid and experiment with scripting :) we are all here to support you!!!
  23. @ kyfohatl 1) It is possible to put WICT base in neutral list and to put some independent forces to guard it. Since independent forces are not considered as "main" force in the game I never wanted to make system for spawning them. However with Murklor's spawning system that is implemented in WICT you can have limited spawning on trigger so you can make a effect like some new, fresh independent forces arrived. Just one remark -- new WICT will have a pool of units that you can fill in with any unit/vehicle from any mod, but still WICT will be working with ONLY 2 sides spawning in turns -- BLUFOR and OPFOR. 2) Yes it is possible, but you have to open at least some of templates man :D And from your question you I see you didn't bother to look at UserSettings and templates. However, since I realized you are not the only one, I am now making it more simple. You can make your own templates, change units and vehicles and all that stuff. Open for example W_reginf, and open some .sqf = 1.sqf, 2.sqf .... You will see it is a template that creates units. So you just have to change classnames. 3) That is nice idea for a mission :D No, you cannot force the spawning process if the player is too close to the base. What you are describing is scenario that needs to be scripted (and not based on probability). What you can do is to make a mission like this: 1) make a trigger that can be: a) convoy with player entered trigger, b) vehicle is destroyed or cannot move, c) player is not in the vehicle anymore 2) when condition is met change trigger variable from 0 to 1 and publicVariable so some scripted Murklor's battle starts, plus you put some null = [] spawn {sleep X; start WICT}; command 3) test your system a little bit and determine that X time and position of the bases Therefore, you can make exact scripted events every time someone starts your mission, but the WICT kicks in and takes control over events. ---------------------------------- WICT is extremely powerful when it comes to the making probability based dynamic systems. However, I made an article Unleashing the beast of spawning, and I will make more of them about making scripted scenarios and dynamic stories, so you can stay tunned, learn some stuff and them make some fantastic mission. What I am trying to implement in WICT, besides improving performance, is dynamic task system coupled with spawning from SQF script, so that mission designers can easily make and connect missions into bigger story. The goal for now is to make such flexible system, so for example, 20 people can make several missions separately around some story, and then those stories can all be assembled in some open world mission, like we know from GTA4 or Red Dead Redemption. But that is long and heavy "story" to pull out :cool: I hope I've helped :D
  24. Yes, it is completely different, with same philosophy but with many functions and scripts with totally different coding. Although for me is easy to convert mission from 3.5 to 4.5 :) Mission won't be compatible, but I already wrote about some "conversion" tips. It is possible to convert 3.5 to 4.5 mission, it is just a matter of how skilled you are. It is your decision. You can make some small missions, test them and play around, and when WICT 4.5 is released you will have mission concept.
  25. Xa xa xa, this is hell of investigation!!! :D yeap, that's why new WICT has battlefield "indicator". I suppose kyfohatl that you are too close to the west base, so of course it is not spawning anything. Place your west base further away from the player, and be sure to check what are Spawn Distance and Scan Distance. I will see to make it even more intuitive in the next WICT. --------------------- LockJaw-65- it is not JUST a teaser :cool:
×