Data Realms Fan Forums
http://45.55.195.193/

Strange bugs in campaign mission
http://45.55.195.193/viewtopic.php?f=8&t=15491
Page 1 of 2

Author:  weegee [ Mon Jun 22, 2009 1:04 pm ]
Post subject:  Strange bugs in campaign mission

Hi, I've made a campaign mission. It is almost playable and debugged. At least there are no errors in the LUA console, an everything works and triggers fine. But there are strange bugs which I can't figure out how to handle. And I don't even understand their nature. I guess that quite big LUA script somehow cripples internal state of the engine and it leads to weird ingame behaviour.

Examples of weirdness are:
- Dummies spawned in tower are trying to get to the dummy controllers insted of brainhunting as set in the script.
- Dummies spawned form dropships are trying to kill their own dropships.
- Heavy brain robot suddenly explodes causing defeat, like if bullets fired inside the tower could hit the brain in the coalition mini bunker.

Any ideas why this can happen? Maybe too much LUA or bad scene (derived from "flatzone large")?. Any help would be appreiated.

Attachments:
KonsMaps.rte.zip [85.29 KiB]
Downloaded 345 times

Author:  ProjektTHOR [ Mon Jun 22, 2009 1:41 pm ]
Post subject:  Re: Strange bugs in campaign mission

Lua.

Good lord, this is like a disease out of control.

Author:  mail2345 [ Mon Jun 22, 2009 6:09 pm ]
Post subject:  Re: Strange bugs in campaign mission

I would say large scene.

And no, lua does not corrupt the internal engine.

Author:  Grif [ Mon Jun 22, 2009 7:38 pm ]
Post subject:  Re: Strange bugs in campaign mission

Hit Ctrl + P and tell us how many MOIDs it displays when ♥♥♥♥ starts getting weird.

Negative points if it's over 255.

Author:  weegee [ Tue Jun 23, 2009 6:51 am ]
Post subject:  Re: Strange bugs in campaign mission

Yeah, I've got 240 of them from the begining, and about 265 when glitches come out. Any ways to decrease them on start? Maybe rebuid scene using less materials? Ofcourse I'll add limit checking code on all LUA spawns.

Author:  mail2345 [ Tue Jun 23, 2009 6:53 am ]
Post subject:  Re: Strange bugs in campaign mission

Code:
if MovableMan:GetMOIDCount() < 240 and

Is what TLB uses for his vanilla areas.

Author:  LowestFormOfWit [ Tue Jun 23, 2009 7:06 am ]
Post subject:  Re: Strange bugs in campaign mission

I think you're missing some of that snippet..

Author:  mail2345 [ Tue Jun 23, 2009 7:17 am ]
Post subject:  Re: Strange bugs in campaign mission

I left the part out so he could add it to his existing if statements.

Author:  Grif [ Tue Jun 23, 2009 7:31 am ]
Post subject:  Re: Strange bugs in campaign mission

for actor in MovableMan.Actors do
if MovableMan:GetMOIDCount() >= 250 then
actor:GibThis();
end
end

This is the only efficient way to solve your problem and will work without any problems 100% of the time. I suggest all mod makers put this into mods. And scenes.

Author:  mail2345 [ Tue Jun 23, 2009 7:54 am ]
Post subject:  Re: Strange bugs in campaign mission

And if the gibs are greater than the attachables?

EDIT:
Oh, I would recomend killing the last actor instead, by writing it to a table, and deleting the last entries.

Author:  411570N3 [ Tue Jun 23, 2009 8:33 am ]
Post subject:  Re: Strange bugs in campaign mission

Gibs don't count in the MOID limit.

Author:  weegee [ Tue Jun 23, 2009 9:35 am ]
Post subject:  Re: Strange bugs in campaign mission

I've cut about 1K of pixels from the map, and removed all unnecessary blocks, dummies and weapons. Now I have about 160 MOIDs from start. Hope it will be enough to avoid glitches without killing poor helpless dummies. Thanks a lot.

Author:  TheLastBanana [ Tue Jun 23, 2009 9:59 pm ]
Post subject:  Re: Strange bugs in campaign mission

160 should be good. Just for future reference, all of the following count as 1 MOID:
    Actors
    ADoors
    AHumans
    ACrabs
    ACRockets
    ACDropships
    Arms
    Legs
    Heads
    Attachables
    HDFirearms
    HeldDevices

For instance, a Coalition Heavy Soldier equipped with a Heavy Sniper Rifle would have:

2 legs
2 arms
1 head
1 helmet
1 torso/actor
1 chest plate
1 weapon
__________
9 MOIDs.

A dummy turret has 11, so avoid those. Long doors have 2 (door and motor) and tunnel doors have 2 doors, so they have 4 MOIDs. All of this adds up. Be sure to add actors very carefully.

Author:  weegee [ Wed Jun 24, 2009 6:50 am ]
Post subject:  Re: Strange bugs in campaign mission

Great reference. Now I doubt where I can put all this info in Wiki. To the Modding\Scenes or to the LUA sections?

Author:  Grif [ Wed Jun 24, 2009 7:09 am ]
Post subject:  Re: Strange bugs in campaign mission

ProjektTHOR wrote:
Lua.


It's a general knowledge piece of information that applies to ALL modding, so it shouldn't go into a lua section.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/