Bug Report(?): Collection Reference Mismatch

A forum for discussing map making ideas and problems for the Myth series.
Post Reply
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Bug Report(?): Collection Reference Mismatch

Post by fildred13 »

I've looked into this extensively, and I believe it is a bug, not a map-making error. I couldn't find anything about it on the forums either, but I could have missed something.

I am creating a plug in which light and dark units are on both sides, like in multiplayer, so I needed differing color schemes. The only way I could do this was to create a "thrall (player)" and "thrall (team1)" unit, and then a "thrall (player)" and "thrall (team1)" collection reference, and so on like that for every unit that is present in the plug. Then, I of course edited the player and thrall collection references in every case to fit which team they were on - red and white for "player," orange and black for "team1." I created 2-5 permutations of these colors for every unit.

All seemed to be going swimmingly and as expected - I had a red and white fighting an orange and black team, and it was all well and good.

Then one day I noticed a red and white dwarf fighting for the orange and black team. I immediately assumed I had placed the wrong unit, went into loathing and - lo and behold - it was an team1 dwarf, meaning it SHOULDN'T have been black and white. I reloaded the game, waited for the dwarf to spawn, and when he finally did he was orange and black. Puzzling, funny bug.

But it kept happening. At random, SOME units on one team would get the colors from the other team. At first I thought there was rhyme and reason: when the CTRL reveals X units, all X units are the wrong color. Nope - the dwarf is revealed with other units, all of which had the correct colors except for the dwarf. Then I thought maybe it was linked groups that would "turn" together (I use unit containers for every unit in the plug. So if a platoon has three squads it will have "duff container" which is just a monster identifier container which gets linked to in the squad, etc.) But JUST today I saw a group of archers who I KNOW are all in the same unit container, all get revealed at the same time, but 2 of the 4 were red and white and 2 were black and orange. Yet in the very same game an ENTIRE squad of thrall - maybe 15 of them - were ALL the wrong color, so sometimes it DOES happen in batches?

So for the bug report: it seems unit tags which refer to the same monster can sometimes bug out and use a DIFFERENT collection reference than the one assigned to that unit.

On a related note: this IS the best way to do what I want right? I'm not completely missing some way to assign color permutations based on team am I? It is a pain that, in order to use any tagset I have to manually create one just for my plug. Especially vTFL not working stinks, and I had to create a TFL tagset by hand.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Melekor
Site Admin
Posts: 2449
Joined: Sat May 01, 2004 12:10 am
Contact:

Re: Bug Report(?): Collection Reference Mismatch

Post by Melekor »

For this kind of bug report, we really need a plugin and a recording file before we can look into it.

As for your question, I believe that is correct, if you want to fake having different team colors for the light & dark teams in single player, collection references is the only way to do it.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Bug Report(?): Collection Reference Mismatch

Post by fildred13 »

I should be able to oblige. I'll keep an eye out for it next time and send the plug/reco.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Bug Report(?): Collection Reference Mismatch

Post by Pyro »

There is a limit with collection references. It is possible you reached it which causes units to show the wrong collection references. I've seen odd things like that in the past with plugins that have a lot of collection references. Maybe you can try to trim some down to prevent this issue.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Bug Report(?): Collection Reference Mismatch

Post by fildred13 »

Well so far it only occurs when I'm testing the plug out of my local folder while I'm working on it. I am yet to see it happen when it is a built plugin. I'll let you know if that happens, but if it doesn't I don't know if it is a bug worth batting an eye at it. Easy enough to just build the plug when I don't want it to happen. If I'm right, that is ;)
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
Post Reply