Jump to content

Randomize unit at creation


Adrix
 Share

Recommended Posts

Hi again ! Here to ask more questions !

I would like to create a unit that can spawn with either a spear, a sword or a mace, which mean different damage types and different actors (though I suppose it would be possible to create a single actor for all three). Is there a way to do this at the moment ? I didn't succeed in using variant in a template but it might just be stupidity. I thought of creating 4 templates (1 base and 1 for each version) and have a random version be picked when the unit if trained. But I have no idea how to do such a thing either.

(While I am at it, is there a way to convert ennemy units ? (think wololo))

Edited by Adrix
Link to comment
Share on other sites

8 minutes ago, Adrix said:

Hi again ! Here to ask more questions !

I would like to create a unit that can spawn with either a spear, a sword or a mace, which mean different damage types and different actors (though I suppose it would be possible to create a single actor for all three). Is there a way to do this at the moment ? I didn't succeed in using variant in a template but it might just be stupidity. I thought of creating 4 templates (1 base and 1 for each version) and have a random version be picked when the unit if trained. But I have no idea how to do such a thing either.

(While I am at it, is there a way to convert ennemy units ? (think wololo)) 

Do you need that for a mod you are working on?

Link to comment
Share on other sites

10 minutes ago, Adrix said:

(While I am at it, is there a way to convert ennemy units ? (think wololo)) 

In alpha23b there is:

- wololo cheat code

- you can give Capturable component to that unit

Else that's not really hard to do (depending of your needs). Here is an old example: https://www.youtube.com/watch?v=BHJs81pwtts

Link to comment
Share on other sites

Yes I'm working on a submob for Hyrule Conquest; adding a couple of extra factions but struggling for certain mechanics we have in mind. And thanks for the conversion ^^ I will look into that !

EDIT : If I understand you can set some units to be capturable but not give the ability to convert to specific units ? (like the priest in AoE)

Edited by Adrix
  • Like 1
Link to comment
Share on other sites

2 hours ago, Adrix said:

Yes I'm working on a submob for Hyrule Conquest; adding a couple of extra factions but struggling for certain mechanics we have in mind. And thanks for the conversion ^^ I will look into that !

EDIT : If I understand you can set some units to be capturable but not give the ability to convert to specific units ? (like the priest in AoE)

Nice !

If you want to use the current system (currently used for buildings and some siege engine):

Give an Attack/Capture to the capturers and the Capturable component to the other units.

But it would be perhaps only a temporary solution.

If you want a proper conversion ability would you prefer something passive or active?

  • Confused 1
Link to comment
Share on other sites

There is a special capture component ? That mean you'd have to add the capturable component to all units though.

 

I imagined a unit that (again, aoe rip off) use conversion as a ranged attack. Instead of dealing damage to an unit it steals it after a couple of seconds of  'attack'. 

 

 

  • Like 2
Link to comment
Share on other sites

5 minutes ago, Trinketos said:

Ok
How i add a the capture component, or other components? 

For the capturer (lines 4-9):

https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/template_unit_infantry.xml

For the capturable (lines 11-15):

https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/template_unit_support_citizen_female.xml

But that's just using the current system which is more design for buildings.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, fatherbushido said:

I see that they use classes to block which unit can capture a certain entity.
Is this correct or is posible to make somenting like this?

Link to comment
Share on other sites

14 hours ago, Adrix said:

Hi again ! Here to ask more questions !

I would like to create a unit that can spawn with either a spear, a sword or a mace, which mean different damage types and different actors (though I suppose it would be possible to create a single actor for all three). Is there a way to do this at the moment ? I didn't succeed in using variant in a template but it might just be stupidity. I thought of creating 4 templates (1 base and 1 for each version) and have a random version be picked when the unit if trained. But I have no idea how to do such a thing either.

(While I am at it, is there a way to convert ennemy units ? (think wololo))

 

13 hours ago, fatherbushido said:

Do you need that for a mod you are working on?

This kind of feature would be useful for male/female variations of units, such as Villagers/Citizens and/or Male and female variants of Scythian units.

  • Like 3
Link to comment
Share on other sites

1 hour ago, wraitii said:

In sure that could be useful, but I was envisioning some kind of template scheme where you could list child templates and frequency for each. That parent template would be what's listed in the building templates production queue. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...