Classic-Burger Posted yesterday at 07:45 Report Share Posted yesterday at 07:45 Stan made some mistakes and I don't know what happened to my post, let's start over. I have many problems with schema component. convert.js Quote Link to comment Share on other sites More sharing options...
Grapjas Posted yesterday at 09:15 Report Share Posted yesterday at 09:15 (edited) What are the issues? What does the log say? Also you are defining cmpPlayer twice in CanConvert. At the bottom half of Helpers/Player.js there are some functions that might help clean up your code a bit. Edited yesterday at 09:34 by Grapjas Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted yesterday at 16:18 Author Report Share Posted yesterday at 16:18 (edited) 7 hours ago, Grapjas said: At the bottom half of Helpers/Player.js there are some functions that might help clean up your code a bit. I'm not there yet. Clean my code from another file, how? The interesting log. ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: RelaxNGValidator: Failed to compile schema ERROR: JavaScript error: simulation/helpers/Player.js line 36 cmpPlayerManager is null LoadPlayerSettings@simulation/helpers/Player.js:36:19 Stan said: Your template is expecting a choice tag And not finding it <optional> </optional> <optional>{youroptionalelement}</optional> Basically it's useful if you want to add non default behaviours e.g for instance you might say that conversion rate is always 1, and someone might want to override it, but you don''t want to write ConversionRate in all templates. You probably don't need NonConvertibleClasses if you have a whitelist with ConvertibleClasses. That's what Stan said. <Convert> <MaxFaith>100</MaxFaith> <CurrentFaith>100</CurrentFaith> <FaithRegenRate>1</FaithRegenRate> <ConversionCost>50</ConversionCost> <CooldownTime>5000</CooldownTime> <ChancePerSecond>0.05</ChancePerSecond> <Range>20</Range> <ConvertibleClasses>Infantry Cavalry Support</ConvertibleClasses> <NonConvertibleClasses>Hero Mechanical Siege Structure Ship</NonConvertibleClasses> </Convert> Healer XML. Convert tag. I will upload the files when I can. Edited yesterday at 16:21 by Classic-Burger Quote Link to comment Share on other sites More sharing options...
Grapjas Posted yesterday at 17:17 Report Share Posted yesterday at 17:17 (edited) Would be easier if you uploaded your project on github or something. You also need function Convert() {} on line 1, which is likely to solve alot of issues. 1 hour ago, Classic-Burger said: Clean my code from another file, how? I meant you can improve your code by using the tools available Edited yesterday at 17:20 by Grapjas 1 Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted yesterday at 17:26 Author Report Share Posted yesterday at 17:26 I'm having trouble setting up my GitLab and Git Hub clients. My Git tortoise is very outdated. I'll see when I have my personal computer nearby. I just updated my conver.js or at least I added <optional> again. convert (2).js Sorry to named "(2)" I'm sharing quickly. Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 20 hours ago Author Report Share Posted 20 hours ago 5 hours ago, Grapjas said: Would be easier if you uploaded your project on github or something. You also need function Convert() {} on line 1, which is likely to solve alot of issues. I meant you can improve your code by using the tools available https://gitlab.com/ClassicBurger99/Convertsyst0ad Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 11 hours ago Author Report Share Posted 11 hours ago I am mostly focused on basic implemention of component/functions. I was thinking of a game of rock, paper, scissors. The Priest = Religión and Myths etc. The Philosopher= Rational and metaphysical thought and elemental natural social. Then Politician= Aristotelianism, platonism, despotism, republic oligarchs, democracy and tyrants. The politician defeats the philosopher and converts through bribery. Politician is defeated by Religion, Priest handles more masses than the politician, the conversion with villagers through myth and faith. The philosopher defeats the religious by conventionalizing myth and metaphysics and convinces through oratory but it is a defeat. Priest>Politician>Philosopher Priest uses faith. Politician uses metal. Philosopher uses oratory. These are the types of control (mind and ideas) through discourse and influence. Conquest without struggle. It's an idea for fighting between units that convert. Priest bonus vs support units ( villagers and slaves). Politician Bonus vs Elite & Champion military. Philosopher bonus vs Citizen Soldier B & A, merchants. It's an idea... Quote Link to comment Share on other sites More sharing options...
Grapjas Posted 1 hour ago Report Share Posted 1 hour ago Couple of pointers - Why do you have the tests folder? I suggest deleting it or properly using it to only test new functions. - You can compact UnitAI like this and only include functions you change/add. Note the ReRegister on the last line. After doing this you can delete the interface file for UnitAI aswell. - I think Stan has a valid point about optional elements, you forgot 2 unless they are intentionally not optional. 1 Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 1 hour ago Author Report Share Posted 1 hour ago 7 minutes ago, Grapjas said: Why do you have the tests folder? I suggest deleting it or properly using it to only test new functions. I didn't know what they were for. 28 minutes ago, Grapjas said: think Stan has a valid point about optional elements, you forgot 2 unless they are intentionally not optional. In practice how does it work, how can it be useful to the modder? 29 minutes ago, Grapjas said: You can compact UnitAI like this and only include functions you change/add. Note the ReRegister on the last line. After doing this you can delete the interface file for UnitAI aswell I would like this to go beyond a mod and have 2 versions, one for modding and another to integrate into the game. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted 52 minutes ago Report Share Posted 52 minutes ago (edited) 36 minutes ago, Classic-Burger said: I would like this to go beyond a mod and have 2 versions, one for modding and another to integrate into the game. Ah, if you want to make it into a patch thats a bit different for sure and folk at IRC dev or here on the forums can probably help you better. I haven't done patches in a long time and tbh didn't have the patience for it compared to modding. I am curious if your errors are gone with the suggested changes though. Edited 52 minutes ago by Grapjas Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 47 minutes ago Author Report Share Posted 47 minutes ago (edited) 10 minutes ago, Grapjas said: Ah, if you want to make it into a patch thats a bit different for sure and folk at IRC dev or here on the forums can probably help you better. I haven't done patches in a long time and tbh didn't have the patience for it compared to modding. I am curious if your errors are gone with the suggested changes though. I have to make a list of corrections, I only corrected the first line of convert.js I'm not sure if UnitAi.js is correct, if I'm not missing anything it's a very complex file. I'm lost with the commands.js suggestion but I need to look into it in depth. I don't know if I should see what's in input.js I don't know the structure yet, I'm following the heal.js trail/path. I don't know if I should clear the cache. Edited 43 minutes ago by Classic-Burger Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 42 minutes ago Author Report Share Posted 42 minutes ago 11 minutes ago, Grapjas said: compared to modding I want it to be a mod and ready to be part of the game when it's ready to be accepted. Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 31 minutes ago Author Report Share Posted 31 minutes ago So reregister registers new functions/dynamics? "Engine.ReRegisterComponentType(IID_UnitAI" 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.