LordStark Posted June 6, 2022 Report Share Posted June 6, 2022 Hi everyone, I want my "Lord" unit to be able to build a castle (and only a castle) and my "Vassal" unit to be able to build a Fortress (and only a fortress). But I can't figure out how to give the two units different build queues - any ideas? Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 6, 2022 Report Share Posted June 6, 2022 Currently they inherit the builder mixin. Think of mixins as partial templates. You can remove elements from the queue by writing -building Or you can change the inheritance to not have to do that. Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 6, 2022 Author Report Share Posted June 6, 2022 Thanks for your reply. I did not quite understand what you meant - where would I write -building? Also, do you mean that exact code or do you mean <Builder disable=""/> which is the code that I use to completely remove a build option from a unit? How would I change the inheretence? Apologies for all the questions, i'm really trying to figure this stuff out on my own and I often use the search function before asking a question. Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 6, 2022 Author Report Share Posted June 6, 2022 I've tried multiple ways, this is the code I currently have for my female worker: Quote <Builder> -building structures/anglo/fortress <Builder/> Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted June 6, 2022 Report Share Posted June 6, 2022 53 minutes ago, LordStark said: -building structures/anglo/fortress Just -substitute_building_template_here For example: <Builder> -structures/anglo/fortress </Builder> Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 7, 2022 Author Report Share Posted June 7, 2022 I tried that code and it didn't work. I thought I had already tried it but just in case I copied and pasted your code exactly - and checked the path directories that there are not spelling mistakes or missing capitals etc etc Quote Link to comment Share on other sites More sharing options...
Freagarach Posted June 7, 2022 Report Share Posted June 7, 2022 @LordStark it would be much more efficient for you yourself to read either the templates in the main game (<Entity parent="builder|template_unit"> means the template_unit "inherits" from the template "builder" in the "mixins" folder, and that is where your answer can be found) or at least the docs at https://docs.wildfiregames.com/ (e.g. https://docs.wildfiregames.com/entity-docs/trunk.html#component.Builder). Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 7, 2022 Author Report Share Posted June 7, 2022 Thank you, this is amazing. Could these two documents and the path page be stickied? Path page: simulation in ps/trunk/binaries/data/mods/public – Wildfire Games When I came to these forums I read the tutorials that I could find and often use the search function. I really find what I am looking for - but you guys have been amazing. I think these two documents would have substantially helped me and cut down on all my questions (and so saved you all some time). I have decided to learn Java so maybe one day I can help with the game - I am on my second lesson and loving it! Really appreciate all the help. 1 Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted June 7, 2022 Report Share Posted June 7, 2022 Actually Java is very different from Java script which we are using you need to be very careful with names when dealing with computer languages after all we have been doing it for over 50 years now so it's complicated Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 8, 2022 Author Report Share Posted June 8, 2022 Oh... wow. I have been busy working on Java. Okay, I will start learning Java script. Thanks for the advice. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.