View unanswered posts | View active topics It is currently Sun Dec 01, 2024 4:11 am



Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
 Strange bugs in campaign mission 
Author Message
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 342 times
Mon Jun 22, 2009 1:04 pm
Profile
Banned
User avatar

Joined: Tue Feb 27, 2007 4:05 pm
Posts: 2527
Reply with quote
Post Re: Strange bugs in campaign mission
Lua.

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


Mon Jun 22, 2009 1:41 pm
Profile YIM
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Strange bugs in campaign mission
I would say large scene.

And no, lua does not corrupt the internal engine.


Mon Jun 22, 2009 6:09 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Mon Jun 22, 2009 7:38 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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.


Tue Jun 23, 2009 6:51 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Strange bugs in campaign mission
Code:
if MovableMan:GetMOIDCount() < 240 and

Is what TLB uses for his vanilla areas.


Tue Jun 23, 2009 6:53 am
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: Strange bugs in campaign mission
I think you're missing some of that snippet..


Tue Jun 23, 2009 7:06 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Strange bugs in campaign mission
I left the part out so he could add it to his existing if statements.


Tue Jun 23, 2009 7:17 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Tue Jun 23, 2009 7:31 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post 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.


Tue Jun 23, 2009 7:54 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Strange bugs in campaign mission
Gibs don't count in the MOID limit.


Tue Jun 23, 2009 8:33 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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.


Tue Jun 23, 2009 9:35 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post 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.


Tue Jun 23, 2009 9:59 pm
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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?


Wed Jun 24, 2009 6:50 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Wed Jun 24, 2009 7:09 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.037s | 14 Queries | GZIP : Off ]