EDIT 20141116 - I figure I can use this first post to put up the to-do list:
Original post, for history:
So far, I have been able to light the player on fire.
in bodypart.cpp:
EDIT: Latest discovery is that the above code causes the game to crash when you sever your right arm :\
Synchronised to sandbox repo: 20141116 - Graded charring in the bitmap, achieved by selecting the RGB colour with the max intensity, RSHIFT max intensity by 2, RSHIFT old RGB by 3 and then add these together with Max>>2 to form the new 'burnt' RGB values Different materials now have different burn times. Introduced a BurnModifier() which determines the duration of burning based on material strength, fire resistance and density, according to the formula (500 + Den + ((Str * FR) >> 1)) 20141116 - Made it so that the words "(on fire)" appear in the post-fix of meleeweapons and armors that are on fire, a la fluids (covered in ...) 20141116 - Prevented wooden flaming swords from catching fire. Achieved this via CanBeBurned in item.h and item.dat and test condition in item::ReceiveDamage 20141116 - Caused burning phoenix feather to reset and stop burning once it gets completely burnt. Wondering if this needs a separate message. 20141116 - Introduced code for extinguishing flames via the function Extinguish() (opposite function to Ignite()) - wielded equipment graphics still do not extinguish for some reason 20141116 - Ghosts, powder, fluids were all burning. Even the snow in Attnam was on fire! This was fixed by adding "virtual int IsBurning() const { return 0; }" to liquids (therefore powders) and gasses. Not ideal means of fixing this. it should really be fixed at the level of object.h Updated the Activation energy threshold to the following formula: ActivationEnergy = 0.5 x MaterialStrength + 5 x MaterialFireResistance + FireResistanceItemEnchantment Revised hence the FireResistance of all materials key: (YYYYMMDD) = complete BF = bugfix FE = feature BA = balancing To do: BF - Graded charring in the bitmap BF - Whenever a meleeweapon or something with a secondary material is completely burnt, then a lump of the secondary material is created BF - Flames do not go away on wielded equipment when extiguished. Clue: The flames do go away when the (phoenix feather) sword is covered in blood BF - Flames do not animate when a stick of balsa is ignited (item sitting far away when ignited??) FE - Once something is on fire, try to get it to infect the rest of the stack and player inventory FE - Introduce the 'on fire' postfix, for (all) things that are presently on fire FE - Include wetness in the formula for activation energy FE - Handle the duration of burning via mass-density, fire resistance, enchantments and material wetness FE - Implement ways of putting flames out FE - Introduce thermal energy (integrate fire damage over cascading explosions) FE - Chance to decrement enchantment when gear is burnt (magic fire?) FE - Flaming sword burning effect FE - Smashing lanterns should be a source of fire FE - Get tailors to repair burnt fabric FE - Burning bodyparts FE - ?Create smoke in tunnels FE - ?Vomit to extinguish fires FE - Burning objects persisting in the bonefile FE - Burning golems FE - Burning phoenix feather golems FE - Make it so melee weapons that are on fire spread fire to enemies BA - Hard code ironalloys so that they cannot burn (avoiding (possible?/untested) conflict with rusting graphics) BA - Give goblinoid magic users mirrored wands Partially done: 20141116 - FE - Destroy objects once they are completely burnt up 20141116 - FE - Special property for phoenix feather material 20141116 - FE - Introduce the 'on fire' postfix, for meleeweapons and armors that are presently on fire 20141116 - BA - Improve ignition by way of explosions. Get Explosion Strength to scale nice and linearly with Activation Energy Complete: 20141116 - BF - Stop - f.ex. wooden - flaming swords from catching fire 20141116 - BF - Ghosts, powder, fluids are all burning. Even the snow in Attnam is on fire! 20141116 - BA - Prevent the TestActivationEnergy algorithm from testing objects that cannot burn anyway
Original post, for history:
So far, I have been able to light the player on fire.
in bodypart.cpp:
int rightarm::GetSpecialFlags() const { return !GetMaster()->IsPlayer() ? SpecialFlags|ST_RIGHT_ARM : SpecialFlags|ST_RIGHT_ARM|ST_FLAME_1; }
EDIT: Latest discovery is that the above code causes the game to crash when you sever your right arm :\