killahpotatoes / kp-cratefiller Goto Github PK
View Code? Open in Web Editor NEWKP-Cratefiller Module
License: GNU General Public License v3.0
KP-Cratefiller Module
License: GNU General Public License v3.0
// Defines the available crates
KPCF_crates = [
call compile preprocessFileLineNumbers 'KPCF\presets\crates_vanilla.sqf';
];
// Defines the available weapons
KPCF_weapons = [
call compile preprocessFileLineNumbers 'KPCF\presets\weapons_vanilla.sqf';
];
// Defines the available grenades
KPCF_grenades = [
call compile preprocessFileLineNumbers 'KPCF\presets\grenades_vanilla.sqf';
];
// Defines the available explosives
KPCF_explosives = [
call compile preprocessFileLineNumbers 'KPCF\presets\explosives_vanilla.sqf';
];
// Defines the available items
KPCF_items = [
call compile preprocessFileLineNumbers 'KPCF\presets\items_vanilla.sqf';
];
Hotfix version to eliminate some bugs and other stuff.
There will be some general code overhaul and improvements for the next version.
Steps to reproduce
17:24:01 Error in expression <Path;
private _name = (getText (_config >> "displayName"));
private _picture = (>
17:24:01 Error position: <>> "displayName"));
private _picture = (>
17:24:01 Error >>: Type String, expected Config entry
17:24:01 File C:\PATH\mpmissions\Other\[16aaTST]Cratefiller_Dev.Altis\KP\KPCF\fnc\fn_cratefiller_removeEquipment.sqf..., line 73
Someone found a bug, where garbage on the ground kills the function which returns the near storages, consequently no storage can be selected anymore.
There will be an option where you can set if you want the item lists to be filled manually or if you want them to be generated.
If possible there will be a restriction of the mods you want to use for the list generation.
KPCF Version: 1.1.0
Did you edit anything within the script files?
Yes
If yes, what did you edit exactly?
Added it to our Liberation version for our wednesday sessions.
Moved the config in the KPCF folder and adjusted the paths accordingly.
Also changed the config values for the KPCF base classname and disabled crate spawning.
When selecting a weapon and then magazine or attachments as sub-category, it'll display also items which are blacklisted in the config.
The blacklist should apply for every kind of category/sub-category.
"optic_nightstalker"
attachments
Was quite easy to solve on my end, but I wanted to report it.
https://github.com/KillahPotatoes/dubjunks-scripts/blob/master/KP-Cratefiller/KPCF/fnc/fn_createSubList.sqf#L49
Adding before the sorting:
_magazines = _magazines - KPCF_blacklistedItems;
https://github.com/KillahPotatoes/dubjunks-scripts/blob/master/KP-Cratefiller/KPCF/fnc/fn_createSubList.sqf#L66
Adding before the sorting:
_attachments = _attachments - KPCF_blacklistedItems;
Most communities use many mods, this can fill the weapon selection list for attachments and magazines with hundreds of weapons.
A search function will be added to search for specific weapons.
The next version will get an import and export function, so that the player can save the loadout of an inventory und import it into another inventory.
Basically yes.
It's currently not very comfortable to select weapons etc. as they're not sorted alphabetically but sorted in the order of the classnames in the config file.
A sorted list in each dropdown menu. We already had a small chat in discord about possible solutions and I'm confident that it's very easy for you to implement.
Nothing
If the base object got an inventory, it wil be detected as storage and can be filled with the cratefiller.
Solution:
The base object may not be detected as valid storage.
If you delete a selected crate, the inventory list won't be cleared. So the list shows the last inventory of the deleted crate.
There need to be some adjustments in case of an empty "activeStorage".
There will be some more categories of item types.
Already planned:
i 've followed the instruction to insert this tools in a simple mission ... i'm going to insert this one in a liberation mission but i don't know how i merge the .xml file with the liberation's one.. could you tell me how can i make or could you insert in next liberation's release?
In our current implementation we don't have crates which can be spawned by KPCF, as we build our crates via the Liberation build menu and use KPCF only for the "put something in inventories which are near the KPCF spawn point" functionality.
So we've in our config file of KPCF:
// Defines the available crates
KPCF_crates = [];
During our last session the players seemed sometimes confused by the empty "spawn crate" dropdown and asked for the purpose of this dropdown.
If the above array is empty the whole "spawn/store crate" buttons and the connected dropdown could be hidden. So there is just the "select inventory" dropdown for the nearby objects.
Maybe it could be also be implemented to have a simple "canSpawnCrates" or similar bool variable, which enables/disables this functionality. That way you don't have to check if the array is empty.
Imagine you pack a crate with some ammo from different weapons or let your squad mates put one magazine of their weapon in a crate, so you can see what they need.
Now you open the cratefiller, select the crate and also see the content with the different magazines. But sadly you can't click on something in the content list and add more items, you have to search the weapon to each magazine and add them from the left selection menu.
It would be more user friendly if the "item adding" recognize if you've selected something in the left or in the right list and use this selection as reference for adding something to the crate. So basically that you can't just remove something, but also add something when selecting something in the content list of the crate.
Nothing
Not exactly a problem, but an enhancement concerning usability.
Mostly you've players which all have different weapons and so you would need to ask everyone which weapon he/she has to collect a realiable list for your logistic guys. This is very time consuming and mistakes/misunderstandings are common.
Maybe something like a small outliner on the right or left which lists all players or groups with players.
After clicking on a group or player it shows a list of all main weapons, sidearms and launchers which are used by that player/group. Then you could select the specific weapon and get (like now if you want to add ammunition) a list of all compatible magazines. This would make logistical service for your troops in the field much easier and less time consuming concerning the "order of supplies".
Nothing
Some files, especially configuration files, need some more detailed comments.
Some comments could be misunderstood by some users.
The listboxes for the storage inventory and the amount are not synced, they need to be handled as one listbox.
Solution 1:
"Connect" the two listboxes.
Solution 2:
Display everything in one box.
Reasoning: This would be the (in my opinion) easiest method to share presets with other people/have a collection.
Bulk export/import would be a bonus.
Updated version with some new features and minor updates.
There are some debug outputs that were used for the local tests.
These need to be removed.
If the game runs with ACE 3 the "addAction" will be replaced with the ACE interaction.
The storage capacity check has the following syntax:
object canAdd item
But it should look like:
object canAdd [item, count]
So right now it checks if there's enough capacity for one item instead of the real amount.
As described in #12 we're currently not using the functionality to spawn crates out of nowhere and just use it to drive vehicles or transport crates near the base station and put items in.
Currently we have the base station and the spawnpoint as objects placed nearby to each other. As we don't care about spawning space or anything it's a kind of "uncomfortable circumstance" that we've to build two objects.
A simple if
in the KPCF_fnc_spawnCrate which switches the "spawn center" to the base station, if there is no spawn point near. That way it would be optional to have a predefined spawn point.
Spawning at the station is also no problem concerning "collision", as it doesn't spawn objects into another object, if you don't use "CAN_COLLIDE"
in the spawn command (which you don't, so everything is fine).
Using findEmptyPosition
in the createVehicle would make it possible to say "min distance to base station should be 2m", if the center is switched to the base station.
private _crate = createVehicle [_activeSpawnPos, (_activeSpawnPos findEmptyPosition [2, 10, _crateType]), [], 0, "NONE"];
Ref: https://community.bistudio.com/wiki/findEmptyPosition
Nothing.
With the next version a big part of the config will be replaced with CBA settings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.