Jump to content

sprucewaine

Member
  • Content Count

    53
  • Joined

  • Last visited

  • Medals

Everything posted by sprucewaine

  1. I copied larrow's code and tried running it through this setup. halfWorldSize = (worldSize / 2); allLocations = nearestLocations [[halfWorldSize,halfWorldSize,0], ["NameVillage","HistoricalSite","NameCityCapital","NameCity"], halfWorldSize]; { _pos = locationPosition _x; //Create the sector logic _logic = (createGroup sideLogic) createUnit ["ModuleSector_F",_pos,[],0,"NONE"]; //Default setting, which are optional _logic setVariable ["DefaultOwner","-1"]; _logic setVariable ["OnOwnerChange",""]; _logic setVariable ["OwnerLimit","0"]; _logic setVariable ["ScoreReward","0"]; _logic setVariable ["TaskOwner","3"]; //Set the sides for the sector _logic setVariable ["sides",[ east, west ]]; //Wait until sector is initialised waitUntil { !isNil { _logic getVariable [ "finalized", nil ] } && { !( _logic getVariable [ "finalized", true ] ) } }; //A size for the trigger _trgSize = 500; //Set the trigger size on the sector _logic setVariable [ "size", _trgSize ]; //Make the module update its trigger [ _logic, [], true, "area" ] call BIS_fnc_moduleSector; //Unfortunately the sector has not been written to also update its marker so.. //Get the modules trigger _trg = ( _logic getVariable "areas" ) select 0; //Get the triggers marker _mrk = ( _trg getVariable "markers" ) select 0; //Update the markers size _mrk setMarkerSize [ _trgSize, _trgSize ]; } forEach allLocations; But it only creates one sector. I don't know why its not working. More info on what I'm trying to do, i really like the idea of a scripted mission given how versatile it will be, just to drag the scripts over to any map. Once i get sectors on all the location spots, ill be trying to hook up the spawn ai modules.
  2. Is it possible to add an action to all objects through the description.ext? like? class CfgVehicles { class LIB_AmmoCrates_NoInteractive_Large { class UserActions { class CollectPoints { displayNameDefault = "Collect"; showWindow = 0; hideOnUse = 1; displayName="Collect"; position="action"; radius=0.10000; onlyForPlayer = 1; condition = true; statement = "this addAction ["Collect", {myCurator addCuratorPoints 0.15}]"; }; }; }; }; which the code doesn't work because i keep getting the (something) instead of ''' error. Anyway if its possible, i want to do this route instead of doing init code as this would mean that all objects placed by editor or Zeus would be affected.
  3. sprucewaine

    Rearming AI

    I can't figure out how to tell units to rearm when i'm in Zeus. How do you re arm units in high command and Zeus?
  4. Does anyone have a working example of creating a spawn AI module via a script? Simply doing this with _pos being defined, doesn't seem to do anything. (createGroup sideLogic) createUnit ["ModuleSpawnAI_F",_pos,[],0,"NONE"];
  5. sprucewaine

    Creating Sectors by Script.

    Upon retrying with a different map (stratis), i am still only getting one sector from your script. Would there be a mod that might affect anything? I got an ACE IF3 CBA setup.
  6. sprucewaine

    Tactical Combat Link - TypeX

    Hey, I love the mod. So glad to ditch alive, Alive was a great mod but it tried to do too many things, which made it contrast with vanilla features destroying the feel of the game. (Opinion, lol i am amazed at ALIVE still and people should still utilize it. I think the mod and alive are compatible as well, Best of both worlds) With caching and unit spawning by arma 3, and your mod.... making a lively world now flawlessly blends into the vanilla game. Couldn't thank you enough. On the side note, do you know what i could do about morale and retreating? Are you eventually going to implement that? Your mod makes the AI so responsive, that in zeus i was just appalled by the amount of dead bodies everywhere. The helicopters are a bit suicidal, and will even just hover almost like they are waiting to get shot down, I think i had to tell the pilot to land both times in zeus. Sometimes when they try to land, i think its way too close to the action. Are little birds and Chinooks treated the same? because both as a transport would probably require different approaches to dropping troops off in the field. I can see big helicopters landing troops near the action, but small ones should land much farther, and give the small amount passengers that they have a chance to approach the action in a clever/sneaky way. (I was playing in arma 3 development mode on the new map; I haven't tested the mod by it self on a standard map) Few ideas that you are free to ignore. It would be cool if dead bodies and wrecks were taken into consideration, making the AI avoid any areas with massive amounts of em. Squads probably shouldn't fight till the last man, squads should kinda have "health". If you spawn a 6 player squad and it gets down to 2 players, I wouldn't blame the squad for dismissing it self, wandering away from the enemy, and then eventually joining another squad later. I kinda wish there was a sentry / guard / cavalry escalation. Hetman had something like this. I just like the idea of the AI utilizing Scout units to get a "feel" for the whole map, they should be sneaky and not engage unless fired at (snipers take one or three shots at a squad, and then run into the forrests). Then the guards come in and will utilize the information gathered to move fronts or plan attacks. Everything else is just there for support. Of course the reason I'm telling you this is because AI mods don't work well together, so its best to just pick one. Anyway I'm sure what ever direction you decided to go in will be worthwhile, Looking forward to seeing future updates!
  7. Hey so ill give you a few tips of what I've tried to do with faction specific missions. If you work with configs, it can make your life a lot easier. I was trying to pull load outs for the re spawn inventory screen, and i manage to pull it off. configs = [ (configFile >> "CfgGroups" >> "Indep" >> "LIB_US_ARMY" >> "Infantry"), 1, false ] call BIS_fnc_returnChildren select {inheritsFrom _x isEqualTo (configFile >> "Man")}; loadouts = []; {loadouts pushBack getText (_x >> 'vehicle')} forEach configs; publicVariable "loadouts"; { [resistance,[_x]] call BIS_fnc_addRespawnInventory; } forEach loadouts; So you have your config entry, how deep the function is going to dig to pull things, and then that boolean is to make sure you only get the very last entry. Then you have it grabbing the actual cfgvehicle name. And then i used a foreach to apply to the loadouts. Anyway you could use this same method to pull all sorts of things, and organize em. Perhaps even sort out the "MAN" array by rank, and have the rank define the costs, so corporals would cost more. On vehicles you can look at number seats, so a quad bike would be cheap, but a truck would be expensive. Sorry that I'm not proficient enough to actually work all this out, but i hope this helps. If you want, you can also do all your costs by hand. [ getAssignedCuratorLogic player, ["ModuleFlareWhite_F",0.02,"ModuleFlareYellow_F",0.02,"ModuleFlareGreen_F",0.02]] call BIS_fnc_curatorObjectRegisteredTable; To individually set costs. Just keep adding to that array with CFG Vehicle, then the price. Cya around! btw if u do the last suggestion, if u add all the vehicle names of the same group, the groups should appear. You need all the vehicle names priced in the group, and for Iron front u need to include the winter units to get access to spawning the grouped units... for what ever reason. IIRC , they might of fixed it.
  8. sprucewaine

    Creating Sectors by Script.

    Gotcha, yeah ill try with other maps later, ATM i am doing the WW2 maps from iron front mod. I was going to be working with the base game maps and dlc maps eventually so, this will come in handy regardless. Thanks for the help.
  9. sprucewaine

    Creating Sectors by Script.

    I was not able to get that one to work, still only spawns one in the middle. "bis_o65 waiting" - the chat log, what ever that means.
  10. sprucewaine

    Creating Sectors by Script.

    Nvm i figured it out. Here is finished product. halfWorldSize = (worldSize / 2); allLocations = nearestLocations [[halfWorldSize,halfWorldSize,0], ["NameVillage","HistoricalSite","NameCityCapital","NameCity"], halfWorldSize]; { _pos = locationPosition _x; //Create the sector logic _logic = (createGroup sideLogic) createUnit ["ModuleSector_F",_pos,[],0,"NONE"]; //Default setting, which are optional _logic setVariable ["DefaultOwner","-1"]; _logic setVariable ["OnOwnerChange",""]; _logic setVariable ["OwnerLimit","0"]; _logic setVariable ["ScoreReward","0"]; _logic setVariable ["TaskOwner","3"]; //Set the sides for the sector _logic setVariable ["sides",[ east, west ]]; //A size for the trigger _trgSize = 500; //Set the trigger size on the sector _logic setVariable [ "size", _trgSize ]; //Make the module update its trigger [_logic] call BIS_fnc_moduleSector; //Unfortunately the sector has not been written to also update its marker so.. //Get the modules trigger _trg = ( _logic getVariable "areas" ) select 0; //Get the triggers marker _mrk = ( _trg getVariable "markers" ) select 0; //Update the markers size _mrk setMarkerSize [ _trgSize, _trgSize ]; } forEach allLocations; Yeah i apologize deeply for just taking code like that, and not understanding it all that well.
  11. Does anyone have a script or an immersive way to skip time? I would like for everyone to be able to change the time, either by adding an action to deployed sleeping bag (like zues has with spawn points), or a simple, if you sit down you get an addaction to skip the time 2 hours forward. It would be amazing if there was a fallout kind of way to skip time, with a slider and everything.
  12. How would you go about caching units only to be deleted later, but doing it all locally? Ive set up a nice script that populates towns with random patrols, now i just need a way for the patrols to get deleted once the player leaves the area. HNK_fnc_createVehPatrols does nothing, thats for later once i figure out how to delete the spawned units. :P Also i ment to type selectRandom instead of floor random.
  13. sprucewaine

    Unit Deletion

    I am pretty sure that there is still a group limit attached to that. Its like 288 or something now, bumped from 144.....
  14. I want the crew to stay in the helicopter, but i don't know how to get it to land in any other way but this. player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; if (_ammo isEqualTo "SmokeShell") then { _unit removeEventHandler ["Fired", 0]; _pos = [getPos _projectile, 500, 500] call BIS_fnc_findSafePos; _veh = createVehicle ["B_CTRG_Heli_Transport_01_tropic_F", _pos, [], 0, "FLY"]; _veh allowdamage false; createVehicleCrew _veh; {myCurator addCuratorEditableObjects [[_x],true ];}forEach units group _veh; //debug _wp = group _veh addWaypoint [position _projectile, 0]; _wp setWaypointType "GETOUT"; _veh addEventHandler ["GetIn", { params ["_vehicle", "_role", "_unit", "_turret"]; [tsk,"SUCCEEDED"] call BIS_fnc_taskSetState; [tsk] call BIS_fnc_deleteTask; call selectRandom [HNK_fnc_createTask_HVT]; {deleteVehicle _x}forEach crew _vehicle; deleteVehicle _vehicle; }]; }; }]; Keep in mind, ive spent the whole day trying out setWaypointstatement, and trying utilizing what the wiki example gave. _helicopter move (getPos _destination); sleep 3; while { ( (alive _helicopter) && !(unitReady _helicopter) ) } do { sleep 1; }; if (alive _helicopter) then { _helicopter land "LAND"; }; And the AI will just hover over where it is suppose to land. Also if you know how to add a waitUntil {speed _projectile == 0}, much appreciated because i keep getting generic error in any form of implementation i choose.
  15. sprucewaine

    Getting AI to land Chopper

    You are right about me reading the wiki wrong, i didn't expect it wanting the vehicle instead of the driver.
  16. sprucewaine

    Getting AI to land Chopper

    Welp, so apparently telling the leader of the group to land does nothing. You must tell the actual helicopter to land. so by adding a "vehicle this" to the waypointstatement, i managed to get it to work. :( half a day gone. Learning to script out everything so that you don't have to use the editor is an amazing and wroth while endeavor. You have the potential to create a live universe that can spawn it self when needed, and delete itself when not. If you do it correctly, it won't even matter what map its on, you could just copy and paste the scripts into any map and it will work.
  17. sprucewaine

    Getting AI to land Chopper

    Its not searching, its just hovering. The command works pretty well, but i haven't gotten it to work on a way point statement might be the issue. Although the way point statement works fine with any other command.
  18. sprucewaine

    Getting AI to land Chopper

    The do stop did not work, perhaps i did it wrong. I did both doStop units _veh, and doStop _veh. edit *I made a mistake and put _veh instead of this, but i tried this, and it still didn't work?* thanks for the suggestions on removing the event handler.
  19. _inf = "((configName _x) isKindOf 'rhsusf_infantry_usmc_base')" configClasses (configFile >> "CfgVehicles"); costs = []; publicVariable "costs"; {costs = costs + [getText (_x >> 'displayName'),0.001]}forEach _inf; [ myCurator, costs] call BIS_fnc_curatorObjectRegisteredTable; I know 'displayName' isn't right, this was just my last attempt at it before giving up. How do i make it so that it doesn't return the whole path to the config entry? I still hate this method of registering costs to curator objects as now it will be a flat rate for what ever category of isKingOf a mod will have. side note- I wish i could use the default costs that account for the units equipment, But still easily white list the entries that i want the curator to be able to spawn using mod config paths. Makes it so much easier than having to do everything by hand, also allows a ton of customization as eventually it would be cool to make your Zeus faction select able, and have it automatically get all the units for it.
  20. sprucewaine

    Hide Certain Units from Zeus Operators in Zeus Menu

    In order to hide groups, you would have to hide one unit to break the group. So lets say you wanted to make a group spawnable, and you have disabled everything? You would have to enable all the units and vehicles that make up that group composition to spawn it, and i haven't figured out a way to either only show group or only show units. Here are some examples. [ getAssignedCuratorLogic player, ["ModuleFlareWhite_F",0.02,"ModuleFlareYellow_F",0.02,"ModuleFlareGreen_F",0.02]] call BIS_fnc_curatorObjectRegisteredTable; This will make it so your zeus interface can only spawn these 3 things, everything else will be thrown out. So if you wanted to, you could just grab all the cfg vehicle classes you want them to be able to spawn, and individually set their prices. I know that sounds tedious, i currently am trying to find a way that will utilize the config and just automatically do it. myCurator addEventHandler [ "CuratorObjectRegistered", { _classes = _this select 1; _costs = []; { _cost = if (_x isKindOf "rhsusf_hmmwe_base" or (_x isKindOf "rhsusf_infantry_army_base") or (_x isKindOf "Module_F")) then {[true,0]} else {[false,0]}; _costs = _costs + [_cost]; } forEach _classes; // Go through all classes and assign cost for each of them _costs } ]; Using Cfg Class trees, you can plug them into the isKindOf area, and can build your list of assets by doing that. This code sets everything i want to being free, and everything that isn't what i called to hidden. Eventually i want to figure out how to set individual prices or try and combine it with the default costs module. What ever you do, don't look at cost tables, because that is just a whole nother hell that you will waste significant amount of time trying to figure out, It just doesn't make sense at all. :( lol Unless someone on these forums wants to call me out on it, and show me a whole world of easy zeus asset balancing. As for using the second Method, place arma 3 units that are part of the same faction / mod, and look at their config. They will usually have Inheritance, and that is what you are going to use to grab all the units that are similar. For instance if you wanted all men, then it would just be isKindOf Man, If you wanted just blufor it would be SoldierWB or something. Usually all mods and vanilla have a base class of a soldier or vehicle that you can pull to get all the variations.
  21. This is my Create FOB function. If you replace the event handler with removeAllCuratorEditingAreas, it will work. I want to make it where you can place as many HQs as you want, But when they get destroyed so goes the editing area around it. Spent like 4 hours trying to figure it out . My first attempt i just made a _EA variable, but i wasn't sure if it was storing the code or the actual number, And if that number would stay with the event handler or change when the event handler fired, but then this attempt confirms that it wouldn't of worked anyway. I know {} is code, and () is number, but it was still confusing as what if you recalled the function, would previous eventhandlers change? HNK_createFOB = { params ["_veh"]; _vehPos = getPos _veh; deleteVehicle _veh; _HQ = HQClass createVehicle _vehPos; myCurator addCuratorEditableObjects [[_HQ],true]; _HQ setVariable ["_EA",((count curatorEditingArea myCurator) + 1)]; myCurator addCuratorEditingArea [(_HQ getVariable "_EA"),position _HQ,100]; _HQ addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; myCurator removeCuratorEditingArea (_HQ getVariable "_EA"); }];};
  22. sprucewaine

    Defining Configs in description.ext

    I am working with the CBA Addon. Would it be part of the mission or a seperate addon?
  23. sprucewaine

    Telling AI squads to re-arm in zeus?

    Can we reopen this? I am working with modded infantry, and so i can't even confirm that moving AI next to ammo would do anything. This is a huge barrier if you ever make a zeus mission where the curator has limited troops to throw at you, as once they are all out of ammo they are toast.
  24. sprucewaine

    How do cost tables work?

    bump? ive been trying to make a zeus mission, and have only iron front addons show up, and on top of that i wanted to individually set the price.... Has anyone successfully even used a cost table? because even the example they give on the wiki is broken, it only shows the cars.
×