Make more units available early on

Hi there,

I am trying to make certain late-game units be able to produced in the earlier ages. Would really love some support on this. And another question, once I succeed, will the A.I. actually spawn these units?

Thank you in advance

With which mod type are you wanting to do this with? Tuning pack, scenario, or game mode? Assuming the question has yet to be resolved. If you did work out a solution already, would be interested to learn the approach =)

Best of luck

Hey. I am still very interested in working this out.

Let me tell you that I am building a very detailed scenario on my own crafted map of Europe which includes middle-east, russia and north africa. This is a w.i.p. and will be for a long time. But i dont mind.
I have included a tuning pack where I edit many values.

Right now I am already able to play quite interesting games on the map. I have 16 starting positions. I used to work on this project in another game for many years until I recently discovered the possibilities in AOE IV. I know exactly where I am heading with this and some of the main features i want to include. I will be learning proper scripting and whatever necessary along the road. Just in an attempt to make it better step by step. I will share any information should I find a solution myself. Just still a newby right now looking to suck up that information.

Sounds like you’re on the right track to creating a great piece of UGC! We are in similar situations so I may not be of as much help as I would like to. That said, we can only benefit from knowledge sharing. So I will share what I can from my own exploration.

Tuning pack with guaranteed a.i utilization
Give an age 1 unit the stats of any higher age version hired ingame without much work.
Allowing a building to hire units available to it later but restricted at an earlier time with a little more work.
Adding units from other buildings/ages/civs to non-native buildings
Scar Script would be able to provide a.i utilization outside of basic retaliation for any units placed by you in editor they spawn with and would use missionomatic functions like _roving_army for things like combat, and pre fabs placed in renderer and/or referenced in the scar file like townlife for villager behavioural, as well as economic and research, customizations.
The crafted map 3townsmission template has a few basic examples of that sort of thing with brief descriptions of general uses for, but not much on implementation of them in the .scar file

I can elaborate on any of that if you would like.

The most important part is the idea you have at the start, so keep on keeping on!

“I begin with an idea and then it becomes something else.”
-Pablo Picasso
“Imagination will often carry us to worlds that never were. But without it we go nowhere.”
-Carl Sagan
“Only when he no longer knows what he is doing does the painter do good things.”
-Edgar Degas

That is great. Thank you for the detailed reply, I will definatly contact you once I am ready to focus my efforts in any of those directions mentioned. Im quite familiar with the tuning pack and map editing functions now. I just havent started with the scripting yet but it is going to be my next step. For that Id like to have a basic code that works as a starting point for trial and error.

Okay so, I have went into scripting. I also understand the 3townsmission and can work with those codes/I have managed to implement them into my own map. At this point what I am looking for is a way to have the player start without a town center. Because for the storyline in my scenario, the player starts with just a farmhouse. I guess I am making two versions of my crafted map, one that comes with missions and one that can be played as a skirmish and even multiplayer.

I am also interested learning about different targeting types; ARMY_TARGETING_REVERSE, ARMY_TARGETING_DISCARD, ARMY_TARGETING_CYCLE (and more?).

Also I see that in script it is possible to add restrictions. Do you know what such a code could look like?. I would disable the construction of siege units until later in the game. Perhaps this will also answer my initial question on this topic, how to make certain units available later on.

AI tries to spawn every unit on the Grid TAB rows. I assume you have Tuning Pack as your modding option.

If you want to make 4th Age units available at early ages then go to Attributes → SBPS → Clone the 4th Age unit → Go to requirements → remove the upgrade or age requirement section or remove the requirements fully → Then go to ebps → put that 4th Age unit at a new TAB at your desired building’s spawn_ext.

Now you or AI can produce these units at early ages.

You might get pre-cached red box error when you try to produce 4th Age units at 1st Age where generally the maximum Age difference should be 3 when you want to produce that 4th Age units at 1st Age.

Lets say you want to produce 4th Age crossbow unit at 1st Age and you will get this red box visual error but when you produce that same unit at 2nd Age again, there will be no problems.

It depends on units to units that some 4th Age units produced visually without any problems at 1st Age.

Thank you so much. This is really a big help for me to balance my map of europe and make it more interesting. Hopefully in the future I will be able to publish my work for others to enjoy. I wish to become as skilled as you with the modding eventually as I am a huge admirer of the work you do with your mod(s)/TP.

1 Like