Robot de-piniatafication by expanding drop lists

Whales had actually shown interest in this and was supposedly planning to include it in the next version, but seeing how things turned out I’m throwing it here:

So as it currently stands, robots all draw from a single set of conditions when determining the items they drop after death: “robot” items (processors, ram, lumps and chunks, batteries and plutonium cells, etc) and all types of bullets (but not fusion packs, interestingly). This is a bit buggery for two reasons:

A) Once you get a decent initial ammo pool and a good gun, one can cheese the fuck out of copbots and the like by hitting an alarmed door/window and letting the ensuing eyebots summon an infinite stream of copbots for the picking, and

B) This one-size-fits-all setup means robots are droppin’ stuff they shouldn’t even BE carrying (copbots with bullets, 9mm-using turrets droppin’ .44, etc).

So we fixed that: each robot now has its own separate item list that that matches up with their characteristics, ie copbots will drop the batons and tasers that they attack with, tripods will drop flamethrowers, turrets and secubots will drop 9mm ammo, while the bulkier robots will also drop armor plating depending on how fast or tough they are, like copbots and chickenbots dropping superalloy plates while tankbots and molebots will drop sturdy hard plates.

Installation: No .diff available yet, so you’ll have to install the mod yourself - it’s rather light on the code-side so it’ll only take a minute. Just make sure you use something like Notepad++, since lesser text editors will horribly maim the files.

Open up mapitems.h and replace

with

mi_biollante, mi_bugs, mi_bees, mi_wasps, mi_robots, mi_eyebot, mi_manhack, mi_skitterbot, mi_secubot, mi_copbot, mi_molebot, mi_tripod, mi_chickenbot, mi_tankbot, mi_turret,

Open up mapitemsdef.cpp and insert the following after the mi_robots entry:

[code] setvector(
mapitems[mi_eyebot],
itm_flashlight, NULL);

setvector(
mapitems[mi_manhack],
itm_knife_combat, NULL);

setvector(
mapitems[mi_skitterbot],
itm_tazer, NULL);

setvector(
mapitems[mi_secubot],
itm_9mm, itm_steel_plate, NULL);

setvector(
mapitems[mi_copbot],
itm_baton, itm_tazer, itm_alloy_plate, NULL);

setvector(
mapitems[mi_molebot],
itm_spiked_plate, itm_hard_plate, NULL);

setvector(
mapitems[mi_tripod],
itm_flamethrower, itm_alloy_plate, NULL);

setvector(
mapitems[mi_chickenbot],
itm_9mm, itm_alloy_plate, NULL);

setvector(
mapitems[mi_tankbot],
itm_tazer, itm_flamethrower, itm_9mm, itm_alloy_plate,
itm_hard_plate, NULL);

setvector(
mapitems[mi_turret],
itm_9mm, NULL);[/code]

Open up monitemsdef.cpp and replace

setvector(monitems[mon_eyebot], mi_robots, 4, mi_ammo, 1,NULL); monitems[mon_manhack] = monitems[mon_eyebot]; monitems[mon_skitterbot] = monitems[mon_eyebot]; monitems[mon_secubot] = monitems[mon_eyebot]; monitems[mon_copbot] = monitems[mon_eyebot]; monitems[mon_molebot] = monitems[mon_eyebot]; monitems[mon_tripod] = monitems[mon_eyebot]; monitems[mon_chickenbot] = monitems[mon_eyebot]; monitems[mon_tankbot] = monitems[mon_eyebot]; monitems[mon_turret] = monitems[mon_eyebot];

with

[code] setvector(monitems[mon_eyebot],
mi_robots, 4, mi_eyebot, 1,NULL);

setvector(monitems[mon_manhack],
mi_robots,	4, mi_manhack, 1, NULL);

setvector(monitems[mon_skitterbot],
mi_robots, 4, mi_skitterbot, 1, NULL);

setvector(monitems[mon_secubot],
mi_robots, 4, mi_secubot, 1, NULL);

setvector(monitems[mon_copbot],
mi_robots, 4, mi_copbot, 1, NULL);

setvector(monitems[mon_molebot],
mi_robots, 4, mi_molebot, 1, NULL);

setvector(monitems[mon_tripod],
mi_robots, 4, mi_tripod, 1, NULL);

setvector(monitems[mon_chickenbot],
mi_robots, 4, mi_chickenbot, 1, NULL);

setvector(monitems[mon_tankbot],
mi_robots, 4, mi_tankbot, 1, NULL);

setvector(monitems[mon_turret],
mi_robots, 4, mi_turret, 1, NULL);[/code]

Delete cataclysm.exe and EVERYTHING in the Objwin folder, then recompile. The old date is clingy and will cause errors as I discovered while making this mod. Save games may or may not continue to work, so be prepared to have to restart/do some save game surgery.

I do suppose this’ll require a bit more jiggering in order to accomidate some of the new DDA items like springs and such, but besides that it’s ship-shape.

You should look into throwing this up on github. It makes these kinds of mods easy to merge to the main game.