Jump to content


Markus Ramikin

Member Since 17 Mar 2010
Offline Last Active Private

#872384 The Markus-is-Modding Thread

Posted by Markus Ramikin on 03 January 2012 - 12:56 PM

Aaand the above fix (or actually an improved version) is now part of DoWPro. :D

For Shodar and whoever else might be interested: next version changelog!

Almost forgot, but I moved two versions ahead a while ago and it seems I'm done, so I might as well post the final version for whoever is still interested:
http://dl.dropbox.co..._IDH_DC_137.txt

Most important changes:

1. Introduction of 4 different strategies

2. Fixing Vehicle balance. I didn't realize just how powerful Chimeras were until I wrote an AI that rushed to them AND refrained from using the inferior "upgrades" (multilasers rule).
The problems with it were twofold:

- Chimeras were too cheap for their effectiveness: fast, high health, and multilasers are a universal counter with decent damage and good range. Just compare them to IG chimeras - the cost's almost the same, while the effectiveness is about doubled. I fixed that primarily by increasing the cost (mostly energy), plus other minor changes.

- You didn't need a new vehicle building in Tier 2 to start spamming out Chimeras, so it was actually hard to prevent the rush. And having the rush interrupted didn't present the usual opportunity cost as would happen for, say, Space Marines, because you need the same buildings for all strats. I fixed that by making vehicles require Librarium (in addition to the other reqs), so an enemy can interrupt the vehicle rush by destroying the comparably fragile Librarium.

Also, Rhino anti-vehicle missiles were too powerful and at the same time their damage against buildings was too low.

And some minor crap. Among others, I stole the idea to change maintenance servitor armor type.

And now I'm waiting for SS IDH so I can see all my work become irrelevant ;).


#868795 The Markus-is-Modding Thread

Posted by Markus Ramikin on 02 December 2011 - 10:04 PM

EDIT: this has been written before I saw the other replies. Still applies. /EDIT


The question I've been asking you to help me with does not in any way depend on servitors or their role or IDH or even what mod, race, unit we're talking about. I'm not asking you to write a whole script. It's a purely technical question about what's possible with the code. I'm asking because I can't seem to find a complete and full reference to relic's Lua, so I'm hoping an experienced modder might know something useful.

I'll try one last time. I will try to be as clear as I possibly can.


for oUnit in military_manager:GetSquads() do
                        oUnitName = oUnit:GetSquadName()
                        if (oUnitName == "inquisition_squad_servitor_maintenance") then
                                iMaintCount = iMaintCount + 1
                                if iMaintCount == 3 then
                                        -- Third squad on the list, is this me?
                                        local Distance = distance_sqr(self.squad_ai:GetPosition(),oUnit:GetPosition())
                                        if Distance < sqr(2) then
In the above code, I use GetSquads() to count through all my maintenance servitor squads on the battlefield.

When I'm at the third one, I ask "is this squad the same as me (the squad that is currently calling the tactic)?" Since all 3 squads call the tactic, only one will pass this check (and therefore I can assign different behaviour to it than the other two, which is my actual goal here).

I do this by checking if oSquad's position is the same as "mine".
distance_sqr(self.squad_ai:GetPosition(),oUnit:GetPosition())
Since a squad's distance to itself is necessarily zero then it will pass the < sqr(2) check.

My question is: is there a different way to what that particular line of code does. To check if "the squad held by variable oSquad is the same as the squad calling this tactic". This, and not anything else, is my question.

Do squads maybe each have a unique identifier, or are they stored in some numbered list or table, or have any other property that will be different for every squad? Maybe the time since it's been built can be looked up? That would be unique most of the time, and I can already see how I'd handle the exceptions.

____________________________________________

Now, I will answer your objections to the maintenance servitors being used in combat, but PLEASE don't get distracted from actually telling me whether you have any ideas on the above.

ALL my comments below apply to IDH as freshly installed, so don't try blaming them on my tweaks. ;)

I'm trying to understand what gameplay purpose this serves considering IDH need all the infantry on the map in Tier0-2 until GKs arrive. I don't see how Servitors used by the AI can "get into position" and really make a difference? They don't even have any offensive weapons.

Maybe you removed the weapons in SS IDH. In DC IDH they have melee weapons and these are
inquisition_power_wrench_double.rgd 	2.925 	11.944 	2.925 	8.531 	6.825 	8.531 	6.825 	8.531 	7.507 	8.531 	15.356 	34.125 	34.125 	34.125
Not awesome, but try telling me that's not useful for a super-cheap, 1-cap tier 1 unit. Good against vehicles, turrets/posts, and can tie up infantry.

They cost 1 squad cap, and 15 req/10 energy, so 25 resource. Though really, all that matters is the 15 requisition, because before Tier 3 you tend to have spare energy due to not having any energy-costly dreadnought-like vehicles to spend it on. But let's count as 25 resource. 175 for a full 7-man squad. Dirt-cheap. (In my tweaks, I upped their cost to 25/15 (280 resource for a full squad) and they still pay off excellently.)

500 HPs on every one, more than a Marine, and that's -before- applying the hefty Medikits bonus of +200. Excellent damage sponges, therefore. I can usually destroy any race's Insane Dawn of Skirmish AI on any reasonably-sized map by building a Lord, Bodyguards with heavy bolters, and a swarm of servitors, and pretty much just attack-moving into his base (pausing to deal with jump troops as needed). It's realizing I can do this that triggered my tweaks, in fact; vanilla DC IDH race is waaaaaaaaaaaaaaaaay too strong. Heavy bolters with no setup time and FOTM in Tier 1, Jesus...

On top of that, they have Sabotage. When following my AI, IDH is the only race in the game with a practical immunity to a vehicle rush. Any other race, I can destroy an Insane AI with a Space Marine vehicle rush, usually with great ease. I've yet to succeed against my maintenance-servitor-using IDH AI.

Seriously, any land speeder makes it close to one of those = dead speeder. Any dreadnought = dreadnought with a good chunk of health gone. Or soon dead too, if all 3 squads were nearby.

You say "IDH need all the infantry on the map in Tier0-2 until GKs arrive". DC IDH stormtroopers SUCK, especially before you manage to get medikits and to a lesser extent targetters. They are costly, break easily, drop like flies to ranged armies and run away from melee armies. A resource drain.

Servitors cost 1 cap so you can drop 1 stormtrooper squad to get 2 of those, it's the very definition of a bargain. And they help enormously, by tying up/forcing to dance enemy shooty units, or drawing the attention of enemy melee units so stormtroopers aren't forced to dance.

You can tie up 6+ squad cap worth of enemy shooters with 3 squad cap worth of yours. Let that sink in.

An amusing side-effect of my AI using a cheap swarm of servitors is that often, the idiotic "regroup by walking through enemy army and get slaughtered" behaviour doesn't hurt DH nearly as much, when playing against other AIs. In fact it often plays to its favor. Because as soon as the swarm starts walking through the enemy army, everything that's shooty gets the hell out of the way due to dancing. This sometimes triggers the whole enemy army pulling back. Nice bonus.

To sum up, M. Servitors were CLEARLY designed as a dual-role unit, one of the many wacky nonstandard design choices in IDH. That's why they have a squad size of 7, lots of hitpoints and a usable attack, and why they didn't give repair ability to Architects. That the AI has problems using them as dual-purpose units doesn't change the fact about the actual race balance. They're basically Kroot with repair.

You should recruit me for playtesting. ;)


Again, please don't forget to look at the technical question I asked. Please.