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
1
Technical Support / Re: HD full
« on: Apr 21, 2020, 06:55 AM »
deactivate MineSaving

2
resolved.

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.

3
update:

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?

4
update:
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

5
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.

6
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

And
Code: [Select]
"Backpackonchest",
"Backpackonchestitem",
"Backpackonchestmags",

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)

7
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.

8
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?


9
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.

10
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.

https://github.com/AnimatekdeCuba/A3Wasteland.Altis/blob/5bb6cbb0d1d574c5bd384650399fe1c0145bf278/client/functions/playerSetupGear.sqf

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?

11
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

12
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.

13
Editing & Coding / Re: Where define hunger and thirst levels?
« on: Apr 01, 2019, 12:20 AM »
If I do not define hungerlevel or thirstlevel in applyPlayerData, doing this, for example

Code: [Select]
case "Hunger": {player setVariable ["acex_field_rations_hunger", _value]};
instead of original one

Code: [Select]
case "Hunger": {hungerLevel = _value};
the system does not correctly save in the DB the level of hunger, or thirst, depending on the case; and in the HUD puts an error "-I do not remember- NaN"

How can I define that hungerlevel is the value (_value) readed from the DB already applied to acex_field_rations_hunger?

14
Editing & Coding / Re: Where define hunger and thirst levels?
« on: Mar 31, 2019, 11:39 PM »
Code: [Select]
["Hunger", ["hungerlevel", [_player getVariable ["acex_field_rations_hunger", 0]]] call getPublicVar],
["Thirst", ["thirstlevel", [_player getVariable ["acex_field_rations_thirst", 0]]] call getPublicVar]

Well, this actually works. it even saves it correctly in the DB. Now what I'm trying to achieve is to read it from there and apply it to the player.
Obviously, I had to disable and modify the majority of initSurvival, I just left the alerts.

What I need now is to make this possible in applyplayerdata

Code: [Select]
case "Hunger" : { hungerlevel = _value }
Turned to something realistic based on this:

Code: [Select]
case "Hunger" : { hungerlevel = (player setVariable ["acex_field_rations_hunger", _value]) };

15
Editing & Coding / Re: Where define hunger and thirst levels?
« on: Mar 30, 2019, 10:08 AM »
What about this

Code: [Select]
["Hunger", ["hungerlevel", [_player getVariable ["acex_field_rations_hunger", 0]]] call getPublicVar],
["Thirst", ["thirstlevel", [_player getVariable ["acex_field_rations_thirst", 0]]] call getPublicVar]
It will works?

Pages: [1] 2 3 4 5 6