Nicolas Weeger | 22 Jan 2012 16:40
Favicon

Archetype and inventory bug

Hello.

After a crash on invidious, I've found a bug related to archetypes in 
inventory handling, and I'm really wondering how to fix it :s

Here's the description:
- when a random map is generated, a special submap can be 
/styles/specialmaps/powerroom

- in this map are firewalls, with a "transferrence" spell in their inventory. 
The archetypes are "firewall_1", "firewall_2" and such

- those archetype contain an archetype "firebullet", because they are firewalls

- when the map is generated, the "firebullet" is copied from the archetype, 
then the "transferrence spell is added

- transferrence is the first item in inventory, so that's what the wall casts ; 
casting this, the wall increases its stats.sp (probably from the crystal, or a 
player standing on the crystal)

- if the map is swapped out, then reloaded from disk, the firewall will have 
its firebullet item copied from the archetype, then reloads the transferrence 
item, and the initial firebullet

- the firewall now contains, in the order: firebullet (archetype instanciation 
for reloading), transferrence (from the map definition), firebullet (archetype 
instanciation for creation)

- this is already a bug, but the fun is when the firewall will move, it'll fire 
(Continue reading)

Mark Wedel | 23 Jan 2012 08:28
Favicon

Re: Archetype and inventory bug

On 01/22/12 07:40 AM, Nicolas Weeger wrote:
> Hello.
>
>
> After a crash on invidious, I've found a bug related to archetypes in
> inventory handling, and I'm really wondering how to fix it :s
>
>
> Here's the description:
> - when a random map is generated, a special submap can be
> /styles/specialmaps/powerroom
>
> - in this map are firewalls, with a "transferrence" spell in their inventory.
> The archetypes are "firewall_1", "firewall_2" and such
>
> - those archetype contain an archetype "firebullet", because they are firewalls
>
> - when the map is generated, the "firebullet" is copied from the archetype,
> then the "transferrence spell is added
>
> - transferrence is the first item in inventory, so that's what the wall casts ;
> casting this, the wall increases its stats.sp (probably from the crystal, or a
> player standing on the crystal)
>
> - if the map is swapped out, then reloaded from disk, the firewall will have
> its firebullet item copied from the archetype, then reloads the transferrence
> item, and the initial firebullet

  Yes - the re-arranging of objects on load/save is a bit of a headache.  This 
was probably originally done for efficiency - it is a lot faster to insert the 
(Continue reading)


Gmane