Remove/hide weapon slots at bottom-right of screen

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
stever1388
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Jun 16, 2020 10:06 pm
Contact:

Remove/hide weapon slots at bottom-right of screen

Post by stever1388 »

I'm trying to hide or remove the weapon slots that appear at the bottom right corner of the screen with a mod.

Why? When I play without biters I like to remove all the military aspects from the game - they just clutter things (IMO). I've been working on a personal mod that removes all the military tech, recipes, and items from the game. This includes military science. I changed a few tech and recipes so that I can still use/get them without the military science (like power armor). I also removed the weapon from the car.

But I can't figure out how to hide those weapon slots. I can't find anywhere where they are defined in the raw data prototypes, nor how to hide them from the game itself. I do have a thing that will delete the gun and ammo on respawn, but I get stuck with that ugly weapon slots that are highlighted red because I have no gun or ammo and it bugs me.

Maybe it isn't possible - but if anyone could point me in the right direction I would appreciate it. Thanks!

Side note - the factory can't grow because I spend hours trying to figure this out instead of playing :(

tubs
Burner Inserter
Burner Inserter
Posts: 15
Joined: Tue Jan 06, 2015 7:29 pm
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by tubs »

Can you do a big hack and draw a GUI. Screen something over it?
bubbels (sic)

stever1388
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Jun 16, 2020 10:06 pm
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by stever1388 »

tubs wrote:
Tue Jun 16, 2020 11:12 pm
Can you do a big hack and draw a GUI. Screen something over it?
That's probably an option. Unfortunately I'm a programmer not an artist, so I'm not sure what I would put there that would look better than just having empty weapon slots lol. I mean I could probably cover it with a white box but I'm not sure I'd consider that "better".

User avatar
kizrak
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Jul 19, 2018 1:27 am
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by kizrak »

👍 I too have a mod that would also benefit from being able to remove (via API or prototype) the armor/weapon/ammo slots from the bottom-right of the screen.

Thanks!

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

Re: Remove/hide weapon slots at bottom-right of screen

Post by Rseding91 »

You can't. They are hard-coded to always have 3 gun slots and 3 ammo slots.
If you want to get ahold of me I'm almost always on Discord.

tubs
Burner Inserter
Burner Inserter
Posts: 15
Joined: Tue Jan 06, 2015 7:29 pm
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by tubs »

Any chance we could get e.g. gui.bottom_right so we can paint over it without hacking guessing pos and size?

I'd actually use that area of the screen for a few things myself not even just covering it.
bubbels (sic)

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by DaveMcW »

Code: Select all

/c game.player.game_view_settings.show_controller_gui = false
This has the side effect of removing the toolbar too.

stever1388
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Jun 16, 2020 10:06 pm
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by stever1388 »

DaveMcW wrote:
Thu Jun 25, 2020 2:44 am

Code: Select all

/c game.player.game_view_settings.show_controller_gui = false
This has the side effect of removing the toolbar too.
Hmmmm interesting. I wonder if a mod could re-create the toolbar then... seems a bit convoluted but might work. I'll look into it. Thanks!

User avatar
kizrak
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Thu Jul 19, 2018 1:27 am
Contact:

Re: Remove/hide weapon slots at bottom-right of screen

Post by kizrak »

Maybe the two plus GUI elements (toolbar and weapon/armor bar?) could be split out in player.game_view_settings?

Just brainstorming 🤓

Reference: GameViewSettings.show_controller_gui
show_controller_gui :: boolean [Read-Write]
Show the controller GUI elements. This includes the toolbar, the selected tool slot, the armour slot, and the gun and ammunition slots.

Post Reply

Return to “Modding interface requests”