Can't place more objects (SOLVED!)

The place to discuss all things Lugaru.
User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Can't place more objects (SOLVED!)

Post by ChosenOne » Sat Jul 17, 2010 2:09 pm

Hey everybody. New user here. Found Luguru and am very amused with it!
I'm making a campaign now. The standards will be very high.

So, I'm building a map where I apparently maxed out the map objects limit. After building a very large structure "M" no longer did anything. If I deleted one object I could place 1 more. If I deleted 5 objects, I could place 5 more, and so on.

I loaded the map today to finish it, and even after culling out many objects I'd placed wastefully, I cannot place any additional objects. Yet I'm under the limit.

I tried deleting every object. Still couldn't place.

I tried saving the map as a different file. Still nothing.


Please help! I'll want to release the campaign here when done, but will be keeping it under wraps until then.

If I can get past this problem and figure out the dialogue system you'll all enjoy the campaign very much I think.

===============

I'm using:

Windows 7 x64
AMD Athlon 64 X2 Dual core 4800+ 2.4GHz
3GB RAM
Last edited by ChosenOne on Wed Jul 21, 2010 4:58 pm, edited 1 time in total.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 9:19 pm
Location: Hamburg City
Contact:

Re: Can't place more objects

Post by rudel_ic » Sat Jul 17, 2010 2:52 pm

ChosenOne wrote: Please help!
Gladly!

The problem is that Lugaru doesn't actually delete objects reliably. Some it moves far below the terrain upon deletion, but they're still there.

That sounds crazy, I know, but that's how it is.

If you want to fix such maps that suffer from this, check this out:
viewtopic.php?f=7&t=6306

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Re: Can't place more objects

Post by ChosenOne » Sat Jul 17, 2010 3:25 pm

Aha, thanks for the info! That is quite crazy! I'll see if I can make use of your workaround.

Better be more cautious with my level design. If only there was undo's/redo's . . .



Also on the table is increasing number of chars allowed, and adding more objects with better textural diversity.

Ideally, the mod would include the executable and DLL's edited to accommodate these "improvements". Other than the filesize of the resultant mod being way bigger than most, do you see any issue with doing that? I'm guessing there may be licensing problems, but I hope not! It would be non-profit of course.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 9:19 pm
Location: Hamburg City
Contact:

Re: Can't place more objects

Post by rudel_ic » Sat Jul 17, 2010 3:52 pm

ChosenOne wrote: Also on the table is increasing number of chars allowed, and adding more objects with better textural diversity.

Ideally, the mod would include the executable and DLL's edited to accommodate these "improvements". Other than the filesize of the resultant mod being way bigger than most, do you see any issue with doing that? I'm guessing there may be licensing problems, but I hope not! It would be non-profit of course.
There are no licensing issues with distributing an executable you built with the sourcecode of Lugaru. You just have to comply with the license, which doesn't stop you from such distribution. Whether or not it's non-profit is irrelevant.

Note though that you have to make the sourcecode available if you release the modified executable. http://www.gnu.org/licenses/old-license ... stedPublic
A diff might suffice, I'm not sure.

Be advised that increasing the number of possible characters on a map can eventually lead to segmentation faults. This problem hasn't been tracked down yet.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Re: Can't place more objects

Post by ChosenOne » Sat Jul 17, 2010 5:04 pm

Excellent, thank you for the info!

If we succeed, this may open doors for other modders to use our improvements, the source will even be available.

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 3:54 pm
Contact:

Re: Can't place more objects

Post by tannim » Sat Jul 17, 2010 5:09 pm

I've found that if you use CTRL+Backspace to delete an object, it stays in the object count.

Lugaru, standard non-modified lugaru, can handle about 250 objects placed on the field. Trees count as two.

if you delete with backspace, the object is actually removed. If you use the other delete, it is gone, but still counts as one.(or two as a tree).

User avatar
kehaar
Posts: 696
Joined: Tue Jan 13, 2009 1:51 am
Location: Trapped under a cat
Contact:

Re: Can't place more objects

Post by kehaar » Sat Jul 17, 2010 5:17 pm

Woo Hoo! A new campaign!!

If you need any help installing dialogues, I can help with that.

Just PM me.

User avatar
Untadaike
Posts: 1660
Joined: Mon Jan 05, 2009 4:46 pm
Contact:

Re: Can't place more objects

Post by Untadaike » Sun Jul 18, 2010 10:35 am

^^ He can help. :) Can't wait for the campaign!

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Re: Can't place more objects (SOLVED!)

Post by ChosenOne » Wed Jul 21, 2010 5:00 pm

Thanks for the tip, tannim.

The planned campaign will stretch Lugaru to it's limits. And beyond. For instance, map object limits.

A thing of the past.
Image

User avatar
kehaar
Posts: 696
Joined: Tue Jan 13, 2009 1:51 am
Location: Trapped under a cat
Contact:

Re: Can't place more objects (SOLVED!)

Post by kehaar » Wed Jul 21, 2010 5:58 pm

Wow! That's awesome!

...of course, my frame rate would be 1 frame/minute on the Olde Mac. :lol:

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 9:19 pm
Location: Hamburg City
Contact:

Re: Can't place more objects (SOLVED!)

Post by rudel_ic » Wed Jul 21, 2010 6:08 pm

If you want to remove the max object count in lugaru_map_merge.py (the merge script for Blender), just comment these lines out in there:

Code: Select all

                        if total>299:
                                error_s_1 = "299 objects maximum exceeded."
                                if total-299>1:
                                        s="s"
                                else:
                                        s=""
                                error_s_2 = str(total-299)+" object"+s+" ignored. Delete that amount."
                                totalfix = 299
Commenting them out means placing a hash sign in front of each line, like this:

Code: Select all

                        #if total>299:
                        #        error_s_1 = "299 objects maximum exceeded."
                        #        if total-299>1:
                        #                s="s"
                        #        else:
                        #                s=""
                        #        error_s_2 = str(total-299)+" object"+s+" ignored. Delete that amount."
                        #        totalfix = 299
Note that the spacing before lines has to remain as it is. The spacing has to be in tabs.


Edit: Oh, and there's these lines:

Code: Select all

                                        if count>299:
                                                break
Comment them out as well:

Code: Select all

                                        #if count>299:
                                        #        break
Basically, search for 299 in there and comment related code out.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Re: Can't place more objects (SOLVED!)

Post by ChosenOne » Wed Jul 21, 2010 6:15 pm

Ohhh, the script has a limit imposed, eh. Thanks, I'll have to edit it to work on my overstuffed maps. No problem then.

kehaar, surprisingly, my FPS didn't suffer too bad, and I don't have the best graphics card either. Hopefully the campaign maps won't make everyone's comps suffer too much.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 9:19 pm
Location: Hamburg City
Contact:

Re: Can't place more objects (SOLVED!)

Post by rudel_ic » Wed Jul 21, 2010 6:18 pm

ChosenOne wrote:Ohhh, the script has a limit imposed, eh. Thanks, I'll have to edit it to work on my overstuffed maps. No problem then.
Sure it has, standard Lugaru crashes with maps that have more than 299 objects, so I had to impose the limit. I didn't have a choice there.

Edit: Sometimes it doesn't crash, but displays bogus data. That's also weird. Probably pointer issues of some kind.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 2:00 pm

Re: Can't place more objects (SOLVED!)

Post by ChosenOne » Wed Jul 21, 2010 7:26 pm

So you're saying raising the object cap risks instability? Lugaru's engine is getting worse by the moment!

User avatar
Count Roland
Posts: 2937
Joined: Tue Sep 25, 2007 9:15 pm
Location: Galapagos Islands, rodeoin some turtles.
Contact:

Re: Can't place more objects (SOLVED!)

Post by Count Roland » Wed Jul 21, 2010 7:55 pm

you have to remember David started working on it in the eighth grade by himself..

Post Reply