Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Animatek

Pages: [1] 2 3 4 5 6
I'd give you my version, but this one is heavily modified to be used with ACE3 and a custom Database, with more bugs than features, and several WIPs that will never see the light of day. If you're interested, it's on GitHub under the name AnimatekdeCuba / A3Wasteland.Altis

I don't know how up-to-date this version is .. so I don't recommend using it for your server .. but if you know how to reverse engineer you can use that code in your mission file without problems.

Inside the Addons folder, look for the BoS and GOM folders, which as I remember are the bases of that code.

BoS manages door codes, locks objects and cache, hacks pins, etc. GOM manages supplies (fuel, repair and ammunition).

In my case, I used this version of the mission and I was updating it line by line to the 1.4 from AgentRev

1. check that you are using extDB and that it is working.

2. Inside the .pbo of the mission there is a storeconfig.sqf file, there you must put them one by one, with their respective prices, etc.  you must be extremely careful not to spoil the structure of the code.  commas are often troublesome. 

3. My friend @GMG_Monkey  has a version with more advanced bases.  Ask him.

Technical Support / Re: HD full
« on: Apr 21, 2020, 06:55 AM »
deactivate MineSaving


In the ApplyPlayerData.sqf file I wrote, taken from the addon code itself:

Code: [Select]
case "BackpackOnChestItem": {
if (typeName _x is EqualTo "STRING") then {
[player, _x] call zade_boc_fnc_addItemToChestpack;
} else {
private _itemclass = _x select 0;
private _itemAmount = _x select 1;
 [player, Itemclass, itemamount] call zade_boc_fnc_additemtochestpack;
} forEach _value;

And it works perfectly. Thank you all for reading. so whoever wants to use DerZade's Backpack On Chest addon, already knows what to do to add it to ArmA3 A3Wasteland and have persistence.


I already found the problem and I don't know how to fix it.

the error is that the function 'zade_boc_fnc_chestpackitems' returns an array with the format
Code: [Select]
["item", "item", "item", "item2", "item2", "item3", "item3"];
 but the function 'zade_boc_fnc_addItemToChest' needs the array in a format
Code: [Select]
[["item", 3], ["item2",2], ["item3",2]];
to effectively add the items to the chest bag.

What should I do to save the array in that format in DB to be able to restore it correctly?

I needed a few semicolons on a cople of line of the ApplyPlayerData.sqf file, and now the client starts well.

BUT, although it is loading well the backpack-on-chest, not the items and magazines. I know that the backpack works, but it appears empty when reconnecting to the server.

so I guess what I have to work on is the two lines that read the DB and apply the items and magazines to the players.

the array of the items and magazines of this addon in the DB are identical to the current arrays for saving backpackitem and backpackmags; the same as the way to write the classname of the backpacks, in the current database; so I assume that the way to call the functions zade_cod_fnc_additemtobackpack and zade_cod_fnc_addmagstobackpack are similar if not identical to the current method (with its obvious differences). no?

I realy need some help here

Editing & Coding / Re: Little concern with ACE3 HITPOINT
« on: Oct 26, 2019, 08:46 PM »
Make sure you check the ACE3 development progress. They are fixing to if not already have release/d an update with a medical system overhaul
I am up to date with ACE3 (apparently not with this forum, because I see that you had answered a while ago and I had not seen it). My request for help is how to do that in the A3Wasteland DB of @AgentRev, save and load the ACE3 hitpoints instead of those vanilla ones.

this was something that I avoided as much as possible; but the circumstances force me to experiment and learn to modify the DB sooner or later.
@agentRev had already suggested that need by adding the BackpackOnChest addon to the ArmA3_A3Wasteland; but I refused and now here I am.
the thing is, I added three new tables to "playersave": backpackonchest (string), backpackonchestitem (array) and backpackonchestmags (array).
and I gave identical properties to the tables that contain similar elements, that is, the same characteristics of the backpack table for the backpackonchest table, the same for backpackitems and backpackmagazines.
in the getplayerdata.sqf file I added the code
Code: [Select]
_zade_backpack = [_player] call zade_boc_fnc_chestpack;
_zade_backpackItem= [_player, false] call zade_boc_fnc_chestpackItem;
_zade_backpackMags = [_player] call zade_boc_fnc_chestpackMagazines;
{ _data pushBack _x } forEach
[ [ "Backpackonchest", _zade_backpack],
[ "Backpackonchestitem", _zade_backpackitem],
[ "Backpackonchestmags", _zade_backpackmags] ];

I also added
Code: [Select]
["Backpackonchest", "STRING"] call _getValue;

["Backpackonchestitem", "ARRAY"] call _getValue;

["Backpackonchestmags", "ARRAY"] call _getValue;

in the default\LoadAccount.sqf file

Code: [Select]

in the extDB\LoadAcount.sqf file; the one who says "the order of these values is EXTREMELY IMPORTANT!"

All this worked perfectly to save the info correctly in the Database, but does not apply it to the player

Now, in the applyplayerdata.sqf file I put:

Code: [Select]
Case "Backpackonchest": { if (_value !="") then { [player, _value] call zade_boc_fnc_addChestpack } };

Case "Backpackonchestitem": { { if (_value !="") then { [player, _x] call zade_boc_fnc_addChestpack } forEach _value } };

Case "Backpackonchestmags": { { if (_value !="") then { [player, _x] call zade_boc_fnc_addMagToChestpack } forEach _value } };
But it does not work. the client stays on the Loading Preview Location screen forever
Please, help!

by the way, absolutely nothing related appears in the .rpt file. Everything seems to be normal.

(Note, I used Google Translate to create this post, and I wrote the codes manually here, they are not copy and paste from the actual files, because I'm using my phone rigth now)

Editing & Coding / Re: Save player data
« on: Sep 02, 2019, 09:30 PM »
I already made that suggestion to lock each player in his faction between server restarts; but @AgentRev told me not to have time at that time. I hope his agenda has been opened.

Editing & Coding / Little concern with ACE3 HITPOINT
« on: Sep 02, 2019, 08:32 PM »
I want to save the damage of each hitpoint modified by ACE3 in the DB.
In the default form of A3Wasteland is:

Code: [Select]
_hitPoints = [];
_hpDamage = getAllHitPointsDamage _player;

if (_x != "") then
_hitPoints pushBack [_x, (_hpDamage select 2) select _forEachIndex];
} forEach (_hpDamage select 0);

{ _data pushBack _x } forEach
["Damage", damage _player],
["HitPoints", _hitPoints],
["Money", _player getVariable ["cmoney", 0]] // Money is always saved, but only restored if A3W_moneySaving = 1

Now, the way to get the hitpoint translated by ACE3 and its damage I think is kinda:
Code: [Select]

//Get the hitpoint and the index
params [["_selection", "", [""]]];
_selection = toLower _selection;
if (_selection != "" && {!(_selection in GVAR(SELECTIONS))}) exitWith {0};
private _hitpoint = [_player, _selection, true] call ace_medical_fnc_translateSelections;
(getAllHitPointsDamage _player) params [["_allHitPoints", []]];
private _hitpointIndex = -1;
{   //case insensitive find
    if (_x == _hitpoint) exitWith {_hitpointIndex = _forEachIndex;};
} forEach _allHitPoints;
if (_hitpointIndex < 0) exitWith {0};

private _currentDamage = _player getHitIndex _hitpointIndex;

the GVAR macro variable (SELECTIONS) refers to

ace_medical_selections (without quotes)

and refers to the new translated and simplified ACE3 hitpoints.

Now; How do I save it in the DB with this new way?

General Discussion / Re: Cold War Germany DLC
« on: Apr 23, 2019, 04:43 AM »
I think doing a whole dedicated A3Wasteland is a lot of work for a DLC that is not "native" to the vanilla version of ArmA 3, which has been the essence of this mod (I mean A3Wasteland) from the beginning.
However, there will be those who do want or need it, and if you are happy to do so, many will be those who will appreciate this work.

Editing & Coding / Re: Gear Loadouts
« on: Apr 02, 2019, 08:11 PM »
This is a silly way to do it, but my users love it.
I added to this code a way to gain military ranks.

As my mission uses ACE3, the name of the players above their heads, comes with the military rank; which makes this addition very useful.

my next step will be to give players with more rank access to exclusive content, the equivalent of "is donor".

although I do not know if in this same code grant him the condition Donor, or make a separate condition based on the military rank. What do you think?

Editing & Coding / Re: Magic Parachute Code
« on: Apr 02, 2019, 07:56 PM »
Step 1. Have an original ArmA3 A3wasteland mission.
step 2. Decompile the PBO file.
Step 3. Do reverse engineering and copy it.
Step 4. Give all the credits to @AgentRev. Done.

the codes is based on functions within the mission (A3W_fnc_) I think it needs additional work to match with other missions.

Good luck

Editing & Coding / Re: Where define hunger and thirst levels?
« on: Apr 01, 2019, 10:23 PM »
All Ok

I just set both values

case "hunger" : { hungerLevel =_value };
                           { player setVariable [acex_field_rations_hunger, _value };

Its work fine. It read and write in DB.

Pages: [1] 2 3 4 5 6