Author |
Message |
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Silly 40K Metagame Bug
So, I'm doing some test runs on the metagame to make sure everything runs smoothly, right? Finding my own stupid typos and errors the hard way, mostly. I have a nice (autobuilt) fortress set up in Yskely Mountain, with a pair of sniper Scouts up top overlooking the approaches, some dudes downstairs keeping the brain happy. I see one of the Scouts taking aim, so I go and see what he's trying to shoot at. Incoming dropship with brain. Okay. Take control (because the AI has no hope of compensating for flight time at that range) and take the shot myself. The bullet comes flying out just as you'd expect, but so does an entire Lascannon beam. Line up a straight shot on the main body, fire. Another lascannon beam, so it's not just a one-off. The dropship explodes and takes the brainbot along with it. End mission. End of Lascannon Rifles? No. In all following defenses of that base, the Scouts shoot Lascannon beams and bullets from their Sniper Rifles. This does not occur on any other map with Scouts possessing Rifles, nor does anything appear to be wrong in the metagame save .ini itself. I guess CC got some wires crossed somewhere?
|
Tue Jun 05, 2012 7:48 am |
|
|
Malamo999
Joined: Fri Jun 01, 2012 10:59 pm Posts: 103
|
Re: Silly 40K Metagame Bug
Arcalane wrote: [...]No. In all following defenses of that base, the Scouts shoot Lascannon beams and bullets from their Sniper Rifles. This does not occur on any other map with Scouts possessing Rifles[...] Which direction are they shooting in?
|
Tue Jun 05, 2012 12:35 pm |
|
|
DDR
Joined: Mon Aug 09, 2010 12:26 am Posts: 8
|
Re: Silly 40K Metagame Bug
I had something sort of similar. One of my soldiers listened to my keyboard input, regardless of who I was actually *controlling* at the time... including the editor.
|
Thu Jun 07, 2012 3:36 am |
|
|
MrC121989
Joined: Wed Feb 10, 2010 12:41 pm Posts: 182 Location: OMG where am i ?
|
Re: Silly 40K Metagame Bug
Same happened to me in tutorial mission.
|
Thu Jun 07, 2012 11:06 am |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Silly 40K Metagame Bug
Malamo999 wrote: Which direction are they shooting in? I'm not sure how that's relevant at all, since it occurred regardless of the direction they were shooting in, but never occurs on any other maps. The simple fact of the matter is those weapons do not load those scripts under normal circumstances. They have their own scripts that do other things. I've checked the scripts they normally load, both in terms of making sure they point to the right script in the .ini and that the script itself has nothing wrong with it. Everything is fine there. Yet, apparently on those maps, they're not fine and load the wrong scripts. Any instance of them did, regardless of whether the actor was newly placed or whatever. On other maps they were just fine and behaved normally. I checked the save files, and the weapons in the inventories of the actors aren't being pointed to the wrong scripts either. It's an error somewhere in Cortex Command itself, possibly a result of relying on a centralized 'Scripts' directory (with subfolders) for my mod rather than splitting the files up and placing them up all over the place.
|
Thu Jun 07, 2012 12:55 pm |
|
|
Malamo999
Joined: Fri Jun 01, 2012 10:59 pm Posts: 103
|
Re: Silly 40K Metagame Bug
Arcalane wrote: Malamo999 wrote: Which direction are they shooting in? [...]I'm not sure how that's relevant at all[...] Sometimes they try to shoot at crafts coming down, but if it's persistent then that's probably a bug...
|
Thu Jun 07, 2012 7:32 pm |
|
|
Bad Boy
Joined: Fri Sep 10, 2010 1:48 am Posts: 666 Location: Halifax, Canada
|
Re: Silly 40K Metagame Bug
It's not exactly the same but I've gotten something like what Arc's getting, I've had the coa shotgun put out the uber cannon's aiming sight: Attachment:
Shotgun1.png [ 313.61 KiB | Viewed 5367 times ]
Attachment:
Shotgun2.png [ 263.52 KiB | Viewed 5367 times ]
Last edited by Bad Boy on Thu Jun 07, 2012 10:18 pm, edited 1 time in total.
|
Thu Jun 07, 2012 8:31 pm |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Silly 40K Metagame Bug
Malamo999 wrote: Sometimes they try to shoot at crafts coming down, but if it's persistent then that's probably a bug... ...what the hell would the direction they're firing in or the fact they're shooting at dropships have to do with the fact the weapon they're using is apparently using entirely the wrong script? But hey, maybe it is relevant. Bugs are funky like that. -- Bad Boy wrote: It's not exactly the same but I've gotten something like what Arc's getting, I've had the coa shotgun put out the uber cannon's aiming sight. How strange. Good to know it's not isolated to my mod at least.
|
Thu Jun 07, 2012 9:31 pm |
|
|
Bad Boy
Joined: Fri Sep 10, 2010 1:48 am Posts: 666 Location: Halifax, Canada
|
Re: Silly 40K Metagame Bug
Just clued into the fact that this might be another breakage due to the MOID count, at least assuming ours was the same bug. My MOID count was 255 in the first pic, which could easily be any other number since the counter seems to break when it gets to 255 sometimes. Though the problem didn't fix itself when the MOID count went back down below 255 and it may have been happening before the MOID count was at 255 too, I'm really not sure. Still, do you know if yours was over the limit too?
|
Thu Jun 07, 2012 10:21 pm |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Silly 40K Metagame Bug
No idea. I've completed both of the campaigns it occurred in now so I can't really test it, but I'll keep my eyes open I guess.
|
Thu Jun 07, 2012 11:14 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Silly 40K Metagame Bug
It's most likely something with the MOID counter, as previously speculated.
Considering there's only 255 pointers, when it goes above this the Lua pointers get voided and weird ♥♥♥♥ starts happening. Will bug data to remove moid limit, although that'd remove crab bombs too...
|
Fri Jun 08, 2012 10:36 am |
|
|
The Gunslinger
Joined: Fri Jan 25, 2008 3:53 am Posts: 65
|
Re: Silly 40K Metagame Bug
Question; if the MOID overload is causing LUA to crash, would the lascannon script be the first one (or possibly the immediate next after the one it's supposed to be running) CC would find in your file structure? What I'm saying is if the first script (or script next after the sniper rifle) is that of a Storm Bolter, would it behave like that instead?
|
Fri Jun 08, 2012 5:07 pm |
|
|
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
|
Re: Silly 40K Metagame Bug
Nope. All the las weapon scripts are in their own folder, as are the scope scripts. Since there were ~2 dozen scripts between the files even if I were to not use folders to split the scripts directory up, it's not just a case of skipping to the next file in line or anything like that.
|
Fri Jun 08, 2012 5:39 pm |
|
|
Bad Boy
Joined: Fri Sep 10, 2010 1:48 am Posts: 666 Location: Halifax, Canada
|
Re: Silly 40K Metagame Bug
Lizardheim wrote: It's most likely something with the MOID counter, as previously speculated.
Considering there's only 255 pointers, when it goes above this the Lua pointers get voided and weird ♥♥♥♥ starts happening. Will bug data to remove moid limit, although that'd remove crab bombs too... Wait that can be removed easily and it's not some unfortunate limitation of the game? So why is it still here? crab bombs alone don't make up for all the screwups it causes. Anyway, for anyone who doesn't like having the ai break the moid limit I'd suggest replacing line 738 of Metafight.lua (in base.rte/Activities) with the following: Code: if self:PlayerActive(player) and not self:PlayerHuman(player) and self.TeamAIActive[self:GetTeamOfPlayer(player)] and self:GetPlayerBrain(player) and MovableMan:GetMOIDCount() <= rte.MOIDCountMax then rte.MOIDCountMax is set to 210 as default, so I went with that but it can of course safely be anything up to around 240 or so (less than 255 to keep it from going over when people pop out of dropships).
|
Fri Jun 08, 2012 7:20 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Silly 40K Metagame Bug
Didn't say it'd be easy.
|
Fri Jun 08, 2012 9:15 pm |
|
|
|