PatrickAWlson Posted January 7, 2018 Posted January 7, 2018 When does one create an entity for a block? Should one never create an entity for a block? I am bringing this up because of mission loading weirdness. On some blocks (anything kuban_ ... kuban_lighthousesmall is a good example) if the block has a linked entity the game complains that the object is not found on mission load in the game (not in the ME). If I actually run the mission the lighthouse is there, but what a pain clicking through a couple dozen warnings every time you load the mission. If there is no linked entity then there is no complaint. Further oddity is that this error seems to occur only on certain objects, specifically, anything with kuban_ in front of it. Other blocks are fine with a linked entity. So the obvious thing to do is don't use linked entities on blocks. But why are they there? What am I losing if I don't use them?
JimTM Posted January 7, 2018 Posted January 7, 2018 (edited) You must make an object a linked entity if you want it to interact with mission MCUs. For example, you may want the object to generate an OnKilled event message to trigger a subtitle translator that announces the destruction of the object. In some cases, you may have to temporarily make an object a linked entity so that you can set the country of the object to avoid "friendly fire" messages in the chat. For details, see step 6 in "Populate the View Port with Buildings and Other Objects", on pg. 51 of the editor manual. I've seen instances of the missing object issue, but I'm not sure what the solution is in your case. It may be due to the fact that Kuban is not fully released yet so some Kuban-related objects cause issues for now. Edited January 7, 2018 by JimTM
PatrickAWlson Posted January 7, 2018 Author Posted January 7, 2018 Thanks for the response. About what I thought given the fact that only kuban_ objects cause this problem. I went back to no linked entity for most objects. I still keep the linked entities for fake airfields. Country is part of the block definition and not the linked entity. Based on your post is it the case that setting country without a linked entity has no impact?
JimTM Posted January 7, 2018 Posted January 7, 2018 (edited) ... Country is part of the block definition and not the linked entity. Based on your post is it the case that setting country without a linked entity has no impact? I'm not sure I understand your question completely. However, since country is set in the object advanced properties, you need to make the object a linked entity to access that property dialog. Then, you can delete the linked entity state and the object keeps the country setting. Edited January 7, 2018 by JimTM
Jade_Monkey Posted January 8, 2018 Posted January 8, 2018 Some objects had issues in the past, particularly some specific bridges in Moskow map. Report this tho the devs so they can fix it like they fixed the bridges.
PatrickAWlson Posted January 8, 2018 Author Posted January 8, 2018 I'm not sure I understand your question completely. However, since country is set in the object advanced properties, you need to make the object a linked entity to access that property dialog. Then, you can delete the linked entity state and the object keeps the country setting. I see where you are coming from now. You are explaining how to set Country using the ME. I don't really do anything with the ME. I write code that produces the mission file, so my point of view is somewhat different. So I do not need a linked entity for country to take effect. I can just assign the value.
KG200_Volker Posted January 9, 2018 Posted January 9, 2018 (edited) When does one create an entity for a block? Only if you want info from them, for example like when they are damaged or killed. They will be destroyed or damaged normally even if they are not linked. Should one never create an entity for a block? You can but I as see it’s easier to use your own instead the ones that come as templates for the maps. E.G. You have an airfield that can be captured and change sides, if someone bombs a hangar that is linked and set to country, when the AF is captured due to bombing, you have to repair it AND change the country. If it is just a block a simple repair and you are good to go. FYI The commanddamage to repair does not apply to static planes, they have to be linked entities. Edited January 9, 2018 by KG200_Volker
LLv34_Temuri Posted January 9, 2018 Posted January 9, 2018 when the AF is captured due to bombing, you have to repair it AND change the country Just as a side note, changing the country of a block isn't possible when the mission is running. 1
JimTM Posted January 9, 2018 Posted January 9, 2018 Just as a side note, changing the country of a block isn't possible when the mission is running. One alternative would be to have two sets of linked-entity blocks (one for each country) and use a delete/spawn MCU combination to switch them over when the airfield is captured. Of course, that may make the target logic a lot more complex and resource intensive. You may also need to make nearby, non-target objects into linked entities and include them in the changeover logic to avoid "fired on a friendly" messages.
LLv34_Temuri Posted January 10, 2018 Posted January 10, 2018 One alternative would be to have two sets of linked-entity blocks (one for each country) and use a delete/spawn MCU combination to switch them over when the airfield is captured. Of course, that may make the target logic a lot more complex and resource intensive. You may also need to make nearby, non-target objects into linked entities and include them in the changeover logic to avoid "fired on a friendly" messages. Blocks can't be spawned.
JimTM Posted January 10, 2018 Posted January 10, 2018 Blocks can't be spawned. Ah, I forgot about that.
JG1_Shadepiece Posted January 10, 2018 Posted January 10, 2018 What is the coding language for scripting in BoX? Is it just with Lua scripts?
LLv34_Temuri Posted January 11, 2018 Posted January 11, 2018 What is the coding language for scripting in BoX? Is it just with Lua scripts? There's no internal scripting language support. The only "support" (to interact with running mission) is to place server input MCU:s into the mission logic, and then call those server inputs via the rcon. Trouble is, enabling the rcon seems to make the server quite unstable. Our Finnish VirtualPilots' server jams daily because of this. We have a separately developed background application sniffing the logs the dserver creates (there's not even any kind of stream available from the dserver) to figure out what happens in the mission. Trouble is that not everything is put into the logs, so we need to work around this by triggering destruction of specially names fake_blocks for certain events.
No601_Swallow Posted January 11, 2018 Posted January 11, 2018 I see where you are coming from now. You are explaining how to set Country using the ME. I don't really do anything with the ME. I write code that produces the mission file, so my point of view is somewhat different. So I do not need a linked entity for country to take effect. I can just assign the value. Aha! A mind-bending experience of epic proportions was using the ME to open one of your generated missions and seeing (it took me a while of pulling and pushing MCUs about to work out a Little of what might be going on) vast stacks of MCUs in exactly the same Location bestriding the map...! I thought at the time no human could possibly have done - or understood - all that, and assumed you were a) from another planet or b) a time traveller from the far distant future. Now I realize you're merely a mortal, albeit with a brain the size of a planet!
JG1_Shadepiece Posted January 12, 2018 Posted January 12, 2018 I see where you are coming from now. You are explaining how to set Country using the ME. I don't really do anything with the ME. I write code that produces the mission file, so my point of view is somewhat different. So I do not need a linked entity for country to take effect. I can just assign the value. Pat if you don't mind me asking, what type of code do you write to produce the missions? Me and a few guys who are getting into the ME have been wondering if we could just code it somehow. I am not too familiar eith coding, but a few of the guys I'm working with are pretty adept.
JG1_Shadepiece Posted January 12, 2018 Posted January 12, 2018 And through Java you can script the generated missions?
PatrickAWlson Posted January 12, 2018 Author Posted January 12, 2018 And through Java you can script the generated missions? The mission file is just text, so sure. 1. Define an object structure that correlates to the mission MCUs 2. Define abstract concept of mission. 3. Define transition from abstract concept of mission to concrete set of MCUs. 4. Write the MCUs The coding process started at the bottom - define the MCUs. Then went straight to the top - define the abstract concept of mission generation. Once those aredone I know how to write MCUs and I know conceptually what a mission should contain. Then I have to write the middle - translate the mission concept to MCUs. Simplified Example Mission has Flights (has a) Flights have planes (has a) Flights waypoints (has a) Flights have objectives (has a) Planes have payloads (has a) Payloads have to be appropriate for the objective (dependency) Plane type has to be appropriate for the mission (dependency) etc. There is no mission MCU nor flight MCU nor objective MCU. There are plane MCUs and waypoint MCUs and action MCUs. The higher level concepts like mission and flight and objective have to be expressed, eventually, as a set of MCUs and linkages.
JG1_Shadepiece Posted January 12, 2018 Posted January 12, 2018 Wow, that's very informative Pat thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now