Jump to content

Recommended Posts

Posted

I think it would be easier if you told us what you are trying to achieve. The unit ID number can't be easily changed without resorting tools, but there are ways to do so (edit the mission file in the .miz, or re-spawn a copy with the desired ID and despawn the original. The latter will not work for player/client skill planes). 

So, what is your use case, and perhaps there are easier ways to get there?

 

Posted

If you use for example static planes, the mission editor makes the unit ID the bort number, it triggers the crap out of my ocd. A few days ago I checked the .miz file, albeit in a cursory manner and could not find anything there, I will comb thought it and see if I can find it. I thought about trying the respawing idea before I posted this question, but there are too many static units for that to be a viable option, although that should work if you are creating a mission from scratch.

 

It's not that important, I can just change the statics to non static and the ocd problem is solved, I was more more curious than anything else.

Posted

I don't think it is unitId. It looks more like it is the index the entry is at within the .miz file. 

Make new mission, place 1 static aircraft, then place a static building, then another static aircraft. The bort numbers will be 1 and 3. It is possible spawning via the scripting engine if the bort number would be used. If that is the case then the table index might be a fallback value. In which case bort should be added to the editor UI. 

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
20 minutes ago, Grimes said:

Make new mission, place 1 static aircraft, then place a static building, then another static aircraft. The bort numbers will be 1 and 3.

Yes that's correct it does work that way.

 

28 minutes ago, Grimes said:

I don't think it is unitId. It looks more like it is the index the entry is at within the .miz file. 

This is the number that gets assigned as the bort.  I remember back in the day there was a Mission Editor mod that had a some fancy wizardy, so I thought maybe something like that existed with this option, not sure if that mod had that option though, I don't think it did.

 

unitid.png

Posted

It has to do with the number of static objects and is not related to unitId. Best I can tell it changes based on the other statics in the mission for any coalition. Say you only have 3 statics on blue their numbers will be 1, 2, and 3. Add in 2 statics on red then the blue bort numbers shift to 3, 4, and 5. Likewise the number gets counted up on neutral statics before it does red. 

static_index_is_bort.jpg

  • Thanks 1

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

  • Recently Browsing   0 members

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