kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
352 stars 108 forks source link

Editing VAR values #230

Closed motoxfreak207 closed 2 years ago

motoxfreak207 commented 2 years ago

Mostly its just a question because I haven't been able to find an answer anywhere. I have edited the starters in sword and changed the appropriate static encounters, trainers teams, etc. However, I can't figure out how to find and edit the options available for VAR values in Scripts and Common. I have tried everything I can think of and looked everywhere I can think of for an answer to no avail. Any assistance in pointing me in the right direction would be very much appreciated as I have hit a dead end. Screenshots included. Screenshot 2022-09-11 203049 Screenshot 2022-09-11 203127 Screenshot 2022-09-11 203248 Screenshot 2022-09-11 203420 Screenshot 2022-09-11 203448

kwsch commented 2 years ago

Nobody took the time to document what each var code is for SW/SH

motoxfreak207 commented 2 years ago

So there is currently no way to change what is displayed by the var script?

kwsch commented 2 years ago

There is no table for SW/SH. Someone would have to create the new table and label each var code they want to be recognized.

https://github.com/kwsch/pkNX/blob/86cf8027ca70ad4c0a4a528491a50812bdf7f920/pkNX.Structures/Text/TextVariableCode.cs#L16-L31

motoxfreak207 commented 2 years ago

Would that be hard to do? and if it's not hard but just tedious, would that be something that can be added to pknx via c#? i dont mind learning if it can be done but i dont know where i would start

kwsch commented 2 years ago

download github desktop

fork the pkNX repo to your own account so you can make changes

Install Visual Studio Community Edition

Install .NET Framework SDK

Open the sln, Build->Rebuild All

Edit the linked cs file shown above, to do something similar as the other games

Add a new line for each text var code alias that should be shown instead of the raw ID

build program and run, verify changes were made

make a new commit

make a new pull request for that commit