PatrickAWlson Posted February 6, 2021 Posted February 6, 2021 Can anybody explain this: In a recent PWCG update I wanted to make some building types destroyable and have that destruction reported in the logs. I found that giving the buildings entities caused them to be reported as destroyed. Therefore I chose my building types and provided entities for them. Some of those building types spew "object not found" errors when entities are associated with them. Bridges were the first structure type where this was discovered. Recently the issue has been reported with small_warehouse. Anybody understand this behavior? Why does it seem as though many buildings are just fine with entities while others produce errors?
LF_Sire Posted February 7, 2021 Posted February 7, 2021 Hello Patrick, I would like to help you but I'm not sure about the process you follow. As I was studing small_warehouse error I could see that the original object was industrual_object... while in the mission and in GroundStructures.json was the inexisting small_warehouse object. So, as I can understand, at least at this case, the problems is that you insert an inexistent object per one existing object. The solution is just use industrial_object... per (wrong) small_warehose at JSON file. I hope I'm not saying some nonsense garbage. A picture of the original building in Kuban scenery. IF problem is it gives a destroyed report I'm not aware when or where (in the log, maybe?), as I have not see it on a fixed generated mission (by changing to original type building). If I could know I gladly would try to search a solution to help you as your work is superb.
PatrickAWlson Posted February 8, 2021 Author Posted February 8, 2021 I figured it out. Bad value in the script field. Looks like the script field only comes into play of the object has an entity, which, thinking about it, makes some sense. When I added an entity the script field was referenced and the bad value generated the error. In the case of the bridges the script did not have Bridges as a directory. In the case of smallwarehouse that seemed to be an object that no longer existed, so @LF_Sire you got that right. All of the messed up references were in the PWCG Kuban data file, which is derived from the templates shipped with the game. Templates probably got updated at some point and it took me awhiel and the right use case to notice the issue on my end. 1
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