Forum Jump :

Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-08-13 12:48        
     
Hello Gents,
I would like to present you my first addon and script.
It simply displays the team roster in the diary (intended to work for briefing purposes).
You can download the whole package here(script version and addon).
Following is a screenshot of how it looks like:

Script Code:


I might also release a server side version of the addon.
I would appreciate feedbacks and suggestions.


This post was edited by Skippy (2014-08-14 13:44, ago)


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2014-08-13 13:02        
     
Clever :) Is it handle "custom" role that you can write in "Description" field?


Advertisement


Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2014-08-13 13:19        
     
@bp.sushi, yes in a way.
You can put :
this setVariable ["displayName","Custom Description"] in a unit init field.


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2014-08-13 13:26        
     
Nice, "me like it" :)


Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2014-08-13 13:44        
     
By the way I still need to figure something out for the addon version.
I defined global variable in the core of the script using someting like this:
#ifndef MyGlobalVar
#define MyGlobalVar
#endif

And I would like the mission maker to be able to change this variable in the init, but I can't get it to work.


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2014-08-13 14:24        
     
by #DEFINE you dont define variable but keyword. And you must assign something to that keyword. for example:
#ifndef MyNumber
#define MyNumber 100
#endif
means that wherever you use MyNumber it will be 100.

If you want set global and public variable accesable for MM use this:
if(isNil "MyGlobalVariable") then {MyGlobalVariable = "default var"; publicVariable "MyGlobalVariable";};


Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2014-08-13 14:55        
     
Yeah my bad I miss typed:
#ifndef MyGlobalVar
#define MyGlobalVar true
#endif

So MyGlobalVar should be accessible everywhere outside of the script scope (?)
The thing is, I don't know if the script(inside the addon) is called before or after the init.sqf is called.


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2014-08-13 14:59        
     
Here is initialization order:
https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Initialization_Order

However by #DEFINE you still dont create variable. You create only keyword. You can assign variable to keyword but you must define variable itself anyway. Its two different things.


Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#9 Posted at 2014-08-13 15:17        
     
Thank you for the link sushi,
Ok so I call my addon's core script in the Extended_PostInit_EventHandlers.hpp file as follow :
class Extended_PostInit_EventHandlers {
	skippy_roster_Post_Init = "skippy_roster_Post_Init_Var = [] execVM ""skippy_roster\roster.sqf""";
};
I'm not too sure about this, I mean there could be a more simple way to do it.

I would like the mission maker to be able to change the addon's core script parameters (like the script version does), but I haven't found a way to achieve that yet. Besides I would still need the script to execute before the briefing.


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2014-08-13 15:44        
     
Simplest way (for user, not for you ;-) ) is to create Module for this.
Look at this: https://community.bistudio.com/wiki/Arma_3_Module_Framework
(feel free to ask if you have questions)
Also by using Extended_PostInit_EventHandlers you force users to use CBA, not necessary in this case i think.

Keep going, grate potential in this mod *THUMBS UP* .


Author Message


Posts: 20692
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 44
In-game name: Foxhound

 
#11 Posted at 2014-08-13 15:46        
     
Thanks for posting the release here :-)
News is up on the frontpage and you can find our mirror here:




Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#12 Posted at 2014-08-13 17:01        
     
@sushi, thank you for all the informations, we'll look into the module thing.
@foxhound thank you for hosting.


Author Message


Posts: 201
Rank:


Level: Member

Country: il
Location:
Occupation:
Age: 40
In-game name: Variable

 
#13 Posted at 2014-08-14 07:44        
     
Skippy this is very useful. Thank you! I will install it today for sure.
Can you somehow add indication of the assigned sub-team colour (you know, the one the leader assigns within his team - "5,6 are team red")
Also - does it show all friendly teams or just your own?

This post was edited by Variable (2014-08-14 08:02, ago)

Join the CiA coop nights! http://ciahome.net

Author Message


Posts: 48
Rank:


Level: Member

Country: fr
Location:
Occupation:
Age:
In-game name:

 
#14 Posted at 2014-08-14 13:19        
     
@Variable, currently it displays all friendly teams on your side. Keep in mind that the script version offers a little more tweaking capabilities as of now (you can chose to display AI or players only). I believe that you can see your group members in the diary (not sure now you made me doubt haha). But I might add a parameter to hide certain groups if that's what you're asking for.

The script was intended to run pre briefing to ensure that everybody could see the big scheme of all friendly forces.
As there are no way (that I know of) to remove entries from the diary, the diary entry isn't "live". It is just a picture of your team at a given time in the mission (most likely before the briefing). I might add a parameter to display group member color.

Let me know of how you want to use it.






Tags: Team Roster