Page 1 of 1

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

Posted: Sat Jul 09, 2016 8:21 am
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!

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

Posted: Sat Jul 09, 2016 8:27 am
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.

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

Posted: Sat Jul 09, 2016 8:46 am
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