ivicok Posted January 16, 2022 Report Share Posted January 16, 2022 (edited) First, I would like to praise the 0 AD team for making a great engine, as well as for making it so accessible to modders. The vanilla game is very enjoyable, the music is great, even if the AI nearly always massacres my towns. Also the use of JavaScript is a great choice, as I use it recently a lot in my work, so I don't have the bad feeling of playing too much... But I have to admit, being no real fan of AoE series, the game was attractive for me for the modding options. There were no wizards and dragons, so I thought about making some for the game. Download here (currently 18 MB). Currently compatible with version 0.25a only! The file contains a .zip, which can be simply extracted to binaries/data/mods folder. The file is irregularily updated. Parameter for launcher: -mod=scythia The mod basically adds a new faction of Sporians, which are very roughly based on 6th c. Sclaveni, as they are described by Byzantine authors - Sporoi where their mythical ancestors according to Procopius. The fantasy aspect is more important - from rhomphaias and bronze armors to dragons and thunderbolts. I was even thinking about making Red Sonja the faction's main hero. In short, as a "civilization", they are somewhat simplified: units can be trained only in the central building and the fortress. There are no barracks, no stables (cavalry needs the Corral), no "female citizen" unit (all units choose a gender variant randomly at training). On the other hand, basic infantry is cheaper than most units in vanilla and trains slightly faster. Units can also be healed in houses (3 at a time) from the beginning. The mod is far from being finished, but I wanted to ask for advice about some features. 1. Instead of temples, the faction can build an idol: a wooden statue of a god. As in Age of Mythology, the player has to choose one: Peraunu or Welinˀsu, which provide units with different upgrades. The idol decays in time, but can be repaired by a shaman (the healer/magician unit) dancing around. The decay is provided by a global aura, which is "researched" automatically when an idol is built. Even if there is a limit of one idol per player, the aura destroys any subsequent idol, if the first is lost. Is it thus possible to "unresearch" it or otherwise deactivate a global aura? 2. One of the functions of both idol and its shaman is to serve as a drop-off point for a new resource called "skulls". I got an inspiration for this new functionality from an older game called Sacrifice, where you collect souls of defeated enemies to strengthen yourself. Defeated enemy combat units have a chance to drop an "intact skull", which can be gathered by your units and brought to the shaman or idol. Only skulls from enemies (technically, the dropped skull is an entity granted to the player, who killed the unit) can be collected. The skulls can be used to upgrade your units, e.g. with rhomphaias or dragons (btw, now you need a fully trained Champion and 30 skulls for one). The problem is the gathering itself: to prevent combat formations from running away from battle, I set the scripts so, that only one skull is gathered at once. Also, for some reason, the units are unable to find nearby skulls dropped by dead enemies for gathering. Why does the gathering AI ignore them? 3. Concerning the dragons: update removes the flying ability. Flight is unwieldy to control - they land and take off again each time a new target is selected, they don't always correctly face their targets, and can use only a melee attack. The flying script is somewhat hard to follow, and it somehow overrides attack AI of the unit. Is it possible to set up a simpler flying motion using the UnitMotion component? Or at least without the circling around coded for the P-51? 4. Another solution for the dragon problem would be to make it a "packing" unit: it could have a walking mode, in which it would use a melee attack, and a flying/floating mode, in which it would throw down flames. The problem was, that packing uses a new entity, so a new visual is generated. This affects only the rider, which is small anyway, but I plan to add more variation to the mount too. Is it possible to use the packing feature and preserve entity visuals? 5. There is also a horse archer upgrade, available to Raiders with the Peraunu idol. As I looked for a way, how to make them capable of shooting on the move, I made them to contain two entities, i.e. a horse with a dummy attack and a "turret". Visually, it is not ideal, as the 1. prop did not place the turret entity correctly unless it was parented to root, and 2. it dies separately from the horse. As I saw that some nomadic factions are in making, are there any more elegant solutions for such a feature? Thanks for any advice, and feel free to try the mod if you wish. Edited October 4, 2022 by ivicok update 10 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted February 4, 2022 Author Report Share Posted February 4, 2022 (edited) Another update brings a new unit and a new feature. The unit - Child - acts as a cheaper "civilian" unit, which is less effective at hard works like lumbering and mining, but gathers fruit well. Boys have a bonus to carrying capacity, girls have a higher resistance. As my grandfather always reminded me that Romans found it important to know how to read, write and swim, I always found it somewhat surprising, that in most Rome-themed games not even Velites can swim. This is, of course, not acceptable for a light-infantry-focused faction. Thus, Warriors - both basic and skull-upgraded - are now able to swim. That is, they can traverse deep water with a small penalty to moving speed. A hack was needed in UnitAI component to make the specific animations for idle, moving and attack states. "don't mind us, we're just having a bath" Little update - now I understand how to calculate the depth, so the swimming mode should be triggered correctly. Edited February 4, 2022 by ivicok bugfix 10 3 Quote Link to comment Share on other sites More sharing options...
asterix Posted February 4, 2022 Report Share Posted February 4, 2022 @wraitii @Stan` swimming , look at the post above. Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 5, 2022 Report Share Posted February 5, 2022 Indeed interesting. 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted February 8, 2022 Author Report Share Posted February 8, 2022 This is possibly nothing new - boats can be now built with turret mechanics. Units transported by them will sit down unless they have something to attack in range. Currently, the boat also slows down proportionally to the number of passengers. 8 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted August 1, 2022 Author Report Share Posted August 1, 2022 After some time I again managed to play around with the code and finish some other boats and heroes. 1. Biome variants: some trees typical for winter environment provide an "aura", which tells units to use specific visual variants - who would walk in sandals on snow? 2. Another minor update concerns monoxyla: melee units help with rowing, making the boat faster, while ranged units slow it down, but they can fire from the board. 3. Hunters (basic archers) can now swim; while swimming, ranged units can use only melee attacks. 4. Ponies! Cavalry units use smaller horses - only elite riders switch to high ones. I guess this is more historical for the setting. Not that it matters much, but maybe you would like to use the animations. 7 1 Quote Link to comment Share on other sites More sharing options...
Darkcity Posted August 1, 2022 Report Share Posted August 1, 2022 Hi @ivicok, Your work is very intereting. I like your boat concepts mentioned in initial thread. There is 1 thread for changing boat fight. Would you be able to incorporate that in your mod? Would love to try it...... Thanks in advance. 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted August 1, 2022 Author Report Share Posted August 1, 2022 24 minutes ago, Darkcity said: Hi @ivicok, Your work is very intereting. I like your boat concepts mentioned in initial thread. There is 1 thread for changing boat fight. Would you be able to incorporate that in your mod? Would love to try it...... Thanks in advance. This is something I would like to implement for larger ships - e.g. I have a raft used as a trade ship and drop-off point, but it would make more sense, if it could carry passengers too. On the other hand, turret mechanics used on monoxyla are not suitable. I will check the siege tower code and think about it. 2 1 Quote Link to comment Share on other sites More sharing options...
Darkcity Posted August 1, 2022 Report Share Posted August 1, 2022 (edited) Sure. 1 hour ago, ivicok said: turret mechanics used on monoxyla are not suitable. I will check the siege tower code and think about it. We can look into what is feasible. We can have discussion related to use cases and viability of the same if you want. PM if you are willing to discuss the same. If you have your current mod ready, can you share the same? Would like to try that. Thanks.. Edited August 1, 2022 by Darkcity Quote Link to comment Share on other sites More sharing options...
rossenburg Posted August 1, 2022 Report Share Posted August 1, 2022 the swimming idea is DOPE 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted August 2, 2022 Author Report Share Posted August 2, 2022 23 hours ago, Darkcity said: Sure. We can look into what is feasible. We can have discussion related to use cases and viability of the same if you want. PM if you are willing to discuss the same. If you have your current mod ready, can you share the same? Would like to try that. Thanks.. The link to the mod files is also in the first post, it stays the same - https://drive.google.com/file/d/1hqaAKNebBjikWZtog9-GRmMbbYmwbWPC/view?usp=sharing If you had any questions or suggestions concerning the development, you can write a PM anytime too. Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 2, 2022 Report Share Posted August 2, 2022 If you're familiar with git you can put it on Github / Gitlab. If not you can consider learning it 2 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted August 28, 2022 Report Share Posted August 28, 2022 Sounds fun, good job. Maybe try it. 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted August 30, 2022 Author Report Share Posted August 30, 2022 I'm not sure if I created it correctly, but here you are - https://github.com/ivicok/0adSporians 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted September 12, 2022 Author Report Share Posted September 12, 2022 (edited) Another feature to give the game a bit more gore - my custom units did not even spawn blood decals before... While adjusting I thought, why shouldn't they already get bloodied in the course of fight? I'm not sure, if it is possible to use two diffuse textures per model using the .xml only, so I played around with shaders. Now an overlay texture is applied, when the unit is too damaged (or, randomly, if it attacks a heavily damaged organic unit). So far applied only for basic Warriors. Entering water and buildings cleanses the blood, i.e. restores the default blank overlay. The code is available at GitHub - https://github.com/ivicok/0adSporians Edited September 12, 2022 by ivicok 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 12, 2022 Report Share Posted September 12, 2022 47 minutes ago, ivicok said: I'm not sure, if it is possible to use two diffuse textures per model using the .xml only, so I played around with shaders. Now an overlay texture is applied, when the unit is too damaged (or, randomly, if it attacks a heavily damaged organic unit). So far applied only for basic Warriors. Entering water and buildings cleanses the blood, i.e. restores the default blank overlay. You can use the same way than for carthage buildings. But it's not an overlay you need extra textures. Do you have a diff of what you changed in model common? Keep up the good work 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted September 12, 2022 Author Report Share Posted September 12, 2022 15 minutes ago, Stan` said: You can use the same way than for carthage buildings. But it's not an overlay you need extra textures. Do you have a diff of what you changed in model common? Keep up the good work Thanks. Which building do you mean? I could find only props on them. I tried to make an overlay prop/actor, but the units use different animations according to actor-internal variants (my system is still a bit messy), what makes them impractical. In the .fs, there are only few lines added - I marked them now with comments. The important part is this: vec3 texdiffuse = tex.rgb; // mod: overlay texture #if USE_OVERLAY texdiffuse = mix(texdiffuse, tex2.rgb, tex2.a); #endif I'm not sure, if it does not terminologically collide with what you call "overlay" in your project. The idea was to have one animated model with two diffuse textures, one of which could be manipulated by the game logic. 1 Quote Link to comment Share on other sites More sharing options...
hyperion Posted September 12, 2022 Report Share Posted September 12, 2022 @ivicok, grep for DamageVariants 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted September 12, 2022 Author Report Share Posted September 12, 2022 2 hours ago, hyperion said: @ivicok, grep for DamageVariants Ah, yes, thanks. Still, it is difficult to use, when the actor has variants with different models. Quote Link to comment Share on other sites More sharing options...
hyperion Posted September 12, 2022 Report Share Posted September 12, 2022 3 hours ago, ivicok said: Ah, yes, thanks. Still, it is difficult to use, when the actor has variants with different models. Variants can also be actors, so one level of indirection might do the trick for you. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 12, 2022 Report Share Posted September 12, 2022 2 hours ago, hyperion said: Variants can also be actors, so one level of indirection might do the trick for you. They can contain meshes anims textures and props but not other actors. 2 Quote Link to comment Share on other sites More sharing options...
hyperion Posted September 12, 2022 Report Share Posted September 12, 2022 1 hour ago, Stan` said: They can contain meshes anims textures and props but not other actors. But props are actors, right? Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 12, 2022 Report Share Posted September 12, 2022 18 minutes ago, hyperion said: But props are actors, right? Yeah... I suppose you can use the donkey mesh to place the unit object then to be able to switch its body and thus anima easily. 1 Quote Link to comment Share on other sites More sharing options...
ivicok Posted September 16, 2022 Author Report Share Posted September 16, 2022 Still, this would be only switching, while here you have an additional texture. Isn't possible/more resource-effective without a second mesh? I've got a good PC, so I cannot tell 1 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted September 16, 2022 Report Share Posted September 16, 2022 1 hour ago, ivicok said: Still, this would be only switching, while here you have an additional texture. Isn't possible/more resource-effective without a second mesh? If you don't render both meshes at the same time (frame) then it's ok. Especially if you use the same material for them. 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.