LordStark Posted June 4, 2022 Report Share Posted June 4, 2022 Hi everyone. My mod focuses a lot on individual units. I want to have a Lord, Marshal, Steward, Bailiff, Lady, Master at Arms, Captain etc etc But to do that, I need to find ways to make them all unique. I would like to try and create the following abilities: 1. Train units - The Master at Arms could give a group of units some experience. This would be a rechargable power that can only be used every 5 minutes. I suspect this is not possible with the game. 2. Marshal the Army - The Marshal would summon 30 additional units to a spot - preferably with aa timer before the units leave the map, die, or vanish on the spot. I suspect this is not possible with the game. 3. Grant Fief - The Lord would have an ability to convert one of his units into an very easy AI Ally who would then start playing the game as a separate easy AI side. 4. I have no idea what the Lady would do. Do any of these ideas seem possible or has any one come up with other kinds of abilities? Quote Link to comment Share on other sites More sharing options...
hyperion Posted June 4, 2022 Report Share Posted June 4, 2022 24 minutes ago, LordStark said: 1. Train units - The Master at Arms could give a group of units some experience. This would be a rechargable power that can only be used every 5 minutes. I suspect this is not possible with the game. 2. Marshal the Army - The Marshal would summon 30 additional units to a spot - preferably with aa timer before the units leave the map, die, or vanish on the spot. I suspect this is not possible with the game. Both can be done in a mod, needs some javascript coding but no issue with current engine. 27 minutes ago, LordStark said: 3. Grant Fief - The Lord would have an ability to convert one of his units into an very easy AI Ally who would then start playing the game as a separate easy AI side. There is a hard limit of 8 players in the engine, so you can't just easily add "players" as you like. It's possible to get around this but it's probably a very tall order, many times harder than 1&2 at least. 1 Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 4, 2022 Author Report Share Posted June 4, 2022 (edited) That's exciting - especially the train units option. Are you able to give me a few points on where to look to figure out the best way to implement the train unit ability? I can't think of any unit that has something similar - in the sense that you need to select the Master at Arms and click on the "Train soldiers" ability and then have a small circle appear that you would click in an area where soldiers are and they would get some additional experience. In terms of the additional AI, I only really play 1v1 so it leaves plenty of room for a fief. Edited June 4, 2022 by LordStark Quote Link to comment Share on other sites More sharing options...
hyperion Posted June 4, 2022 Report Share Posted June 4, 2022 47 minutes ago, LordStark said: That's exciting - especially the train units option. Are you able to give me a few points on where to look to figure out the best way to implement the train unit ability? There is a Persian hero training immortals or ships training units, this is already somewhat close to what you want. As for granting experience, start by adding a new action "grant exp" like there is for walk attack and so on, check unit_actions.js 1 Quote Link to comment Share on other sites More sharing options...
LordStark Posted June 5, 2022 Author Report Share Posted June 5, 2022 I gave this a good shot, I even tried playing as the Persians and built each hero to try and find this ability (give soldiers experience) and I had no luck. In the hero_cyrus_ii.xml templates I did find: Quote <Trainer> 15 <BatchTimeModifier>0.7</BatchTimeModifier> 16 <Entities datatype="tokens"> 17 units/anglo/infantry_archer 18 </Entities> 19 </Trainer> But when I copied and pasted this text into my civilian woman template (for testing) it came up with an error and woman could no longer be build in the game. I am not actually sure if this tag would give soldiers experience or if it simply decreases their build time... I am modding the millenium mod so my unit is in the anglo side. Quote Link to comment Share on other sites More sharing options...
hyperion Posted June 8, 2022 Report Share Posted June 8, 2022 Train is usually used to denote spawn units while you seem to use it for grant experience. So guess this is where some confusion arises. The hero can be used to study spawning (well train units) while the unit_actions.js is what I think is a good starting point for digging into a grant experience feature, hope this helps out a bit. 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.