Jump to content
Sign in to follow this  
wok

mapSize param not defined for 'Chernarus'

Recommended Posts

I am trying to make a Stratis mission work on Chernarus in Arma 3. The mission is Invade & Annex from ahoyworld (https://bitbucket.org/ahoyworld/aw-invade-annex/).

First moved the files from Arma 2/Addons to my Arma 3/@Chernarus/Addons folder and removed the files editor.pbo, ui.pbo, UIFonts.pbo, modules.pbo,anims.pbo and anims.pbo (i followed a tutorial that said that i should not copy those). Then using the -mod param I tried the editor and Chernarus looks pretty nice, everything works fine.

Now for the mission, I edited init.sqf, removed all the elements of the arrays _initialTargets and _targets and added only one element called Chernogorsk. Then edited the file mission.sqm, in class Markers, edited the respawn_west (Item2) marker position to a random position, and edited the Girna marker (I chose one randomly) position and name, I used Chernogorsk as name instead of Girna. I also commented the code on line 643 to 660 of init.sqf because by displaying debug messages I noticed the code after that wasn't executing.

After doing all that I created a LAN game with the mission and start it, the mission starts fine and the base looks ok, the main AO red circle marker gets moved into the only target (Chernogorsk), but nothing else works, no enemies, no side missions, etc. Immediatelly after the main AO marker gets moved into Chernogorsk position (after 10 seconds because of sleep 10 in 198 in init.sqf), I get this error:

Title: BIS_fnc_worldArea

Message: mapSize param is not defined for 'Chernarus'

The error shows up twice. I coulnd't find any info about it, is anyone familiar with it? Is it a problem with the mission or with the way I am using chernarus on Arma 3?

Any help will be appreciated.

Share this post


Link to post
Share on other sites

Mapsize is defined in A3 world configs

Startis for instance is mapSize = 8192;

It relates to area size , maybe you can define it in Init or something of mission or if not it might need a config re write

Share this post


Link to post
Share on other sites

Adding mapSize = 8192; to init didn't have any effect, not sure if there's another way to define it. Any more info on the config thing? Where do I find this config that may need to be rewrited? I did found mapSize in map_stratis.pbo but I am not sure where that should be added in chernarus pbos. Sorry i am really a noob on this, I never created a mission I am just trying to help someone.

Edited by wok

Share this post


Link to post
Share on other sites

firstly Chernarus map size will be different ,

i am not aware of this Function you are calling put it is getting / looking for a value in the chernarus config file name Mapsize .

you can either write your own function (if yo know what is executing it and how ) or make a replacement config for chernarus that adds Mapsize = (insert size in meters of chernarus here possibly 20000 not sure) ;

sorry cant help more , not sure about BIS_fnc_worldArea and its usage

Share this post


Link to post
Share on other sites
firstly Chernarus map size will be different ,

i am not aware of this Function you are calling put it is getting / looking for a value in the chernarus config file name Mapsize .

you can either write your own function (if yo know what is executing it and how ) or make a replacement config for chernarus that adds Mapsize = (insert size in meters of chernarus here possibly 20000 not sure) ;

sorry cant help more , not sure about BIS_fnc_worldArea and its usage

I did a search on all the missions files for the string "worldArea" and it doesn't exists, it must be called by another bis_fnc, I suspect is related to how soldiers and other stuff is placed randomly on the map, in AO, etc.

I have been trying to rePBO the chernarus.pbo to add mapSize to the config.cpp but still had no luck, im such a noob. Lets see how this goes, ill keep trying. I am not sure if this is causing the mission to not work but it probably cause some problems.

Do you (or anyone else) have any example on how this mapSize thing may be done via init.sqf?

Anyway you already helped me a lot, thank you very much.

Share this post


Link to post
Share on other sites

Changing the mission is way easier. Try to track it down and rewrite that part.

Share this post


Link to post
Share on other sites
;2389170']Changing the mission is way easier. Try to track it down and rewrite that part.

I followed your advice, after some debugging and a lot of code commented I found the mapSize error gets triggered by this code:

_randomPos = [[[getMarkerPos currentAO, PARAMS_AOSize],_dt],["water","out"]] call BIS_fnc_randomPos;

the _dt is defined here:

	_dt = createTrigger ["EmptyDetector", getMarkerPos currentAO];
_dt setTriggerArea [PARAMS_AOSize, PARAMS_AOSize, 0, false];
_dt setTriggerActivation ["EAST", "PRESENT", false];
_dt setTriggerStatements ["this","",""];

After that _randomPos line the mission breaks, nothing else works, before that everything execute normally. Now I am trying to figure out how to sort this _randomPos thing out without causing the mapsize error.

Share this post


Link to post
Share on other sites

a3\functions_f\Map\fn_randomPos.sqf calls BIS_fnc_worldArea which contains

	_mapSize = getnumber (_worldPath >> "mapSize");
if (_mapSize == 0) then {["mapSize param not defined for '%1'",worldname] call bis_fnc_halt};

So just replace the randomPos with a custom function.

My approach is to put two markers: bottomLeft and topRight.

Based on these you can compute one.

For details check: http://pastebin.jonasscholz.de/10879 (determines a set of positions)

Share this post


Link to post
Share on other sites
I followed your advice, after some debugging and a lot of code commented I found the mapSize error gets triggered by this code:

_randomPos = [[[getMarkerPos currentAO, PARAMS_AOSize],_dt],["water","out"]] call BIS_fnc_randomPos;

Just replace that line with

_randomPos = [[[getMarkerPos currentAO, PARAMS_AOSize],_dt],["water"]] call BIS_fnc_randomPos;

All it should need is the "out" removed as this is the bit that is calling WorldArea.

Shouldnt make much difference to your mission as your calling for a random pos in [getMarkerPos currentAO, PARAMS_AOSize] or _dt so "out" wont even matter as long as markerpos + params_aosize doesn't overlap the edge of the populated map (if it does your just be spawning out in the wilderness a little way :P).

The only other place its called is to default parm0 if not specified but as in the last sentance your already suppling this parm.

Ok theres alot of wilderness in cherno :) If it does bother you that much just copy BIS_fnc_randomPos and rename it and replace all

[] call BIS_fnc_worldArea

with

[] call _fnc_WA_replace

and add this function to the script

_fnc_WA_replace = {
_trig = createtrigger ["emptydetector",[9122.17,5178.92]];
_trig settriggerarea [8500,8500,0,true];
_trig
};

Havent fully tested but sizes are right from cherno config. Think that should about do it. Luckily i was only looking at this set of script earlier this morning trying to figure out some other problems.

Edited by Larrow

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×