Talk:Wiimms SZS Tools

From Custom Mario Kart
Jump to: navigation, search

misc

@wimm Can you make the Yaz0 compression page?
I can't find out how it works...
kHacker35000vr 17:04, 6 April 2011 (CEST)
Yes, it's already planned, At the moment I make the U8. Perhaps my sources may help:
Do you need it now?
Wiimm 22:17, 6 April 2011 (CEST)

I have noticed that you can't shift kmp points without encoding or decoding files, this can be very annoying. Maybe you can add a function for this.
kHacker35000vr 21:26, 1 January 2012 (CET)

Do you mean the new options --shift -scale .... ?
For them there is no decoding needed.
Wiimm 22:18, 1 January 2012 (CET)
I have tested alot of things but didn't manage to do without decoding, I'm not used to barch scripts at all but at least it worked.
kHacker35000vr 00:45, 2 January 2012 (CET)
Again: Do you mean the new options --shift -scale .... ?
If not: What do you mean exactly?
Perhaps this may help. If I work with a track, I have extracted it with "wszst extract --decode". After editing the KMP text file I create a new szs with "wszst create track.d --overwrite --fast" and a second later the file track.szs is ready. A second script put the track in an already extracted ISO image, patch the track names in the BMG files, and create and copy a new image to my WBFS drive. This takes about 40 seconds. And then I'm ready to test & play directly on my wii.
Wiimm 01:08, 2 January 2012 (CET)
Forgot to say, I use the --shift command and I didn't have to decode it to txt file. I used wkmpt DECODE course.kmp --shift x,y,z but it would be handier if there was a way just to edit the kmp without decoding to .txt.
kHacker35000vr 11:23, 2 January 2012 (CET)
Then read this and use "wkmpt encode ..." as explained here. And don't worry about encode/decode: Both commands read both file types (binary+text) and only the output is encoded (binary) or decoded (text).
Wiimm 12:36, 2 January 2012 (CET)
For some reason my kmp froze after using your tool, could you look at my kmp? here, I can't find any error
kHacker35000vr 14:46, 2 January 2012 (CET)
Please give the the track before modifying too. Wiimm 16:02, 2 January 2012 (CET)
Here's the whole track: [1]
kHacker35000vr 16:09, 2 January 2012 (CET)
Was the freeze there before shifting? If yes: Please give me the KMP from before.
Wiimm 17:40, 2 January 2012 (CET)
Got it!
I havechanged 2 things in 1 turn:
  • It was either that some enemy points are to close together (I know this problem for item points).
  • Or it was (more possible) the mandatory checkpoints:
    • Sections 2+3 are parallel, but only section 3 has a point with mode==4
    • Section 6 has out of order point with mode==2
Here is my KMP.
Wiimm 18:36, 2 January 2012 (CET)
The course still freezes before loading, and because I used the kmp of the orginal model it should work fine. The only thing outside the szs modifier I did was shifting the points.
kHacker35000vr 20:35, 2 January 2012 (CET)
Did you see my second message: I got it! Wiimm 21:17, 2 January 2012 (CET)
I have downloaded the one you gave in the link, I assumed that it was the fixed one. --kHacker35000vr 21:46, 2 January 2012 (CET)
I have tested it again without freeze. Here is the complete track. The zip files contains 2 versions: In one I have removed all invalid objects with ID 0. No problems with both tracks (tested on a Wii).
Wiimm 23:22, 2 January 2012 (CET)
It's still not loading, not on the wii and not on dolphin. It couldn't be the slot because I have replaced ridgehighway_course as it should. Which mode do you use when testing?
kHacker35000vr 10:55, 3 January 2012 (CET)
I'm used slots 3.1 and 3.2 (star cup) for the tests. I haven't tried he special slot 4.2 (moonview), because many tacks freeze here.
Wiimm 10:59, 3 January 2012 (CET)
Did you create your console with Visual C# 2010 Express using C Sharp? And could you send me the .cs file? Thanks. --HackSizer 08:48, 7 April 2012 (CEST)
I use POSIX/GNU C, and fpr Windows Cygwin. The code is GPL2, you can find it here: http://opensvn.wiimm.de/viewvc/wii/trunk/wiimms-szs-tools/
There is no special code for the console.
Wiimm 09:45, 7 April 2012 (CEST)

KCL Tool Bugs

Recently I've been experiencing some issues with your KCL Tools. Using the current version of your Tools to lower the walls in my KCL, it added a fall boundary that had not existed before in the KCL Model I created (I have checked several times). See this: [2] (Skip to around 2:50). It caused my course to have a lap count failure because that fall boundary is by a check point that re-spawns you ahead. It is normally impossible to perform this, because there was never anyway to respawn at that point. I don't know what could have caused this issue, but I thought that I should let you know since this only occur ed after I ran it through the wkclt.--SuperMario64DS 16:48, 18 June 2012 (UTC)

If you lower the walls it is possible, that a hidden fall boundary is now "visible". Please send me the KCL before lowering the walls for analysis.
btw: The track is now much better.
Wiimm 18:49, 18 June 2012 (UTC)
Thanks! You can just use the KCL that already exists on the track, as that is the same KCL but without lowered walls (And I did use the lower wall script for the bad KCL). Hopefully this problem will be resolved soon, it's such a useful feature. --SuperMario64DS 21:20, 18 June 2012 (UTC)
But I need the KCL before lowering the walls to compare it and to found the bug, if it is a bug.
Wiimm 15:27, 19 June 2012 (UTC)
I had quickly updated the download with a KCL Fix before anybody could download it (Although it shows that about 4-5 got it before then). That KCL is just like the one I had before I fixed the walls, so it should work (Although it has one extra face). I remember awhile back I had the same issue when simply running the KCL I made through your tools, on the first bridge there was a random fall boundary to the right of the bridge, even if one did not exist in the model. If you'd like the tools that I made the KCL with, then ask Chadderz. It's a debugged version of the CTools KCL Editor. Oddly enough, it also had a similar bug thag adds an invisible wall that I cannot delete, so I tried to use your tools to fix it which instead added the fall boundary in a different area. I no longer have the original KCL I made before then in KCL Form, but I do have it in OBJ form, and if you'd like, I can generate a KCL using the tools I used to re-create the KCL prior to the fall boundary. Somebody I know was also one of th original few to end up with the bad KCL, so I can get that for you as well. --SuperMario64DS 15:43, 19 June 2012 (UTC)
And here are the results of my analysis:
My tools aren't buggy, but your KCL is it. Let me explain it:
  • Per definition a floating point variable can hold more the the usual values. NAN, -NAN (not a number), INF and -INF (infinitive) and also -NULL.
  • In your KCL there are 10 triangles with length NAN, 5 are "fall boundary". The internal handling didn't expect such invalid data and the fall boundary becomes active.
Solution: Use my next release, which which is more sensible on this, and drop this invalid data. Or you can use this new KCL.
Wiimm 14:00, 22 June 2012 (UTC)

V1.17 BUG

The Tools can scale Model,KCL,KMP,VRCORN and the minimap but it can´t scale the Objects´s KCL. They stay where they were in the original.(Mushroom Gorge & Bowser Castle) --Rukasudo90 18:51, 24 April 2013 (GMT)

How did you test it? Have you enabled the scaling of objects kcl?
http://szs.wiimm.de/opt/patch-file
Wiimm (talk) 22:12, 24 April 2013 (UTC)

DS KCL/NKM support?

Is it possible to add support for converting DS KCL files and/or NKM files to MKWii KCL and KMP files? Alternatively, is there any tool that can read DS KCL files and export OBJs of them? --PretendingToBePro (talk) 00:30, 13 February 2014 (UTC)

Can't answer that, because I have never analysed DS files (doesn't own the game) -- Wiimm (talk) 15:45, 13 February 2014 (UTC)
[3] and [4]. It will be an interesting project for me to write aa nkm-to-kmpTXT converter myself. --PretendingToBePro (talk) 18:05, 14 February 2014 (UTC)

BRRES Problem (Vertices)

How do I reduce the number of vertices in both the map_model and vrcorn_model?

VerticesHintPlusWarningWiimmsSZSTools.jpg

--Michael (talk) 15:13, 26 April 2014 (UTC)

Not with my tools, they count only. The number of vertices is only a hint for possible problems. Best is to ask Torran or Tock.
Wiimm (talk) 15:31, 26 April 2014 (UTC)
You should simplify the minimap. Also there is no reason anymore to have a vrcorn_model.brres with over 200 vertices. Animation should be made without using Nintendo files as a base file.
Tock (talk) 16:59, 26 April 2014 (UTC)
Nevermind it now. I was trying to fix the GCN Wario Colosseum KCL grid effect bug, and during that time, I ended up with that message during development. I solved the vrcorn_model problem by porting the sky from Double Dash. I cancelled the bug-fixing development, but Tock, thanks for the advice. And Wiimm: Will these be in a future update? --Michael (talk) 17:53, 26 April 2014 (UTC)

WCTCT Problem

How do i fix this problem? Screen Shot 2015-08-12 at 9.03.15 pm.png

When I attempt to make a CTGP_CODE file, the terminal returns this. Is there something wrong with the syntax? https://drive.google.com/file/d/0B7accbUeEbSfWDlxSTdfTHZBczQ/view -- Kingjt24 (talk) 07:37, 19 August 2015 (UTC)

Yes. Have many bugs in syntax, you can contact with me to solve it. --MrDark35000vr (talk) 18:32, 19 August 2015 (UTC)
The quotes are wrong. This leads into syntax errors. Don't use a text processor like Word. Better are real source code editors like notepad++.
-- Wiimm (talk) 15:29, 20 August 2015 (UTC)
Thanks anyway Wiimm, but MrDark35000vr resolved the problem. -- Kingjt24 (talk) 01:31, 22 August 2015 (UTC)
One question, what formatting language do you edit the CT-TEXT files in? -- Kingjt24 (talk) 06:35, 22 August 2015 (UTC)
What do you mean with "formatting language"?
wctct (like the other SZS tools) use a simple self made text interpreter with expressions and preprocessor like instructions.
-- Wiimm (talk) 07:32, 22 August 2015 (UTC)
Is it possible for anyone to help with a problem. When i should be seeing the strap screen for my CT distribution, i get a black screen with EXCEPTION (DSI) OCCURRED. I know it could be any number of things but what is the most likely cause? -- Kingjt24 (talk) 05:02, 23 August 2015 (UTC)

Region Patching

For some reason, when I type 'wstrt PATCH StaticR.rel --region 584' into cmd it always says 'File not modified, STATR:StaticR.rel' I've also tried -o for overwrite, it did nothing. Checking it via ANALYZE just shows it's region and the fact that I changed the URLs. Does anyone know how to fix? --PokemonAcer

Try with wszst patch region=584 StaticR.rel --MrDark35000vr (talk) 14:51, 24 August 2015 (UTC)
That didn't work... --PokemonAcer
Known Bug. See here (change log) and here (bottom: workaround).
-- Wiimm (talk) 15:29, 24 August 2015 (UTC)

NTSC-K support?

I attempted to patch a Korean main.dol using these tools, but here is what I got: http://prntscr.com/98dmhj

I realize that not a lot of Koreans play mkw anymore (in fact, I found out today that 8 Koreans are on wiimmfi). Of those, 1, Aiden, said he definitely would play my distribution if it has NTSC-K support. I have yet to hear from the others, however. In any event, I really believe that, just like wiimmfi, anyone deserves a chance to play on my MKW Hack Pack, even if it is just one person, and I think it would be such a shame if they're not able to simply because they have an unsupported region.

So, my questions are: Is there anything I'm doing wrong with the code? Or did you simply not see the need to add the support? If the second question is yes, I want to know if you want to add the support for these players so that they can play on my distribution, it's rather important to me. Huili (talk) 18:25, 29 November 2015 (UTC)

2 steps are needed to include Korean support:
  • Here you find the most current CT-Code: https://github.com/Wiimm/wii-ct-code Adapt it to Korean version. Especially the file rmck.ld must be created.
  • Then I can extend my tools to accept Korean CTCODE. Since some versions my tools accept external CTCODE sources, so that you (or any developer) can create and test new CTCODE without my help.
-- Wiimm (talk) 21:52, 29 November 2015 (UTC)
One addition to Wiimms comment if you plan to port the CTCODE: Only (not especially) the file rmck.ld must be created, the other files must stay as they are (no change). -- Leseratte (talk) 06:02, 30 November 2015 (UTC)
The main Makefile needed also attention. But now I have edited it and enabled rmck support:
  • make rmck creates the korean files, if rmck.ld exists.
  • make all creates all but not korean files.
So your job is:
  1. Ask me for rmck support of my tools
  2. Clone the repository
  3. Create/Update rmck.ld
  4. Call: make rmck
  5. Test it
  6. Repeat steps 3 to 5 until all bugs are fixed.
  7. Give me rmck.ld.
-- Wiimm (talk) 08:45, 30 November 2015 (UTC)
I have implemented RMCK support now. Therefore external bin files must be available.
-- Wiimm (talk) 19:35, 30 November 2015 (UTC)
The new SZS Tools support Korean now. Only rmck.ld is missing now (not my job).
-- Wiimm (talk) 17:27, 11 December 2015 (UTC)

Wiimms Audio Tools?

Has Wiimm, or anyone thought about adding audio tools to this awesome toolset?

Never thought about it. -- Wiimm (talk) 09:50, 8 February 2016 (UTC)
This is a good idea! I have been studying the BRSAR format myself and if we learn enough about it, it could be possible to make entire BRSAR files from scratch. I want to see this in the near future. Aplumafreak500 (talk) 18:31, 8 February 2016 (UTC)
Then create the page BRSAR (File Format) -- Wiimm (talk) 22:53, 8 February 2016 (UTC)

Created rmck.ld

Hello. I'm Korean, I'm not good at English.

I created rmck.ld, But can't ported playerBase, playerDataUNK from NTSC-K..i need your help..I think you can do it! How can i give rmck.ld to you?

I have no experience ins this. Maybe Leseratte can help. However, please post or send me the file.
-- Wiimm (talk) 19:22, 16 February 2016 (UTC)
If there are only a few offsets missing I can probably port those myself. I just didn't want to spend a lot of time porting all of those offsets. Post a link to the file (as Wiimm has already said) and I'll see. -- Leseratte (talk) 19:57, 16 February 2016 (UTC)

https://drive.google.com/open?id=0B0465_dHk3VPcEdSR09qN1BldVU <- rmck.ld I think you can do it!


And I tried to make rmck..but i had this error.


RMCK Error.PNG

Sorry to bother you..can you support rmck if make rmck.ld to succeed?(Wiimms MKW Fun)

Scale one file inside a SZS?

Is it possible to only scale one file inside a SZS? When I edited a KMP file and want to test it, I need to scale it and then I scale it inside a SZS, I scale everything that is already scaled and then I need to replace all those files. And scaling the KMP doesn't work when using:

wszst patch course.kmp --scale 11.1

Wexos (talk) 10:22, 21 February 2016 (UTC)

--pfile KMP and maybe --tkmp <list> for a finer selection -- Wiimm (talk) 10:59, 21 February 2016 (UTC)
Thanks.
Wexos (talk) 11:25, 21 February 2016 (UTC)

Hack Pack Update

Regardless of what happens with regards to wiimmfi and your personal life, my update will come out on April 18th. But I was wondering if you can make the following updates or if they're already out.

  1. Disable worldwide. (not sure if this is done yet, just thought I'd ask).
  2. Enable first 8 cups on regionals.
  3. Fix the after 18th item is a mushroom bug.
  4. Inject lap and speed modifier into main.dol.
  5. Reduce the shrink time from a thundercloud.

Also, I got some suggestions for you, if you're willing to do them and have the time:

  1. 2nd player online gets VR.(don't know if this is hard coded or not).
  2. Mii heads on minimap from CTGP.
  3. Force checkpoints.
  4. Keep all items if you fall (but still lose them if you get shocked, mega'd, powed).
  5. Guru cheat code detection (not sure if this has been done or not or if it's even possible).
  6. Basically, anything close to being ignorance is bliss.
  7. Fake item box cracking like a shell on contact.

Not sure where to put some of these suggestions, or if wszst can do all of this. I just thought I might as well post it all here and you could tell me what can be done with the tools and what can't be done. I also just want to let you know that if none of this can be done before my April 18th deadline, that's ok, as I will be updating the pack again and releasing it on December 18th, which I think is more than enough time for you to do as much as you can, so no presure there! Huili (talk) 21:48, 4 April 2016 (UTC)

Enabling the first 8 cups can be done by recompiling the CTCODE from source with the right parameter (ENABLE_FILTER = 0). You can add cheat codes to the main.dol with the option --add-section (http://szs.wiimm.de/wstrt/cmd-patch.html#dol) (18th item bugfix, lap/speed mod, thundercloud mod, force checkpoints, don't loose items, Miis on Minimap [if all of them are publicly released which I'm currently not sure). Though "Miis on Minimap" needs a bit of work to not break offline modes (where the CPUs are invisible on the map because they have no Mii).
2nd player gets VR is definitely hard-coded. The protocol does not support it, and the game neither, you would need a way to select two licenses at once; so I don't think that is doable. I'm not sure what you mean with "Guru cheat code detection"; but I don't think we'll add something like IIB to the game (unless the CTGP IIB patch will be released). That would be a bunch of work, while you can just use mkw-ana to detect cheaters; which also has the advantage of generating the proof file (network dump) itself.
Leseratte (talk) 04:11, 5 April 2016 (UTC)
The first 5 points are already available. Give me some days I will give you the needed files. And if you tell me the region, I enable a region protection too.
Is there a way to send you private messages? Easiest for me (plus Leseratte) is a discussion at forum.wii-homebrew.com
-- Wiimm (talk) 09:46, 7 April 2016 (UTC)

Missing rmck/boot_code.bin

Rmck.PNG

how to fix..? -- Aiden (talk) 13:23, 9 April 2016 (UTC)

  • checkout my github
  • make rmck
  • --ct-dir /path/to/szs-tools
  • Verify it (untested by me)
-- Wiimm (talk) 13:33, 9 April 2016 (UTC)
Ct-dir.PNG
Sorry..is this right? -- Aiden (talk) 08:15, 10 April 2016 (UTC) --
You probably also need the "--add-ctcode" parameter -- Leseratte (talk) 09:28, 10 April 2016 (UTC)
Error.PNG
what is wrong with command? -- Aiden (talk) 11:04, 10 April 2016 (UTC)
Does the file "wii-ct-code-master/szs-tools/rmck/boot_code.bin" exist? If not, were there any errors in the output of "make rmck"? -- Leseratte (talk) 11:27, 10 April 2016 (UTC)
@Aiden
I sent you a private message at Wii-Homebrew.
-- Wiimm (talk) 15:47, 10 April 2016 (UTC)

SLOTS

With the new discovery on slot 4.2, you could improve the SLOTS command by making it check for those material names in the course_model.brres.
--maczkopeti (talk) 20:37, 26 May 2016 (UTC)

Good work! It's now at my to-do list. -- Wiimm (talk) 21:28, 26 May 2016 (UTC)

--scale

I am trying to scale my KCL. I haven't got it to work, I fall through the road. When decoding it I see that it is scaled too large. So I tried to check what scale the KCL got scaled with. I want it to be scaled with 14.4. I also tried other values.
--scale 14.4 = 207.36
--scale 2 = 4
--scale 3 = 9

So when I put --scale 14.4 it is actually scaled with 207.36 which equals 14.4 * 14.4. When I put --scale 3 it is scaled with 9 which is equals 3 * 3. This sounds really weird but it's the only solution that I have. Is this a bug or am I totally wrong?
Wexos (talk) 13:01, 6 June 2016 (UTC)

If you say --scale 3, all 3 dimensions are scaled by 3. So the total scale is 3x3x3.
If you fall through after scaling, i think there was a small hole, that is scaled too.
Please send me your unscaled kcl + the scaled one for an analysis and tell me the coordinates of the problematic place.
-- Wiimm (talk) 19:10, 6 June 2016 (UTC)
I want to scale the KCL file 14.4 in all dimensions. I'm ripping the original KCL file and I want to scale it so it fits MKW. Here is the two KCL files. I have decoded the scaled one and imported it to 3ds Max. One point in the unscaled KCL is -1275.789, -50.0, 200.0. The same point in the scaled KCL is -264568.563, -10368.0, 41472.0. That is 207.36 times bigger in each dimension. I want it to be 14.4 times bigger in each dimensions.
Wexos (talk) 13:39, 7 June 2016 (UTC)
Indeed, the transformation function is called twice. This is an error since v1.49a. -- Wiimm (talk) 17:28, 7 June 2016 (UTC)
I found the bug. It was a forgotten test line. As workaround use: wkclt COPY source -d dest.kcl
-- Wiimm (talk) 17:44, 7 June 2016 (UTC)
Okay.
Wexos (talk) 19:41, 7 June 2016 (UTC)

Function

Could you add this function so it gets created when using wkclt CFF? It is for Fall Boundary.

@function i # (type,z,index)
	@return $1 & 0x1F 	# type (5 bits)
	> | ( $2 & 7 ) << 5 	# Z (3 bits)
	> | ( $3 & 0xFF ) << 8  # Index (8 bits)
@endfunction

Wexos (talk) 10:35, 25 June 2016 (UTC)

done -- Wiimm (talk) 11:32, 25 June 2016 (UTC)
is this for example for calculating several pochas with different indices? Like what i asked Wexos in PM? --Sucht93a (talk) 11:40, 25 June 2016 (UTC)
Yes. It's a function for some fall boundary variants, like the variant for pocha and for pochaYogan. Now when I look at those objects on the KMP Object Query the setting 1 is not correct.
Wexos (talk) 17:21, 27 June 2016 (UTC)

Tool wctct and music slot settings

On the page http://szs.wiimm.de/info/ct-code.html, slot xLC (0x75) is described as:

Music ID of a music title not used in the game. Probably the title was designed for Luigi Circuit.

As Miles5x5's CT Pack proves, this slot is used in-game, but its entry is set to the same music as Mario Circuit (and can be set to something else via editing revo_kart.brsar). So what I'm asking, is that the keyword "LC" be set to this ID instead of 0x7d (which is the ID for Mario Circuit).

How Mario Kart Wii decides which music ID corresponds to which song is determined by the InfoIndex setting inside each file in the BRSAR. InfoIndex 117 (0x75) maps to BRSAR file STRM_N_CIRCUIT1_N and is set to load the Mario Circuit BRSTM. Likewise, InfoIndex 125 (0x7d) loads Mario Circuit's slot at STRM_N_CASTLE_N. It even works with non-track music - Infoindex 84 (0x54) loads the title screen music. Theoretically, that ID can be loaded as track music thanks to CTGP_CODE. (Of note, 1 plus that InfoIndex is loaded as final lap music, so for Galaxy Arena (0xc9), the final lap music is slot 0xca, which is the Winning Run music.) So, the files in the BRSAR can be changed to load another song (similar to how people change the SEQ_O_EARTH file to load an arbitrary BRSTM as Wi-Fi music). Miles5x5's CT Pack changed it to load the Block Plaza BRSTM, and it works in-game. I have also done some experimentation myself and managed to load a completely new BRSTM for Luigi Circuit by adding new BRSAR slots.

It's also worth noting that InfoIndex (music IDs) can:

  • Be added to the BRSAR thanks to a recent update of BrawlBox, theoretically allowing for customized songs for Custom Tracks.
  • Are 16-bit integers, and possibly even 24 or 32 bit.
  • Can be changed.

So, in conclusion: Music slot logic should be changed in wctct to support these points.

Aplumafreak500 (talk) 19:54, 13 January 2017 (UTC)

Thanks for info. I put in to my to-do list (doing Wiimmfi and mkw-ana stuff in the next weeks). -- Wiimm (talk) 22:09, 13 January 2017 (UTC)

Help

How do I install this for windows 10?--Littlelum (talk) 01:52, 22 March 2017 (UTC)