How to Mod monsters so they attack towns 100% of the time (or some variation)

I am curious if anyone has figured out how to make the monsters guaranteed to attack a city if in it's radius.

 

I tried modding the intelligence of monsters and then tested it out. I saw an AI plop a city down right next to a slag (I changed the Slag to have 10 intelligence which is very high, the highest I saw was 12) The slag did not attack the town and I kept watching it for 60 turns. It wandered around the town and attacked a few AI groups, killing them but refused to attack the town. I want to make it so that they will attack any towns which come into their radius, or even better, how to make it guarantee attack any pioneers that come into it's radius because the pioneer would right up to it and it did nothing.

 

So, if possible, how can I mod them so they guaranteed attack anything that comes close to it (especially pioneers)

 

and, how to make monsters attack towns that are close to them

9,815 views 24 replies
Reply #1 Top

Also, if anyone knows, is it possible to stop pioneers being able to construct outposts>> I tried removing the ability which allows them to build outposts but the AI still seems to be using pioneers to build outposts. (I wanted scouts instead to build outposts and not pioneers but not sure if it is possible to get the AI to do this)

Reply #2 Top

I don't think either can be changed.

Reply #3 Top

I see. That sucks then haha. Ok have to work around it. It is easy to make scouts be able to build outposts. I just wish I could make the AI use it that way instead.

Reply #4 Top

Update: I found it!

 

Monster Aggression can be set with this:

 

<GameModifier>
<ModType>Unit</ModType>
<Attribute>AbilityBonus</Attribute>
<StrVal>A_MonsterAggression</StrVal>
<Value>-100</Value>
<Provides>Monsters ignore player within ZoC</Provides>
</GameModifier>

Increase the value to positive levels to freak monsters out and have them attack you.

Reply #5 Top

Very cool. This should make things interesting. I wonder if this will make them attack cities too.

Reply #6 Top

Sean, does that mean every monster needs to get that tag or is there a way of doing it globally.

Reply #7 Top

Quoting BlackRainZ, reply 1
Also, if anyone knows, is it possible to stop pioneers being able to construct outposts>> I tried removing the ability which allows them to build outposts but the AI still seems to be using pioneers to build outposts. (I wanted scouts instead to build outposts and not pioneers but not sure if it is possible to get the AI to do this)

Oh...I so wish this happens for beta 5.

  • It would end pioneer spam overnight.
  • It would give an actual use to scouts.
  • Most of all, it would give another strategic decision for a user to make.
Reply #8 Top


You put the tag on the unit or city you want to be attacked. Change the modtype to City for city affects.

Reply #9 Top


How much more overpowered do you intend to make Master Scouts Traited pioneers? :P Just kidding but seriously if you do mod the game to work like this, which would be cool, you gotta address Master Scouts, namely getting the trait off pioneers. I would even say with an escort they should get attacked.

Reply #10 Top

Sean, it would work for pioneers and cities but how could it work for designed units>

Reply #11 Top

I guess even just having the monsters highly aggro to pioneers and cities would help. Would I put the code under the cityhub1, cityhub2, cityhub3, etc in coreimprovements>

Reply #12 Top


I did. Check Elemental Balance v.1.952.011 for an example. I also added in the Nightwatch to allow the player to eventually protect himself.

Reply #13 Top

You did what> You got it to work for designed units>> Is that in the coreunits file>>

Reply #14 Top

Are you trying to use a question mark?

 

I tried adding it to cityhubs. Still need to test it. Adding it to a unit will affect how likely things are to attack that unit. So you would want to add it to the pioneer, not the monster.

Reply #15 Top

yes I dont have a question mark on my keyboard haha. Also the code doesnt work. I tried with pioneers and cities.

Reply #16 Top

It should work on pioneers.

Reply #17 Top

Yeah, it definitely didn't. Try this, just play on a small or medium map, reveal the whole map and watch the AI, they will build pioneers and the pioneers will go off and found cities, never getting attacked. Even with 100% aggressiveness.

Reply #18 Top


I have knowledge about that I didn't really want it to become popularized yet. If you watch the game with the map revealed, you quickly realized the AI, monster, NPC Kingdom, NPC Empire, All AI Factions, are all moving at the same time in many cases. This is the heart of why the monsters and the factions seem to be allied. They don't collide with each other when both move to a tile at the same time. So, not only can they be in th same tile, often times the monsters that chase them have no chance to attack. Now that we are coming close to beta 5, I will bring it up properly.

Reply #19 Top

I've noticed that if I move my units quickly enough, I can sometimes evade pursuing monsters for precisely that reason.  Hopefully that issue is fixed, though I'm not sure how this issue can be addressed without significantly increasing the amount of endgame lag as each faction resolves their turn.

Reply #20 Top

Yeah, that is what the problem is Sean. Which means that the monster aggressiveness code doesn't work until they fix that.

Reply #21 Top

My point is that the code works, but turns don't. I sent in an e-mail to support about it, so hopefully they bring it up during the Monday meeting.

Reply #22 Top

Yes, that is exactly what I meant. The fact that turns don't work means the code basically doesn't work. Until turns work correctly, we wont really know for sure.

Reply #23 Top


You can exploit this yourself just by having a unit selected at the end of your turn and move themm as fast as you can on your next turn, they will avoid all monsters. They really really  need to fix turns.

Reply #24 Top

its not just turns its EVERYTHING just wierd

its like multitasking but  sometimes i go out to save game and while doing that i get champion level up, monsters attacking, sovereigns asking a tribute i mean WTF
just make a normal queue of events and stop it when you are doing something that require the game to not proceed