I haven't found any useful documentation on the CLoot objects in the Data Editor, so decided to experiment.
My assumption for CLootSet - which apparently is false - was as follows:
The CLootSet will go through each child in Children, and roll for success given the chance between 0 and 100 (%)
The Minimum Count indicates how many of the children rolls will succeed at minimum
The Maximum Count indicates at most how many rolls are allowed to succeed
I created a test loot table in various configurations, and let my overpowered Jim Raynor kill 100s of units using the loot table to test the results.
Hopefully I didn't make any errors in my debug messages, but the below results just don't make sense to me.
Hopefully somebody can explain what the correct interpretation of the CLootSet object is!
Note that the minimum value of Minimum Value is 1 if you try to set it yourself. The base object has it set to 0.
Index Chance Item
0 0 10 slot bag 1 100 (none)
Min Count: 1
Max Count: 1
Results: average items / kill = 0.01 (would have expected 0) Max drops / kill = 1
Index Chance Item 0 50 10 slot bag 1 50 (none) Min Count: 1 Max Count: 1
Results: average items / kill = 1.025 (would have expected 0.5) Max drops / kill = 2 (would have expected 1)
Index Chance Item 0 50 10 slot bag 1 50 24 slot bag Min Count: 1 Max Count: 1
Results: average items / kill = 2 (would have expected less than 1) Max drops / kill = 2 (would have expected 1) For the above table I get the same result if I set Max Count to 100, i.e. still only and always 2 drops per kill
I'm doing the development in a SC2Mod file. If I test (Ctrl+F9) from that file, using the test map set in preferences, then I get double the loot. If I go to the SC2Map in the Editor that I also use in preferences for testing the mod, and then test from there, I get normal expected loot. It's the exact same map.
So workaround is to go the SC2Map manually to test the mod.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I haven't found any useful documentation on the CLoot objects in the Data Editor, so decided to experiment.
My assumption for CLootSet - which apparently is false - was as follows:
I created a test loot table in various configurations, and let my overpowered Jim Raynor kill 100s of units using the loot table to test the results.
Hopefully I didn't make any errors in my debug messages, but the below results just don't make sense to me.
Hopefully somebody can explain what the correct interpretation of the CLootSet object is!
Note that the minimum value of Minimum Value is 1 if you try to set it yourself. The base object has it set to 0.
^^I'm pretty sure this is what I used to get started for loot systems.
It goes through part 4, look for following vids in the description.
Hopefully an answer to your question is found in them.
It's a good tutorial, thanks. However, I still have an issue which is not addressed in there.
The CLootUnit object seems to consistently drop 2 of the selected unit instead of 1. I have tested a setup as follows:
Overlord has Unit - Loot set to MedKit
MedKit is a CLootUnit object with the unit Pickup - Medkit
...and that's it
Every time I kill an Overlord it drops 2 Pickup - Medkits. Also tested with other items such as 10 slot bag.
Does anybody have the same issue?
OK I've found what's going wrong.
I'm doing the development in a SC2Mod file. If I test (Ctrl+F9) from that file, using the test map set in preferences, then I get double the loot. If I go to the SC2Map in the Editor that I also use in preferences for testing the mod, and then test from there, I get normal expected loot. It's the exact same map.
So workaround is to go the SC2Map manually to test the mod.