Veridagorin Posted April 10, 2014 Report Share Posted April 10, 2014 (edited) Hi all i have a few more questions how easy is to add a new armor and attack type?can i do it in Notepad++?where are the files that define the armor and damage?can a unit deal 2 types of damage at the same time? ex. from roman ballista that appears to have 2 damage types <Attack> <Ranged> <MaxRange>76</MaxRange> <MinRange>16.0</MinRange> <ProjectileSpeed>22.0</ProjectileSpeed> <RepeatTime>6000</RepeatTime> <Splash> <Shape>Circular</Shape> <Range>10</Range> <FriendlyFire>true</FriendlyFire> <Hack>40.0</Hack> <Pierce>0.0</Pierce> <Crush>40.0</Crush> </Splash> </Ranged> </Attack> Edit i have another question can i make units garrison in neutral buildings/trees?so that they can shoot arrows from a safe place? Edited April 10, 2014 by Veridagorin Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 10, 2014 Report Share Posted April 10, 2014 Just do a search for one of the damage names in your project (f.e. search on "Hack"), and you'll get a good list of files. In short, the types are defined in Attack.js, Damage.js (in public/simulation/components/) and there will also be some gui parts (most likely the selection files in public/gui/session/) and the connection between the simulation and the gui: GuiInterface.js. The AI would also need to be modified I guess. You should be able to do all that without recompiling though. Quote Link to comment Share on other sites More sharing options...
niektb Posted April 10, 2014 Report Share Posted April 10, 2014 The armor can be done in the same file. The reason that you don't see them is because the're already defined in a parent template.In the parent file of the roman ballista you'll find this:<Armour> <Hack>2</Hack> <Pierce>30</Pierce> <Crush>10</Crush></Armour>You can adjust these values in the child template, using the same tags (child values override parental values)You might find this tutorial useful (although it doesn't directly deal with armor and other stats)http://www.wildfiregames.com/forum/index.php?showtopic=18396 1 Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 thanks for the help my question was more on the lines of adding a totally new type of damagelike keeping the Hack, pierce and crushand then adding a new attack and armor type like firefunction Armour() {} Armour.prototype.Schema ="<a:help>Controls the damage resistance of the unit.</a:help>" +"<a:example>" +"<Hack>10.0</Hack>" +"<Pierce>0.0</Pierce>" +"<Crush>5.0</Crush>" +"<Burn>0.0</Burn>" + would adding a burn like this to all the places that have hack/pierce or crush add a new armor and attack type burn? i have another question how to test my mod out? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 10, 2014 Report Share Posted April 10, 2014 would adding a burn like this to all the places that have hack/pierce or crush add a new armor and attack type burn?You just took the example section of the XML. The actual schema is a few lines up or down. The schema defines that the attack has to be a decimal number f.e. i have another question how to test my mod out? When your mod is in a directory "MyMod", then you can execute it like "./pyrogenesis -mod=MyMod" (edit the pyrogenesis shortcut). Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 okay thanks i changed the whole file to incorporate burn resistance armor Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 its not working do i need a pryogenesis in my mod folder? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 10, 2014 Report Share Posted April 10, 2014 No, those should be in different directories. Does this help: http://trac.wildfiregames.com/wiki/Modding_Guide Or this: http://trac.wildfiregames.com/wiki/GameDataPaths Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 it still doesn't work i'm supposed to change it in properties right? Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 10, 2014 Report Share Posted April 10, 2014 Can you zip your mod and upload it here? Also "doesn't work" is quite vague. Is pyrogenesis crashing, or do you just fail to see your changes? I have no idea what "properties" you're talking about. Quote Link to comment Share on other sites More sharing options...
niektb Posted April 10, 2014 Report Share Posted April 10, 2014 Oh and Notepad++ is no problem of course. (Any text/code editor would work) Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 when you back click on pryogenesis there is properties am i supposed to change it there?or am i supposed to change the name? Quote Link to comment Share on other sites More sharing options...
niektb Posted April 10, 2014 Report Share Posted April 10, 2014 (edited) You need a shortcut:Target: "C:\CODE\binaries\system\pyrogenesis.exe" -mod=testmod or C:\CODE\binaries\system\pyrogenesis.exe -mod=testmodStart in: C:\CODE\binaries\systemReplace C:\CODE\binaries\system with your own installation path:"[installation path]\binaries\system\pyrogenesis.exe" -mod=testmod And testmod is of course your modfolder. Edited April 10, 2014 by niektb Quote Link to comment Share on other sites More sharing options...
Radagast. Posted April 10, 2014 Report Share Posted April 10, 2014 (edited) Edit i have another question can i make units garrison in neutral buildings/trees? so that they can shoot arrows from a safe place?Neutral buildings is the easier. Though it will have to be scripted. Just look for where the conditions/restrictions are that prevent you acting on neutral and enemy buildings. The trees are difficult. The Council of Modders tries to deal with it. Though there is no promise about when we will have bent our mind around it. (it's a quite huge project and the C++ API has to be adapted if JavaScript limits the possibilites). As a trick you could prop the units to the tree. Best would be a script/generic way that exchanges the props. The council is researching this too. Once triggers are in, we could trigger a unit that stands below a tree to be beamed up into the tree. It's questionable if it should be safe though. Being able to attack and destroy props is one of the important features we dream of . (it would allow partial damage and crumbling walls, too). If the tree would play its attack animation, then the unit (that was propped into the tree) would shoot arrows too. The question remains if there would be damage. Also a big problem is where to put things. It's probably impossible to answer without really knowing the engine better, i.e. by heart. Time is your friend here. Edited April 10, 2014 by Hephaestion Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 10, 2014 Author Report Share Posted April 10, 2014 ok i did that it plays 0 A.D. but without the changes i madei'm using a windows 8 computer if that is helpful at all Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted April 11, 2014 Report Share Posted April 11, 2014 ok i did that it plays 0 A.D. but without the changes i made i'm using a windows 8 computer if that is helpful at all Are you sure it plays without the changes? Or did you just not change anything visual? Unless you altered the GUI pages, you won't see any difference. Also, can you show us your paths? Where is pyrogenesis installed, where is the public folder, where is your mod, what's the exact command ... Quote Link to comment Share on other sites More sharing options...
niektb Posted April 11, 2014 Report Share Posted April 11, 2014 Maybe you could adjust some visuals (or music) to make sure your mod is indeed ran. Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 12, 2014 Author Report Share Posted April 12, 2014 I have adjusted some visuals they don't show upTarget"C:\Users\verid_000\AppData\Local\0 A.D. alpha\binaries\system\pyrogenesis.exe" --mod=AnorithiaMy mod's locationsC:\Users\verid_000\AppData\Local\0 A.D. alpha\binaries\data\mods\AnorithiaPublic mod's locationC:\Users\verid_000\AppData\Local\0 A.D. alpha\binaries\data\mods\public Quote Link to comment Share on other sites More sharing options...
niektb Posted April 12, 2014 Report Share Posted April 12, 2014 --mod is wrong, use only one "-" 3 Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 12, 2014 Author Report Share Posted April 12, 2014 (edited) yes it workedI added a faction and when i go to test my mod when I go into the single player lobby i can't select any civsand there are these error messages initCivNameList ( ) (gui\gamesetup/gamesetup.JS:481 initMain ( ) (gui\gamesetup/gamesetup.JS:126initonTick ( ) (gui\gamesetup/gamesetup.JS:616Syntax error:JSON parse parsing JSON data in civs Doonland.JSON Edited April 12, 2014 by Veridagorin Quote Link to comment Share on other sites More sharing options...
Radagast. Posted April 13, 2014 Report Share Posted April 13, 2014 Can you post the content of the Doonland.JSON. Or best just turn your mod folder in a repository folder, which we can integrate into the Council of Modder repos. Then everyone can help. It might attract new modders as it's better join efforts than loose control, and get lost alone - it would surprise me if there weren't some people help you in your giant mod, which has a lot of potential. I can't help with artwork atm as I'm busy with more general things from our wishlist. @Error: Syntax error. Can be anything. Forgot a , or one too much? Forgot a ' or "? Also make sure your editor's encoding is UTF-8, (look for an option in the editor's settings). Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 13, 2014 Author Report Share Posted April 13, 2014 i can't upload it to the council of modders because GitHub says i can't have a private repository on a free accounti can upload it to my GitHub user just not the 0 ad one Quote Link to comment Share on other sites More sharing options...
Radagast. Posted April 14, 2014 Report Share Posted April 14, 2014 Ah, hm. You can keep the repository with your account of course. But how can we access it. Can you add us as administration? Or do you have a paid account and this is incompatible, it should not? Don't you like it as public account (then still only Administrators can change it but everyone can see)? I think there are only two possibilities:You could add us as collaborators.Convert it to a CoM repository by transfering owndership of your Anorithia repository via Settings at the right in GitHub. Quote Link to comment Share on other sites More sharing options...
Veridagorin Posted April 20, 2014 Author Report Share Posted April 20, 2014 okay i added you as a collaborator i think 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.