Jump to content

Recommended Posts

Posted

Via scripting you can sort of do it via markup functions: https://wiki.hoggitworld.com/view/DCS_func_markupToAll

It is worth noting that the Draw feature and what is available in the scripting engine are almost two different iterations of it. For instance the scripting engine has one set of outlines for shapes while draw has different options. Scripting can't draw an ellipse or icons. Some of the scripting functions can "rotate" the object but it is purely done via doing the corresponding rotation of points and drawing it that way. Also color for scripting is basically RGBA in values from 0 to 1 while the editor values for drawn shapes is hex. 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

ok that makes sense. I was thinking of simple two possible function. Turn visibility on and visibility off for a specific object.

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

Intel® Core™i7 Quad Core Processor i7-6700 (3.4GHz) 8MB Cache | 32GB HyperX FURY DDR4 2133MHz | MSI GeForce RTX 2070 ARMOR 8G |SSD 1TB 970 EVO Plus M.2

  • 3 weeks later...
Posted

Suntsag's made a nice tutorial for the Draw feature:

 

 

 

  • Like 2

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted

Can these be exported to a template/copied between missions in some way?  I've got FIR boundaries mapped out and some 'persistent' markers for a campaign, but the usual static template and copy/paste doesn't work ☹️

System

Monitor: RoG SWIFT PG349Q | Case: Cooler Master HAF X | Mobo: ASUS Rampage IV Extreme | CPU: Intel Core i7-3970X | RAM: 16GB Corsair CMT8GX3M2B2133C9 | GPU: RoG STRIX GeForce 1080Ti | SSD: Crucial MX500 500GB | HDD: 2x 1TB WD 10k Velociraptor (RAID0)

 

Modules

DCS World: | BS2 | A10C | CA | UH1 | Mi8 | FC3 | HT1 | L39 | SA342 | F5E | M2K | NTTR | AJS37 | AV8B | F18 | PG | C101 | F16 | SC | A4E | MB339 | Falcon 4: BMS | FSX:SE

Posted
27 minutes ago, DHesquire said:

Can these be exported to a template/copied between missions in some way? 

 

Not that I know of .. the concept of the Static Template is very powerful, I hope and wish that ED will expand it to include items like:

- Trigger Zones

- Action Triggers

- Draw objects

- Weather

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted

This technique might help in some way perhaps:

You can port a mission between maps easily by unpacking, changing the theatre file to suit, and then changing the "[theatre]" tag in the mission file as well.  Repack into a zip, rename .miz and then all your stuff will be in the exact same x/y coords as in the previous map.

You now have to move all the zones, aircraft, etc.

When I have to reproduce triggers, I snap off screenshots of each one in the source mission, and just manually rebuild them in the new one. 

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Posted
17 minutes ago, fargo007 said:

You can port a mission between maps easily by unpacking, changing the theatre file to suit, and then changing the "[theatre]" tag


I wouldn’t exactly describe it as easy, since most of the time the missions units and statics will end up located on places hard to reach with the mouse, and moving them with the mouse can be tricky ir even impossible, and if you select a unit on the unit list and then attempt to cut/paste it into a correct location, any trigger condition that references the unit will dissapear.

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar

Mobile: iPad Pro 12.9" of 256 GB

Posted (edited)
14 minutes ago, Rudel_chw said:


I wouldn’t exactly describe it as easy, since most of the time the missions units and statics will end up located on places hard to reach with the mouse, and moving them with the mouse can be tricky ir even impossible, and if you select a unit on the unit list and then attempt to cut/paste it into a correct location, any trigger condition that references the unit will dissapear.

I guess it depends on where you've put things. The far edges of maps aren't really popular places in my missions.

I've never had difficulty with this at all. Drag the units to suit and don't cut and paste them. 

It's still FAR easier than rebuilding the entire thing manually, especially if the time required to rebuild a giant trigger stack far outweighs the burden of moving the objects.

If your mission is much more unit-centric or script driven than triggers, there's no benefit here. If it's largely trigger-driven, this is the best choice I've found.

The right tool for the right job.  Nobody said mission building in DCS would be easy..... 😏

 

Edited by fargo007
  • Like 1

 

Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍

https://discord.gg/blacksharkden/

Posted
On 11/22/2021 at 2:23 PM, DHesquire said:

Can these be exported to a template/copied between missions in some way?  I've got FIR boundaries mapped out and some 'persistent' markers for a campaign, but the usual static template and copy/paste doesn't work ☹️

Thank you for the update, @NineLine!  If even just the basic Copy/Paste could be done for map markers, that'd be a massive help.  Ability to have them (and IP objects, maybe?) as compatible parts of Static Templates would be a bigger bonus!

I've managed to get around it by cracking the template's MIZ file open, and copying the [drawings] section from my into the MIZ of the flyable missions themselves.  Obviously this isn't ideal long-term as it has corrupted entire mission files for me before, but it's worked as an interim solution 🙂

...just awaiting CombatFlite to be updated to 'merge' functionality (pull & push markers to/from mission editor) 😇

  • Like 1

System

Monitor: RoG SWIFT PG349Q | Case: Cooler Master HAF X | Mobo: ASUS Rampage IV Extreme | CPU: Intel Core i7-3970X | RAM: 16GB Corsair CMT8GX3M2B2133C9 | GPU: RoG STRIX GeForce 1080Ti | SSD: Crucial MX500 500GB | HDD: 2x 1TB WD 10k Velociraptor (RAID0)

 

Modules

DCS World: | BS2 | A10C | CA | UH1 | Mi8 | FC3 | HT1 | L39 | SA342 | F5E | M2K | NTTR | AJS37 | AV8B | F18 | PG | C101 | F16 | SC | A4E | MB339 | Falcon 4: BMS | FSX:SE

Posted

Will it be possible now or in the future to change the color of a text box or line etc... Dynamically. So for instance if a zone gets captured the color changes

  • Like 1

I was in Art of the Kill D#@ it!!!!

  • 2 weeks later...
Posted

Could someone tell me what I'm doing wrong, please.

Situation:

I will put a text box at an airfield with notations like those shown in Suntsag's video above (all credit goes to him for the idea).  However, while the box is rather small while zoomed in, the box becomes incredibly large the further I zoom out; to the point where multiple boxes start overlapping each other and become unreadable and ugly to look at.

Am I missing a checkbox somewhere, or am I glitched somehow?

  • Like 1
  • 2 weeks later...
Posted
On 12/13/2021 at 4:01 AM, Baaz said:

Could someone tell me what I'm doing wrong, please.

Situation:

I will put a text box at an airfield with notations like those shown in Suntsag's video above (all credit goes to him for the idea).  However, while the box is rather small while zoomed in, the box becomes incredibly large the further I zoom out; to the point where multiple boxes start overlapping each other and become unreadable and ugly to look at.

Am I missing a checkbox somewhere, or am I glitched somehow?

I've noticed that too - it seems the scaling is done relative to the screen space rather than the map it overlays, so it stays a fixed size on your screen but obvs as you zoom out it becomes (appears) 'bigger' relative to the map and its neighbours

  • Like 1

System

Monitor: RoG SWIFT PG349Q | Case: Cooler Master HAF X | Mobo: ASUS Rampage IV Extreme | CPU: Intel Core i7-3970X | RAM: 16GB Corsair CMT8GX3M2B2133C9 | GPU: RoG STRIX GeForce 1080Ti | SSD: Crucial MX500 500GB | HDD: 2x 1TB WD 10k Velociraptor (RAID0)

 

Modules

DCS World: | BS2 | A10C | CA | UH1 | Mi8 | FC3 | HT1 | L39 | SA342 | F5E | M2K | NTTR | AJS37 | AV8B | F18 | PG | C101 | F16 | SC | A4E | MB339 | Falcon 4: BMS | FSX:SE

Posted

Is there any way to copy/paste drawn elements? If I want 10 circles the same size or if I want all textboxes to follow the same style. Ctrl-c ctrl-v does not seem to work. 

  • 1 month later...
Posted

How does one do a line break in the text box?

I know it's possible as I've seen it done before; but does it require going into the .miz file itself and editing a file by hand?

  • 2 weeks later...
Posted
On 12/13/2021 at 5:01 AM, Baaz said:

Could someone tell me what I'm doing wrong, please.

Situation:

I will put a text box at an airfield with notations like those shown in Suntsag's video above (all credit goes to him for the idea).  However, while the box is rather small while zoomed in, the box becomes incredibly large the further I zoom out; to the point where multiple boxes start overlapping each other and become unreadable and ugly to look at.

Am I missing a checkbox somewhere, or am I glitched somehow?

 

On 12/22/2021 at 1:27 PM, DHesquire said:

I've noticed that too - it seems the scaling is done relative to the screen space rather than the map it overlays, so it stays a fixed size on your screen but obvs as you zoom out it becomes (appears) 'bigger' relative to the map and its neighbours

So is it possible to turn that text scaling off while zooming in and out? If not not it is really needed. 

  • Like 1
  • Thanks 1
Posted
On 2/22/2022 at 12:36 AM, Andartu said:

 

So is it possible to turn that text scaling off while zooming in and out? If not not it is really needed. 

I don't think so - if there is I certainly haven't found it.  One for @NineLine to consider/feedback 😃

  • Like 2
  • Thanks 1

System

Monitor: RoG SWIFT PG349Q | Case: Cooler Master HAF X | Mobo: ASUS Rampage IV Extreme | CPU: Intel Core i7-3970X | RAM: 16GB Corsair CMT8GX3M2B2133C9 | GPU: RoG STRIX GeForce 1080Ti | SSD: Crucial MX500 500GB | HDD: 2x 1TB WD 10k Velociraptor (RAID0)

 

Modules

DCS World: | BS2 | A10C | CA | UH1 | Mi8 | FC3 | HT1 | L39 | SA342 | F5E | M2K | NTTR | AJS37 | AV8B | F18 | PG | C101 | F16 | SC | A4E | MB339 | Falcon 4: BMS | FSX:SE

  • 3 weeks later...
  • 2 weeks later...
Posted (edited)
On 3/12/2022 at 12:09 PM, applepiefrost said:

Is there a way using scripting to get the points of a drawing done in the Mission Editor? For example, if I draw a line in the ME, can I somehow find the (x, y)-pair of the two points while the mission is running?

You can take this data from 'mission' file inside .miz:

- change .miz to .zip

- extract the file called "mission"

- open it with Notepad++ (optional - set Language to JSON in order to expand/collapse objects)

- search for ["drawings"], then scroll to  ["layers"]

- you will see something like this:

[1]

....

[4] = 
            {
                ["visible"] = true,
                ["name"] = "Common",
                ["objects"] = 
                {
                    [1] = 
                    {
                        ["visible"] = true,
                        ["colorString"] = "0x000000ff",
                        ["lineMode"] = "segments",
                        ["mapY"] = 612784.67632253,
                        ["primitiveType"] = "Line",
                        ["style"] = "solid",
                        ["closed"] = false,
                        ["thickness"] = 5,
                        ["mapX"] = -365817.09247666,
                        ["layerName"] = "Common",
                        ["name"] = "GerogeBound1",
                        ["points"] = 
                        {
                            [1] = 
                            {
                                ["y"] = 0,
                                ["x"] = 0,
                            }, -- end of [1]
                            [2] = 
                            {
                                ["y"] = 26571.240587333,
                                ["x"] = -7049.5128088843,

                            }, -- end of [2]
                            [4] = 
                            {
                                ["y"] = 82967.343058407,
                                ["x"] = -271.13510803401,

                            }, -- end of [4]
                            [8] = ...

Bolded x and y are your points coordinates, you can access it with LUA, something like:

local testPointX = env.mission.drawings.layers[4].points[1][x]

local testPointY = env.mission.drawings.layers[4].points[1][y]

You will need a for loop to parse all the points.

Hope it helps 🙂

 

Edited by dark_wood
  • 4 months later...
Posted

Is there a change that we get a scripting possibility for the icons? It will be very helpful if we can set them via scripting.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...