Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Things that we aren't going to implement
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Post by AenAllAin »

I have been running into several limiting factors while working on my mods for this game. I didn't find a topic thread for most of these, so maybe some have not been requested yet. Would it be possible to see any of the following capabilities exposed to the modding community?

1. Multi-typing (weak Multiple Inheritance); could the "type" property on the entity prototypes be changed from a single value to a table, so that we can cross-breed prototype behaviors for more variety? For example, type = { "wall", "electric-pole"} to enable electrified wall variants directly instead of kludging transparent entities together.

2. Event Cascade/Bubbling/Propagation; could you enable this feature. There are times when I find it would be best to design game behavior by programmatically triggering events, or structuring things as a cascade.

3. Entity IDs; I think someone already asked for this, but could you expose the instance IDs for the in-game entities?

...I guess I will leave it at that for now, because I am new to the API and the other requests may already have solutions.
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

Re: Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Post by AenAllAin »

Choumiko wrote:to 1.: viewtopic.php?f=25&t=23211#p145511

2. Not sure if i understand correctly, but you can raise the available events via game.raise_event
Thanks Choumiko! I hadn't found that yet.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Post by Adil »

AenAllAin wrote: 3. Entity IDs; I think someone already asked for this, but could you expose the instance IDs for the in-game entities?
Yeah, I've asked for unique entity identifiers before, but it kinda drowned without a sound here.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14594
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Post by Rseding91 »

Adil wrote:
AenAllAin wrote: 3. Entity IDs; I think someone already asked for this, but could you expose the instance IDs for the in-game entities?
Yeah, I've asked for unique entity identifiers before, but it kinda drowned without a sound here.
A large portion of the entities have no unique ID. Their only unique characteristic is their memory address on the computer being run and the location they take up in the save file.

If there was an easy "ID" field to expose for each entity I would have already added read access to it.
If you want to get ahold of me I'm almost always on Discord.
AenAllAin
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat Apr 02, 2016 3:10 am
Contact:

Re: Multi-typing/Multiple Inheritance, Event Cascade/Bubbling, .

Post by AenAllAin »

Rseding91 wrote:
Adil wrote:
AenAllAin wrote: 3. Entity IDs; I think someone already asked for this, but could you expose the instance IDs for the in-game entities?
Yeah, I've asked for unique entity identifiers before, but it kinda drowned without a sound here.
A large portion of the entities have no unique ID. Their only unique characteristic is their memory address on the computer being run and the location they take up in the save file.

If there was an easy "ID" field to expose for each entity I would have already added read access to it.
Thanks for the info; I guess that is a common assumption that everything is ID'ed and a further assumption that for some reason we were not being allowed access ...bad assumptions. I'm glad you let us know.

By any chance, is there a work-around mechanism in the "Util.lua" that you have already provided? I have noticed a number of mods/modders addressing this same issue with different approaches to grouping/pairing entities for later lookup.
Post Reply

Return to “Won't implement”