Page 1 of 1

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

Posted: Sat Apr 09, 2016 5:49 am
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.

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

Posted: Sat Apr 09, 2016 10:32 am
by Choumiko
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

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

Posted: Sat Apr 09, 2016 2:36 pm
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.

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

Posted: Sun Apr 10, 2016 11:02 am
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.

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

Posted: Mon Apr 11, 2016 3:47 am
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.

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

Posted: Thu Apr 14, 2016 8:39 pm
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.