Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Caster of Magic II Brainstorming Megathread

(December 21st, 2022, 05:32)Anskiy Wrote: Someone came up with some suggestions for optimizing scripts exposed to modding, I hope Seravy finds them useful: https://www.realmsbeyond.net/forums/show...#pid819433

It pretty much already works like that - unit data is stored as base values and current values both.
Recalculation is done (including script) only on trigger conditions which can be one of two categories - either all units on a specific map tile are recalculated (for effects that affect a tile or a single unit - due to abilities like Holy Bonus the entire tile needs to be calculated either way) - or every unit in the game (for global effects). (There is also a third category, recalculate every unit in combat but that's pretty much the same as doing it for the tile where the combat takes place)

However trigger conditions are numerous so it has to be done often anyway. For example, anyone moves a unit, the source and destination tile needs to be recalculated. Anyone casts or cancels a global enchantment, every unit has to, etc
Reply



Messages In This Thread
RE: Caster of Magic II Brainstorming Megathread - by namad - November 20th, 2020, 22:50
RE: Caster of Magic II Brainstorming Megathread - by enna - September 11th, 2021, 06:36
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 11th, 2021, 14:17
RE: Caster of Magic II Brainstorming Megathread - by Anskiy - September 20th, 2021, 21:24
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 21st, 2021, 04:09
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 21st, 2021, 11:17
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 21st, 2021, 18:56
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 22nd, 2021, 12:37
RE: Caster of Magic II Brainstorming Megathread - by Seravy - September 22nd, 2021, 13:12
RE: Caster of Magic II Brainstorming Megathread - by Anskiy - September 26th, 2021, 04:45
RE: Caster of Magic II Brainstorming Megathread - by enna - October 12th, 2021, 09:49
RE: Caster of Magic II Brainstorming Megathread - by Seravy - December 21st, 2022, 08:07
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 12th, 2023, 16:11
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 14th, 2023, 05:13
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 22nd, 2023, 04:50
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 22nd, 2023, 05:08
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 22nd, 2023, 14:42
RE: Caster of Magic II Brainstorming Megathread - by Arnuz - November 22nd, 2023, 14:45
RE: Caster of Magic II Brainstorming Megathread - by Lagi - February 2nd, 2025, 13:13

Forum Jump: