Modify Skills

Non Compliant

Warning! Making these changes in the Shadows Cooperative codebase (SoI Engine) will render your codebase non-compliant with the existing repo. There are plans to modify this in the future to allow administrators to change languages on the fly. -Nim

 

Step-by-step guide

 

When adding, re-naming or removing a skill you must take extreme care to follow all the rules below. There are four (4) places that you will need to make changes and it is important that you do it correctly.

  1. Modify the define statement in structs.h (around line 1360) - Don't forget to change the LAST_SKILL value if you're adding skills to the end of the list!

  2. Modify the 'add_registry' lines in handler.cpp (around line 5220)

  3. Modify the constant in constants.cpp (around line 240)

  4. Modify the OV/LV/CAP entries in the REGISTRY file, which is found under tp, bp or pp i.e. tp/regions/registry.

 

Be super careful to use the exact same spelling throughout ALL of these changes. Also, make sure that the skills are all in the exact same order across all four files. You can get away with some differences within handler.cpp, but I would not recommend it.

Of course you will have to recompile before testing, so don't forget.

It is recommended that prior to rebooting you remove ALL skills from your character and then reboot. Upon successful reboot you can apply all skills to your character again for testing. Use "mset noskills" and "mset allskills" to make these changes.

If you have a lot of changes to make with skills, I recommend taking your time and making one change at a time and then recompile, reboot and test before you move on.

Once you have everything working on the test port, you can copy the new registry file to the bp/regions and pp/regions directories and perform a binary swap from each port. The command 'swap binary' from the appropriate port will copy the compiled version of your test port server over. You'll have to reboot (shutdown reboot) and then test again.

I highly recommend that you get your complete skill list figured out prior to opening for play, as removing a skill from hundreds of players can be quite taxing if you feel you need to remove one in the future. Adding a skill, of course is quite painless, while renaming one can cause a lot of headaches.

I also recommend leaving in place all existing skills that are used throughout the codebase, even if you don't think you'll use them. The overhead required to leave them is minimal and far offsets the cost of possible problems you may run into by removing an existing skill that is an important part of the code.

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Copyright 2015 Shadows of Isildur