Jump to content

mind

Member
  • Content Count

    98
  • Joined

  • Last visited

  • Medals

Posts posted by mind


  1. Hi all,

     

    Can any one point me to addon where magazines have real models (not mag_univ.p3d)? I remember in A2 DayZ a lot of magazines had custom models.

    Also, i wonder how simple is that to rip magazine from weapon`s p3d. Is it even possible? I am not modeler, so have no clue.

     


  2. Hey,

     

    Small topic for those who love to play around with randomness.

    Have you ever tried to find random point in circle? Let`s try find a random point around player in 1000 meters radius. So we can write something like.

    player getRelPos [random 1000, random 360];

    And here we go, seems cool right? No it is not. Let`s try do that 5000 times, and put a marker for each resulting position.

    for "_i" from 0 to 5000 do { 
       _pos = player getRelPos [random 1000, random 360]; 
       _markerstr = createMarkerLocal [str random 100,_pos];  
       _markerstr setMarkerShapeLocal "ICON";  
       _markerstr setMarkerTypeLocal "hd_dot"; 
    };

    Here what we gonna have.

    Spoiler

    wrong.png

    As you can see it is not random at all. Dots are concentrated towards center.

     

    So how can we have unified distribution? We can write following:

    for "_i" from 0 to 5000 do {
    	_radius = 1000;
    	_randomValue = random _radius;
    	_distributedValue = _randomValue;
    	if ((1-(_randomValue/_radius)) > (random 1)) then {
    		_distributedValue = (_randomValue + (random (_radius - _randomValue)))
    	};
    	_pos = player getRelPos [_distributedValue, random 360]; 
    	_markerstr = createMarkerLocal [str random 100,_pos];  
    	_markerstr setMarkerShapeLocal "ICON";  
    	_markerstr setMarkerTypeLocal "hd_dot"; 
    };

    So here is what we gonna have as result

    Spoiler

    good.png

     

    Basically what we do here is: As smaller the random value we get as bigger the chance that we will add to this value a bit. (In simple words ;p)

     

    Have a good day

    • Like 2

  3. Hi all,

     

    I have been away from ARMA recently. There is a certain project which i probably will not be able to finish...

    Point is, there is asset in this project that i want to share even thought the whole project is not done.

     

    This asset is hiqh quality map of Altis and Stratis. I dont know if someone will find this usefull, but i hope so.

    Maps were made from inside game by making screenshots, I suppose it is not against EULA. I will remove download links if it is against EULA.

    Both maps have following parameters:

    - Resolution is 32768x32768 pixels (higher is not possible for JPG coz I wanted to keep resolution as power of 2)

    - Both satelite and height map variants available

    - No watermarks

     

    Also, both maps were cut to tiles, so it can be used in tile map engines. Leaflet in my case.

     

    Here are some sneak pics.

    image.pngimage.pngimage.pngimage.png

     

    Single JPG maps:

    1) Stratis (satelite + height map) download - 129 MB

    2) Altis (satelite + height map) download - 199 MB

     

    Tiled maps. 8 Layers. Resolution 256x256. Format PNG. 21845 files.

    1) Stratis - height map download - 606 MB

    2) Stratis - satelite download - 748 MB

    3) Altis - height map download - 845 MB

    4) Altis - satelite download - 811 MB

    • Like 1

  4. Hi all,

     

    I encountered rather strange and very dangerous bug.

     

    Following code will execute, but will ignore structure elements like IF blocks. Resulting in both lines written.

    _action = '
       if (true) then {
          hint "This line MUST print"
       } else {
          hint "This line MUST NOT print"
       }
    ';
    _button buttonSetAction _action;
    

    Pressing this button will result in printing both lines with no errors, it is if like there were no IF block or it`s evaluation skipped.

     

    However following code will execute as expected

    _action = 'if (true) then {hint "This line MUST print"} else {hint "This line MUST NOT print"}';
    _button buttonSetAction _action;
    

    It looks like newlines and tabs, causing this strange behaviour.

     

    P.S.

    Other workaround for buttonSetAction is using calling global function.


  5. I have another tiny update for you guys. it is for notepad++ plugin only, so I figure out i will silently "replace" version`s 0.9.0.1 "asct.dll". So 0.9.0.1 is latest version, download link updated. So this update allow executing only portion of text from currently opened file. As with "Execute" command, "Execute segment" will use default instanceID.

     

    If you have some text selected, you can then press Plugins->ASCT->Execute segment.seg.jpg

     

    And if you have nothing selected, the whole line where your caret currently is, will be executedline.jpg

    • Like 1

  6. Pretty nifty tool man! I will definitely will give this a shot.

    Questions tho, we run a couple of different instances of Arma on our server. How do you specify what instance you want it to execute on or is single instance-only as of right now?

    Thats a brilliant quastion, thank you. I actually have an idea how to make it possible to send code to a specific instance of arma.

     

    For now though, you are right, one instance only.

    • Like 1

  7. main.jpg

    General description

    Arma Server Control Tool can be used to execute SQF scripts on server directly, by using standalone server side application. Idea behind this project is to solve the problem that, in many cases it is hard or straight impossible for server administrator to execute certain scripts on server, also it most likely involves joining server with game client. A lot of times server admins are not able to quickly react to some event on server due to absence of a PC with installed arma nearby. With ASCT all you need to do is to login to your server with remote Desktop or TeamViewer, right click on script.sqf and select ASCT Execute.
     
    NOTICE! This application REQUIRE root access to server, you MUST be able to connect to server with remote desktop or TeamViewer. If you have only web access this application is NOT usable.
     

    Target audience

    This tool supposed to be used only on server side. it is made for server admins and developers. Currently this program can be used only on windows platform.

     

     

    Installing

    1) Copy paste @asct folder to root of your server alongside with other addons
    2) Change your server startup parameters by adding -serverMod="@asct;"
    3) Copy paste “asct_console†anywhere you like.
    At this point you are basically done, you can now use asct.exe as console app. However there are few optional steps to make your life simpler.
     
    4) Optional. If you are running several arma servers on single machine, you should set "instanceID" in order to distinguish arma servers. To do that execute following expression on server init 
    asct_instanceID = “your_idâ€; 
    Select something descriptive as “your_id†but use only a-z,0-9 and _ characters.
    5) Optional. When directory for asct.exe selected, run Add_ASCT_to_context_menu.bat, that should be found in same directory. Remember to run it as administrator. This will add “ASCT Execute†option to windows explorer context menu. In case you have several servers on same machine, open Add_ASCT_to_context_menu_instance_yourID.bat file and edit 3rd line. instead of "yourID" type in same instanceID you used in step 4. Save .bat file and execute it as administrator.
    6) Optional. For notepad++ users. Copy paste asct.dll from “Notepad++ plugin†folder to “C:\...\Notepad++\plugins\â€
     

    Use as console application

    There are several ways to use app. They all have some pros and cons, choose one you like more. For sake of clear examples let`s assume you put asct.exe in C:\asct_console\ folder.
    As most console apps, this require user to provide parameters. Only one parameter can be used at once.
     
    1) Execute script from file
    -f <filename>
    Example: C:\>asct_console\asct.exe -f "C:\my scripts folder\script.sqf"
    This is simplest method, nothing much to say here, app will read whole file and execute it`s contents. It is also possible to pass only filename, in such case file must be in same folder as asct.exe. This method allow file to have both single line comments // and multiline comments /*   */. However, preprocessor directives are NOT allowed (#include, #define, __MACRO__, etc…). SQF files should be encoded as UTF-8.
     
     
    2) Execute expression
    -e <expression>
    Example: C:\>asct_console\asct.exe -e "diag_log \"hello from RPT\";"
    This method is very straightforward, thus can be useful for only very simple commands. As you can see it require to escape inner quotes and some other technical characters like %, it does not support any comments and must have whole expression in single line. However, it might be useful if you like to use asct in conjuration with some batch, PowerShell, VBS or whatever else scripting methods you like. 
     
     
    3) Execute base64 encoded expression
    -b <base64code>
    Example: C:\>asct_console\asct.exe -b ZGlhZ19sb2cgImhlbGxvIGZyb20gUlBUIjs=
    This one accepts script expression in form of UTF-8 string encoded as base64. What you see in example is basically “literal†representation of bytes of UTF-8 string diag_log "hello from RPT";  This method combine ability to have whole expression in one line, allowing single and multiline comments and accept expression of any complexity. Encode/Decode algorithm borrowed from here http://www.adp-gmbh.ch/cpp/common/base64.html. You can use online services to encode script as base64, google for it.
     
    Optionaly, if you have several instances of arma servers, there is also one additional parameter to tell on which server script must be executed. It can be used in conjuration with other parameters.
    -id <instanceID>
    Example: C:\>asct_console\asct.exe -f "C:\my scripts folder\script.sqf" -id your_ID
    You can use this parameter before or after expression parameter. In this way script will be executed on server with given instanceID.
     
    NOTE! In windows, applications have limits on length of parameters. At max it is 32768 characters, but command prompt has own limitation of 8191 character. However, there is no limitation for size of script inside SQF file, so first method can be used on very long scripts.

     

     

    Use as notepad++ plugin

    npp.jpg

    If you are using Notepad++, you can install asct plugin for it. It will allow you to execute scripts directly from notepad++. After plugin is installed (see Install. step 4) you must specify full path to asct.exe. To do that, on toolbar press Plugins->ASCT->Settings. There you will see input box, write full path to ASCT and press OK. When you have your script ready, press Plugins->ASCT->Execute to run it. Notepad++ allow to have several documents opened at same time, but only content from currently active document, will be read and executed.
     
    if you have several instances of arma servers, you should add their instanceIDs to a list in settings menu, once it is done, you will be able to select target server with "Execute at..." pressed. It is also possible to select certain server as default target by selecting instanceID from list and pressing "make default" button, after that, selected instanceID will be used in Execute funciton. By pressing "make default" button with no selected server, instanceID will be "unset".
     

    Use as windows explorer context menu

    cont.jpg

    You can also execute scripts directly from windows explorer by using right-click context menu. Follow step 5 from installation to get “ASCT Execute†option in context menu. Now navigate to folder with your script.sqf file, right click it and select “ASCT Executeâ€. As with other methods, here you can have direct execution on each of your server instances.

     

    Security & Battleye

    This application does not use any “cheating†methods to do it`s job, no memory reading/writing, no dll injections or anything else like this. All it does is using callExtension command to communicate with asct_ext.dll from which receive and call compile expressions.  This application is not meant to be used on client, thus it will be immediately blocked by battleye which is totally intended behavior. On server side, on the other hand, battleye have much less limitations (if any) and allow use any extensions. If you like to use application on client for development/testing feel free to do so with disabled battleye.Similarly, asct.pbo is not signed as it should NEVER be required mod, nor used on clients in actual game. In current implementation, there should be no way for cheaters to exploit application in any way, unless they have root access to server.

     

    Web interface

    Allowing to have asct available in browser on remote PC is something that I am very interested in doing. I realize many server owners have no root access, only some sort of web control panel with limited functionality. It would be amazing to allow use of asct for them as well. However, such a thing would require A LOT of safety considerations, it is direct control of server execution from internet after all. Does not seems to be very SAFE idea. Nonetheless I will consider implementing this as experiment. If you feel like helping me out with ssl and web development, send me a PM.

     

    Current version and goals

    Current version of application is 0.9.0.1. Next version will have bug fixing that hopefully will be found in the course on few next weeks. Once all bugs sorted out there will be final version 1.0. There probably will be no new functionality available in final version.

     

    License

    This application is released under GNU GENERAL PUBLIC LICENSE version 3.
    If you redistribute this application, please mention author and give link to this forum page.
     
    Changelog
     

     

    Version 0.9.0.0
    - initial release
     
    Verison 0.9.0.1
    - Added support for multiply servers
    - Added segment/line execution in notepad++
    - Additional logging
     
     

    Download

    Latest version 0.9.0.1 Google drive (both x32 and x64)

     

    Older versions:

    0.9.0.0 - Google drive

     

    Feel like this tool was usefull for you? You can show your appreciation with small donation, thank you!

    • Like 9

  8. @KK, Larrow is talking about objects drug and droped in eden editor.

    It looks like inside eden "simulation" (which is not same as mission simulation) there are, engine side implemented, means to paint "simple" objects.

     

    While in actual mission it is impossible to do so, because, apperently, mission simulation use setObjectTexture/setObjectTextureGlobal mechanics to do the job. Those commands (mechanics behind them) are not working for simple objects in mission simulation yet, but BIS already implemented a way to paint simple objects, in eden. So I am sure, soon, setObjectTexture/setObjectTextureGlobal will be updated and will be able to paint simple objects.

     

    P.S. it is not only arrows (helpers). Nothing, created with createSimpleObject, is paintable. Try this for example.

    obj = createSimpleObject ["A3\Signs_F\Signs_Ad\SignsAd_Sponsor_F.p3d", getPosASL Player];
    obj setObjectTexture [0, "#(rgb,8,8,3)color(0,1,1,1)"];
    

  9. @pierremgi, thanks but, this is troubleshooting report, i just inform BIS about semi-broken command.

     

    However, this script clearly show how complicated loadout manipulations are at the moment.

    several commands for each item slot, multiply addMagazine commands introduced from OFP to A2:OA.

    Hopefully, we will have get/setUnitLoadout as primary gear manipulation method.

     

    By the way, notice how classic addMagazine used to add empty mag. This is in fact one of very few ways to add empty mag to players inventory.

    Other way is setUnitLoadout.

     

    BIS, please make this command as simple as possible. Please do not overextend with command`s input control,

    it is better to have less protection then less flexibility.


  10. Hi,

     

    Posting here coz cant get in new feedback tracker  :(

     

    VERSION:

    Public (non-dev) 1.62.137494

     

    DESCRIPTION:

    I noticed following problem when using setUnitLoadout command.

    When more than 1 magazine have same number of bullets (but less than maximum magazine capacity), 

    this command will not set given bullet count, instead added mags will be fully loaded to its maximum capacity.

     

    REPRODUCTION

    Try execute following

    player setUnitLoadout [[],[],[],[],["V_Chestrig_rgr",[["30Rnd_556x45_Stanag",15,3]]],[],"","",[],["","","","","",""]]
    

    This command should give 3 mags with 15 bullets each. It will give 3 full mags instead.

     

     

     

    HOWEVER!!!!!!

    Adding one magazine will work fine.

    player setUnitLoadout [[],[],[],[],["V_Chestrig_rgr",[["30Rnd_556x45_Stanag",15,1]]],[],"","",[],["","","","","",""]]
    

    ALSO:

    There is also a nasty workaround

    player setUnitLoadout [[],[],[],[],["V_Chestrig_rgr",[["30Rnd_556x45_Stanag",15,1],["30Rnd_556x45_Stanag",15,1]]],[],"","",[],["","","","","",""]]
    

    This will give two semi-filled magazines.

    But this is not very usable, because getUnitLoadout will combine similar mags with same ammo count.

     

     

    Hopefully this command will be fixed, as it is THE VERY BEST item handling command ever!!!

    I personally love, how this command handles wrong input and empty arrays, so much more flexible from addMagazine, addItem and others.

    Great work BIS! :)

×