Where to begin creating a mod that adds a GUI-arrow

Place to get help with not working mods / modding interface.
Post Reply
User avatar
PeteTheLich
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Jun 28, 2016 4:06 am
Contact:

Where to begin creating a mod that adds a GUI-arrow

Post by PeteTheLich »

So I have had this idea for a while now and finally wanted to dive in creating my first mod. I have little to no programming knowledge (I did a little Visual basic/Java years ago) but I am not unfamiliar with the process.

I want to create a mod that would give belts a pointer like this Image

Im not really sure where to begin. I saw the tutorial and followed through but im not sure how I can translate that to this situation (since it adds an item this is GUI only)

I've gathered some info on things I might need?

on_player_rotated_entity

game.player.set_gui_arrow({type="entity", entity=game.get_entity_by_tag("tech-wreckage")})

game.player.set_gui_arrow({type="position", position=glob.miner.dropposition})

ghost_prototype

Prototype/TransportBelt transport-belt

Prototype/TransportBeltToGround transport-belt-to-ground

but im not sure how to mash them together to get what I want.

Any help would be greatly appreciated!

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

Re: Where to begin creating a mod that adds a GUI-arrow

Post by DaveMcW »

The building preview is not moddable. The best you could do is could do is add arrows to the normal transport belt graphics, and replace them with custom items with normal graphics after they are built. Then handle conversion of non-arrow belts back to arrow belts when they are deconstructed.

Interesting events are on_built_entity, on_player_mined_item, on_robot_built_entity, on_robot_mined.

User avatar
PeteTheLich
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Tue Jun 28, 2016 4:06 am
Contact:

Re: Where to begin creating a mod that adds a GUI-arrow

Post by PeteTheLich »

DaveMcW wrote:The building preview is not moddable. The best you could do is could do is add arrows to the normal transport belt graphics, and replace them with custom items with normal graphics after they are built. Then handle conversion of non-arrow belts back to arrow belts when they are deconstructed.

Interesting events are on_built_entity, on_player_mined_item, on_robot_built_entity, on_robot_mined.
Dreams = crushed :(

So what youre saying is modifying the sprite sheet of the transport belt

Image

by putting arrows in it then swap them out after theyre built?


So maybe this shouldnt be in the modding forum but the suggestions forum? it seems like it'd be easy for the Devs to do since they have the hooks

Post Reply

Return to “Modding help”