Page 1 of 1

Increase size of a custom park

Posted: Mon Dec 11, 2017 3:23 pm
by rodneyM7
I would like to have a few more larger sizes available in the editor instead of just the default ones because after all they're just too small.
Now I found this in the park_ed.qb:

Code: Select all

#00635    createmenu STRUCT{
            type = verticalmenu
            id = parked_clear_menu
            ParkEdMenuXYValues w = 300.0
            h = 400.0
            just_center_x just_center_y blue_top eventhandler = STRUCT{
              type = ShowEventHandler
              target = "helper_park_editor"
            children = ARRAY(
                type = textmenuelement
                auto_id text = "Select new size"
                static dont_gray drawer = title
                type = textmenuelement
                auto_id text = "16 X 16"
                kill_menu target = "Ed_RunCommand"
                params = STRUCT{
                  command = clearmap
                  size = 0

The structure for the others is the same, 24x24 has size = 1 and 80x6 at last has size = 4. Out of curiosity I set the value of size to 5 and I get a 80x12 park (just the floor though everything else is gone but I can edit it and play it as any other CAP). So that's pretty nice already. However when I increase the size to 6 and more the game crashes. Does anybody know where the worldsize of the CAPs are defined or how I could increase the size of the park further (80x80 would be perfect)? I couldn't find anything in the scripts.

Re: Increase size of a custom park

Posted: Wed Dec 13, 2017 4:36 am
by WhoElseButMe
Pretty sure you'll need to edit the themes of the park as the bulk of the work. Then you'll need to edit edpieces.qb
Notice there are 5 items in each the base_park_heap, base_park_pool, and shell_pieces.
Also, notice the part of the name of the items in shell_pieces array elements indicative of the shell size those pieces are for.
Really the sizes are more than likely defined in the exe and the collision is defined in the theme.


Re: Increase size of a custom park

Posted: Sat Dec 16, 2017 8:22 pm
by rodneyM7
Yes, I've noticed that. So the cause that the editor just generates a floor surrounded by nothing would be that there are actually 6 sizes defined in the exe but only 5 were implemented (meaning shell pieces for size 6 are missing)?

Some things I found in the exe:

This seems to be the string included in the .qb of post #1 that we're looking for. In the same area of the .exe also functions for the beginning and ending of park generation are defined. Actually "size" isn't only used in the park.qb but also in the tricks.qb for an image. (That's the function below DATA XREF (sub_4904D0+11Ao ...).)

Code: Select all

#00064      BloodParticlesOn name = "breath.png"
            size = 20.0

So we can ignore that one and follow the one above I highlighted: sub_45FC60+2C6.
Graph View:

Text View:

That's my progress so far, never done this before and I'm completely lost with all the push / call / eax stuff. My understanding is that the graphic view shows how the functions are (logically) connected to each other. Blue arrow means there can be branching (and we can select different sizes after all?), green what the program does on default, red what it doesn't do on default. So somewhere here the sizes should be defined right? I'll try to read up more on this, not expecting you to explain all that :P But would be nice to know if I'm on the right track here.


Posted: Tue Jun 28, 2022 11:59 am
by steamymn
Nice-- Looks like a great area to live and you are right in the middle of all that-- For this weekends trip I had to drive for an hr to get to the start of the trail.