thpsX

- => Questions & Tutorials => Topic started by: Zeoalexo on June 28, 2018, 12:05:56 pm

Title: adding custom levels
Post by: Zeoalexo on June 28, 2018, 12:05:56 pm
how do i go about adding custom levels? cant seem to figure it out.
Title: Re: adding custom levels
Post by: Dieselpirat on June 28, 2018, 01:23:52 pm
1. Download your desired custom level. (i. e. tampa)

2. Hit start and type "%localappdata%" (without "" but including the %) and hit enter

3. Go to "THUG Pro/User/Data/Pre/" and extract the three .prx files into this folder

4. Rename them: brun_scripts.prx -> tampa_scripts.prx, burncol.prx -> tampacol.prx and burnscn.prx -> tampascn.prx

5. Go back to the User folder (which contains the Data folder)

6. Put > This < (https://1drv.ms/u/s!Akbf-CZv00SQg2Sjs3mPcgJA4BAS) in there

That's it.

Tampa is just an example, you can do this with any level, just replace every "tampa" with how you want to call the level-files. (including the tampa.level.json filename, its contents and the three .prx files)

Editing the *.level.json:
Just change line 2 to whatever you want:
Code: [Select]
"level_name": "NameDisplayedInTheLevelSelectMenu",
and replace "tampa" at line 9, 10 and 11
Code: [Select]
    "level_pre": "tampa_scripts.pre",
    "level_scnpre": "tampascn.pre",
    "level_colpre": "tampacol.pre",

I hope this is clear enough, if not, ask away!
Title: Re: adding custom levels
Post by: NeVeRsOfT on June 28, 2018, 01:42:05 pm
You call it the ".level.jason file" but the file is called .level.json? o.o
Title: Re: adding custom levels
Post by: Zeoalexo on June 28, 2018, 01:45:29 pm
ok where do i go to edit the json file
Title: Re: adding custom levels
Post by: NeVeRsOfT on June 28, 2018, 01:48:08 pm
just open it with a txt file, right? :3
Title: Re: adding custom levels
Post by: SoulStorm64 on June 28, 2018, 01:54:16 pm
1. Download your desired custom level. (i. e. tampa)

2. Hit start and type "%localappdata%" (without "" but including the %) and hit enter

3. Go to "THUG Pro/User/Data/Pre/" and extract the three .prx files into this folder

4. Rename them: brun_scripts.prx -> tampa_scripts.prx, burncol.prx -> tampacol.prx and burnscn.prx -> tampascn.prx

5. Go back to the User folder (which contains the Data folder)

6. Put > This < (https://1drv.ms/u/s!Akbf-CZv00SQg2Sjs3mPcgJA4BAS) in there

That's it.

Tampa is just an example, you can do this with any level, just replace every "tampa" with how you want to call the level-files. (including the .level.jason filename, its contents and the three .prx files)

Editing the .level.jason:
Just change line 2 to whatever you want:
Code: [Select]
"level_name": "NameDisplayedInTheLevelSelectMenu",
and replace "tampa" at line 9, 10 and 11
Code: [Select]
    "level_pre": "tampa_scripts.pre",
    "level_scnpre": "tampascn.pre",
    "level_colpre": "tampacol.pre",

I hope this is clear enough, if not, ask away!


Thanks! that worked out pretty well. i just renames the Rampage Skate parks "Burn" to rsp and it loaded up just fine with your JSON file!

also name your .json to whatever the extension is of the level so like rsp.level.json or in the case of Dieselpirat tutorial his would be tampa.level.json
Title: Re: adding custom levels
Post by: Dieselpirat on June 28, 2018, 02:29:40 pm
@NeVeRsOfT
it's json, my bad ;)


@Zeoalexo
Notepad should do, but I recommend using something like Notepad++ or VSCode. Notepad likes to screw up indentations.


@SoulStorm64
Glad I could help!
Title: Re: adding custom levels
Post by: SoulStorm64 on June 28, 2018, 03:31:45 pm
yeah i just needed the format to fiddle with so its much appreciated! getting most of the old levels to load just fine (madtown skatepark had some crazy shadow fickering)

but if you want to use a level that replaces another level like oil rig or foundary i found just replacing these lines if a level has the extension that the custom level originally replaced  like deadmall replaces foundary and it uses "foun" as the extension (I*E* FOUNcol.prx  or oilcol.prx)
       
Code: [Select]
        "scene_name": "oil",
"creator_name": "Unknown",
"level_qb": "levels\\oil\\oil.qb",
"level_scripts_qb": "levels\\oil\\oil_scripts.qb",
"level_sfx_qb": "levels\\oil\\oil_sfx.qb",
"level_thugpro_qb": "levels\\oil\\oil_thugpro.qb
"
     
Title: Re: adding custom levels
Post by: Zeoalexo on June 28, 2018, 03:52:32 pm
yeah i just needed the format to fiddle with so its much appreciated! getting most of the old levels to load just fine (madtown skatepark had some crazy shadow fickering)

but if you want to use a level that replaces another level like oil rig or foundary i found just replacing these lines if a level has the extension that the custom level originally replaced  like deadmall replaces foundary and it uses "foun" as the extension (I*E* FOUNcol.prx  or oilcol.prx)
       
Code: [Select]
        "scene_name": "oil",
"creator_name": "Unknown",
"level_qb": "levels\\oil\\oil.qb",
"level_scripts_qb": "levels\\oil\\oil_scripts.qb",
"level_sfx_qb": "levels\\oil\\oil_sfx.qb",
"level_thugpro_qb": "levels\\oil\\oil_thugpro.qb
"
   

that's why the level isnt showing up for me. im trying to import Streets, but it isnt showing up. what do i change the code to?
Title: Re: adding custom levels
Post by: SoulStorm64 on June 28, 2018, 04:08:56 pm


that's why the level isnt showing up for me. im trying to import Streets, but it isnt showing up. what do i change the code to?

what was the level did it replace? was this streetssanfran from thpsgoat? because depending on what level it replaced before u need to replace them all with the appropriate level name it replaced or else the game will crash. so like if it replaced burn use "scene_name": "burn" instead of "scene_name": "oil" and so on with the level_qb   level_scripts_qb   level_sfx_qb and Level_thugpro_qb like so

(The Highlighted Hoffbowl represents what i changed the original replace level name with something that wont conflict with other custom parks. so if you have 5 levels that replace burnside with the "Burn extension" you can choose what you want it to be like hoffbown_scripts.pre was originally oil_scripts.pre.)

Quote
  {
   "level_name": "Hoffman Skatebowl",
   "scene_name": "oil",
   "creator_name": "Unknown",
   "level_qb": "levels\\oil\\oil.qb",
   "level_scripts_qb": "levels\\oil\\oil_scripts.qb",
   "level_sfx_qb": "levels\\oil\\oil_sfx.qb",
   "level_thugpro_qb": "levels\\oil\\oil_thugpro.qb",
   "level_pre": "hoffbowl_scripts.pre",
   "level_scnpre": "hoffbowlscn.pre",
   "level_colpre": "hoffbowlcol.pre",
   "ambient_rgba": [127, 127, 127, 63],
   "light0_rgba": [127, 127, 127, 63],
   "light1_rgba": [127, 127, 127, 63],
   "light0_position": [0.0, 0.0],
   "light1_position": [0.0, 0.0],
   "FLAG_OFFLINE": false,
   "FLAG_INDOOR": true,
   "FLAG_NOSUN": true,
   "FLAG_DEFAULT_SKY": true,
   "FLAG_ENABLE_WALLRIDE_HACK": true,
   "FLAG_DISABLE_BACKFACE_HACK": false,
   "FLAG_MODELS_IN_SCRIPT_PRX": false,
   "FLAG_DISABLE_GOALEDITOR": false,
   "FLAG_DISABLE_GOALATTACK": false,
   "FLAG_NO_PRX": false,
}
Title: Re: adding custom levels
Post by: Sileighty on June 29, 2018, 10:29:21 am
For some reason, every level has the same skybox. This means New York and even Skate Heaven become day levels. How do you fix that?
Title: Re: adding custom levels
Post by: Sattan on June 29, 2018, 10:33:01 am
the original creator has to re export the maps thru the new tools in order to fix the skybox issue.
Title: Re: adding custom levels
Post by: Zodiac on June 30, 2018, 07:30:39 pm
Hi. I've done everything you guys wrote above and I have a custom level in the list, but as soon as I start it, game crashes. I've tried some different levels with no luck. :(

upd. some attempts later, I got it working. I don't know what caused game crash (maybe .json encoding?) but problem is solved now, lol.
Title: Re: adding custom levels
Post by: J215s on July 01, 2018, 09:14:14 am
So this works perfectly in freeskate, but I get an error if I try to use any custom levels online. Any suggestions?
Title: Re: adding custom levels
Post by: Zodiac on July 01, 2018, 09:46:39 am
So this works perfectly in freeskate, but I get an error if I try to use any custom levels online. Any suggestions?
I think some levels are just not designed for multiplayer. But i can be mistaken...
Title: Re: adding custom levels
Post by: J215s on July 01, 2018, 11:12:35 am
Quote
I think some levels are just not designed for multiplayer. But i can be mistaken...
They worked okay in the older version with the Burnside trick so I don't think that's a problem. Maybe I need to change something in the .json file? Or it could just be a bug.
Title: Re: adding custom levels
Post by: moemudzi on July 01, 2018, 12:32:05 pm
So this works perfectly in freeskate, but I get an error if I try to use any custom levels online. Any suggestions?
I think some levels are just not designed for multiplayer. But i can be mistaken...

I think both players need to have the level with the same date such as name, creator name, etc.
Title: Re: adding custom levels
Post by: Skater1014 on July 01, 2018, 05:05:23 pm
If you're trying to use the new .json system with an older custom level and it throws an error online, it's because the original creator of the level needs to re-export the level and make a .json file compatible with it. There's name conflicts with Burnside (or whatever level it used to replace) in the level scripts which is why it doesn't work online.
So yeah the older custom levels can only be played offline unless the creator updates them to work with the new system.

I know personally all of my levels besides one of them are like that and the Blender plugin heavily changed since those levels were last exported so the level .blend files for each level would need to be edited to work with the new plugin in order to be re-exported correctly.
Title: Re: adding custom levels
Post by: Random Boi on July 01, 2018, 07:12:55 pm
Is there a limit to how many custom levels there are
Title: Re: adding custom levels
Post by: TheAussassin on July 02, 2018, 12:38:49 am
seems every time I try to play the custom level the game immediately crashes
 
Title: Re: adding custom levels
Post by: Zodiac on July 02, 2018, 02:28:19 am
seems every time I try to play the custom level the game immediately crashes
I had the same issue. Try playing offline and rename .prx files from "burn" to something like "custlvl" or whatever u want. Also, don't edit json file, it should be
Code: [Select]
{
"level_name": "custlvl",
"scene_name": "burn",
"creator_name": "Unknown",
"level_qb": "levels\\burn\\burn.qb",
"level_scripts_qb": "levels\\burn\\burn_scripts.qb",
"level_sfx_qb": "levels\\burn\\burn_sfx.qb",
"level_thugpro_qb": "levels\\burn\\burn_thugpro.qb",
"level_pre": "custlvl_scripts.pre",
"level_scnpre": "custlvlscn.pre",
"level_colpre": "custlvlcol.pre",
"ambient_rgba": [127, 127, 127, 63],
"light0_rgba": [127, 127, 127, 63],
"light1_rgba": [127, 127, 127, 63],
"light0_position": [0.0, 0.0],
"light1_position": [0.0, 0.0],
"FLAG_OFFLINE": false,
"FLAG_INDOOR": true,
"FLAG_NOSUN": true,
"FLAG_DEFAULT_SKY": true,
"FLAG_ENABLE_WALLRIDE_HACK": true,
"FLAG_DISABLE_BACKFACE_HACK": false,
"FLAG_MODELS_IN_SCRIPT_PRX": false,
"FLAG_DISABLE_GOALEDITOR": false,
"FLAG_DISABLE_GOALATTACK": false,
"FLAG_NO_PRX": false,
}

ALSO! If you made a level by yourself, you should name it "burn" in blender at export. You can rename it later.
Title: Re: adding custom levels
Post by: TheAussassin on July 02, 2018, 03:45:07 am
I had the same issue. Try playing offline and rename .prx files from "burn" to something like "custlvl" or whatever u want.
I appreciate the response however I was using the new level from Skater1014 which seems to be for this new custom level system, I have it appearing in the game menu but selecting it still crashes the game straight away.
Now that I think about it, it could be that it used to use the old replacing Burnside method and something went wrong while porting it.
In case it isn't blatantly obvious, I'm not a level maker of any kind so I'll use that as an excuse if I seem..bit dumb
Title: Re: adding custom levels
Post by: NeVeRsOfT on July 02, 2018, 04:26:44 am
Is there a way to add level portraits/level select images? :o
Title: Re: adding custom levels
Post by: J215s on July 02, 2018, 09:26:17 am
If you're trying to use the new .json system with an older custom level and it throws an error online, it's because the original creator of the level needs to re-export the level and make a .json file compatible with it. There's name conflicts with Burnside (or whatever level it used to replace) in the level scripts which is why it doesn't work online.
So yeah the older custom levels can only be played offline unless the creator updates them to work with the new system.

I know personally all of my levels besides one of them are like that and the Blender plugin heavily changed since those levels were last exported so the level .blend files for each level would need to be edited to work with the new plugin in order to be re-exported correctly.
Would that be something that could possibly be fixed in a future update or is re-exporting everything the only option? I guess for now we can still just stick with replacing the Burnside files for online games.
Title: Re: adding custom levels
Post by: Skater1014 on July 03, 2018, 03:52:31 am
I had the same issue. Try playing offline and rename .prx files from "burn" to something like "custlvl" or whatever u want.
I appreciate the response however I was using the new level from Skater1014 which seems to be for this new custom level system, I have it appearing in the game menu but selecting it still crashes the game straight away.
Now that I think about it, it could be that it used to use the old replacing Burnside method and something went wrong while porting it.
In case it isn't blatantly obvious, I'm not a level maker of any kind so I'll use that as an excuse if I seem..bit dumb
You know which level it was? They all load fine for me with the new system.

If you're trying to use the new .json system with an older custom level and it throws an error online, it's because the original creator of the level needs to re-export the level and make a .json file compatible with it. There's name conflicts with Burnside (or whatever level it used to replace) in the level scripts which is why it doesn't work online.
So yeah the older custom levels can only be played offline unless the creator updates them to work with the new system.

I know personally all of my levels besides one of them are like that and the Blender plugin heavily changed since those levels were last exported so the level .blend files for each level would need to be edited to work with the new plugin in order to be re-exported correctly.
Would that be something that could possibly be fixed in a future update or is re-exporting everything the only option? I guess for now we can still just stick with replacing the Burnside files for online games.
For now re-exporting is the only option. Idk if it's even possible for the devs to fix in an update since it's a name conflict but it would be nice.
Title: Re: adding custom levels
Post by: TheAussassin on July 03, 2018, 04:54:17 am
You know which level it was? They all load fine for me with the new system.
it was city escape
Update: After some very scientific testing (I tried them a couple times) out of all the levels (that mention json) that crash right away are: City Escape, Delfino Plaza and Subway Bell Subway. The rest work an absolute dream
Title: Re: adding custom levels
Post by: Skater1014 on July 03, 2018, 03:15:13 pm
You know which level it was? They all load fine for me with the new system.
it was city escape
Update: After some very scientific testing (I tried them a couple times) out of all the levels (that mention json) that crash right away are: City Escape, Delfino Plaza and Subway Bell Subway. The rest work an absolute dream
Did you put the "models" folder that they come with in Thugpro's "data" folder?
That might be why it's crashing if you didn't, those levels use custom ped models and if the game can't find them it crashes.
Title: Re: adding custom levels
Post by: TheAussassin on July 03, 2018, 09:39:32 pm
Did you put the "models" folder that they come with in Thugpro's "data" folder?
That might be why it's crashing if you didn't, those levels use custom ped models and if the game can't find them it crashes.
that was exactly it, I didn't put them in at first because I didn't know if I'd end up seeing Yoshi kicking about in Los Angeles and such but after putting them in it worked perfectly. Mucho thanks.
Title: Re: adding custom levels
Post by: Skater1014 on July 04, 2018, 10:12:55 pm
Did you put the "models" folder that they come with in Thugpro's "data" folder?
That might be why it's crashing if you didn't, those levels use custom ped models and if the game can't find them it crashes.
that was exactly it, I didn't put them in at first because I didn't know if I'd end up seeing Yoshi kicking about in Los Angeles and such but after putting them in it worked perfectly. Mucho thanks.
No problem, lol yeah you shouldn't see that since they don't replace anything.