kymckay / arma-silentmapconverter Goto Github PK
View Code? Open in Web Editor NEWA program used to convert SQM files into SQF files for ARMA 2/3.
License: GNU General Public License v3.0
A program used to convert SQM files into SQF files for ARMA 2/3.
License: GNU General Public License v3.0
My current method of reading and translating mission.sqm isn't the most ideal. It runs well but I should really redesign it to be more logical and structurally digestible.
Instead of using setVehicleInit I should really just have the code run after the unit is created. This allows the program to be useful for A3 and A2.
Remember to replace "this" with the unit variable name.
The code structure to support it is already there, I just need to add in the code to extract and transfer values. Values to support:
Now that I've got the basic program done in python it would be nice to avoid the whole "packaging the interpreter" spiel by re-writing this in another language.
Would cut down on file size and remove some hassle from compiling.
C++ is a possibility.
Mentioned it on IRC but AI spawned on HC or on server from the script all have their waypoints turned into guard waypoints. With the current generated .sqf it doesn't specify the waypoint type (setWaypointType) after each addWaypoint. Would it be possible to add it? Taking most CBB missions into account, move makes up the vast majority of missions.
This would also be a good way to verify whether guard is now just the default waypoint / if there's a way around the problem or if it's a bigger problem with the creating/recreating waypoints that needs to be reported.
Here's a copy of OP British plus the folder I used to HC if you want to test it yourself https://dl.dropboxusercontent.com/u/14592975/arma3/op_british_smc.rar
They appear to always face north after spawning, even though they have 'setPos ...' being called with what appear to be the correct values from the original mission/editor. Not sure what's up with this. Maybe they aren't initialized or something?
It looks like objects get shifted to avoid collisions - this messes up things like sandbags. Consider using "CAN_COLLIDE" instead of "FORM" for those objects to allow them to be placed in the same spot as originally pulled from.
To repro:
Empty vehicles should be similar to the groups, should look into turning some of my existing code into a function for that.
I had a simple mission setup with some units patrolling around some cars blocking the road. When exported into SQF from the mission it looks like their waypoints are added above the ground (visible when I add those units to Zeus). I don't think it's breaking behaviour for this simple test, but it might affect other waypoint types.
My guess is it's an ATL/ASL issue...
Exported mission SQF (Map was Altis):
// Created by SMC v2.0.2
// 03/17/15 17:04:15
// --Vehicles/Objects--
_veh0 = createVehicle ["O_Truck_02_covered_F",[12642.443,15900.986,0],[],0,"FORM"];
_veh0 setDir -6.5021181;
_veh1 = createVehicle ["O_Truck_02_covered_F",[12631.437,15909.576,0],[],0,"FORM"];
_veh1 setDir 174.05939;
_veh2 = createVehicle ["Land_BagBunker_Large_F",[12684.727,16139.941,0],[],0,"FORM"];
_veh2 setDir -197.96167;
// --Units--
_group0 = createGroup west;
_group2 = createGroup east;
_unit2 = _group2 createUnit ["O_soldier_SL_F",[12613.095,15978.438,0],[],0,"FORM"];
if (isNull _unit2) then {_unit2 = createVehicle ["O_soldier_SL_F",[12613.095,15978.438,0],[],0,"FORM"]; [_unit2,_group2] call BIS_fnc_spawnCrew;};
_unit2 setSkill 0.5;
_unit2 setRank "SERGEANT";
_unit3 = _group2 createUnit ["O_soldier_AR_F",[12608.095,15973.438,0],[],0,"FORM"];
if (isNull _unit3) then {_unit3 = createVehicle ["O_soldier_AR_F",[12608.095,15973.438,0],[],0,"FORM"]; [_unit3,_group2] call BIS_fnc_spawnCrew;};
_unit3 setSkill 0.44999999;
_unit3 setRank "CORPORAL";
_unit4 = _group2 createUnit ["O_soldier_AAR_F",[12603.095,15968.438,0],[],0,"FORM"];
if (isNull _unit4) then {_unit4 = createVehicle ["O_soldier_AAR_F",[12603.095,15968.438,0],[],0,"FORM"]; [_unit4,_group2] call BIS_fnc_spawnCrew;};
_unit4 setSkill 0.40000001;
_unit5 = _group2 createUnit ["O_medic_F",[12598.095,15963.438,0],[],0,"FORM"];
if (isNull _unit5) then {_unit5 = createVehicle ["O_medic_F",[12598.095,15963.438,0],[],0,"FORM"]; [_unit5,_group2] call BIS_fnc_spawnCrew;};
_unit5 setSkill 0.40000001;
_unit6 = _group2 createUnit ["O_soldier_TL_F",[12618.095,15973.438,0],[],0,"FORM"];
if (isNull _unit6) then {_unit6 = createVehicle ["O_soldier_TL_F",[12618.095,15973.438,0],[],0,"FORM"]; [_unit6,_group2] call BIS_fnc_spawnCrew;};
_unit6 setSkill 0.5;
_unit6 setRank "SERGEANT";
_unit7 = _group2 createUnit ["O_soldier_AR_F",[12623.095,15968.438,0],[],0,"FORM"];
if (isNull _unit7) then {_unit7 = createVehicle ["O_soldier_AR_F",[12623.095,15968.438,0],[],0,"FORM"]; [_unit7,_group2] call BIS_fnc_spawnCrew;};
_unit7 setSkill 0.40000001;
_unit8 = _group2 createUnit ["O_soldier_LAT_F",[12628.095,15963.438,0],[],0,"FORM"];
if (isNull _unit8) then {_unit8 = createVehicle ["O_soldier_LAT_F",[12628.095,15963.438,0],[],0,"FORM"]; [_unit8,_group2] call BIS_fnc_spawnCrew;};
_unit8 setSkill 0.44999999;
_unit8 setRank "CORPORAL";
_unit9 = _group2 createUnit ["O_soldier_F",[12633.095,15958.438,0],[],0,"FORM"];
if (isNull _unit9) then {_unit9 = createVehicle ["O_soldier_F",[12633.095,15958.438,0],[],0,"FORM"]; [_unit9,_group2] call BIS_fnc_spawnCrew;};
_unit9 setSkill 0.40000001;
// --Waypoints--
_wp20 = _group2 addWaypoint [[12615.85,15999.277,19.283798],0];
_wp20 setWaypointBehaviour "SAFE";
_wp21 = _group2 addWaypoint [[12674.478,16112.748,28.636181],0];
_wp22 = _group2 addWaypoint [[13090.5,16163.888,17.052177],0];
_wp23 = _group2 addWaypoint [[13179.168,15965.93,13.909006],0];
_wp24 = _group2 addWaypoint [[13138.612,15754.242,13.263485],0];
_wp25 = _group2 addWaypoint [[12664.796,15743.496,16.572479],0];
_wp26 = _group2 addWaypoint [[12611.768,15940.767,17.200161],0];
_wp26 setWaypointType "CYCLE";
It would be good if it ignored units set to playable as well as any placed game logic.
Conversion from a mission: https://dl.dropboxusercontent.com/u/14592975/arma3/Nrth_Comm_Strike_init_HC.sqf
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.