Page 1 of 1

(done) Moving conditions to a table

Posted: Mon Dec 17, 2018 11:44 pm
by Sophia
I've been considering adding a conditions table to DSB that would work similar to obj, which would remove a lot of the arcane weirdness that you can run into by having to use condition id's and dsb_add_condition and such. However, this is very likely a breaking change.

Any thoughts?

Re: Moving conditions to a table

Posted: Mon Dec 17, 2018 11:50 pm
by Gambit37
To be honest I haven't done enough with them yet to be able to offer any coherent thoughts on the matter. :)

Re: Moving conditions to a table

Posted: Tue Dec 18, 2018 2:31 am
by Sophia
It shouldn't be that hard to make the new system use dsb_add_condition under the hood, which means old dungeons will probably still work, so I'm going to go ahead with it. This is how it will be for 0.72.

The table approach does feel a lot more intuitive.
For example:

Code: Select all

conditions.poison = {
	scope = INDIVIDUAL,
	update_rate = 24,
	update_func = poison_func,
	subrenderer_image = gfx.poisoned,

	mouth_show = true,
	green = false,
}
Gambit, this also means that as of 0.72 your dungeon will suddenly stop working because of those dsb_replace_condition calls you needed to use. They won't be necessary any more, so just remove them and everything will work fine again. :mrgreen:

Re: (done) Moving conditions to a table

Posted: Tue Dec 18, 2018 9:05 am
by Gambit37
Great, that does look much simpler, thank you :)

Re: (done) Moving conditions to a table

Posted: Thu Dec 20, 2018 8:43 pm
by Sophia
Updated the wiki with the new information! Which won't actually be relevant until 0.72 is out, but that will be soon, hopefully.