Jump to content

Conversion system


Recommended Posts

We would start with the concept of resistance and the resistance.js component.

We must also create converter.js

I need to register and handle a custom event in the simulation engine.

The changeOwner function is powerful and should be used with care, as it handles all the switching of sides.

 

I don't know whether to use a new unit (template) or use the current healers.

Note: resistance.js (The Component of Convertible Units)

This component would be added to all units that can be converted (villagers, soldiers, but not necessarily buildings or heroes). Defines how susceptible a unit is to conversion.

For now I know that the success of a conversion would be random.

deepseek_mermaid_20250821_584106.thumb.jpg.0c536ebb5cb29950d4daa2f28ca06d92.jpg

Edited by Classic-Burger
Link to comment
Share on other sites

4 minutes ago, real_tabasco_sauce said:

This might be tricky to fit into the balance equation. Because of the economy and citizen soldiers, units in 0ad tent to be more “expendable” compared to those in aoe where you see conversion mechanics.

im here for it, though.

For now it is only an (early)implementation, even if it is to exist in mods only.

I'm trying to figure out how to not use the capture component and make it different, make it random, and make failure lead to greater resistance.

Link to comment
Share on other sites

10 minutes ago, real_tabasco_sauce said:

This might be tricky to fit into the balance equation. Because of the economy and citizen soldiers, units in 0ad tent to be more “expendable” compared to those in aoe where you see conversion mechanics.

im here for it, though.

https://ageofempires.fandom.com/wiki/Conversion 

There seems to be a formula that makes this more difficult.

Conversion resistance level n modifies the chances of conversion. 

 

The formula.

Conversion resistance level n modifies the chances of conversion t as t/max(1,n)%

 

Link to comment
Share on other sites

4 hours ago, Classic-Burger said:

I need community consensus.

Nah, you don't need any consensus for a mod.

The most important thing would be voicelines akin to wolololo.

I don't think I would try to convert a unit in the midst of a battle, but it would be fun to have to help with structures.

Link to comment
Share on other sites

2 minutes ago, Gurken Khan said:

Nah, you don't need any consensus for a mod.

The most important thing would be voicelines akin to wolololo.

I don't think I would try to convert a unit in the midst of a battle, but it would be fun to have to help with structures.

Yes, but I need a consensus for an  mechanic that can use engine. I'm not sure if I'll need it 

In theory I don't need it, it's just that I don't plan on making the mod, I plan on creating a component to make it available.

Link to comment
Share on other sites

2 minutes ago, Classic-Burger said:

Yes, but I need a consensus for an  mechanic that can use engine. I'm not sure if I'll need it 

In theory I don't need it, it's just that I don't plan on making the mod, I plan on creating a component to make it available.

And the consensus I need is how to do this effectively, what I want are suggestions, that's the consensus I'm looking for.

Link to comment
Share on other sites

Do you mean maybe you plan to do it as a compatible mod? It won't work. Your game will go OOS (out of synch). But you could still use the lobby and find persons that play with you if they also install this mod.

 

Yesterday I tried slightly related exploit. I captured a elephant in a cage and wanted to heal it. Since it doesn't work with the gui I tried the command with the unit IDs. Sadly the healer still refused to do it. My plan was to level up ranged units by attacking the elephant and level up the healers by healing the elephant.

ele.png.8922f773c17a0378a098f7bd5112caf9.png

 

I only came up with a convoluted expensive way: You can set up 2 forges to build a temple far away from your CC. Delete the forges, temple goes to gaia. Gaia temple heals elephant by aura. Not really practical, but maybe for a scenario map like survival.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

5 hours ago, ffm2 said:

Do you mean maybe you plan to do it as a compatible mod? It won't work. Your game will go OOS (out of synch). But you could still use the lobby and find persons that play with you if they also install this mod.

 

Yesterday I tried slightly related exploit. I captured a elephant in a cage and wanted to heal it. Since it doesn't work with the gui I tried the command with the unit IDs. Sadly the healer still refused to do it. My plan was to level up ranged units by attacking the elephant and level up the healers by healing the elephant.

ele.png.8922f773c17a0378a098f7bd5112caf9.png

 

I only came up with a convoluted expensive way: You can set up 2 forges to build a temple far away from your CC. Delete the forges, temple goes to gaia. Gaia temple heals elephant by aura. Not really practical, but maybe for a scenario map like survival.

I was thinking of an alternative component to capture animals.

 

I'm looking to learn how the game works, I've already written 4 basic components.

The first component is in the interface. Other commands like capture, attack, and healing have that.

Conversion.js [inside components/interface folder]

The second is a component to determine "convertibility" entity to be convert. Convertible.js

The third is instructions on how the healer/converting unit converts.

I called it converter.js or conversion.js

One contains the instructions for the target unit and the other contains the instructions for the priest. 

That's the easy part so far, then comes the complex or long part.

  • Like 1
Link to comment
Share on other sites

6 minutes ago, Classic-Burger said:

Conversion.js [inside components/interface folder]

Files inside that folder usually contain only one line, to register the component with the Engine.

You need also "Conversion.js" inside the "components" directory. This should contain the logic.

Inside "components":

image.png.9d33c9955d72c36ad561b13b40f8bb40.png

Inside "components/interfaces":

image.png.98d2557086e4cde54b317ed34446db1d.png

Link to comment
Share on other sites

23 minutes ago, Deicide4u said:

Files inside that folder usually contain only one line, to register the component with the Engine.

You need also "Conversion.js" inside the "components" directory. This should contain the logic.

Inside "components":

image.png.9d33c9955d72c36ad561b13b40f8bb40.png

Inside "components/interfaces":

image.png.98d2557086e4cde54b317ed34446db1d.png

What does the interface do?

Link to comment
Share on other sites

@Classic-Burger, it usually contains only one line, which registers the component in the Engine.

For example, if your component file is named "Builder.js", the interface (with the same name) file would contain:

Engine.RegisterInterface("Builder");

Note that the "Builder" here is a name of the constructor inside "Builder.js" component. The constructor name and file name should match, for consistency.

Edited by Deicide4u
  • Thanks 1
Link to comment
Share on other sites

8 minutes ago, Deicide4u said:

@Classic-Burger, it usually contains only one line, which registers the component in the Engine.

For example, if your component file is named "Builder.js", the interface (with the same name) file would contain:

Engine.RegisterInterface("Builder");

Note that the "Builder" here is a name of the constructor inside "Builder.js" component. The constructor name and file name should match, for consistency.

I understood that, but not completely at the time.

So anything I want to register in the engine must have a counterpart, for example, if I register "absurdity" I must create an "absurdity.js".

Link to comment
Share on other sites

19 minutes ago, Deicide4u said:

@Classic-Burger, it usually contains only one line, which registers the component in the Engine.

For example, if your component file is named "Builder.js", the interface (with the same name) file would contain:

Engine.RegisterInterface("Builder");

Note that the "Builder" here is a name of the constructor inside "Builder.js" component. The constructor name and file name should match, for consistency.

How are the others related?

How do they appear registered within the game, I read that one must be through interface or hotkey.

Link to comment
Share on other sites

7 hours ago, ffm2 said:

Do you mean maybe you plan to do it as a compatible mod? It won't work. Your game will go OOS (out of synch). But you could still use the lobby and find persons that play with you if they also install this mod.

 

Yesterday I tried slightly related exploit. I captured a elephant in a cage and wanted to heal it. Since it doesn't work with the gui I tried the command with the unit IDs. Sadly the healer still refused to do it. My plan was to level up ranged units by attacking the elephant and level up the healers by healing the elephant.

ele.png.8922f773c17a0378a098f7bd5112caf9.png

 

I only came up with a convoluted expensive way: You can set up 2 forges to build a temple far away from your CC. Delete the forges, temple goes to gaia. Gaia temple heals elephant by aura. Not really practical, but maybe for a scenario map like survival.

What a great idea you gave me, a taming system. Like in Ark Survival.

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...