Jump to content
  • 0

1.0.5 rpt bug with mission loot table


MGT

Question

Getting this in my .rpt (stock loot_init.sqf file) when using mission loot config

 0:17:51 Error in expression <eight = round ((_itemChances select _l) * 100);
for "_k" from 0 to (_weight - 1)>
 0:17:51   Error position: <* 100);
for "_k" from 0 to (_weight - 1)>
 0:17:51   Error *: Type Array, expected Number
 0:17:51 File mpmissions\DayZ_Epoch_11.Chernarus\extras\custom_loot\init\loot_init.sqf, line 85

Mission file loads, moves onto spawn screen but server doesn't load client into game.

Link to comment
Share on other sites

Recommended Posts

  • 0

Getting this in my .rpt (stock loot_init.sqf file) when using mission loot config

 0:17:51 Error in expression <eight = round ((_itemChances select _l) * 100);
for "_k" from 0 to (_weight - 1)>
 0:17:51   Error position: <* 100);
for "_k" from 0 to (_weight - 1)>
 0:17:51   Error *: Type Array, expected Number
 0:17:51 File mpmissions\DayZ_Epoch_11.Chernarus\extras\custom_loot\init\loot_init.sqf, line 85

Mission file loads, moves onto spawn screen but server doesn't load client into game.

 

guessing this is in relation to the new 1.8 loot system?  Have you changed it at all since the last patch?

Link to comment
Share on other sites

  • 0

guessing this is in relation to the new 1.8 loot system?  Have you changed it at all since the last patch?

 

Yes ofc, all the new files from dayz_code smashed through Winmerge

Note: Running the official mission loot config also returns the same error.

Link to comment
Share on other sites

  • 0

Yes ofc, all the new files from dayz_code smashed through Winmerge

 

sorry I meant the actually custom loot tables.  Just merged everything over myself.  Waiting to get off work to play "fix bugs till 2am"

 

edit: just saw your edit... damn.  Guess DZE_MissionLootTable = false; till this gets fixed

Link to comment
Share on other sites

  • 0

sorry I meant the actually custom loot tables.  Just merged everything over myself.  Waiting to get off work to play "fix bugs till 2am"

 

Yes, all the new hpp files.

Edit: May of borked my hpp file during unrap, loading in now :)

Link to comment
Share on other sites

  • 0

Yes, allot has changed since 1.0.4.2 and we are not even finished with the 1.8 code merge. Any script that used the older loot table format will need to be updated.

gotta razz you about it but  Love the "&& and ||" changes in the comments

 

edit: also, do you think changing foreach to count will have a positive impact on performance? or was there another reason to make this switch.  (just for my personal future coding reference)

Link to comment
Share on other sites

  • 0

Issues with loot tables are caused by the changes to the format of the config entries. Changes were done (in DayZ CE) to A. reduce the amount of large arrays, C. make loot tables more readable.

 

The old format is

lootType[] = {"YourItem1", "YourItem2"}, {0.5,0.5}; 

 

New Format

lootType[] = {{"YourItem1",0.5},{"YourItem2",0.5}};

 

Note that the array is not necessarily shorter, but it does consist of shorter arrays. I.e. in a large entry you will not have 2 200 element nested arrays, you will have 1 array consisting of 200 2 element nested arrays.

 

gotta razz you about it but  Love the "&& and ||" changes in the comments

 

edit: also, do you think changing foreach to count will have a positive impact on performance? or was there another reason to make this switch.  (just for my personal future coding reference)

Yes, this is from a discussion in the DayZ CE Repo *it's a private repo). @dddlazer

http://pastebin.com/AWgv27iR

 

You cannot use the magical var _forEachIndex in count. And you cannot nest multiple counts.

Link to comment
Share on other sites

  • 0

Issues with loot tables are caused by the changes to the format of the config entries. Changes were done (in DayZ CE) to A. reduce the amount of large arrays, C. make loot tables more readable.

 

The old format is

lootType[] = {"YourItem1", "YourItem2"}, {0.5,0.5}; 

 

New Format

lootType[] = {{"YourItem1",0.5},{"YourItem2",0.5}};

 

Note that the array is not necessarily shorter, but it does consist of shorter arrays. I.e. in a large entry you will not have 2 200 element nested arrays, you will have 1 array consisting of 200 2 element nested arrays.

 

Yes, this is from a discussion in the DayZ CE Repo *it's a private repo). @dddlazer

http://pastebin.com/AWgv27iR

 

You cannot use the magical var _forEachIndex in count. And you cannot nest multiple counts.

nice.  I like this. Hope to see it make some improvements in server performance.

Link to comment
Share on other sites

  • 0

Any ideas when DZC or Steam will be pushing a new beta/official/non-GS patch through?

 

As it would seem the Dev branch changes too often and is too complicated for mere mortals to use :rolleyes:

Link to comment
Share on other sites

  • 0

Sorry for stealing the topic abit but after the update (using default files), I keep getting this in my rpt log

10:01:39   Error Undefined variable in expression: _vehicle
10:01:39 File z\addons\dayz_server\init\server_functions.sqf, line 248
10:01:39 Error in expression <imit = _random select 1;

_qty = {_x == _vehicle} count serverVehicleCounter;


>
10:01:39   Error position: <_vehicle} count serverVehicleCounter;


>

Anyone know what it is?

Link to comment
Share on other sites

  • 0

Sorry for stealing the topic abit but after the update (using default files), I keep getting this in my rpt log

<rpt log>

Anyone know what it is?

 

I'm sure that's because your MaxVehicleLimit is set too high.

You need to edit the numbers for each vehicle in dayz_server.pbo > missions > "your_map" > dynamic_vehicle.sqf so that enough can spawn to match your limit.

Link to comment
Share on other sites

  • 0

For anyone else updating theirs ready for DZC, pretty much every script needed to be updated.

Apart from merging in all the scripts again onto the new server & mission files isn't it just any old custom loot addons that would be drastically affected and need to be re-written/dropped?

Link to comment
Share on other sites

  • 0

Apart from merging in all the scripts again onto the new server & mission files isn't it just any old custom loot addons that would be drastically affected and need to be re-written/dropped?

that's what I'm doing.  Pretty difficult to merge it with a completely different format.

Link to comment
Share on other sites

  • 0

Issues with loot tables are caused by the changes to the format of the config entries. Changes were done (in DayZ CE) to A. reduce the amount of large arrays, C. make loot tables more readable.

 

The old format is

lootType[] = {"YourItem1", "YourItem2"}, {0.5,0.5}; 

 

New Format

lootType[] = {{"YourItem1",0.5},{"YourItem2",0.5}};

 

Note that the array is not necessarily shorter, but it does consist of shorter arrays. I.e. in a large entry you will not have 2 200 element nested arrays, you will have 1 array consisting of 200 2 element nested arrays.

 

Yes, this is from a discussion in the DayZ CE Repo *it's a private repo). @dddlazer

http://pastebin.com/AWgv27iR

 

You cannot use the magical var _forEachIndex in count. And you cannot nest multiple counts.

Unless I'm doing something wrong, the only script I can find with the arrays written the old way is the Custom Loot script which, I think was originally written for 103....

 

I think I'm just going to drop that for now and see how we get on with the Epoch 105 standard loot for a while.....

 

Oh well, it'll be a case of hit and hope soon....  :unsure:

Link to comment
Share on other sites

  • 0
itemType[] = {{"ItemWatch", "generic"}, {"ItemCompass", "generic"}, {"ItemMap", "weapon"}, {"pistols", "cfglootweapon"}, {"ItemFlashlight", "generic"}, {"ItemKnife", "generic"}, {"ItemMatchbox_DZE", "generic"}, {"", "generic"}, {"backpacks", "backpack"}, {"tents", "single"}, {"", "military"}, {"", "trash"}, {"Binocular", "weapon"}, {"PartPlywoodPack", "magazine"}, {"clothes", "single"}, {"specialclothes", "single"}, {"WeaponHolder_MeleeCrowbar", "object"}, {"shotgunsingleshot", "cfglootweapon"}};
itemChance[] = {0.04, 0.03, 0.02, 0.1, 0.01, 0.04, 0.01, 0.36, 0.04, 0.01, 0.02, 0.17, 0.02, 0.02, 0.01, 0.01, 0.03, 0.06};
 
This is how the custom loot currently works for 1042. Are we saying that this definitely doesn't work for 105? Even though it's divided up by 'itemType' & itemChance'?
 
Sorry but I don't have the luxury of a test server, just one that's normally empty early morning UK time...
Link to comment
Share on other sites

  • 0

 

itemType[] = {{"ItemWatch", "generic"}, {"ItemCompass", "generic"}, {"ItemMap", "weapon"}, {"pistols", "cfglootweapon"}, {"ItemFlashlight", "generic"}, {"ItemKnife", "generic"}, {"ItemMatchbox_DZE", "generic"}, {"", "generic"}, {"backpacks", "backpack"}, {"tents", "single"}, {"", "military"}, {"", "trash"}, {"Binocular", "weapon"}, {"PartPlywoodPack", "magazine"}, {"clothes", "single"}, {"specialclothes", "single"}, {"WeaponHolder_MeleeCrowbar", "object"}, {"shotgunsingleshot", "cfglootweapon"}};
itemChance[] = {0.04, 0.03, 0.02, 0.1, 0.01, 0.04, 0.01, 0.36, 0.04, 0.01, 0.02, 0.17, 0.02, 0.02, 0.01, 0.01, 0.03, 0.06};
 
This is how the custom loot currently works for 1042. Are we saying that this definitely doesn't work for 105? Even though it's divided up by 'itemType' & itemChance'?
 
Sorry but I don't have the luxury of a test server, just one that's normally empty early morning UK time...

 

It may be more time friendly to just use the old files and modify the compiles.sqf and variables.sqf entries to point to them.

 

In order to update your loot table you simply need to look at both of the arrays and add another element to each itemType entry, the value is the chance value (number) from itemChange.

So what you provided would work out to be this.

itemType[] = {{"ItemWatch", "generic",0.04}, {"ItemCompass", "generic",0.03}, {"ItemMap", "weapon",0.02}, {"pistols", "cfglootweapon",0.1}, {"ItemFlashlight", "generic",0.01}, {"ItemKnife", "generic",0.04}, {"ItemMatchbox_DZE", "generic",0.01}, {"", "generic",0.036}, {"backpacks", "backpack",0.04}, {"tents", "single",0.01}, {"", "military",0.02}, {"", "trash",0.17}, {"Binocular", "weapon",0.02}, {"PartPlywoodPack", "magazine",0.02}, {"clothes", "single",0.01}, {"specialclothes", "single",0.01}, {"WeaponHolder_MeleeCrowbar", "object",0.03}, {"shotgunsingleshot", "cfglootweapon",0.06}};
Link to comment
Share on other sites

  • 0

I can't get these working with 1.0.5. Spent some time earlier reworking some edits from the previous patch into the new system. Added the call in description.ext, loaded up the server but couldn't get in-game. Reverted back to a fresh set of loot files and still, it's not possible to load in. If I remove the call from description.ext, I load in fine. There are no errors in any logs at all.

Link to comment
Share on other sites

  • 0

I can't get these working with 1.0.5. Spent some time earlier reworking some edits from the previous patch into the new system. Added the call in description.ext, loaded up the server but couldn't get in-game. Reverted back to a fresh set of loot files and still, it's not possible to load in. If I remove the call from description.ext, I load in fine. There are no errors in any logs at all.

No call in .hpp/.cfg files etc. Those type of files only accept processor commands. call/Spawn/execVM/compile is for .sqf (script files). You must use #include "LootConfig.hpp"

Link to comment
Share on other sites

  • 0

Epoch and OverPoch 1.0.5 loot tables

 

http://www.sendspace.com/filegroup/QLQrbnKvPqnGW86Zq2jjug

 

Note, if using OverPoch loot, edit the nsw_er7a and nsw_er7s on line 27 if you're not using Namalsk map to spawn in Gauss at A2

 

 

MGT, You're such a nice guy for sharing...

 

THANKS

 

Saves a lot of extra work for others.

i second this. Thanks very much MGT!  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...