Construction Planner Continued

by azaghal

Ghosts require player's approval before construction bots are dispatched. This gives the player improved control over what parts of the factory get built, and when.

Utilities
7 hours ago
1.1 - 2.0
2.56K
Logistic network Blueprints

i Use a color tint instead of Check

2 months ago

So far the mod works well for me and I like it. I just find it to be a big eye sore with the large green Checks obstructing what entity is there. It would be nicer to tint the color of the ghost between approved and none approved instead.

2 months ago

Hm... This sounds like a neat idea, but browsing around a bit - I think there'll be a whole bunch of complications to implement it in that manner. The current implementation is very simple - it just draws text and sets the colour (rgb + transparency) for the drawn text.

I can't find anything that would allow me to set tint per ghost entity, or to get (programatically) some kind of mask/sprite that I draw on top of the entity (so it would overlap exactly with the underlying ghost).

However... It could be possible to implement some kind of nicer looking sprite. It might affect performance slightly (I assume drawing text is cheaper than drawing sprites). But that could be somewhat offset by having support for either variant.

That being said, this is probably not something I will be looking at anytime soon, but... If you are able to come up with some kind of prototype with screenshots (particularly in case of sprite alternative) on how it would look like, that could be a starting point.

In case you want to experiment with some basics around just changing how the text is rendered (or what character is used for drawing), you could have a look at the approvalBadges.lua file. Just don't use it against your main save game. :)

Best regards,
Branko

2 months ago

If its not possible to do a tint then at least make the check less large more subtle? Its very obstructing I can't tell what I am looking at sometimes.

I saw mods that changed the tint of ghosts so I figure it would be possible.

2 months ago

Yeah, I actually had a look at one of those mods (Tinted Ghosts), and it sets the tint across the board during startup - so to my knowledge (and based on what I've see in the API docs), it's not possible to do it per entity.

I might revisit the current design at some point, but it's not very high on my list as mentioned.

Best regards,
Branko

2 months ago

Hm... After messing around a bit more to see if I could somehow implement the thing by setting the approval force colour (unfortunately, this only works for specific entities that support it, like gun turrets), I've also had a bit of a look at the rendering API for text etc. Ended-up messing around a bit with drawing some kind of circles etc with transparency on top of entities, but it looked a bit ugly, and did not look good at all with rails.

So... Although the tint thing won't work, I did realise that the mod could be a bit more configurable in this department. Some ideas on what could be implemented in terms of configuration options:

  • Picking the character to render for approved and/or unapproved ghosts, including a blank option (to show, for example, only unapproved ghosts ticks). This would most likely end-up being a static list since some characters don't seem to render correctly (original author mentions this in the source files, and I've confirmed it). I'd be more than happy to expand the list over time, and reconsider making it free-form field down the line if the list becomes unmanageable.
  • Picking the marking colour for approved/unapproved ghosts.
  • Setting the scale for rendered character. This might need some tweaking on where the character gets positioned (current code offsets the chars ever so slightly to look better on top of an entity).
  • Only show the markings when alt mode is active.

I don't expect this would result in any kind of performance hit, except maybe when you change the setting. The only flaw that I can see is that the setting would have to be set via map settings, and would be applicable for all players in a savegame. Theoretically, I could render these markings per player, but I think that would result in performance hit (since you'd need to draw/create/manage one mark for each player separately).

Do any of these options look like something you could find useful to make the markings less obnoxious for your use-case/play-through?

Best regards,
Branko

2 months ago

A small check in the corner would be less intrusive probably. Smething similar to the Bottleneck mod indicators.

11 days ago

So, I will probably end up revisiting this request now that I managed to get the mod working under game version 2.0, but no promises on timelines. I might end-up opting for something as simple as allowing to pick the scale of the icon, though.

New response