red_ned

Infistar Custom Functions

7 posts in this topic

This is for admins to be able to click to spawn a DMS mission through infiSTAR.

The files included reflect MY bandit missions (I may add static but I have bespoke ones just for Napf so included a demo for you to create your own).

Download:  https://github.com/redned70/CodeAddons/tree/master/Infistar Code

All instructions on the repository readme.

 

This is a start of adding custom stuff for missions and maybe some events etc which I will add over time for you to look through and use but this does show defining the functions, defining the menu name and linking the two together so be gentle as I haven't been in this direction before.

Thanks to @infiSTAR for initial help with double quotes and for creating a great admin mod.

Edited by red_ned
  • Like 5

Share this post


Link to post
Share on other sites
Advertisement

... must write again because the text array above is buggedO.o

i've installed your script and it works for all dynamic missions but not for my static missions and I dont know why .... the only static mission which is working is the core factory...

can you help me? i cant find the mistake ¬¬

here only a example of my static missions

custom_functions.hpp

Spoiler

class custom53 {									// next number up
		type = 0;										// just execute
		name = "Spawn_kastro_castle_Mission";			// name of menu item - must be unique
		code = "call fn_spawn_kastro_castle";		// name of function called - must be unique
	};
	class custom54 {									// next number up
		type = 0;										// just execute
		name = "Spawn_castle_183_Mission";			// name of menu item - must be unique
		code = "call fn_spawn_castle_183";		// name of function called - must be unique
	};
	class custom55 {									// next number up
		type = 0;										// just execute
		name = "Spawn_mayor_Mission";			// name of menu item - must be unique
		code = "call fn_spawn_mayor";		// name of function called - must be unique
	};
	class custom56 {									// next number up
		type = 0;										// just execute
		name = "Spawn_kweis_Mission";			// name of menu item - must be unique
		code = "call fn_spawn_kweis";		// name of function called - must be unique
	};
	class custom57 {									// next number up
		type = 0;										// just execute
		name = "Spawn_check_Mission";			// name of menu item - must be unique
		code = "call fn_spawn_check";		// name of function called - must be unique

 

infistar custom in mission.pbo

Spoiler

fn_spawn_kastro_castle = 					{ _stringcode = "[""kastro_castle""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };
fn_spawn_castle_183 = 						{ _stringcode = "[""castle_183""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };
fn_spawn_mayor = 							{ _stringcode = "[""mayor""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };
fn_spawn_kweis = 							{ _stringcode = "[""kweis""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };
fn_spawn_check = 							{ _stringcode = "[""check""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };

 

EXILE_AHAT_CONFIG

 

Spoiler

"Spawn_kastro_castle_Mission",        
            "Spawn_castle_183_Mission",                
            "Spawn_mayor_Mission",                    
            "Spawn_kweis_Mission",                   
            "Spawn_check_Mission",               

 

Here The Stuff of core factory

 

Spoiler

//Custom_Funktions.hpp

class custom74 {							
		type = 0;	// just execute
		name = "Spawn_kore_factory_Mission";
		code = "call fn_spawn_kore_factory";
	};

//Infistar_custom in mission.pbo

fn_spawn_kore_factory = 					{ _stringcode = "[""kore_factory""] call DMS_fnc_SpawnStaticMission;"; [_stringcode] call admin_d0_server; };

//Exile_AHAT_config.hpp

"Spawn_kore_factory_Mission",

 

 

Edited by Powerstriker46

Share this post


Link to post
Share on other sites
5 hours ago, Powerstriker46 said:

... must write again because the text array above is buggedO.o

i've installed your script and it works for all dynamic missions but not for my static missions and I dont know why .... the only static mission which is working is the core factory...

can you help me? i cant find the mistake ¬¬

here only a example of my static missions

custom_functions.hpp

infistar custom in mission.pbo

EXILE_AHAT_CONFIG

Here The Stuff of core factory

1. make sure your static missions are listed as possible missions in the DMS PBO as you cant call a mission that's not listed

In my custom functions I have:

	class custom45 {
		type = 0;	// just execute
		name = "Static_Napf_Castle_Mission";
		code = "call fn_spawn_Napf_Castle_Mission";
	};

so the name for InfiSTAR menu has to be identical to "name"

"Static_Napf_Castle_Mission",

If the name in the menu doesn't exactly match InfiSTAR leaves out the item so if the item isn't in your menu this is the issue.

then code must exactly match the custom file you loaded into your mission PBO -

fn_spawn_Napf_Castle_Mission = 				{ _stringcode = "[""Napf_Castle_Mission""] call DMS_fnc_SpawnStaticMission;"; 			[_stringcode] call admin_d0_server; };

I would realistically look for a missing comma on the menu side of InfiSTAR and look for [] or ;

punctuation and brackets usually mean things listed before the mistake work and things after don't

also check that the mission name is correct in the fnc call as again it should be an exact match (I match the case of the letters too just in case) and check you RPT for errors too as I found some of the typos do appear in there although some things don't :/

I cant really tell too much from your posting as I really need to compare all 3 files complete but I hope some of this helps

Share this post


Link to post
Share on other sites

yeah i was stupid :D

 

"i asked my compiler hey dude whats wrong?"

and compiler says

"yeah you idiot has forgot a "="  behind one of the entrys in infistar custom.sqf on line 54"

me :swearing:

 

now its :gottarun:

 

++ for other guys wich want to use it:

i had a mission called "notimportant_2.1.sqf"

and your script dont like the . on 2.1,  (error log in rpt.log)

i removed the . and this mission is working, too.

 

Nice script and thanks for your help :D

 

LG

PS46

 

Share this post


Link to post
Share on other sites
On ‎10‎/‎07‎/‎2018 at 4:28 PM, Powerstriker46 said:

yeah i was stupid :D

 

"i asked my compiler hey dude whats wrong?"

and compiler says

"yeah you idiot has forgot a "="  behind one of the entrys in infistar custom.sqf on line 54"

me :swearing:

 

now its :gottarun:

 

++ for other guys wich want to use it:

i had a mission called "notimportant_2.1.sqf"

and your script dont like the . on 2.1,  (error log in rpt.log)

i removed the . and this mission is working, too.

 

Nice script and thanks for your help :D

 

LG

PS46

 

you may be able to use a delimiter for extra ascii characters - e.g.

 \.

no tested it though so best to avoid

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.