[Rseding] [0.17.69] Enemy combat bots gui show damage based on player force modifiers.

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
TheKid0z
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jul 22, 2019 1:46 am
Contact:

[Rseding] [0.17.69] Enemy combat bots gui show damage based on player force modifiers.

Post by TheKid0z »

Steps

1. Set enemy and player damage modifiers

Code: Select all

/c game.print(game.forces.enemy.set_ammo_damage_modifier('combat-robot-laser',0))

Code: Select all

/c game.print(game.forces.player.set_ammo_damage_modifier('combat-robot-laser',-.2))
2. Spawn a Combat bot - In this case, il be using a distractor.

Code: Select all

/c local ent = game.surfaces[1].create_entity{name = "assembling-machine-1", position = {15, 3}, force = game.forces.enemy, recipe = "iron-stick"}; game.print(ent.surface.create_entity{name = "distractor", position = {15,3}, target = ent, force  = ent.force,speed=1}.force.get_ammo_damage_modifier('combat-robot-laser'));
3. The above command prints the enemy damage modifier which is 0 but the GUI shows player values. The actual damage they do is according to their own force value, its just visual.
Screenshot (148).png
Screenshot (148).png (3.7 MiB) Viewed 501 times
4. This is similar for All 3 combat robots - defender, distractor, destroyer. It doesn't matter how the bots were created ie. - using a capsule / directly.

5. Affected modifiers - bullet, combat-robot-laser, combat-robot-beam

Rseding91
Factorio Staff
Factorio Staff
Posts: 10274
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding] [0.17.69] Enemy combat bots gui show damage based on player force modifiers.

Post by Rseding91 »

Thanks for the report. I don't have a solution to this at the moment.

The entire description system (tooltip system) was not built with showing not-your-forces stuff in mind. The tooltip you're seeing is a hybrid of live information from the entity itself - which isn't on your force - and from the description system using your force. The description system has no concept of "this is actually a description of an an entity that's not owned by me, that might be friendly, enemy, neutral, or other) and so this is where the issue comes from.

I don't consider it worth the time and code bloat it would take to go and re-work the entire description system to account for this when PvP Factorio is an after-thought. I'll mention this to the guy working on re-doing the styles for tooltips to see if he wants to try to account for this but I doubt he will want to.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 2402
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [Rseding] [0.17.69] Enemy combat bots gui show damage based on player force modifiers.

Post by Bilka »

Thanks for the report, fixed for the next version.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users