Resources and Looting

  1. 8 years ago

    Hej,

    Since I am trying to create an insurgency-wasteland mix with alive and ace, I got some questions left (and further ones to come, I guess). About the idea of the Mission:
    The Players should start with starting gear and some vehicles (3CBs Brit Packs). Their order is to gain a foothold in the area (Reshmaan) against the Taliban (CAF Aggressors, Asymetric). They get missions, they suceed in them and they get resources. Those resources can be spend to order resupply boxes (some ammo and grenades and first aid stuff), vehicles (no big armor or anything) or some base building Equipment. To get resupply boxes the Players would only Need to suceed in one Mission. For a vehicle, they would Need several. And for base building Equipment, they'd Need to gather a lot of resources.

    1. Is it possible to untie the player's resources from the OPCOM? So the Players can get their own resource pool untouchable by the OPCOM? I don't want the OPCOM to spend all the gathered resources.
    2. Can I change the preload ammo boxes you can order via combat supply?
    3. Can I change the resource-cost of vehicles and ammo boxes and base-building-gear?
    4. Can the Player check somewhere how many resource-points they got?
    5. Is it possible to have no Opcom for the player's faction? Player -> 3cbs, OPCOM -> BLU_F ? (I know I could just try it, but I'm not home right now, so I figured it would be faster to just ask)

    Help and ideas would be appreciated.

  2. highhead

    12 Apr 2016 Administrator

    AFAIK there are no official access points for those variables. I would have to take a look at the code.

    ad. 1. Not yet. You could hack the mission.sqm and set the "reinforcements" variable to "0.01" or something very very low, so that OPCOM doesnt reinforce at all but in asymmetric mode, there are no reinforcements requested from military logistics either way.

    ad. 2. think there is a way with overwriting staticData.sqf but you would have to define new classes of boxes with custom content in the description.ext though and im really no config expert.

    ad. 3. not that I am aware of.

    ad. 4. The forcepool is per side not per player - but I can provide a quick script that you can use to display that.

    ad. 5. yes

    I believe I told you before - Take a look in the ALiVE | Sabotage mission. You can see how I disable certain logistics options there. And please try how far you can get.

  3. @highhead
    First of all thank you very much for the Patience and help. I'll take a look at the Sabotage Mission as soon as possible.

    Some follow ups:

    1. If I set the OPCOM to occupation and put him down in one base only. Will he attack other objectives he is not synced to?
    2. will an asymetric hostile OPCOM attack the occupating faction if I don't sync them to the objective?
    3. ad. 3. Is there a list of how much the different Units/objects/vehicles cost for logistics? Or is it: 1 Point per ordered item (so 1 unit or 1 Group or 1 vehicle or 1 ammo box)?
    4. ad. 4. Such a script would be perfect. Maybe you can make it, so the Player has to use something (like a Radio object) to ask for the resource Status? Or tell me how I can rewrite it to put it in the init of an object.
  4. 1. No, OPCOM is only aware of objectives that he is synced to. He may send groups to attack any nearby enemies, but he will not attack the objective directly.

    2. Sort of follows point 1, he will only attack them if they happen to be in his way, but he will not attack their objectives directly.

    3. Don't think so, don't know though

  5. Well.
    I tried to edit the resources in the mission.sqm.
    Found the variable, put it to 0.1, but as soon as I opened the editor again, to check it, the module puts the pool back to 1000, no matter what I put in before.
    Do I have to change the variable after saving the mission completely?

  6. @Murdock Can I change the preload ammo boxes you can order via combat supply?

    Is there a way to use an eventhandler to do that? I'm just beginning to understand the things you can and cannot do, so I'd rather ask than spend several hours trying to make something impossible work.
    The idea is to make an eventhandler, so that when a supply box of a specific type is spawned (means: ordered via combat supply) the eventhandler deletes all things inside and adds specific things back to it. So when the Player gets to the box, it just contains the things I want to be in there, not the vanilla stuff. To not overwhelm the Players, I'd blacklist some boxes in the logistic/c2 module or whitelist those I want them to use.
    Would that be a possible solution?

    @highhead ad. 2. think there is a way with overwriting staticData.sqf but you would have to define new classes of boxes with custom content in the description.ext though and im really no config expert.

    Where do I find that staticData.sqf? Or do I have to create it myself like the init.sqf? If I create/define a new class of box there, will it be available via logistics and/or zeus/Editor too?

  7. highhead

    15 Apr 2016 Administrator

    murdock, the variable to change is on the OPCOM module and you need to do it in the mission.sqm after your done with editing in editor

  8. highhead

    15 Apr 2016 Administrator

    ad. Eventhandler that resets the ammo -> Actually this is a great idea and it may just work! Haven't tried it but its worth a shot, comrade! Probably you'd need an init eventhandler that fires for class reammobox

  9. highhead

    15 Apr 2016 Administrator
    Edited 8 years ago by highhead

    you'd need to use XEH cause regular BIS init-EH only fires for units afaik.

    and you'd need to testout that classes (written from top of my head).

    class Extended_Init_EventHandlers
    {
    	class Reammobox_F
    	{
    		class yourClass
    		{
    			ServerInit = "if (typeOf _this in ['YourBoxType','caseSensitive']) then {yourcode}";
    		};
    	};
    };
  10. ehrm.. Well.. What does that "caseSensitive" mean?
    for the c3b basic weapon ammo box (UK3CB_BAF_Box_WpsBasic) it would be something like this?

    class Extended_Init_EventHandle
    {
      class Reammobox_F
      {
         class UK3CB_BAF_Box_WpsBasic
         {
            ServerInit = "if (typeOf _this in ['UK3CB_BAF_Box_WpsBasic','caseSensitive']) then {addBackpack "B_Parachute"}";
         };
      };
    };

    Would this add a Parachute Backpack to a 3CB WeaponBasic Box as soon as it is created?
    I cannot use something like:

    ReammoBox_F addEventHandler ["Init",{null = [this] execVM "supplybox.sqf";}];

    And in that supplybox.sqf use IF Box == UK3CB_BAF_Box_WpsBasic then addBackpack... ?

  11. caseSensitive was just an in code reminder that whatever you use in that field is case sensitive, so make sure you don't MiX aNd MAtCh caSeS

 

or Sign Up to reply!