ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Jan 23, 2021 7:36 am

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jun 03, 2020 10:35 am 

Joined: Fri Sep 07, 2012 1:34 am
Posts: 279
So the Actor:cloneActor() method has a bunch of fields that it sets to nil on the cloned actor:
-- alt_node fields (controls fields copied with cloneActor by default)
_M.clone_nodes = table.merge({running_fov=false, running_prev=false,
   -- spawning/death fields:
   make_escort=false, escort_quest=false, summon=false, on_added_to_level=false, on_added=false, clone_on_hit=false, on_die=false, die=false, self_ressurect=false,
   -- AI fields:
   on_acquire_target=false, seen_by=false,
   -- NPC interaction:
   on_take_hit=false,  can_talk=false,
   -- player fields:
   puuid=false, quests=false, random_escort_levels=false, achievements=false, achievement_data=false, game_ender=false,
   last_learnt_talents = false, died=false, died_times=false, killedBy=false, all_kills=false,     all_kills_kind=false,
},_M.clone_nodes, true)
_M.clone_nodes = {player=false, x=false, y=false,
   fov_computed=false,     fov={v={actors={}, actors_dist={}}}, distance_map={v={}},
   _mo=false, _last_mo=false, add_displays=false,
   shader=false, shader_args=false,
This is nice. However, what's not nice is it also removes these fields from any tables in the actor, and any tables in those tables, and...

So here are a couple things that causes:
- When the recursive cloning reaches Corpathus, it removes the "summon" field on Corpathus - that field stores the function Corpathus uses to summon blightspawn. So when your Warden's Call clone tries to summon a blightspawn it gets an error instead.
- When it reaches Wintertide it removes the "x" and "y" fields of its "winterStorm" table, resulting in errors if you (or Greater Mummy Lord) have a winter storm going and then you use Forgery of Haze or whatever.

And probably a bunch more difficult-to-track-down bugs. Shouldn't it only remove these fields from the actor themselves?

PostPosted: Wed Jun 03, 2020 2:46 pm 
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10738
Location: Angolwen
It probably should indeed! Thanks :)

[tome] joylove: You can't just release an expansion like one would release a Kraken XD
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 11 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group