Jump to content
  • 0

loading custom mission.sqf *FIXED*


doofmachine1

Question

Hello, lately i have been working on a server trying to figure out this and that, since im pretty new to the whole "arma 2 server" thing, with my basic knowledge in c# :/ Sometimes it tough but i feel like i understand enough to install mods and such, maybe not write my own script yet. But hopefully eventually when i start to read about it. Sooo, heres my issue that i would like to have some help with. I have been trying to figure out how to change around in the trader cities with both NPC's and the buildings, which i gave up on but then i ran into this code snippet by and accident when i was browsing around in my init.sqf

 

	// Add trader citys
	_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf"

And i got so excited so i grabbed the sqf in pbomanager and got hands on the biedi file also, so i started editing the map. And now after a couple of hours of work im trying to load the new mission so. I went into my documents opens the .sqf in notepad++ grab the important stuff that i have there, fires up my PBOmanager and opens "D:\arma 2 server\Arma 2 Overpoch Server\@DayZ_Overpoch_Server\addons\dayz_server.pbo" (I still run my server on my personal pc for testing before i rent a server to sort everything out)

And then i open "\missions\DayZ_Epoch_11.Chernarus\mission.sqf" and remove the current code and replaces it with my own, ofcourse i make sure they look the same at the end. 

 

_vehicle_1352 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_R2_Rock1", [13817.806, 11746.111, -27.215347], [], 0, "CAN_COLLIDE"];
  _vehicle_1352 = _this;
  _this setDir 68.549126;
  _this setPos [13817.806, 11746.111, -27.215347];
};

processInitCommands; // This is what im refering too

And saves, but still it loads the old trader cities that came from the original version of the mission.sqf.. Am i missing something here? Maybe someone could help me out with this issue.

Well hopefully i explained good enough tried to be as detailed as possible and sorry if some words are spelt wrong or grammar is screwed, english isn't my native language.

Thanks!


*FIX IN COMMENTS*

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

You cannot edit files while they are still inside the PBO, since they won't save properly.  You have to copy and paste them out of the PBO to another location, make your edits, and then copy and paste them back into the PBO.  You could also just leave the edited mission.sqm directly in your mission file and just change the path information in your init.sqf, which is the way most people do it.  That way when you need to make changes you don't have to do all that copy and pasting.

Link to comment
Share on other sites

  • 0

You cannot edit files while they are still inside the PBO, since they won't save properly.  You have to copy and paste them out of the PBO to another location, make your edits, and then copy and paste them back into the PBO.  You could also just leave the edited mission.sqm directly in your mission file and just change the path information in your init.sqf, which is the way most people do it.  That way when you need to make changes you don't have to do all that copy and pasting.

Yeah, i literally tried that 30 minutes ago. Well all the old buildings dissapeared but no new :/ i have no clue why maybe im not extracting the files in the right folder?

tried both

@DayZ_Overpoch_Server Dayz_server

@DayZ_Epoch_Server Dayz_server

so now it says in init.sqf 

	// Add trader citys
	_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\custommission.sqf";

and heres the server pbo

0A7OP6y.png

from what i can see it should work. but it doesn't.

and heres the custommission.sqf

http://pastebin.com/XChVwAVA

Link to comment
Share on other sites

  • 0

*FIX*

 

So, what i did was that i redirected the files into just 


 
_nil = [] execVM "custommission.sqf";

to keep it simple instead of having to browse throu the server files all the time.

and then, i went to the original .sqf can be and got all the AI's agan and just copied the bottom line of them 
 

  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};

and pasted it into the custom_mission.sqf so it looked like 

 


_unit_13 = objNull;
if (true) then
{
  _this = createAgent ["Profiteer4", [11448.411, 11350.32, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _unit_13 = _this;
  _this setDir 34.525925;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};


on everyone of them. 

and then i looked for centerpoints which were hidden all around the code, just remove em also..

they look like this:

 

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0; 

And also you have to make sure every NPC is called by
  _this = createAgent 
and not 
_this = _group_1 createUnit

 

Well this was a light version of my fix, If you would like i could record a video to be more precise.. this fix was just really straight throu and not so detailed..

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
  • Advertisement
  • Discord

×
×
  • Create New...