Jump to content

How do i edit the mission?


deli

Recommended Posts

Okey i've been trying to open the mission in the editor to play around with, but with no success. I've been able to open it as a scenario and host it from my computer but not in the editor. What am i doing wrong? 

 

I used this file "co40 AW Invade & Annex 2.83.Stratis.pbo"

 

And after i edit it do i save it somehow and testplay it in the scenario map or?

 

 

 

Ed. Btw is the new 2.85 getting uploaded here?

Link to comment
Share on other sites

I would ask AW staff if they think it's OK before you unpack and modify something they created.

 

Thanks for checking. :)

 

So long as you keep the credit to Ahoy World in the mission, you're free to open and edit the mission as much as you like.

Link to comment
Share on other sites

thanks for the help! im not going to make a server or anything but i know how things are placed and how this map/mission works so i thought i would use it to learn how to make a map/mission!

Link to comment
Share on other sites

thanks for the help! im not going to make a server or anything but i know how things are placed and how this map/mission works so i thought i would use it to learn how to make a map/mission!

 

Good man! 'tis the best way to learn! :)

Link to comment
Share on other sites

I have been trying to port this to an older map for my own amusement (Chernarus, 3 airfields and more coastal cities) but no luck. Why will this not function at all on a new map, what would I need to do in the files (removed the Stratis entries and changed to Chernarus in mission.sqm, { addons[], addonsAuto, Intro, outrowin, Outrolose}). 
I think that with all of those cities, it has the possibilities to be an end all, and there are very few missions as it is for older maps.Any Ideas Guys?

Link to comment
Share on other sites

I have been trying to port this to an older map for my own amusement (Chernarus, 3 airfields and more coastal cities) but no luck. Why will this not function at all on a new map, what would I need to do in the files (removed the Stratis entries and changed to Chernarus in mission.sqm, { addons[], addonsAuto, Intro, outrowin, Outrolose}). 

I think that with all of those cities, it has the possibilities to be an end all, and there are very few missions as it is for older maps.Any Ideas Guys?

What exactly doesn't work, do you get an error message or something? Try to be more specific so it's easier for others to help you. I am not an expert on this field but if you get some error message or you have some logs I may be able to help you.

Link to comment
Share on other sites

Have you edited the markers for the targets on init.sqf? On the first lines it says:

 

These targets are simply markers on the map with the same name.

.....

_initialTargets = [        "Agia Marina and Firing Range",        "Camp Rogain",        "Kamino Firing Range",        "Air Station Mike 26",        "Camp Maxwell",        "Girna",        "Camp Tempest"];

.....

 

Editing that and the things you said on mission.sqm i think it should work, the rest of the code doesn't seem to be tied to stratis. Also look for debugMode = false; on init.sqf and set it to true to see if you get any messages from the mission. Also, I think the I&A mission lets you enable/disable side missions, priority targets, etc. You should disable everything, and test if you get the main mission working, and if you do then start enabling things one by one to find what's broken.

Link to comment
Share on other sites

I cannot find the "debugMode = false" in init.sqf, which line is it on(maybe your version is different)? I'll mess around on it some more, and see if I can get it working.

 

for now I have ...

 

_targets = [
"Lopatino",
"Vybor",
"Pustoshka",
"Zelenogorsk",
"Pavlovo",
"Kamenka",
"Komarovo",
"Rogovo",
"Kabanino",
"Grishino",
"Stary Sobor",
"Novy Sobor",
"Gorka",
"Dubrovka",
"Gvozdno",
"Krasnostav",
"Khelm",
"Industrial Harbor",
"Berezino",
"Polana",
"Orlovets",
"Solnichniy",
"Staroya",
"Kamyshovo",
"Elektrozavodsk",
"Prigorodki",
"Mogilevka",
"Chernogorsk",
];

Link to comment
Share on other sites

Line 305, I've been reading the code here https://bitbucket.org/ahoyworld/aw-invade-annex/src, it may be a different version than you have.

 

Those targets you just posted, do they exists as map markers with that same name on your map? I think they should be in the mission.sqm file, on the class Markers.

 

Also, im not sure if this is an error that can cause problems on the mission because I never really coded a mission, but in other programming languages your array contains an error on the last entry:

 

"Chernogorsk",
];

It should not have that last comma after "Chernogorsk". The commas are used to separate the array elements, so the last one doesn't need one.

Link to comment
Share on other sites

Wok, great to see you helping out here a fellow vlad. It's nice to see your kind of aspiration of people who have a genuine interest in tryin to help even tho you said that you have no experience you provided a valid pointer in error in ones Array also pointing out to the bitbucket is a push to the right direction.

 

antiprotestant, with all the above in mind. Could you push me a version as a zip attachment, I can have a look at possible problems or just come by to our TS3-server it's manned almost all the time.

 

Cheers.

Link to comment
Share on other sites

It should not have that last comma after "Chernogorsk". The commas are used to separate the array elements, so the last one doesn't need one.

This is a common coding practice. This way it's easier to add more elements to the array and you don't have to remember to add an extra comma when you do.

Link to comment
Share on other sites

This is a common coding practice. This way it's easier to add more elements to the array and you don't have to remember to add an extra comma when you do.

 

In SQF, however, the array will not be "valid" if the final element has a comma after it and will therefore never be initialised. It expects another element.

Link to comment
Share on other sites

Oh. Yea, not all languages or parsers/compilers supports trailing commas (JSON for IE is a famous example). But I understand why it ended up there :-)

 

Aye languages always have their little quirks, I suppose. I learnt something cool about PHP the other day actually: if you compare two variables using == it will compare just the value of each variable (by converting integers to strings and the like) while using === will compare purely by value. Ergo, === is faster and pretty much all you ever use if you write code right. :D

 

Anyway, back on-topic: good posts, wok. If you've then added all the correct markers and filled that array and AOs are appearing but not populating, you may want to take a look through the group class names used to spawn enemies; it could well be that it's trying to spawn units that don't even exist in ArmA II. Line 551 of the init.sqf is where the spawning function begins.

Link to comment
Share on other sites

Sorry guys, been busy lately. 

 

I shortened the list of the towns to test if it was a misspelling, but I don't think it is. I uploaded it for you guys to take a look, just de-pbo it.

http://www.mediafire.com/download.php?0wzl768mkaezf4e

 

The missions just don't start at all (side and main).

I made a few changes also, so it could be something I have done. But with all the errors from CBA right now, and the A2 compatibility errors; it is hard to filter the script errors from the mission. (fyi- I have been using all of the Arma 2 content (all the DLCs),but i dont think I set the A2 vehicles yet.)

Link to comment
Share on other sites

Sorry guys, been busy lately. 

 

I shortened the list of the towns to test if it was a misspelling, but I don't think it is. I uploaded it for you guys to take a look, just de-pbo it.

http://www.mediafire.com/download.php?0wzl768mkaezf4e

 

The missions just don't start at all (side and main).

I made a few changes also, so it could be something I have done. But with all the errors from CBA right now, and the A2 compatibility errors; it is hard to filter the script errors from the mission. (fyi- I have been using all of the Arma 2 content (all the DLCs),but i dont think I set the A2 vehicles yet.)

 

I've made a little progress. First I would recommend you to download the latest I&A code because that's the one I am testing with (i got it from bitbucket) and you would probably end up updating anyway.

 

What I did:

  • Placed all the files from I&A mission (unpacked) on the folder ...My Documents/Arma 3 Alpha - Other Profiles/wok/MPMissions/AW_IA_Domination.Chernarus

     

  • On init.sqf: removed all the elements of the arrays _initialTargets and _targets and added only one element called Chernogorsk

     

  • On 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, used Chernogorsk instead of Girna.

Starting the mission like this didn't do much, the base looks fine, ammo crates, helis etc. But the AO, side mission, radio tower, etc markers stay "outside the map" and the mission never start. But then I removed the following code (line 643 to 660 of init.sqf):

 

//Spawn random wrecks
if (PARAMS_PriorityTargets == 1) then
{
        {
                _accepted = false;
                _position = [0,0,0];
                while {!_accepted} do
                {
                        _position = [] call BIS_fnc_randomPos;
                        if (_position distance (getMarkerPos "respawn_west") > 800) then
                        {
                                _accepted = true;
                        };
                };
                _randomWreck = _x createVehicle _position;
                _randomWreck setDir (random 360);
        } forEach ["Land_Wreck_Commanche_F","Land_UWreck_Mv22_F","Land_UWreck_Mv22_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad_F","Land_Wreck_Truck_dropside_F","Land_Wreck_Truck_F","Land_Wreck_Car_F","Land_Wreck_Car2_F","Land_Wreck_Car3_F"];
};

And now when I start the mission, the main AO marker (the red circle) gets moved into Chernogorsk position, but nothing else works, no enemies, no side mission, nothing. Immediately after the AO red circle moves to cherno position I get an error that says something like:

 

Tiitle: BIS_fnc_worldArea

Message: mapSize param not defined for Chernarus

 

I couldn't find any info on it so I am not sure if it's related or not. But you should definitely try removing or commenting the "Spawn random wrecks" code.

 

-----------------------------------------------------------------------------------------------------------------------------

 

Update: I found the problem, it's related to the random positions of enemies and such, I will play with it a little more and see how far I can take it, so far I think I made it work, but the problem now is enemies spawn next to the player instead of in the AO :P I will update my findings here.

Link to comment
Share on other sites

  • 2 weeks later...

I forgot about this thread, I was expecting antiprotestant to bring it up. Anyway my findings on this: the problem wirh I&A in Chernarus is the function BIS_fnc_randomPos, it doesn't seem to work on Chernarus. It may be possible to fix it by editing the Chernarus map pbos and adding the mapSize parameter, but I coulnd't do it so I am not sure.

 

So the fix is to replace BIS_fnc_randomPos with another function, I used this for testing: https://github.com/xyberviri/DayZBanditAI/blob/master/dayz_1.Chernarus/scripts/compile/fn_randomPos.sqf

 

Just add that file on the mission folder, then add this to init.sqf:

fnc_randomPos = compile preprocessFile "fn_randomPos.sqf";

Then search for all the places where BIS_fnc_randomPos is used and replace it with this new function, for example:

// replace this
_randomPos = [[[getMarkerPos currentAO, PARAMS_AOSize],_dt],["water","out"]] call BIS_fnc_randomPos;
// with this
_randomPos = [getMarkerPos currentAO, random 360, random PARAMS_AOSize, false, 2] call fnc_randomPos;

Or:

// replace this
_randomPos = [[[getMarkerPos currentAO, 20],_dt],["water","out"]] call BIS_fnc_randomPos;
// with
_randomPos = [getMarkerPos currentAO, random 360, 20, false, 2] call fnc_randomPos;

 

If anyone request it I could build a sample of I&A working on Chernarus, I tested it using this replacement function and it seemed to work fine.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry it has taken me so long. I've been working 70 hours a week, so I have little time lately.

 

 I have made all the changes you posted Wok, and the AO is being created properly, and being populated by soldiers; but I am getting a error on the radioTower saying that it is a undefined variable (and will not create tower), and still no hints for main AO location (think the hints and side mission problems are to do with tower error). I'll tinker with it and see if I can get around it. 

 

Also I am still getting the BIS_fnc_worldarea error on start, so something else must still be trying to access the fnc.

Link to comment
Share on other sites

Sorry it has taken me so long. I've been working 70 hours a week, so I have little time lately.

 

 I have made all the changes you posted Wok, and the AO is being created properly, and being populated by soldiers; but I am getting a error on the radioTower saying that it is a undefined variable (and will not create tower), and still no hints for main AO location (think the hints and side mission problems are to do with tower error). I'll tinker with it and see if I can get around it. 

 

Also I am still getting the BIS_fnc_worldarea error on start, so something else must still be trying to access the fnc.

 

Yea, you are getting the error because BIS_fnc_randomPos is still being used somewhere in the mission, you need to replace all the occurrences with the custom function. I guess the tower problem is because of this too. These are all the files that uses BIS_fnc_randomPos in the latest dev branch from bitbucket:

./init.sqf
./objectives/priority/init.sqf
./objectives/priority/missions/land_destroyEMP.sqf
./objectives/priority/missions/land_destroyMortars.sqf
./objectives/side/init.sqf
./objectives/side/init.sqf
./sm/sideMissions.sqf
./sm/priorityTargets.sqf

If you still can't get it working let me know and I will see if I can do it. Also, if you have the markers for all the AO locations and respawn area for Chernarus post them because I have no idea how to get them, in the tests I made I got them from the mission you posted but not sure if it had all the cities.

Link to comment
Share on other sites

  • 2 months later...

Hey guys i want to edit this mission as well. I've got the PBO extracted and i can edit it. However when I change anything like add another helicopter or change the logo thing when you log in the the little picture or change the players names. The respawn doesn't work and none of the scripts work? 

 

I want to make a dedicated server but edit it to how I want it. I'll leave the credit still to ahoyworld of course. 

Link to comment
Share on other sites

  • 1 year later...

I have the same issue.

I have the invade and annex 2.88 for stratis, I unpack the PBO and load its content up

in the editor.

When i preview, all is fine.

But when i change one thing.. say a chopper.. when i Save and then preview the missions are not loading.

 

How do i fix this? :)

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
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...